Created
July 8, 2019 21:30
-
-
Save r7vme/70aa9225ec184b3c35264a47e9dd40d6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 sqrtKernel( | |
const int n, | |
const float* x, | |
float* y) | |
{ | |
for (int i = blockIdx.x * blockDim.x + threadIdx.x; | |
i < n; i += gridDim.x * blockDim.x) | |
{ | |
y[i] = sqrtf(x[i]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment