OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-SimpleGPUHashTable commits / b99a2ea

Make sure batches divide evenly
b99a2eaaa3e89a1c8447fc1bf7da65f62cde1113
by David Farrell <nosferalatu@gmail.com> · 2020-03-01T01:30:28.000Z

Changed files (1) +3 -2

src/test.cpp +3 -2
……@@ -78,8 +78,9 @@ int main()
7878 KeyValue* pHashTable = create_hashtable(kHashTableCapacity);
7979
8080 // Insert all the elements; each batch is processed concurrently on the GPU
81 int num_batch_insertions = 10;
82 int num_kvs_in_batch = kNumKeyValues / num_batch_insertions;
81 const uint32_t num_batch_insertions = 16;
82 static_assert(kNumKeyValues % num_batch_insertions == 0, "needs even divisor");
83 uint32_t num_kvs_in_batch = kNumKeyValues / num_batch_insertions;
8384 for (int i = 0; i < num_batch_insertions; i++)
8485 {
8586 insert_hashtable(pHashTable, all_kvs.data() + i*num_kvs_in_batch, num_kvs_in_batch);