Created
February 25, 2018 01:27
-
-
Save ChrisLane/a4dd51f9470e3494f371578dbde51c83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__global__ void addToBlocks(int *d_Output, int *d_Addition, int len) { | |
int thid = blockIdx.x * blockDim.x + threadIdx.x; | |
if ((thid) < len) { | |
printf("%d:%d + %d:%d\n", thid, d_Output[thid], blockIdx.x, d_Addition[blockIdx.x]); | |
d_Output[thid] += d_Addition[blockIdx.x]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment