Created
July 8, 2019 21:43
-
-
Save r7vme/96ed180e9c54c58b527dbe57095aec32 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 maxKernel( | |
const int n, | |
const float eps, | |
const float* x, | |
float* y) | |
{ | |
for (int i = blockIdx.x * blockDim.x + threadIdx.x; | |
i < n; i += gridDim.x * blockDim.x) | |
{ | |
y[i] = fmaxf(x[i], eps); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment