PandA-2024.02
examples
MachSuite
MachSuite
sort
radix
sort.h
Go to the documentation of this file.
1
/*
2
Implementation based on algorithm described in:
3
A. Danalis, G. Marin, C. McCurdy, J. S. Meredith, P. C. Roth, K. Spafford, V. Tipparaju, and J. S. Vetter.
4
The scalable heterogeneous computing (shoc) benchmark suite.
5
In Proceedings of the 3rd Workshop on General-Purpose Computation on Graphics Processing Units, 2010
6
*/
7
8
#include <stdio.h>
9
#include <stdlib.h>
10
#include <string.h>
11
#include "support.h"
12
13
#define TYPE int32_t
14
#define TYPE_MAX INT32_MAX
15
16
#define SIZE 2048
17
#define NUMOFBLOCKS 512
18
19
#define ELEMENTSPERBLOCK 4
20
#define RADIXSIZE 4
21
#define BUCKETSIZE NUMOFBLOCKS*RADIXSIZE
22
#define MASK 0x3
23
24
#define SCAN_BLOCK 16
25
#define SCAN_RADIX BUCKETSIZE/SCAN_BLOCK
26
27
void
ss_sort
(
int
a[
SIZE
],
int
b[SIZE],
int
bucket[
BUCKETSIZE
],
int
sum
[
SCAN_RADIX
]);
28
30
// Test harness interface code.
31
32
struct
bench_args_t
{
33
int
a
[
SIZE
];
34
int
b
[
SIZE
];
35
int
bucket
[
BUCKETSIZE
];
36
int
sum
[
SCAN_RADIX
];
37
};
bench_args_t::bucket
int bucket[BUCKETSIZE]
Definition:
sort.h:35
bench_args_t::a
TYPE a[SIZE]
Definition:
sort.h:16
SCAN_RADIX
#define SCAN_RADIX
Definition:
sort.h:25
sum
int sum
Definition:
dotproduct.h:3
BUCKETSIZE
#define BUCKETSIZE
Definition:
sort.h:21
ss_sort
void ss_sort(int a[SIZE], int b[SIZE], int bucket[BUCKETSIZE], int sum[SCAN_RADIX])
Definition:
sort.c:78
SIZE
#define SIZE
Definition:
sort.h:16
bench_args_t::sum
int sum[SCAN_RADIX]
Definition:
sort.h:36
bench_args_t
Definition:
aes.h:18
bench_args_t::b
int b[SIZE]
Definition:
sort.h:34
Generated on Mon Feb 12 2024 13:02:50 for PandA-2024.02 by
1.8.13