-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgpuInterface.h
39 lines (22 loc) · 1.07 KB
/
gpuInterface.h
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
// see https://github.com/nosferalatu/SimpleGPUHashTable
#pragma once
#include <string>
struct KeyValue
{
uint32_t key;
uint32_t value;
};
const uint32_t kHashTableCapacity = 128 * 1024 * 1024;
const uint32_t kNumKeyValues = kHashTableCapacity / 2;
const uint32_t kEmpty = 0xffffffff;
KeyValue* create_hashtable();
void insert_hashtable(KeyValue* hashtable, const KeyValue* kvs, uint32_t num_kvs);
void lookup_hashtable(KeyValue* hashtable, KeyValue* kvs, uint32_t num_kvs);
void lookup_hashtable_single_query(KeyValue* hashtable, KeyValue* kvs);
void lookup_hashtable_multiple_query(KeyValue* hashtable, KeyValue* kvs, uint32_t num_kvs);
void lookup_hashtable_on_array(KeyValue* hashTable, uint32_t* h_array, uint32_t ARRAY_SIZE, uint32_t ARRAY_BYTES);
void delete_hashtable(KeyValue* hashtable, const KeyValue* kvs, uint32_t num_kvs);
std::vector<KeyValue> iterate_hashtable(KeyValue* hashtable);
void destroy_hashtable(KeyValue* hashtable);
// tiff.cpp
void loadTiff(long*** imageStack, std::string pathTiff, int startPage,int endPage,std::tuple<int,int>& dimensions ) ;