check transfer  0.1
Check data transfer for SDAccell OpenCL application
gen_cnt.cl
Go to the documentation of this file.
1 
2 
3 
4 
5 __kernel
6 __attribute__ ((reqd_work_group_size(1,1,1)))
7 void gen_cnt(
8  __global ulong8 *pOut,
9  __global ulong8 *pStatus,
10  const uint size
11  )
12 {
13 
14 
15  uint blockWr;
16 
17 
18  ulong8 temp0, temp1;
19 
20  ulong8 checkStatus;
21 
22  ulong8 addConst;
23 
24 
25  checkStatus = pStatus[0];
26 
27  temp1 = pStatus[1];
28  addConst = pStatus[2];
29 
30  blockWr = checkStatus.s0 >> 32;
31 
32  __attribute__((xcl_pipeline_loop))
33  for ( int ii=0; ii<size; ii++)
34  {
35 
36  pOut[ii] = temp1;
37 
38  temp1.s0 +=addConst.s0;
39  temp1.s1 +=addConst.s1;
40  temp1.s2 +=addConst.s2;
41  temp1.s3 +=addConst.s3;
42  temp1.s4 +=addConst.s4;
43  temp1.s5 +=addConst.s5;
44  temp1.s6 +=addConst.s6;
45  temp1.s7 +=addConst.s7;
46 
47  }
48 
49 
50 
51  blockWr++;
52  checkStatus.s0 = ((ulong)blockWr)<<32 | 0xAA56;
53 
54  pStatus[0] = checkStatus;
55  pStatus[1] = temp1;
56 
57 }
58 
59