1 #define ARRAY_SIZE 24000 3 #define OPS_PER_ACCEL ARRAY_SIZE/NUM_ACCELS 5 typedef unsigned long int ub4;
6 typedef unsigned short int ub2;
7 typedef unsigned char ub1;
17 b = (val >> 5) & 0x1fff;
18 a = ((val << 22) >> 19);
19 rsl = (a^scramble[tab[b]]);
27 for (i=0; i<max_idx; i++) {
28 hash=
phash(key_input[i], scramble, tab);
29 result +=(table[hash] == key_input[i]);
41 #pragma omp parallel for num_threads(NUM_ACCELS) private(i) 52 printf (
"Result: %d\n", main_result);
53 if (main_result == 24000) {
54 printf(
"RESULT: PASS\n");
56 printf(
"RESULT: FAIL\n");
ub4 phash(ub4 val, ub2 *scramble, ub1 *tab)
int hash_table[ARRAY_SIZE]
int perfect_hash(int *key_input, int *table, ub2 *scramble, ub1 *tab, int max_idx)