blob: a33b2b7b9389e4e102030932aa0b06b1eacb1d40 [file] [log] [blame]
Allan MacKinnonc110e792018-06-21 09:09:56 -07001//
2// Copyright 2016 Google Inc.
3//
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6//
7
8#ifndef HS_CL_ONCE
9#define HS_CL_ONCE
10
11#define HS_LANES_PER_WARP_LOG2 3
12#define HS_LANES_PER_WARP (1 << HS_LANES_PER_WARP_LOG2)
13#define HS_BS_WARPS 16
14#define HS_BS_WARPS_LOG2_RU 4
15#define HS_BC_WARPS_LOG2_MAX 4
16#define HS_FM_BLOCKS_LOG2_MIN 1
17#define HS_HM_BLOCKS_LOG2_MIN 1
18#define HS_KEYS_PER_LANE 16
19#define HS_REG_LAST(c) c##16
20#define HS_KEY_WORDS 2
21#define HS_KEY_TYPE ulong
22#define HS_EMPTY
23
24#define HS_SLAB_ROWS() \
25 HS_SLAB_ROW( 1, 0 ) \
26 HS_SLAB_ROW( 2, 1 ) \
27 HS_SLAB_ROW( 3, 2 ) \
28 HS_SLAB_ROW( 4, 3 ) \
29 HS_SLAB_ROW( 5, 4 ) \
30 HS_SLAB_ROW( 6, 5 ) \
31 HS_SLAB_ROW( 7, 6 ) \
32 HS_SLAB_ROW( 8, 7 ) \
33 HS_SLAB_ROW( 9, 8 ) \
34 HS_SLAB_ROW( 10, 9 ) \
35 HS_SLAB_ROW( 11, 10 ) \
36 HS_SLAB_ROW( 12, 11 ) \
37 HS_SLAB_ROW( 13, 12 ) \
38 HS_SLAB_ROW( 14, 13 ) \
39 HS_SLAB_ROW( 15, 14 ) \
40 HS_SLAB_ROW( 16, 15 ) \
41 HS_EMPTY
42
43#define HS_TRANSPOSE_SLAB() \
44 HS_TRANSPOSE_STAGE( 1 ) \
45 HS_TRANSPOSE_STAGE( 2 ) \
46 HS_TRANSPOSE_STAGE( 3 ) \
47 HS_TRANSPOSE_BLEND( r, s, 1, 2, 1 ) \
48 HS_TRANSPOSE_BLEND( r, s, 1, 4, 3 ) \
49 HS_TRANSPOSE_BLEND( r, s, 1, 6, 5 ) \
50 HS_TRANSPOSE_BLEND( r, s, 1, 8, 7 ) \
51 HS_TRANSPOSE_BLEND( r, s, 1, 10, 9 ) \
52 HS_TRANSPOSE_BLEND( r, s, 1, 12, 11 ) \
53 HS_TRANSPOSE_BLEND( r, s, 1, 14, 13 ) \
54 HS_TRANSPOSE_BLEND( r, s, 1, 16, 15 ) \
55 HS_TRANSPOSE_BLEND( s, t, 2, 3, 1 ) \
56 HS_TRANSPOSE_BLEND( s, t, 2, 4, 2 ) \
57 HS_TRANSPOSE_BLEND( s, t, 2, 7, 5 ) \
58 HS_TRANSPOSE_BLEND( s, t, 2, 8, 6 ) \
59 HS_TRANSPOSE_BLEND( s, t, 2, 11, 9 ) \
60 HS_TRANSPOSE_BLEND( s, t, 2, 12, 10 ) \
61 HS_TRANSPOSE_BLEND( s, t, 2, 15, 13 ) \
62 HS_TRANSPOSE_BLEND( s, t, 2, 16, 14 ) \
63 HS_TRANSPOSE_BLEND( t, u, 3, 5, 1 ) \
64 HS_TRANSPOSE_BLEND( t, u, 3, 6, 2 ) \
65 HS_TRANSPOSE_BLEND( t, u, 3, 7, 3 ) \
66 HS_TRANSPOSE_BLEND( t, u, 3, 8, 4 ) \
67 HS_TRANSPOSE_BLEND( t, u, 3, 13, 9 ) \
68 HS_TRANSPOSE_BLEND( t, u, 3, 14, 10 ) \
69 HS_TRANSPOSE_BLEND( t, u, 3, 15, 11 ) \
70 HS_TRANSPOSE_BLEND( t, u, 3, 16, 12 ) \
71 HS_TRANSPOSE_REMAP( u, 1, 1 ) \
72 HS_TRANSPOSE_REMAP( u, 2, 3 ) \
73 HS_TRANSPOSE_REMAP( u, 3, 5 ) \
74 HS_TRANSPOSE_REMAP( u, 4, 7 ) \
75 HS_TRANSPOSE_REMAP( u, 5, 9 ) \
76 HS_TRANSPOSE_REMAP( u, 6, 11 ) \
77 HS_TRANSPOSE_REMAP( u, 7, 13 ) \
78 HS_TRANSPOSE_REMAP( u, 8, 15 ) \
79 HS_TRANSPOSE_REMAP( u, 9, 2 ) \
80 HS_TRANSPOSE_REMAP( u, 10, 4 ) \
81 HS_TRANSPOSE_REMAP( u, 11, 6 ) \
82 HS_TRANSPOSE_REMAP( u, 12, 8 ) \
83 HS_TRANSPOSE_REMAP( u, 13, 10 ) \
84 HS_TRANSPOSE_REMAP( u, 14, 12 ) \
85 HS_TRANSPOSE_REMAP( u, 15, 14 ) \
86 HS_TRANSPOSE_REMAP( u, 16, 16 ) \
87 HS_EMPTY
88
89#define HS_FM_BLOCKS_LOG2_1 0
90#define HS_FM_BLOCKS_LOG2_2 1
91#define HS_FM_BLOCKS_LOG2_3 2
92#define HS_FM_BLOCKS_LOG2_4 3
93#define HS_FM_BLOCKS_LOG2_5 4
94#define HS_FM_BLOCKS_LOG2_6 5
95#define HS_HM_BLOCKS_LOG2_5 0
96#define HS_FM_BLOCKS_LOG2_7 6
97#define HS_HM_BLOCKS_LOG2_6 1
98#define HS_FM_BLOCKS_LOG2_8 7
99#define HS_HM_BLOCKS_LOG2_7 2
100#define HS_FM_BLOCKS_LOG2_9 8
101#define HS_HM_BLOCKS_LOG2_8 3
102#define HS_FM_BLOCKS_LOG2_10 9
103#define HS_HM_BLOCKS_LOG2_9 4
104#define HS_FM_BLOCKS_LOG2_11 10
105#define HS_HM_BLOCKS_LOG2_10 5
106#define HS_FM_BLOCKS_LOG2_12 11
107#define HS_HM_BLOCKS_LOG2_11 6
108#define HS_FM_BLOCKS_LOG2_13 12
109#define HS_HM_BLOCKS_LOG2_12 7
110#define HS_FM_BLOCKS_LOG2_14 13
111#define HS_HM_BLOCKS_LOG2_13 8
112#define HS_FM_BLOCKS_LOG2_15 14
113#define HS_HM_BLOCKS_LOG2_14 9
114#define HS_FM_BLOCKS_LOG2_16 15
115#define HS_HM_BLOCKS_LOG2_15 10
116
117#endif
118
119//
120//
121//
122