forked from iHeartGraph/Enterprise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inspector.cuh
733 lines (678 loc) · 15.8 KB
/
inspector.cuh
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
/*
* Copyright 2016 The George Washington University
* Written by Hang Liu
* Directed by Prof. Howie Huang
*
* https://www.seas.gwu.edu/~howie/
* Contact: iheartgraph@gmail.com
*
*
* Please cite the following paper:
*
* Hang Liu and H. Howie Huang. 2015. Enterprise: breadth-first graph traversal on GPUs. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis (SC '15). ACM, New York, NY, USA, Article 68 , 12 pages. DOI: http://dx.doi.org/10.1145/2807591.2807594
*
* This file is part of Enterprise.
*
* Enterprise is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Enterprise is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Enterprise. If not, see <http://www.gnu.org/licenses/>.
*/
//Dec/15/2013
#include "comm.h"
//+---------------------------------
//|For clfy BASED EX_QUEUE STORAGE
//+---------------------------------
template <typename vertex_t, typename index_t,
typename depth_t>
__global__ void sort_dist_inspect_clfy
(
vertex_t *ex_cat_sml_q,
vertex_t *ex_cat_mid_q,
vertex_t *ex_cat_lrg_q,
index_t *tr_edges_c_d,
index_t *ex_cat_sml_sz,
index_t *ex_cat_mid_sz,
index_t *ex_cat_lrg_sz,
depth_t *depth_d,
depth_t curr_level,
index_t num_ver,
const index_t sml_shed,
const index_t lrg_shed,
const index_t bin_sz
)
{
const index_t TID_ST = threadIdx.x +blockIdx.x*blockDim.x;
const index_t NUM_VER = num_ver;
const index_t GRNTY = blockDim.x*gridDim.x;
const index_t EX_OFF = TID_ST*bin_sz;
index_t tid_next = TID_ST;
index_t tid = TID_ST;
const depth_t LEVEL = curr_level;
__shared__ index_t cache[THDS_NUM];
depth_t depth_curr, depth_next;
index_t card_curr, card_next;
index_t ex_sml_ct = 0;
index_t ex_mid_ct = 0;
index_t ex_lrg_ct = 0;
index_t card_sum = 0;
if(tid < NUM_VER){
card_curr = tex1Dfetch(tex_csr_card, tid);
depth_curr = tex1Dfetch(tex_depth, tid);
tid_next += GRNTY;
}
while(tid<NUM_VER){
if(tid_next < NUM_VER){
card_next = tex1Dfetch(tex_csr_card, tid_next);
depth_next = tex1Dfetch(tex_depth, tid_next);
}
if(depth_curr == LEVEL){
card_sum += card_curr;
//---------------
//!!!HERE IS A FILTER OF CARD =0
//------------------------------
if(card_curr<=0)
{}else if(card_curr < sml_shed)
{
ex_cat_sml_q[EX_OFF+ex_sml_ct]=tid;
ex_sml_ct++;
}else if(card_curr > lrg_shed){
ex_cat_lrg_q[EX_OFF+ex_lrg_ct]=tid;
ex_lrg_ct++;
}else{
ex_cat_mid_q[EX_OFF+ex_mid_ct]=tid;
ex_mid_ct++;
}
}
card_curr = card_next;
depth_curr = depth_next;
tid = tid_next;
tid_next += GRNTY;
}
#ifdef ENABLE_CHECKING
if( ex_sml_ct > bin_sz ||
ex_mid_ct > bin_sz ||
ex_lrg_ct > bin_sz)
error_d = 1;
#endif
ex_cat_sml_sz[TID_ST]= ex_sml_ct;
ex_cat_mid_sz[TID_ST]= ex_mid_ct;
ex_cat_lrg_sz[TID_ST]= ex_lrg_ct;
if(LEVEL != 0){
cache[threadIdx.x] = card_sum;
__syncthreads();
int i = blockDim.x>>1;
while(i){
if(threadIdx.x <i)
cache[threadIdx.x] += cache[threadIdx.x+i];
__syncthreads();
i>>=1;
}
if(!threadIdx.x)
tr_edges_c_d[blockIdx.x] = cache[0];
}
}
template <typename vertex_t, typename index_t,
typename depth_t>
__global__ void sort_switch_dist_inspect_clfy
(
vertex_t *ex_cat_sml_q,//each thd obt ex_q
vertex_t *ex_cat_mid_q,//each wap obt ex_q
vertex_t *ex_cat_lrg_q,//each cta obt ex_q
index_t *ex_cat_sml_sz,
index_t *ex_cat_mid_sz,
index_t *ex_cat_lrg_sz,
depth_t *depth_d,
depth_t curr_level,
index_t num_ver,
const index_t sml_shed,
const index_t lrg_shed,
const index_t bin_sz
)
{
const index_t TID_ST = threadIdx.x +blockIdx.x*blockDim.x;
const index_t NUM_VER = num_ver;
const index_t GRNTY = blockDim.x*gridDim.x;
const index_t EX_OFF = TID_ST*bin_sz;
const depth_t LEVEL = curr_level;
index_t card_curr, card_next;
depth_t depth_curr, depth_next;
index_t ex_sml_ct = 0;
index_t ex_mid_ct = 0;
index_t ex_lrg_ct = 0;
index_t hub_ptr;
index_t tid = TID_ST;
while(tid < HUB_BU_SZ){
hub_vert[tid] = V_INI_HUB;
hub_card[tid] = 0;
tid += GRNTY;
}
//Figure out its own start and end pos
//We want each thread to inspect a continuous block
index_t step_sz = NUM_VER/GRNTY;
// if(step_sz<16){
//small problem size
const index_t REMAINDER = NUM_VER - step_sz * GRNTY;
if(TID_ST < REMAINDER){
step_sz ++;
}
const index_t strt_pos = step_sz * TID_ST +
(TID_ST >= REMAINDER ? REMAINDER:0);
const index_t end_pos = strt_pos + step_sz;
tid = strt_pos;
index_t tid_next = strt_pos + 1;
if(step_sz){
card_curr = tex1Dfetch(tex_csc_card, strt_pos);
depth_curr = tex1Dfetch(tex_depth, strt_pos);
}
while(tid < end_pos){
if( tid_next < end_pos){
card_next = tex1Dfetch(tex_csc_card, tid_next);
depth_next = tex1Dfetch(tex_depth,tid_next);
}
if(depth_curr == INFTY){
if(card_curr > 0){
if(card_curr < sml_shed){
ex_cat_sml_q[EX_OFF+ex_sml_ct]=tid;
ex_sml_ct++;
}else if(card_curr > lrg_shed){
ex_cat_lrg_q[EX_OFF+ex_lrg_ct]=tid;
ex_lrg_ct++;
}else{
ex_cat_mid_q[EX_OFF+ex_mid_ct]=tid;
ex_mid_ct++;
}
}
}
//construct hub-cache
if(depth_curr == LEVEL){
hub_ptr = tid & (HUB_BU_SZ - 1);
if(card_curr > hub_card[hub_ptr]){
hub_vert[hub_ptr] = tid;
hub_card[hub_ptr] = card_curr;
}
}
card_curr = card_next;
depth_curr = depth_next;
tid = tid_next;
tid_next ++;
}
// }else{
// //big problem size
// //In problem big, we want each thread to get 16x indices to check.
// if(NUM_VER - step_sz * GRNTY){
// //handle error
// }
// __shared__ index_t beg_pos_s[THDS_NUM];
// __shared__ depth_t depth_s[THDS_NUM<<4];
// beg_pos_s[threadIdx.x] = step_sz*TID;
//
// const index_t TRIES = step_sz>>4;
// const index_t lane_id = threadIdx.x%32;
// const index_t warp_id = threadIdx.x>>5;
// const index_t thread_off= threadIdx.x<<4;
//
// index_t tries = 0;
// index_t load_ptr;
// index_t proc_vert;
//
// while(tries < TRIES){
//
// //warp stride loading
// for(int i = 0; i< 32; i++){
// proc_vert=(warp_id<<5)+i+(lane_id>>4);
// load_ptr=(tries<<4)+beg_pos_s[proc_vert]+(lane_id%16);
// depth_s[(proc_vert<<4)+(lane_id%16)]=tex1Dfetch(tex_depth,load_ptr);
// }
// __syncthreads();
// ++tries;
//
// //thread strid checking
// for(int i = 0; i< 16; i++)
// if(depth_curr == INFTY)//maybe unvisited
// if(card_curr > 0){
// if(card_curr < sml_shed){
// ex_cat_sml_q[EX_OFF+ex_sml_ct]=tid;
// ex_sml_ct++;
// }else if(card_curr > lrg_shed){
// ex_cat_lrg_q[EX_OFF+ex_lrg_ct]=tid;
// ex_lrg_ct++;
// }else{
// ex_cat_mid_q[EX_OFF+ex_mid_ct]=tid;
// ex_mid_ct++;
// }
// }
//
// //construct hub-cache
// if(depth_curr == LEVEL){
// hub_ptr = tid & (HUB_BU_SZ - 1);
// if(card_curr > hub_card[hub_ptr]){
// hub_vert[hub_ptr] = tid;
// hub_card[hub_ptr] = card_curr;
// }
// }
//
// card_curr = card_next;
// depth_curr = depth_next;
// tid = tid_next;
// tid_next ++;
// }
//
//
// }
#ifdef ENABLE_CHECKING
if( ex_sml_ct > bin_sz ||
ex_mid_ct > bin_sz ||
ex_lrg_ct > bin_sz)
error_d = 1;
#endif
ex_cat_sml_sz[TID_ST]= ex_sml_ct;
ex_cat_mid_sz[TID_ST]= ex_mid_ct;
ex_cat_lrg_sz[TID_ST]= ex_lrg_ct;
}
//+----------------------------
//|For xxx_inspect_clfy
//+----------------------------
template < typename vertex_t,typename index_t>
__global__ void reaper
(
vertex_t *ex_cat_q,//sml, mid, lrg
vertex_t *ex_q_d,//sml, mid, lrg
index_t *ex_q_sz_d,
index_t *ex_cat_off,
const index_t bin_sz
)
{
const index_t TID = threadIdx.x+blockIdx.x*blockDim.x;
const index_t SCAN_OFF = ex_cat_off[TID];
const index_t COUNT = ex_q_sz_d[TID];
const index_t BIN_OFF = TID*bin_sz;
for(index_t i=0;i<COUNT;i++)
ex_q_d[SCAN_OFF+i] = ex_cat_q[BIN_OFF+i];
}
template <typename vertex_t, typename index_t,
typename depth_t>
__global__ void sort_bu_dist_inspect_clfy
(
vertex_t *ex_cat_sml_q,//each thd obt ex_q
vertex_t *ex_cat_mid_q,//each thd obt ex_q
vertex_t *ex_cat_lrg_q,//each thd obt ex_q
index_t *ex_cat_sml_sz,
index_t *ex_cat_mid_sz,
index_t *ex_cat_lrg_sz,
depth_t *depth_d,
depth_t curr_level,
index_t num_ver,
const index_t sml_shed,
const index_t lrg_shed,
const index_t bin_sz
)
{
const index_t TID_ST = threadIdx.x +blockIdx.x*blockDim.x;
const index_t NUM_VER = num_ver;
const index_t GRNTY = blockDim.x*gridDim.x;
const index_t EX_OFF = TID_ST*bin_sz;
index_t tid_next = TID_ST;
index_t tid = TID_ST;
const depth_t LEVEL = curr_level;
index_t card_curr, card_next;
depth_t depth_curr, depth_next;
index_t ex_sml_ct = 0;
index_t ex_mid_ct = 0;
index_t ex_lrg_ct = 0;
index_t hub_ptr;
while(tid < HUB_BU_SZ)
{
hub_vert[tid] = V_INI_HUB;
hub_card[tid] = 0;
tid += GRNTY;
}
tid = TID_ST;
if(tid < NUM_VER)
{
card_curr = tex1Dfetch(tex_csc_card, tid);
depth_curr = tex1Dfetch(tex_depth, tid);
tid_next += GRNTY;
}
while(tid<NUM_VER)
{
if(tid_next < NUM_VER)
{
card_next = tex1Dfetch(tex_csc_card, tid_next);
depth_next = tex1Dfetch(tex_depth, tid_next);
}
if(depth_curr == INFTY){
//+---------------
//|!!!HERE IS A FILTER OF CARD =0
//+------------------------------
if(card_curr<=0)
{}else if(card_curr < sml_shed)
{
ex_cat_sml_q[EX_OFF+ex_sml_ct]=tid;
ex_sml_ct++;
}else if(card_curr > lrg_shed){
ex_cat_lrg_q[EX_OFF+ex_lrg_ct]=tid;
ex_lrg_ct++;
}else{
ex_cat_mid_q[EX_OFF+ex_mid_ct]=tid;
ex_mid_ct++;
}
}
//construct hub-cache
if(depth_curr == LEVEL)
{
hub_ptr = tid & (HUB_BU_SZ - 1);
if(card_curr > hub_card[hub_ptr])
{
hub_vert[hub_ptr] = tid;
hub_card[hub_ptr] = card_curr;
}
}
depth_curr = depth_next;
card_curr = card_next;
tid = tid_next;
tid_next += GRNTY;
}
#ifdef ENABLE_CHECKING
if( ex_sml_ct > bin_sz ||
ex_mid_ct > bin_sz ||
ex_lrg_ct > bin_sz)
error_d = 1;
#endif
ex_cat_sml_sz[TID_ST]= ex_sml_ct;
ex_cat_mid_sz[TID_ST]= ex_mid_ct;
ex_cat_lrg_sz[TID_ST]= ex_lrg_ct;
}
//+---------------------------------------------------
//|CLASSIFIED BASED STORAGE FOR EX_QUEUE
//+---------------------------------------------------
template< typename vertex_t,
typename index_t,
typename depth_t>
void sort_inspect_clfy
(
vertex_t *ex_cat_sml_q,//each thd obt ex_q
vertex_t *ex_cat_mid_q,//each thd obt ex_q
vertex_t *ex_cat_lrg_q,//each thd obt ex_q
vertex_t *ex_q_sml_d,
vertex_t *ex_q_mid_d,
vertex_t *ex_q_lrg_d,
vertex_t *ex_cat_sml_sz,
vertex_t *ex_cat_mid_sz,
vertex_t *ex_cat_lrg_sz,
vertex_t *ex_cat_sml_off,
vertex_t *ex_cat_mid_off,
vertex_t *ex_cat_lrg_off,
depth_t *depth_d,
depth_t curr_level,
index_t *tr_edges_c_d,
index_t *tr_edges_c_h,
index_t num_ver,//num ver in the graph
cudaStream_t *stream,
const index_t sml_shed,
const index_t lrg_shed,
const index_t bin_sz
)
{
sort_dist_inspect_clfy
<vertex_t, index_t, depth_t>
<<<BLKS_NUM, THDS_NUM>>>
(
ex_cat_sml_q,//each thd obt ex_q
ex_cat_mid_q,//each thd obt ex_q
ex_cat_lrg_q,//each thd obt ex_q
tr_edges_c_d,
ex_cat_sml_sz,
ex_cat_mid_sz,
ex_cat_lrg_sz,
depth_d,
curr_level,
num_ver,
sml_shed,
lrg_shed,
bin_sz
);
cudaThreadSynchronize();
if(curr_level){
cudaMemcpy(tr_edges_c_h, tr_edges_c_d,
sizeof(index_t)*BLKS_NUM,
cudaMemcpyDeviceToHost);
//+------------------------------------
//|SUM NUMBER OF VER TO BE EXPANDED
//+--------------------------------------
for(index_t i=1; i < BLKS_NUM; i++)
tr_edges_c_h[0] += tr_edges_c_h[i];
if(tr_edges_c_h[0] >= EDGES_C*0.3)
{
ENABLE_BTUP = true;
#ifdef ENABLE_MONITORING
std::cout<<"~~~~~~~TOP-DOWN-->>BOTTOM-UP~~~~~~~~~\n";
#endif
sort_switch_dist_inspect_clfy
<vertex_t, index_t, depth_t>
<<<BLKS_NUM, THDS_NUM>>>
(
ex_cat_sml_q,//each thd obt ex_q
ex_cat_mid_q,//each thd obt ex_q
ex_cat_lrg_q,//each thd obt ex_q
ex_cat_sml_sz,
ex_cat_mid_sz,
ex_cat_lrg_sz,
depth_d,
curr_level,
num_ver,
sml_shed,
lrg_shed,
bin_sz
);
}
}
//+------------------
//|SML_Q
//+------------------
insp_scan
<vertex_t, index_t>
(
ex_cat_sml_sz,
ex_cat_sml_off,
THDS_NUM*BLKS_NUM,
BLKS_NUM>>1,
THDS_NUM>>1,
SML_Q,
stream[0]
);
reaper
<vertex_t, index_t>
<<<BLKS_NUM, THDS_NUM, 0, stream[0]>>>
(
ex_cat_sml_q,
ex_q_sml_d,
ex_cat_sml_sz,
ex_cat_sml_off,
bin_sz
);
//+------------------
//|MID_Q
//+------------------
insp_scan
<vertex_t, index_t>
(
ex_cat_mid_sz,
ex_cat_mid_off,
THDS_NUM*BLKS_NUM,
BLKS_NUM>>1,
THDS_NUM>>1,
MID_Q,
stream[1]
);
reaper
<vertex_t, index_t>
<<<BLKS_NUM, THDS_NUM, 0, stream[1]>>>
(
ex_cat_mid_q,
ex_q_mid_d,
ex_cat_mid_sz,
ex_cat_mid_off,
bin_sz
);
//+------------------
//|LRG_Q
//+------------------
insp_scan
<vertex_t, index_t>
(
ex_cat_lrg_sz,
ex_cat_lrg_off,
THDS_NUM*BLKS_NUM,
BLKS_NUM>>1,
THDS_NUM>>1,
LRG_Q,
stream[2]
);
reaper
<vertex_t, index_t>
<<<BLKS_NUM, THDS_NUM, 0, stream[2]>>>
(
ex_cat_lrg_q,
ex_q_lrg_d,
ex_cat_lrg_sz,
ex_cat_lrg_off,
bin_sz
);
//+------------------------------------
//|counting number of edges traversed
//+------------------------------------
#ifdef ENABLE_MONITORING
if(curr_level)
std::cout<<"curr exp_sz: "<<tr_edges_c_h[0]<<"vs"<<EDGES_C
<<"="<<(tr_edges_c_h[0]*1.0/EDGES_C)
<<"\n";
#endif
}
template< typename vertex_t,
typename index_t,
typename depth_t>
void sort_bu_inspect_clfy
(
vertex_t *ex_cat_sml_q,//each thd obt ex_q
vertex_t *ex_cat_mid_q,//each thd obt ex_q
vertex_t *ex_cat_lrg_q,//each thd obt ex_q
vertex_t *ex_q_sml_d,
vertex_t *ex_q_mid_d,
vertex_t *ex_q_lrg_d,
vertex_t *ex_cat_sml_sz,
vertex_t *ex_cat_mid_sz,
vertex_t *ex_cat_lrg_sz,
vertex_t *ex_cat_sml_off,
vertex_t *ex_cat_mid_off,
vertex_t *ex_cat_lrg_off,
depth_t *depth_d,
depth_t curr_level,
index_t num_ver,//num ver in the graph
cudaStream_t *stream,
const index_t sml_shed,
const index_t lrg_shed,
const index_t bin_sz
)
{
// std::cout<<"Before catgorizer: "<<cudaDeviceSynchronize()<<"\n";
sort_bu_dist_inspect_clfy
<vertex_t, index_t, depth_t>
<<<BLKS_NUM, THDS_NUM>>>
(
ex_cat_sml_q,//each thd obt ex_q
ex_cat_mid_q,//each thd obt ex_q
ex_cat_lrg_q,//each thd obt ex_q
ex_cat_sml_sz,
ex_cat_mid_sz,
ex_cat_lrg_sz,
depth_d,
curr_level,
num_ver,
sml_shed,
lrg_shed,
bin_sz
);
cudaThreadSynchronize();
//+------------------
//|SML_Q
//+------------------
insp_scan
<vertex_t, index_t>
(
ex_cat_sml_sz,
ex_cat_sml_off,
THDS_NUM*BLKS_NUM,
BLKS_NUM>>1,
THDS_NUM>>1,
SML_Q,
stream[0]
);
// std::cout<<"After scan: "<<cudaDeviceSynchronize()<<"\n";
reaper
<vertex_t, index_t>
<<<BLKS_NUM, THDS_NUM, 0, stream[0]>>>
(
ex_cat_sml_q,
ex_q_sml_d,
ex_cat_sml_sz,
ex_cat_sml_off,
bin_sz
);
//+------------------
//|MID_Q
//+------------------
insp_scan
<vertex_t, index_t>
(
ex_cat_mid_sz,
ex_cat_mid_off,
THDS_NUM*BLKS_NUM,
BLKS_NUM>>1,
THDS_NUM>>1,
MID_Q,
stream[1]
);
reaper
<vertex_t, index_t>
<<<BLKS_NUM, THDS_NUM, 0, stream[1]>>>
(
ex_cat_mid_q,
ex_q_mid_d,
ex_cat_mid_sz,
ex_cat_mid_off,
bin_sz
);
//+------------------
//|LRG_Q
//+------------------
insp_scan
<vertex_t, index_t>
(
ex_cat_lrg_sz,
ex_cat_lrg_off,
THDS_NUM*BLKS_NUM,
BLKS_NUM>>1,
THDS_NUM>>1,
LRG_Q,
stream[2]
);
reaper
<vertex_t, index_t>
<<<BLKS_NUM, THDS_NUM, 0, stream[2]>>>
(
ex_cat_lrg_q,
ex_q_lrg_d,
ex_cat_lrg_sz,
ex_cat_lrg_off,
bin_sz
);
}