-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbufradixsort_config.h
66 lines (53 loc) · 1.73 KB
/
bufradixsort_config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef BUFRADIXSORT_CONFIG_H
#define BUFRADIXSORT_CONFIG_H
/* extensions */
#if defined(__INTEL_COMPILER)
#define ALIGNED(multiple) __attribute__((aligned(multiple)))
#define ASSUME_ALIGNED(ptr, multiple) __assume_aligned(ptr, multiple)
#define NOINLINE __attribute__((noinline))
#define LIKELY(x) __builtin_expect(!!(x), 1)
#define UNLIKELY(x) __builtin_expect(!!(x), 0)
#define PREFETCH(ptr, rw, loc) __builtin_prefetch(ptr, rw, loc)
#elif defined(__GNUC__)
#define ALIGNED(multiple) __attribute__((aligned(multiple)))
#define ASSUME_ALIGNED(ptr, multiple) __builtin_assume_aligned(ptr, multiple)
#define NOINLINE __attribute__((noinline))
#define LIKELY(x) __builtin_expect(!!(x), 1)
#define UNLIKELY(x) __builtin_expect(!!(x), 0)
#define PREFETCH(ptr, rw, loc) __builtin_prefetch(ptr, rw, loc)
#else
#define ASSUME_ALIGNED(ptr, multiple) (ptr)
#define NOINLINE
#define LIKELY(x) x
#define UNLIKELY(x) x
#define PREFETCH(ptr, rw, loc)
#endif
#define EXT_UNIQID_NONE __LINE__
#define EXT_UNIQID_SSE2 __LINE__
#define EXT_UNIQID_ALTIVEC __LINE__
#define EXT_UNIQID_NEON __LINE__
#define EXT_UNIQID(ext) EXT_UNIQID_HELPER(ext)
#define EXT_UNIQID_HELPER(ext) EXT_UNIQID_##ext
/* optimization parameters */
#ifndef BUFRADIXSORT_USE_SIMD_RELOCATE
#define BUFRADIXSORT_USE_SIMD_RELOCATE 0
#endif
#ifndef EXT_STREAM
#define EXT_STREAM SSE2
#endif
#ifndef UNROLL_HISTOGRAM
#define UNROLL_HISTOGRAM 8
#endif
#ifndef UNROLL_RELOCATE
#define UNROLL_RELOCATE 8
#endif
#ifndef BUFFER_SIZE
#define BUFFER_SIZE 64
#endif
#define BKT_BIT 8
#define ELEM_SIZE_LOG_MAX 3
#define SUPPORTED_INT_BITS_LIST_LEN 4
#define SUPPORTED_INT_BITS_LIST (8, 16, 32, 64)
#define SUPPORTED_FLOAT_BITS_LIST_LEN 2
#define SUPPORTED_FLOAT_BITS_LIST (32, 64)
#endif /* BUFRADIXSORT_CONFIG_H */