mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-27 09:29:15 -05:00
574b492b47
From CUDA 9.0 to CUDA 11.4 the CUDA Visual Studio integration defines omitted user defines from PTX generation. With CUDA 11.5 this has been resolved, so we backport the fix to allow for consistent behavior when using CMake
12 lines
260 B
Plaintext
12 lines
260 B
Plaintext
|
|
#ifndef CUDA_PTX_COMPILATION
|
|
# error "CUDA_PTX_COMPILATION define not provided"
|
|
#endif
|
|
|
|
__global__ void kernelA(float* r, float* x, float* y, float* z, int size)
|
|
{
|
|
for (int i = threadIdx.x; i < size; i += blockDim.x) {
|
|
r[i] = x[i] * y[i] + z[i];
|
|
}
|
|
}
|