Multi-core Hash Joins
Main-memory hash join implementations for multi-core CPUs
npj_types.h
Go to the documentation of this file.
1
10#ifndef NPO_TYPES_H
11#define NPO_TYPES_H
12
13#include "types.h" /* tuple_t */
14
20typedef struct bucket_t bucket_t;
21typedef struct hashtable_t hashtable_t;
22typedef struct bucket_buffer_t bucket_buffer_t;
23
24#if PADDED_BUCKET==0
31struct bucket_t {
32 volatile char latch;
33 /* 3B hole */
34 uint32_t count;
35 tuple_t tuples[BUCKET_SIZE];
36 struct bucket_t * next;
37};
38#else /* PADDED_BUCKET: bucket is padded to cache line size */
43struct bucket_t {
44 volatile char latch;
45 /* 3B hole */
46 uint32_t count;
47 tuple_t tuples[BUCKET_SIZE];
48 struct bucket_t * next;
49} __attribute__ ((aligned(CACHE_LINE_SIZE)));
50#endif /* PADDED_BUCKET */
51
54 bucket_t * buckets;
55 int32_t num_buckets;
56 uint32_t hash_mask;
57 uint32_t skip_bits;
58};
59
62 struct bucket_buffer_t * next;
63 uint32_t count;
65};
66
69#endif /* NPO_TYPES_H */
#define BUCKET_SIZE
Definition: npj_params.h:19
#define OVERFLOW_BUF_SIZE
Definition: npj_params.h:29
#define CACHE_LINE_SIZE
Definition: npj_params.h:24
Definition: types.h:45
Provides general type definitions used by all join algorithms.