diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index eebfd901d..961097baf 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -1198,7 +1198,7 @@ namespace Eigen { #define EIGEN_USING_STD(FUNC) using std::FUNC; #endif -#if EIGEN_COMP_MSVC_STRICT && (EIGEN_COMP_MSVC < 1900 || (EIGEN_COMP_MSVC == 1900 && EIGEN_COMP_NVCC)) +#if EIGEN_COMP_MSVC_STRICT && (EIGEN_COMP_MSVC < 1916 || (EIGEN_COMP_MSVC == 1916 && EIGEN_COMP_NVCC)) // For older MSVC versions, as well as 1900 && CUDA 8, using the base operator is necessary, // otherwise we get duplicate definition errors // For later MSVC versions, we require explicit operator= definition, otherwise we get diff --git a/unsupported/test/cxx11_tensor_of_float16_gpu.cu b/unsupported/test/cxx11_tensor_of_float16_gpu.cu index 30bcc1d28..e11782a79 100644 --- a/unsupported/test/cxx11_tensor_of_float16_gpu.cu +++ b/unsupported/test/cxx11_tensor_of_float16_gpu.cu @@ -113,7 +113,7 @@ void test_gpu_unary() { gpu_float.device(gpu_device) = gpu_float.random() - gpu_float.constant(0.5f); gpu_res_float.device(gpu_device) = gpu_float.abs(); - gpu_res_half.device(gpu_device) = gpu_float.cast().abs().cast(); + gpu_res_half.device(gpu_device) = gpu_float.cast().abs().template cast(); Tensor half_prec(num_elem); Tensor full_prec(num_elem); @@ -154,7 +154,7 @@ void test_gpu_elementwise() { gpu_float1.device(gpu_device) = gpu_float1.random(); gpu_float2.device(gpu_device) = gpu_float2.random(); gpu_res_float.device(gpu_device) = (gpu_float1 + gpu_float2) * gpu_float1; - gpu_res_half.device(gpu_device) = ((gpu_float1.cast() + gpu_float2.cast()) * gpu_float1.cast()).cast(); + gpu_res_half.device(gpu_device) = ((gpu_float1.cast() + gpu_float2.cast()) * gpu_float1.cast()).template cast(); Tensor half_prec(num_elem); Tensor full_prec(num_elem); @@ -444,8 +444,8 @@ void test_gpu_forced_evals() { gpu_float.device(gpu_device) = gpu_float.random() - gpu_float.constant(0.5f); gpu_res_float.device(gpu_device) = gpu_float.abs(); - gpu_res_half1.device(gpu_device) = gpu_float.cast().abs().eval().cast(); - gpu_res_half2.device(gpu_device) = gpu_float.cast().abs().broadcast(no_bcast).eval().cast(); + gpu_res_half1.device(gpu_device) = gpu_float.cast().abs().eval().template cast(); + gpu_res_half2.device(gpu_device) = gpu_float.cast().abs().broadcast(no_bcast).eval().template cast(); Tensor half_prec1(num_elem); Tensor half_prec2(num_elem);