Skip to content

Commit e571f94

Browse files
committed
double fix coalescing.cu
1 parent a7953f1 commit e571f94

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

series/cuda-cpp/coalescing-global/coalescing.cu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void runTest(int deviceId, int nMB)
5151
offset<<<n/blockSize, blockSize>>>(d_a, 0); // warm up
5252

5353
for (int i = 0; i <= 32; i++) {
54-
checkCuda( cudaMemset(d_a, 0.0, n * sizeof(T)) );
54+
checkCuda( cudaMemset(d_a, 0, n * sizeof(T)) );
5555

5656
checkCuda( cudaEventRecord(startEvent,0) );
5757
offset<<<n/blockSize, blockSize>>>(d_a, i);
@@ -67,7 +67,7 @@ void runTest(int deviceId, int nMB)
6767

6868
stride<<<n/blockSize, blockSize>>>(d_a, 1); // warm up
6969
for (int i = 1; i <= 32; i++) {
70-
checkCuda( cudaMemset(d_a, 0.0, n * sizeof(T)) );
70+
checkCuda( cudaMemset(d_a, 0, n * sizeof(T)) );
7171

7272
checkCuda( cudaEventRecord(startEvent,0) );
7373
stride<<<n/blockSize, blockSize>>>(d_a, i);
@@ -108,4 +108,4 @@ int main(int argc, char **argv)
108108

109109
if (bFp64) runTest<double>(deviceId, nMB);
110110
else runTest<float>(deviceId, nMB);
111-
}
111+
}

0 commit comments

Comments
 (0)