On CUDA versions previous to 8.0, only __shared__ variables could be declared as static in the device code.
This commit is contained in:
Joan Puigcerver 2017-06-07 07:03:27 +02:00 committed by gunan
parent cd56a638da
commit 1b6453bec5

View File

@ -66,7 +66,13 @@ class ProjectiveGenerator {
projection;
// TODO(ringwalt): Add a fill value input.
#if (defined __CUDA_ARCH__) && (CUDART_VERSION < 8000)
// On CUDA versions previous to 8.0, only __shared__ variables
// could be declared as static in the device code.
const T fill_value = T(0);
#else
static const T fill_value = T(0);
#endif
switch (interpolation_) {
case INTERPOLATION_NEAREST:
// Switch the order of x and y again for indexing into the image.