Skip to content

Commit

Permalink
Updated default cuda example (#3685)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-rifkin committed May 19, 2022
1 parent 0954019 commit f7f5f1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/cuda/default.cu
@@ -1,6 +1,6 @@
// Type your code here, or load an example.
__global__ void square(int *array, int n) {
int tid = blockIdx.x;
__global__ void square(int* array, int n) {
int tid = blockDim.x * blockIdx.x + threadIdx.x;
if (tid < n)
array[tid] = array[tid] * array[tid];
}

0 comments on commit f7f5f1c

Please sign in to comment.