12 int radixID, i, bucket_indx;
13 local_1 :
for (radixID=0; radixID<
SCAN_RADIX; radixID++) {
15 bucket_indx = radixID*SCAN_BLOCK + i;
16 bucket[bucket_indx] += bucket[bucket_indx-1];
23 int radixID, bucket_indx;
25 sum_1 :
for (radixID=1; radixID<
SCAN_RADIX; radixID++) {
27 sum[radixID] =
sum[radixID-1] + bucket[bucket_indx];
33 int radixID, i, bucket_indx;
34 last_1:
for (radixID=0; radixID<
SCAN_RADIX; radixID++) {
36 bucket_indx = radixID * SCAN_BLOCK + i;
37 bucket[bucket_indx] = bucket[bucket_indx] +
sum[radixID];
52 int blockID, i, bucket_indx, a_indx;
54 hist_1 :
for (blockID=0; blockID<
NUMOFBLOCKS; blockID++) {
55 hist_2 :
for(i=0; i<4; i++) {
57 bucket_indx = ((a[a_indx] >>
exp) & 0x3)*NUMOFBLOCKS + blockID + 1;
58 bucket[bucket_indx]++;
65 int i, blockID, bucket_indx, a_indx;
68 update_1 :
for (blockID = 0; blockID <
NUMOFBLOCKS; blockID++) {
69 update_2 :
for(i=0; i<4; i++) {
72 b[bucket[bucket_indx]] = a[a_indx];
73 bucket[bucket_indx]++;
84 sort_1 :
for (exp=0; exp<32; exp+=2) {
100 update(a, bucket, b, exp);
void local_scan(int bucket[BUCKETSIZE])
void last_step_scan(int bucket[BUCKETSIZE], int sum[SCAN_RADIX])
void ss_sort(int a[SIZE], int b[SIZE], int bucket[BUCKETSIZE], int sum[SCAN_RADIX])
void init(int bucket[BUCKETSIZE])
void sum_scan(int sum[SCAN_RADIX], int bucket[BUCKETSIZE])
void update(int b[SIZE], int bucket[BUCKETSIZE], int a[SIZE], int exp)
void hist(int bucket[BUCKETSIZE], int a[SIZE], int exp)