Skip to content

Commit 19bc74d

Browse files
committed
Reduce register pressure
1 parent fc3374d commit 19bc74d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ __global__ void weighted_minhash_cuda(
4242
const uint32_t sample_offset = sample_index * sample_delta;
4343
const uint32_t samples = blockDim.x * sample_delta;
4444
extern __shared__ float shmem[];
45-
float *lnmins = &shmem[(threadIdx.y * blockDim.x + sample_index) * 3 * sample_delta];
46-
uint2 *dtmins = reinterpret_cast<uint2 *>(lnmins + sample_delta);
45+
float *volatile lnmins = &shmem[(threadIdx.y * blockDim.x + sample_index) * 3 * sample_delta];
46+
uint2 *volatile dtmins = reinterpret_cast<uint2 *>(lnmins + sample_delta);
4747
int32_t row = -1;
4848
for (uint32_t index = 0, border = 0;; index++) {
4949
if (index >= border) {

0 commit comments

Comments
 (0)