GENIE
match_common.cu
Go to the documentation of this file.
1 #include "match_common.h"
2 #include "match_device_utils.h"
3 
4 namespace genie
5 {
6 namespace matching
7 {
8 
9 __global__
10 void convert_to_data(T_HASHTABLE* table, u32 size)
11 {
12  u32 tid = threadIdx.x + blockIdx.x * blockDim.x;
13  if (tid >= size)
14  return;
15  data_t *mytable = reinterpret_cast<data_t*>(&table[tid]);
16  u32 agg = get_key_attach_id(table[tid]);
17  u32 myid = get_key_pos(table[tid]);
18  mytable->id = myid;
19  mytable->aggregation = *reinterpret_cast<float*>(&agg);
20 }
21 
22 } // namespace matching
23 
24 } // namespace genie
25 
This is the top-level namespace of the project.
__global__ void convert_to_data(T_HASHTABLE *table, u32 size)
Definition: match_common.cu:10
__host__ __forceinline__ __device__ u32 get_key_attach_id(T_HASHTABLE key)
__forceinline__ __host__ __device__ T_KEY get_key_pos(T_HASHTABLE key)
uint32_t u32
Definition: match_common.h:18
Basic utility functions to be used in matching kernels.
u64 T_HASHTABLE
Definition: match_common.h:21