Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7867ece

Browse files
author
Bernhard Kerbl
committed
Better comments
1 parent a10d84b commit 7867ece

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

18_StandardLibrary/src/main.cu

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
#include <cuda/std/atomic>
88

99
/*
10-
Basic, architecture-agnostic reduction, using global atomics.
11-
Uses portable cuda::std::atomics. Note that even though this code is portable,
12-
it may not necessarily give the best performance. cuda::std::atomics have
13-
system-wide (CPU + GPU) scope. If an algorithm is sure to run on the GPU, better
14-
performance may be achieved using cuda::atomics, which take an additional parameter
15-
"thread_scope" (e.g., "device" for global, "block" for shared memory atomics).
10+
Basic, architecture-agnostic reduction, using global atomics.
11+
Uses portable cuda::std::atomics. Note that even though this code is portable,
12+
it may not necessarily give the best performance. cuda::std::atomics have
13+
system-wide (CPU + GPU) scope. If an algorithm is sure to run on the GPU, better
14+
performance may be achieved using cuda::atomics, which take an additional parameter
15+
"thread_scope" (e.g., "device" for global, "block" for shared memory atomics).
1616
*/
1717
__host__ __device__ void reduceAtomic(int tId, int numThreads, int N, const int* input, cuda::std::atomic<int>* result)
1818
{

0 commit comments

Comments
 (0)