Multi-core Hash Joins
Main-memory hash join implementations for multi-core CPUs
src
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
20
typedef
struct
bucket_t
bucket_t
;
21
typedef
struct
hashtable_t
hashtable_t
;
22
typedef
struct
bucket_buffer_t
bucket_buffer_t
;
23
24
#if PADDED_BUCKET==0
31
struct
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 */
43
struct
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
53
struct
hashtable_t
{
54
bucket_t
* buckets;
55
int32_t num_buckets;
56
uint32_t hash_mask;
57
uint32_t skip_bits;
58
};
59
61
struct
bucket_buffer_t
{
62
struct
bucket_buffer_t
* next;
63
uint32_t count;
64
bucket_t
buf[
OVERFLOW_BUF_SIZE
];
65
};
66
69
#endif
/* NPO_TYPES_H */
BUCKET_SIZE
#define BUCKET_SIZE
Definition:
npj_params.h:19
OVERFLOW_BUF_SIZE
#define OVERFLOW_BUF_SIZE
Definition:
npj_params.h:29
CACHE_LINE_SIZE
#define CACHE_LINE_SIZE
Definition:
npj_params.h:24
bucket_buffer_t
Definition:
npj_types.h:61
bucket_t
Definition:
npj_types.h:31
hashtable_t
Definition:
npj_types.h:53
tuple_t
Definition:
types.h:45
types.h
Provides general type definitions used by all join algorithms.
Generated on Tue Oct 4 2022 15:20:47 for Multi-core Hash Joins by
1.9.4