Fabcoin Core  0.16.2
P2P Digital Currency
silentarmy184.h
Go to the documentation of this file.
1 const unsigned char CL_MINER_KERNEL184[] = R"_mrb_(
2 # 1 "input.cl"
3 # 1 "<built-in>"
4 # 1 "<command-line>"
5 # 1 "/usr/include/stdc-predef.h" 1 3 4
6 # 1 "<command-line>" 2
7 # 1 "input.cl"
8 # 58 "input.cl"
9 typedef struct sols_s
10 {
11  uint nr;
12  uint likely_invalids;
13  uchar valid[10];
14  uint values[10][(1 << 9)];
15 }sols_t;
16 
17 
18 #pragma OPENCL EXTENSION cl_khr_global_int32_base_atomics : enable
19 # 102 "input.cl"
20 __constant ulong blake_iv[] =
21 {
22  0x6a09e667f3bcc908, 0xbb67ae8584caa73b,
23  0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1,
24  0x510e527fade682d1, 0x9b05688c2b3e6c1f,
25  0x1f83d9abfb41bd6b, 0x5be0cd19137e2179,
26 };
27 
28 
29 
30 
31 __kernel
32 void kernel_init_ht(__global char *ht, __global uint *rowCounters)
33 {
34  rowCounters[get_global_id(0)] = 0;
35 }
36 # 166 "input.cl"
37 __kernel __attribute__((reqd_work_group_size(64, 1, 1)))
38 void kernel_round0(__global ulong *blake_state, __global char *ht, __global ulong *buf,
39  __global uint *rowCounters, __global uint *debug)
40 {
41  uint tid = get_global_id(0);
42  ulong v[16];
43  uint inputs_per_thread = (1 << (184 / (7 + 1))) / get_global_size(0);
44  uint input = tid * inputs_per_thread;
45  uint input_end = (tid + 1) * inputs_per_thread;
46  uint dropped = 0;
47  ulong val1 = 0, val9 = 0;
48 
49  uint buflen;
50 
51  if( buf[0] == 2 )
52  {
53  buflen = 12;
54  }
55  else
56  {
57  buflen = 76;
58  val1 = buf[2];
59  }
60  while (input < input_end)
61  {
62 
63  v[0] = blake_state[0];
64  v[1] = blake_state[1];
65  v[2] = blake_state[2];
66  v[3] = blake_state[3];
67  v[4] = blake_state[4];
68  v[5] = blake_state[5];
69  v[6] = blake_state[6];
70  v[7] = blake_state[7];
71  v[8] = blake_iv[0];
72  v[9] = blake_iv[1];
73  v[10] = blake_iv[2];
74  v[11] = blake_iv[3];
75  v[12] = blake_iv[4];
76  v[13] = blake_iv[5];
77  v[14] = blake_iv[6];
78  v[15] = blake_iv[7];
79 
80  v[12] ^= 128 + buflen + 4 ;
81 
82  v[14] ^= (ulong)-1;
83 
84  if( buf[0] == 2 )
85  {
86  val1 = buf[2] | (ulong)input<<(buflen%8*8);
87  }
88  else
89  {
90  val9 = buf[10] | (ulong)input<<(buflen%8*8);
91  }
92 
93 
94  v[0] = (v[0] + v[4] + buf[ 1+0 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 32); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 24); v[0] = (v[0] + v[4] + val1); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 16); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 63);;
95  v[1] = (v[1] + v[5] + buf[ 1+2 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 32); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 24); v[1] = (v[1] + v[5] + buf[ 1+3 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 16); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 63);;
96  v[2] = (v[2] + v[6] + buf[ 1+4 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 32); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 24); v[2] = (v[2] + v[6] + buf[ 1+5 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 16); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 63);;
97  v[3] = (v[3] + v[7] + buf[ 1+6 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 32); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 24); v[3] = (v[3] + v[7] + buf[ 1+7 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 16); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 63);;
98  v[0] = (v[0] + v[5] + buf[ 1+8 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 32); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 24); v[0] = (v[0] + v[5] + val9); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 16); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 63);;
99  v[1] = (v[1] + v[6] + buf[ 1+10 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 32); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 24); v[1] = (v[1] + v[6] + buf[ 1+11 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 16); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 63);;
100  v[2] = (v[2] + v[7] + buf[ 1+12 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 32); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 24); v[2] = (v[2] + v[7] + buf[ 1+13 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 16); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 63);;
101  v[3] = (v[3] + v[4] + buf[ 1+14 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 32); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 24); v[3] = (v[3] + v[4] + buf[ 1+15 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 16); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 63);;
102 
103  v[0] = (v[0] + v[4] + buf[ 1+14 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 32); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 24); v[0] = (v[0] + v[4] + buf[ 1+10 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 16); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 63);;
104  v[1] = (v[1] + v[5] + buf[ 1+4 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 32); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 24); v[1] = (v[1] + v[5] + buf[ 1+8 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 16); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 63);;
105  v[2] = (v[2] + v[6] + val9); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 32); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 24); v[2] = (v[2] + v[6] + buf[ 1+15 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 16); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 63);;
106  v[3] = (v[3] + v[7] + buf[ 1+13 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 32); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 24); v[3] = (v[3] + v[7] + buf[ 1+6 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 16); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 63);;
107  v[0] = (v[0] + v[5] + val1); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 32); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 24); v[0] = (v[0] + v[5] + buf[ 1+12 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 16); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 63);;
108  v[1] = (v[1] + v[6] + buf[ 1+0 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 32); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 24); v[1] = (v[1] + v[6] + buf[ 1+2 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 16); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 63);;
109  v[2] = (v[2] + v[7] + buf[ 1+11 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 32); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 24); v[2] = (v[2] + v[7] + buf[ 1+7 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 16); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 63);;
110  v[3] = (v[3] + v[4] + buf[ 1+5 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 32); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 24); v[3] = (v[3] + v[4] + buf[ 1+3 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 16); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 63);;
111 
112  v[0] = (v[0] + v[4] + buf[ 1+11 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 32); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 24); v[0] = (v[0] + v[4] + buf[ 1+8 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 16); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 63);;
113  v[1] = (v[1] + v[5] + buf[ 1+12 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 32); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 24); v[1] = (v[1] + v[5] + buf[ 1+0 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 16); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 63);;
114  v[2] = (v[2] + v[6] + buf[ 1+5 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 32); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 24); v[2] = (v[2] + v[6] + buf[ 1+2 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 16); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 63);;
115  v[3] = (v[3] + v[7] + buf[ 1+15 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 32); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 24); v[3] = (v[3] + v[7] + buf[ 1+13 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 16); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 63);;
116  v[0] = (v[0] + v[5] + buf[ 1+10 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 32); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 24); v[0] = (v[0] + v[5] + buf[ 1+14 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 16); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 63);;
117  v[1] = (v[1] + v[6] + buf[ 1+3 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 32); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 24); v[1] = (v[1] + v[6] + buf[ 1+6 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 16); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 63);;
118  v[2] = (v[2] + v[7] + buf[ 1+7 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 32); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 24); v[2] = (v[2] + v[7] + val1); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 16); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 63);;
119  v[3] = (v[3] + v[4] + val9); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 32); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 24); v[3] = (v[3] + v[4] + buf[ 1+4 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 16); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 63);;
120 
121  v[0] = (v[0] + v[4] + buf[ 1+7 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 32); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 24); v[0] = (v[0] + v[4] + val9); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 16); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 63);;
122  v[1] = (v[1] + v[5] + buf[ 1+3 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 32); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 24); v[1] = (v[1] + v[5] + val1); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 16); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 63);;
123  v[2] = (v[2] + v[6] + buf[ 1+13 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 32); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 24); v[2] = (v[2] + v[6] + buf[ 1+12 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 16); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 63);;
124  v[3] = (v[3] + v[7] + buf[ 1+11 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 32); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 24); v[3] = (v[3] + v[7] + buf[ 1+14 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 16); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 63);;
125  v[0] = (v[0] + v[5] + buf[ 1+2 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 32); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 24); v[0] = (v[0] + v[5] + buf[ 1+6 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 16); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 63);;
126  v[1] = (v[1] + v[6] + buf[ 1+5 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 32); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 24); v[1] = (v[1] + v[6] + buf[ 1+10 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 16); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 63);;
127  v[2] = (v[2] + v[7] + buf[ 1+4 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 32); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 24); v[2] = (v[2] + v[7] + buf[ 1+0 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 16); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 63);;
128  v[3] = (v[3] + v[4] + buf[ 1+15 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 32); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 24); v[3] = (v[3] + v[4] + buf[ 1+8 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 16); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 63);;
129 
130  v[0] = (v[0] + v[4] + val9); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 32); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 24); v[0] = (v[0] + v[4] + buf[ 1+0 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 16); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 63);;
131  v[1] = (v[1] + v[5] + buf[ 1+5 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 32); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 24); v[1] = (v[1] + v[5] + buf[ 1+7 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 16); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 63);;
132  v[2] = (v[2] + v[6] + buf[ 1+2 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 32); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 24); v[2] = (v[2] + v[6] + buf[ 1+4 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 16); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 63);;
133  v[3] = (v[3] + v[7] + buf[ 1+10 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 32); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 24); v[3] = (v[3] + v[7] + buf[ 1+15 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 16); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 63);;
134  v[0] = (v[0] + v[5] + buf[ 1+14 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 32); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 24); v[0] = (v[0] + v[5] + val1); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 16); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 63);;
135  v[1] = (v[1] + v[6] + buf[ 1+11 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 32); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 24); v[1] = (v[1] + v[6] + buf[ 1+12 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 16); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 63);;
136  v[2] = (v[2] + v[7] + buf[ 1+6 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 32); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 24); v[2] = (v[2] + v[7] + buf[ 1+8 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 16); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 63);;
137  v[3] = (v[3] + v[4] + buf[ 1+3 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 32); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 24); v[3] = (v[3] + v[4] + buf[ 1+13 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 16); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 63);;
138 
139  v[0] = (v[0] + v[4] + buf[ 1+2 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 32); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 24); v[0] = (v[0] + v[4] + buf[ 1+12 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 16); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 63);;
140  v[1] = (v[1] + v[5] + buf[ 1+6 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 32); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 24); v[1] = (v[1] + v[5] + buf[ 1+10 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 16); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 63);;
141  v[2] = (v[2] + v[6] + buf[ 1+0 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 32); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 24); v[2] = (v[2] + v[6] + buf[ 1+11 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 16); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 63);;
142  v[3] = (v[3] + v[7] + buf[ 1+8 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 32); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 24); v[3] = (v[3] + v[7] + buf[ 1+3 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 16); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 63);;
143  v[0] = (v[0] + v[5] + buf[ 1+4 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 32); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 24); v[0] = (v[0] + v[5] + buf[ 1+13 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 16); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 63);;
144  v[1] = (v[1] + v[6] + buf[ 1+7 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 32); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 24); v[1] = (v[1] + v[6] + buf[ 1+5 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 16); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 63);;
145  v[2] = (v[2] + v[7] + buf[ 1+15 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 32); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 24); v[2] = (v[2] + v[7] + buf[ 1+14 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 16); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 63);;
146  v[3] = (v[3] + v[4] + val1); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 32); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 24); v[3] = (v[3] + v[4] + val9); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 16); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 63);;
147 
148  v[0] = (v[0] + v[4] + buf[ 1+12 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 32); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 24); v[0] = (v[0] + v[4] + buf[ 1+5 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 16); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 63);;
149  v[1] = (v[1] + v[5] + val1); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 32); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 24); v[1] = (v[1] + v[5] + buf[ 1+15 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 16); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 63);;
150  v[2] = (v[2] + v[6] + buf[ 1+14 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 32); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 24); v[2] = (v[2] + v[6] + buf[ 1+13 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 16); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 63);;
151  v[3] = (v[3] + v[7] + buf[ 1+4 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 32); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 24); v[3] = (v[3] + v[7] + buf[ 1+10 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 16); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 63);;
152  v[0] = (v[0] + v[5] + buf[ 1+0 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 32); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 24); v[0] = (v[0] + v[5] + buf[ 1+7 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 16); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 63);;
153  v[1] = (v[1] + v[6] + buf[ 1+6 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 32); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 24); v[1] = (v[1] + v[6] + buf[ 1+3 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 16); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 63);;
154  v[2] = (v[2] + v[7] + val9); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 32); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 24); v[2] = (v[2] + v[7] + buf[ 1+2 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 16); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 63);;
155  v[3] = (v[3] + v[4] + buf[ 1+8 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 32); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 24); v[3] = (v[3] + v[4] + buf[ 1+11 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 16); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 63);;
156 
157  v[0] = (v[0] + v[4] + buf[ 1+13 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 32); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 24); v[0] = (v[0] + v[4] + buf[ 1+11 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 16); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 63);;
158  v[1] = (v[1] + v[5] + buf[ 1+7 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 32); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 24); v[1] = (v[1] + v[5] + buf[ 1+14 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 16); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 63);;
159  v[2] = (v[2] + v[6] + buf[ 1+12 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 32); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 24); v[2] = (v[2] + v[6] + val1); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 16); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 63);;
160  v[3] = (v[3] + v[7] + buf[ 1+3 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 32); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 24); v[3] = (v[3] + v[7] + val9); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 16); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 63);;
161  v[0] = (v[0] + v[5] + buf[ 1+5 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 32); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 24); v[0] = (v[0] + v[5] + buf[ 1+0 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 16); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 63);;
162  v[1] = (v[1] + v[6] + buf[ 1+15 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 32); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 24); v[1] = (v[1] + v[6] + buf[ 1+4 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 16); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 63);;
163  v[2] = (v[2] + v[7] + buf[ 1+8 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 32); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 24); v[2] = (v[2] + v[7] + buf[ 1+6 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 16); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 63);;
164  v[3] = (v[3] + v[4] + buf[ 1+2 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 32); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 24); v[3] = (v[3] + v[4] + buf[ 1+10 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 16); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 63);;
165 
166  v[0] = (v[0] + v[4] + buf[ 1+6 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 32); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 24); v[0] = (v[0] + v[4] + buf[ 1+15 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 16); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 63);;
167  v[1] = (v[1] + v[5] + buf[ 1+14 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 32); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 24); v[1] = (v[1] + v[5] + val9); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 16); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 63);;
168  v[2] = (v[2] + v[6] + buf[ 1+11 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 32); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 24); v[2] = (v[2] + v[6] + buf[ 1+3 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 16); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 63);;
169  v[3] = (v[3] + v[7] + buf[ 1+0 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 32); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 24); v[3] = (v[3] + v[7] + buf[ 1+8 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 16); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 63);;
170  v[0] = (v[0] + v[5] + buf[ 1+12 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 32); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 24); v[0] = (v[0] + v[5] + buf[ 1+2 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 16); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 63);;
171  v[1] = (v[1] + v[6] + buf[ 1+13 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 32); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 24); v[1] = (v[1] + v[6] + buf[ 1+7 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 16); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 63);;
172  v[2] = (v[2] + v[7] + val1); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 32); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 24); v[2] = (v[2] + v[7] + buf[ 1+4 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 16); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 63);;
173  v[3] = (v[3] + v[4] + buf[ 1+10 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 32); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 24); v[3] = (v[3] + v[4] + buf[ 1+5 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 16); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 63);;
174 
175  v[0] = (v[0] + v[4] + buf[ 1+10 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 32); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 24); v[0] = (v[0] + v[4] + buf[ 1+2 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 16); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 63);;
176  v[1] = (v[1] + v[5] + buf[ 1+8 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 32); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 24); v[1] = (v[1] + v[5] + buf[ 1+4 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 16); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 63);;
177  v[2] = (v[2] + v[6] + buf[ 1+7 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 32); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 24); v[2] = (v[2] + v[6] + buf[ 1+6 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 16); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 63);;
178  v[3] = (v[3] + v[7] + val1); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 32); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 24); v[3] = (v[3] + v[7] + buf[ 1+5 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 16); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 63);;
179  v[0] = (v[0] + v[5] + buf[ 1+15 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 32); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 24); v[0] = (v[0] + v[5] + buf[ 1+11 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 16); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 63);;
180  v[1] = (v[1] + v[6] + val9); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 32); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 24); v[1] = (v[1] + v[6] + buf[ 1+14 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 16); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 63);;
181  v[2] = (v[2] + v[7] + buf[ 1+3 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 32); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 24); v[2] = (v[2] + v[7] + buf[ 1+12 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 16); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 63);;
182  v[3] = (v[3] + v[4] + buf[ 1+13 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 32); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 24); v[3] = (v[3] + v[4] + buf[ 1+0 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 16); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 63);;
183 
184  v[0] = (v[0] + v[4] + buf[ 1+0 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 32); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 24); v[0] = (v[0] + v[4] + val1); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 16); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 63);;
185  v[1] = (v[1] + v[5] + buf[ 1+2 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 32); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 24); v[1] = (v[1] + v[5] + buf[ 1+3 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 16); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 63);;
186  v[2] = (v[2] + v[6] + buf[ 1+4 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 32); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 24); v[2] = (v[2] + v[6] + buf[ 1+5 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 16); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 63);;
187  v[3] = (v[3] + v[7] + buf[ 1+6 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 32); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 24); v[3] = (v[3] + v[7] + buf[ 1+7 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 16); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 63);;
188  v[0] = (v[0] + v[5] + buf[ 1+8 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 32); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 24); v[0] = (v[0] + v[5] + val9); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 16); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 63);;
189  v[1] = (v[1] + v[6] + buf[ 1+10 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 32); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 24); v[1] = (v[1] + v[6] + buf[ 1+11 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 16); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 63);;
190  v[2] = (v[2] + v[7] + buf[ 1+12 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 32); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 24); v[2] = (v[2] + v[7] + buf[ 1+13 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 16); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 63);;
191  v[3] = (v[3] + v[4] + buf[ 1+14 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 32); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 24); v[3] = (v[3] + v[4] + buf[ 1+15 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 16); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 63);;
192 
193  v[0] = (v[0] + v[4] + buf[ 1+14 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 32); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 24); v[0] = (v[0] + v[4] + buf[ 1+10 ]); v[12] = rotate((v[12] ^ v[0]), (ulong)64 - 16); v[8] = (v[8] + v[12]); v[4] = rotate((v[4] ^ v[8]), (ulong)64 - 63);;
194  v[1] = (v[1] + v[5] + buf[ 1+4 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 32); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 24); v[1] = (v[1] + v[5] + buf[ 1+8 ]); v[13] = rotate((v[13] ^ v[1]), (ulong)64 - 16); v[9] = (v[9] + v[13]); v[5] = rotate((v[5] ^ v[9]), (ulong)64 - 63);;
195  v[2] = (v[2] + v[6] + val9); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 32); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 24); v[2] = (v[2] + v[6] + buf[ 1+15 ]); v[14] = rotate((v[14] ^ v[2]), (ulong)64 - 16); v[10] = (v[10] + v[14]); v[6] = rotate((v[6] ^ v[10]), (ulong)64 - 63);;
196  v[3] = (v[3] + v[7] + buf[ 1+13 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 32); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 24); v[3] = (v[3] + v[7] + buf[ 1+6 ]); v[15] = rotate((v[15] ^ v[3]), (ulong)64 - 16); v[11] = (v[11] + v[15]); v[7] = rotate((v[7] ^ v[11]), (ulong)64 - 63);;
197  v[0] = (v[0] + v[5] + val1); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 32); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 24); v[0] = (v[0] + v[5] + buf[ 1+12 ]); v[15] = rotate((v[15] ^ v[0]), (ulong)64 - 16); v[10] = (v[10] + v[15]); v[5] = rotate((v[5] ^ v[10]), (ulong)64 - 63);;
198  v[1] = (v[1] + v[6] + buf[ 1+0 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 32); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 24); v[1] = (v[1] + v[6] + buf[ 1+2 ]); v[12] = rotate((v[12] ^ v[1]), (ulong)64 - 16); v[11] = (v[11] + v[12]); v[6] = rotate((v[6] ^ v[11]), (ulong)64 - 63);;
199  v[2] = (v[2] + v[7] + buf[ 1+11 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 32); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 24); v[2] = (v[2] + v[7] + buf[ 1+7 ]); v[13] = rotate((v[13] ^ v[2]), (ulong)64 - 16); v[8] = (v[8] + v[13]); v[7] = rotate((v[7] ^ v[8]), (ulong)64 - 63);;
200  v[3] = (v[3] + v[4] + buf[ 1+5 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 32); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 24); v[3] = (v[3] + v[4] + buf[ 1+3 ]); v[14] = rotate((v[14] ^ v[3]), (ulong)64 - 16); v[9] = (v[9] + v[14]); v[4] = rotate((v[4] ^ v[9]), (ulong)64 - 63);;
201 
202 
203 
204 
205  ulong h[7];
206  h[0] = blake_state[0] ^ v[0] ^ v[8];
207  h[1] = blake_state[1] ^ v[1] ^ v[9];
208  h[2] = blake_state[2] ^ v[2] ^ v[10];
209  h[3] = blake_state[3] ^ v[3] ^ v[11];
210  h[4] = blake_state[4] ^ v[4] ^ v[12];
211 
212  h[5] = (blake_state[5] ^ v[5] ^ v[13]) & 0xffffffffffff ;
213 
214  uchar *hash = (uchar *)h;
215  for( uint i= 0; i < 2; i++ )
216  {
217  hash = hash + 23 * i;
218  ulong xi0, xi1, xi2;
219  uint row;
220  __global char *p;
221  uint cnt;
222 
223  xi0 = *(ulong *)(hash+0);
224  xi1 = *(ulong *)(hash+8);
225  xi2 = *(ulong *)(hash+16);
226 
227 
228  row = ((((uint)hash[0] << 8) | hash[1]) << 5) | hash[2] >> 3;
229 
230 
231 
232 
233  xi0 = (xi0 >> 16) | (xi1 << (64 - 16));
234  xi1 = (xi1 >> 16) | (xi2 << (64 - 16));
235  xi2 = (xi2 >> 16);
236 
237  p = ht + row * (( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2) * 32;
238  uint rowIdx = row/4;
239  uint rowOffset = 8*(row%4);
240  uint xcnt = atomic_add(rowCounters + rowIdx, 1 << rowOffset);
241  xcnt = (xcnt >> rowOffset) & 0xFF;
242  cnt = xcnt;
243  if (cnt < (( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2))
244  {
245  p += cnt * 32 + (8 + ((0) / 2) * 4);
246 
247 
248  *(__global uint *)(p - 4) = (input<<1) + i;
249 
250 
251  *(__global ulong *)(p + 0) = xi0;
252  *(__global ulong *)(p + 8) = xi1;
253  *(__global ulong *)(p + 16) = xi2 & 0xffffffffff;
254  }
255  }
256 
257 
258 
259 
260 
261  input++;
262  }
263 
264 
265 
266 
267 }
268 # 421 "input.cl"
269 uint getrow(uint round, __global ulong *a, __global ulong *b)
270 {
271  uint row;
272 
273  __global uchar *p1 = (__global uchar *)a;
274  __global uchar *p2 = (__global uchar *)b;
275 
276  switch( round )
277  {
278  case 1:
279  row = ((uint)(p1[0] ^ p2[0]) & 0x1) << 20
280  | ((uint)(p1[0+1] ^ p2[0+1])) << 12
281  | ((uint)(p1[0+2] ^ p2[0+2])) << 4
282  | (p1[0+3] ^ p2[0+3]) >> 4;
283  break;
284  case 2:
285  row = ((uint)(p1[0] ^ p2[0]) & 0x3) << 19
286  | ((uint)(p1[0+1] ^ p2[0+1])) << 11
287  | ((uint)(p1[0+2] ^ p2[0+2])) << 3
288  | (p1[0+3] ^ p2[0+3]) >> 5;
289  break;
290  case 3:
291  row = ((uint)(p1[0] ^ p2[0]) & 0x7) << 18
292  | ((uint)(p1[0+1] ^ p2[0+1])) << 10
293  | ((uint)(p1[0+2] ^ p2[0+2])) << 2
294  | (p1[0+3] ^ p2[0+3]) >> 6;
295  break;
296  case 4:
297  row = ((uint)(p1[0] ^ p2[0]) & 0xf) << 17
298  | ((uint)(p1[0+1] ^ p2[0+1])) << 9
299  | ((uint)(p1[0+2] ^ p2[0+2])) << 1
300  | (p1[0+3] ^ p2[0+3]) >> 7;
301  break;
302  case 5:
303  row = ((uint)(p1[0] ^ p2[0]) & 0x1f ) << 16
304  | ((uint)(p1[1] ^ p2[1])) << 8
305  | (p1[2] ^ p2[2]);
306  break;
307  case 6:
308  row = (((uint)(p1[0] ^ p2[0]) & 0x3f ) << 15 )
309  | ((uint)(p1[1] ^ p2[1])) << 7
310  | (p1[2] ^ p2[2]) >> 1;
311  break;
312  default:
313  break;
314  }
315 
316  return row;
317 }
318 
319 
320 uint ht_store(uint round, __global char *ht_src, __global char *ht, uint tree, __global uint *rowCounters)
321 {
322  ulong xi0, xi1, xi2, xi3 = 0;
323  uint row;
324  __global uchar *p;
325  uint cnt;
326  __global ulong *a8, *b8;
327  __global uint *a4, *b4;
328 
329  uint collisionThreadId = (tree >> 8);
330  uint slot_a = (tree & 0xf);
331  uint slot_b = ((tree >> 4) & 0xf);
332 
333  __global uchar *ptr = (__global uchar *)ht_src + collisionThreadId * (( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2) * 32 + (8 + ((round - 1) / 2) * 4);
334 
335  a8 = (__global ulong *)(ptr + slot_a * 32);
336  b8 = (__global ulong *)(ptr + slot_b * 32);
337  a4 = (__global uint *)(ptr + slot_a * 32);
338  b4 = (__global uint *)(ptr + slot_b * 32);
339 
340  {
341 
342  if (round == 1 )
343  {
344 
345  xi0 = a8[0] ^ b8[0];
346  xi1 = a8[1] ^ b8[1];
347  xi2 = a8[2] ^ b8[2];
348  }
349  else if (round == 2)
350  {
351 
352  xi0 = a8[0] ^ b8[0];
353  xi1 = a8[1] ^ b8[1];
354  xi2 = a8[2] ^ b8[2];
355  }
356  else if (round == 3)
357  {
358 
359  xi0 = (a4[0] ^ b4[0]) | ((ulong)(a4[1] ^ b4[1]) << 32);
360  xi1 = (a4[2] ^ b4[2]) | ((ulong)((a4[3] ^ b4[3]) & 0xffffff ) << 32);
361  xi2 = 0;
362  }
363  else if (round == 4 )
364  {
365 
366  xi0 = (a4[0] ^ b4[0]) | ((ulong)(a4[1] ^ b4[1]) << 32);
367  xi1 = (a4[2] ^ b4[2]) ;
368  xi2 = 0;
369  }
370  else if (round == 5 )
371  {
372 
373  xi0 = a8[0] ^ b8[0];
374  xi1 = a8[1] ^ b8[1];
375  xi2 = 0;
376  }
377  else if (round == 6)
378  {
379 
380  xi0 = a8[0] ^ b8[0];
381  xi1 = 0;
382  xi2 = 0;
383  }
384 
385  if (!xi0 && !xi1)
386  return 0;
387 
388 
389 
390  if( round == 6 )
391  {
392  xi0 = (xi0 >> 16) | (xi1 << (64 - 16));
393  xi1 = (xi1 >> 16) | (xi2 << (64 - 16));
394  xi2 = (xi2 >> 16) ;
395  }
396  else
397  {
398  xi0 = (xi0 >> 24) | (xi1 << (64 - 24));
399  xi1 = (xi1 >> 24) | (xi2 << (64 - 24));
400  xi2 = (xi2 >> 24) ;
401  }
402  }
403 
404  row = getrow(round, a8, b8);
405 
406  p = ht + row * (( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2) * 32;
407  uint rowIdx = row/4;
408  uint rowOffset = 8*(row%4);
409  uint xcnt = atomic_add(rowCounters + rowIdx, 1 << rowOffset);
410  xcnt = (xcnt >> rowOffset) & 0xFF;
411  cnt = xcnt;
412  if (cnt >= (( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2))
413  {
414 
415  atomic_sub(rowCounters + rowIdx, 1 << rowOffset);
416  return 1;
417  }
418 
419  p += cnt * 32 + (8 + ((round) / 2) * 4);
420 
421 
422  *(__global uint *)(p - 4) = tree;
423  if (round == 1)
424  {
425 
426  *(__global ulong *)(p + 0) = xi0;
427  *(__global ulong *)(p + 8) = xi1;
428  *(__global ulong *)(p + 16) = xi2 & 0xffff;
429  }
430  else if (round == 2)
431  {
432 
433  *(__global uint *)(p + 0) = xi0;
434  *(__global ulong *)(p + 4) = (xi0 >> 32) | (xi1 << 32);
435  *(__global uint *)(p + 12) = ((xi1 >> 32) & 0xffffff );
436  }
437  else if (round == 3)
438  {
439 
440  *(__global uint *)(p + 0) = xi0 & 0xffffffff;
441  *(__global ulong *)(p + 4) = (xi0 >> 32) | (xi1 << 32);
442  }
443  else if (round == 4)
444  {
445 
446  *(__global ulong *)(p + 0) = xi0;
447  *(__global ulong *)(p + 8) = xi1 & 0xff;
448  }
449  else if (round == 5)
450  {
451 
452  *(__global ulong *)(p + 0) = xi0 & 0xffffffffffff;
453  }
454  else if (round == 6 )
455  {
456 
457  *(__global uint *)(p + 0) = xi0 & 0xffffffff;
458  }
459 
460  return 0;
461 }
462 
463 
464 
465 
466 
467 void equihash_round(uint round,
468  __global char *ht_src,
469  __global char *ht_dst,
470  __global uint *debug,
471  __local uchar *first_words_data,
472  __local uint *collisionsData,
473  __local uint *collisionsNum,
474  __global uint *rowCountersSrc,
475  __global uint *rowCountersDst)
476 {
477  uint tid = get_global_id(0);
478  uint tlid = get_local_id(0);
479  __global uchar *p;
480  uint cnt;
481 
482  __local uchar *first_words = &first_words_data[((( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2)+2)*tlid];
483 
484  uchar mask;
485  uint i, j;
486 
487 
488  uint n;
489  uint dropped_coll = 0;
490  uint dropped_stor = 0;
491  __global ulong *a, *b;
492  uint xi_offset;
493 
494 
495  xi_offset = (8 + ((round - 1) / 2) * 4);
496 
497  uint thCollNum = 0;
498  *collisionsNum = 0;
499  barrier(CLK_LOCAL_MEM_FENCE);
500  p = (ht_src + tid * (( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2) * 32);
501  uint rowIdx = tid/4;
502  uint rowOffset = 8*(tid%4);
503  cnt = (rowCountersSrc[rowIdx] >> rowOffset) & 0xFF;
504  cnt = min(cnt, (uint)(( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2));
505 
506  if (!cnt)
507  {
508 
509  goto part2;
510  }
511 
512  p += xi_offset;
513 
514  {
515  for (i = 0; i < cnt; i++, p += 32)
516  {
517  switch(round)
518  {
519  case 1:
520  first_words[i] = (p[0] & 0x07 ) >> 1;
521  break;
522  case 2:
523  first_words[i] = (p[0] & 0x0f ) >> 2;
524  break;
525  case 3:
526  first_words[i] = (p[0] & 0x1f ) >> 3;
527  break;
528  case 4:
529  first_words[i] = (p[0] & 0x3f ) >> 4;
530  break;
531  case 5:
532  first_words[i] = (p[0] & 0x7f ) >> 5;
533  break;
534  case 6:
535  first_words[i] = p[0] >> 6;
536  break;
537  case 7:
538  first_words[i] = (( p[0] & 0x1 ) << 1 )| ( p[1] >> 7 );
539  break;
540  }
541  }
542  }
543 
544 
545  for (i = 0; i < cnt-1 && thCollNum < ((( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2) * 5); i++)
546  {
547  uint collision = (tid << 8) | (i << 4) | (i + 1);
548 
549  for (j = i+1; (j+4) < cnt;)
550  {
551  {
552  if( first_words[i] == first_words[j] )
553  {
554  {
555  thCollNum++;
556  uint index = atomic_inc(collisionsNum);
557  collisionsData[index] = collision;
558  }
559  }
560  collision++;
561  j++;
562  }
563 
564  {
565  if (first_words[i] == first_words[j])
566  {
567  thCollNum++;
568  uint index = atomic_inc(collisionsNum);
569  collisionsData[index] = collision;
570  }
571  collision++;
572  j++;
573  }
574 
575  {
576  if (first_words[i] == first_words[j])
577  {
578  thCollNum++;
579  uint index = atomic_inc(collisionsNum);
580  collisionsData[index] = collision;
581  }
582  collision++;
583  j++;
584  }
585 
586  {
587  if (first_words[i] == first_words[j])
588  {
589  thCollNum++;
590  uint index = atomic_inc(collisionsNum);
591  collisionsData[index] = collision;
592  }
593  collision++;
594  j++;
595  }
596  }
597 
598  for (; j < cnt; j++)
599  {
600  if (first_words[i] == first_words[j])
601  {
602  thCollNum++;
603  uint index = atomic_inc(collisionsNum);
604  collisionsData[index] = collision;
605  }
606  collision++;
607  }
608  }
609 
610 part2:
611  barrier(CLK_LOCAL_MEM_FENCE);
612 
613  uint totalCollisions = *collisionsNum;
614  for (uint index = tlid; index < totalCollisions; index += get_local_size(0))
615  {
616  dropped_stor += ht_store(round, ht_src, ht_dst, collisionsData[index], rowCountersDst);
617  }
618 
619 
620 
621 
622 }
623 # 791 "input.cl"
624 __kernel __attribute__((reqd_work_group_size(64, 1, 1))) void kernel_round1(__global char *ht_src, __global char *ht_dst, __global uint *rowCountersSrc, __global uint *rowCountersDst, __global uint *debug) { __local uchar first_words_data[((( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2)+2)*64]; __local uint collisionsData[((( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2) * 5) * 64]; __local uint collisionsNum; equihash_round(1, ht_src, ht_dst, debug, first_words_data, collisionsData, &collisionsNum, rowCountersSrc, rowCountersDst); }
625 __kernel __attribute__((reqd_work_group_size(64, 1, 1))) void kernel_round2(__global char *ht_src, __global char *ht_dst, __global uint *rowCountersSrc, __global uint *rowCountersDst, __global uint *debug) { __local uchar first_words_data[((( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2)+2)*64]; __local uint collisionsData[((( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2) * 5) * 64]; __local uint collisionsNum; equihash_round(2, ht_src, ht_dst, debug, first_words_data, collisionsData, &collisionsNum, rowCountersSrc, rowCountersDst); }
626 __kernel __attribute__((reqd_work_group_size(64, 1, 1))) void kernel_round3(__global char *ht_src, __global char *ht_dst, __global uint *rowCountersSrc, __global uint *rowCountersDst, __global uint *debug) { __local uchar first_words_data[((( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2)+2)*64]; __local uint collisionsData[((( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2) * 5) * 64]; __local uint collisionsNum; equihash_round(3, ht_src, ht_dst, debug, first_words_data, collisionsData, &collisionsNum, rowCountersSrc, rowCountersDst); }
627 __kernel __attribute__((reqd_work_group_size(64, 1, 1))) void kernel_round4(__global char *ht_src, __global char *ht_dst, __global uint *rowCountersSrc, __global uint *rowCountersDst, __global uint *debug) { __local uchar first_words_data[((( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2)+2)*64]; __local uint collisionsData[((( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2) * 5) * 64]; __local uint collisionsNum; equihash_round(4, ht_src, ht_dst, debug, first_words_data, collisionsData, &collisionsNum, rowCountersSrc, rowCountersDst); }
628 __kernel __attribute__((reqd_work_group_size(64, 1, 1))) void kernel_round5(__global char *ht_src, __global char *ht_dst, __global uint *rowCountersSrc, __global uint *rowCountersDst, __global uint *debug) { __local uchar first_words_data[((( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2)+2)*64]; __local uint collisionsData[((( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2) * 5) * 64]; __local uint collisionsNum; equihash_round(5, ht_src, ht_dst, debug, first_words_data, collisionsData, &collisionsNum, rowCountersSrc, rowCountersDst); }
629 
630 
631 __kernel __attribute__((reqd_work_group_size(64, 1, 1)))
632 void kernel_round6(__global char *ht_src, __global char *ht_dst,
633  __global uint *rowCountersSrc, __global uint *rowCountersDst,
634  __global uint *debug, __global sols_t *sols)
635 {
636  uint tid = get_global_id(0);
637 
638  __local uchar first_words_data[((( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2)+2)*64];
639  __local uint collisionsData[((( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2) * 5) * 64];
640  __local uint collisionsNum;
641 
642  equihash_round(6, ht_src, ht_dst, debug, first_words_data, collisionsData,
643  &collisionsNum, rowCountersSrc, rowCountersDst);
644 
645  if (!tid)
646  sols->nr = sols->likely_invalids = 0;
647 }
648 
649 uint expand_ref(__global char *ht, uint xi_offset, uint row, uint slot)
650 {
651  return *(__global uint *)(ht + row * (( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2) * 32 +
652  slot * 32 + xi_offset - 4);
653 }
654 
655 
656 
657 
658 
659 
660 uint expand_refs(uint *ins, uint nr_inputs, __global char **htabs, uint round)
661 {
662  __global char *ht = htabs[round % 2];
663  uint i = nr_inputs - 1;
664  uint j = nr_inputs * 2 - 1;
665  uint xi_offset = (8 + ((round) / 2) * 4);
666  int dup_to_watch = -1;
667 
668  do
669  {
670  ins[j] = expand_ref(ht, xi_offset,
671  (ins[i] >> 8), ((ins[i] >> 4) & 0xf));
672  ins[j - 1] = expand_ref(ht, xi_offset,
673  (ins[i] >> 8), (ins[i] & 0xf));
674 
675  if (!round)
676  {
677  if (dup_to_watch == -1)
678  dup_to_watch = ins[j];
679  else if (ins[j] == dup_to_watch || ins[j - 1] == dup_to_watch)
680  return 0;
681  }
682 
683  if (!i)
684  break ;
685  i--;
686  j -= 2;
687  }while (1);
688 
689  return 1;
690 }
691 
692 
693 
694 
695 void potential_sol(__global char **htabs, __global sols_t *sols,
696  uint ref0, uint ref1)
697 {
698  uint nr_values;
699  uint values_tmp[(1 << 7)];
700  uint sol_i;
701  uint i;
702  nr_values = 0;
703  values_tmp[nr_values++] = ref0;
704  values_tmp[nr_values++] = ref1;
705  uint round = 7 - 1;
706 
707  do
708  {
709  round--;
710  if (!expand_refs(values_tmp, nr_values, htabs, round))
711  return ;
712  nr_values *= 2;
713  }while (round > 0);
714 
715 
716  sol_i = atomic_inc(&sols->nr);
717  if (sol_i >= 10)
718  return ;
719 
720  for (i = 0; i < (1 << 7); i++)
721  sols->values[sol_i][i] = values_tmp[i];
722  sols->valid[sol_i] = 1;
723 }
724 
725 
726 
727 
728 __kernel __attribute__((reqd_work_group_size(64, 1, 1)))
729 void kernel_sols(__global char *ht0, __global char *ht1, __global sols_t *sols,
730  __global uint *rowCountersSrc, __global uint *rowCountersDst)
731 {
732  uint tid = get_global_id(0);
733 
734  __global char *htabs[2] = { ht0, ht1 };
735  __global char *hcounters[2] = { rowCountersSrc, rowCountersDst };
736  uint ht_i = (7 - 1) % 2;
737  uint cnt;
738  uint xi_offset = (8 + ((7 - 1) / 2) * 4);
739  uint i, j;
740  __global char *a, *b;
741  uint ref_i, ref_j;
742 
743 
744 
745  ulong collisions;
746  uint coll;
747 
748 
749 
750 
751  uint mask = 0xffffffff;
752 
753 
754 
755 
756  a = htabs[ht_i] + tid * (( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2) * 32;
757  uint rowIdx = tid/4;
758  uint rowOffset = 8*(tid%4);
759  cnt = (rowCountersSrc[rowIdx] >> rowOffset) & 0xFF;
760  cnt = min(cnt, (uint)(( 1 << (((184 / (7 + 1)) + 1) - 21)) * 2));
761  coll = 0;
762  a += xi_offset;
763 
764  for (i = 0; i < cnt; i++, a += 32)
765  {
766  uint a_data = ((*(__global uint *)a) & mask);
767  ref_i = *(__global uint *)(a - 4);
768 
769  for (j = i + 1, b = a + 32; j < cnt; j++, b += 32)
770  {
771  if (a_data == ((*(__global uint *)b) & mask))
772  {
773  ref_j = *(__global uint *)(b - 4);
774  collisions = ((ulong)ref_i << 32) | ref_j;
775  goto exit1;
776  }
777  }
778  }
779  return;
780 
781 exit1:
782  potential_sol(htabs, sols, collisions >> 32, collisions & 0xffffffff);
783 }
784 )_mrb_";
785 
786 const size_t CL_MINER_KERNEL_SIZE184 = strlen((char *)CL_MINER_KERNEL184);
const size_t CL_MINER_KERNEL_SIZE184
const unsigned char CL_MINER_KERNEL184[]
Definition: silentarmy184.h:1