Skip to content

Commit

Permalink
Small error fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispypatt committed Apr 22, 2019
1 parent 342d471 commit b9d2a83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion groupby_hash_templates.cu
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ bool keyEqualRM(T* key_columns, size_t idx1, size_t idx2, size_t num_key_rows, s
}

// hashKey generating
template <typename T> __host__ __device__
__host__ __device__
size_t HashKey(size_t idx, T* key_columns, size_t num_key_rows, size_t num_key_columns) {
size_t hash_key = 0;
Expand Down Expand Up @@ -86,7 +87,7 @@ void fillTable(Tkey* key_columns,
size_t offset = gridDim.x * blockDim.x;
for (size_t i = idx; i < num_key_rows; i += offset) {
// try inserting, assume there is enough space
size_t curPos = HashKey(i, key_columns, num_key_rows, num_key_columns) % len_hash_table;
size_t curPos = HashKey(i, key_columns, num_key_rows, num_key_cols) % len_hash_table;

unsigned int collisionCount = 0;
bool isInserted = false;
Expand Down

0 comments on commit b9d2a83

Please sign in to comment.