1/*
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 *
6 * Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
7 */
8
9#ifndef GDK_IMPS_H
10#define GDK_IMPS_H
11
12/*
13 * the cache dictionary struct
14 */
15typedef struct {
16 unsigned int cnt:24, /* cnt of pages <= IMPS_MAX_CNT */
17 repeat:1, /* repeat flag */
18 flags:7; /* reserved flags for future */
19} cchdc_t;
20
21/* hard bounds */
22#define IMPS_MAX_CNT ((1 << 24) - 1) /* 24 one bits */
23#define IMPS_PAGE 64
24
25/* auxiliary macros */
26#define IMPSsetBit(B, X, Y) ((X) | ((uint##B##_t) 1 << (Y)))
27#define IMPSunsetBit(B, X, Y) ((X) & ~((uint##B##_t) 1 << (Y)))
28#define IMPSisSet(B, X, Y) (((X) & ((uint##B##_t) 1 << (Y))) != 0)
29
30#endif /* GDK_IMPS_H */
31