2525#include < catch2/catch_test_macros.hpp>
2626
2727struct valid_key {
28- valid_key (uint64_t num_keys) : num_keys_(num_keys) {}
29- __host__ __device__ bool operator ()(uint64_t x) const { return x < num_keys_; }
30- const uint64_t num_keys_;
28+ valid_key (size_t num_keys) : num_keys_(num_keys) {}
29+ __host__ __device__ bool operator ()(size_t x) const { return x < num_keys_; }
30+ const size_t num_keys_;
3131};
3232
3333template <typename KeyType>
3434void generate_keys (thrust::host_vector<KeyType>& keys,
35- thrust::host_vector<uint64_t >& offsets,
35+ thrust::host_vector<size_t >& offsets,
3636 size_t num_keys,
3737 size_t max_key_value,
3838 size_t max_key_length)
@@ -58,7 +58,7 @@ TEST_CASE("Lookup test", "")
5858 std::size_t max_key_value = 1000 ;
5959 std::size_t max_key_length = 32 ;
6060 thrust::host_vector<KeyType> keys;
61- thrust::host_vector<uint64_t > offsets;
61+ thrust::host_vector<size_t > offsets;
6262
6363 generate_keys (keys, offsets, num_keys, max_key_value, max_key_length);
6464
@@ -97,9 +97,9 @@ TEST_CASE("Lookup test", "")
9797 trie.build ();
9898
9999 {
100- thrust::device_vector<uint64_t > lookup_result (num_keys, -1lu);
101- thrust::device_vector<KeyType> device_keys = keys;
102- thrust::device_vector<uint64_t > device_offsets = offsets;
100+ thrust::device_vector<size_t > lookup_result (num_keys, -1lu);
101+ thrust::device_vector<KeyType> device_keys = keys;
102+ thrust::device_vector<size_t > device_offsets = offsets;
103103
104104 trie.lookup (
105105 device_keys.begin (), device_offsets.begin (), device_offsets.end (), lookup_result.begin ());
0 commit comments