From 0ac1fc52ddc4042e1a4e07061207db5a2223affa Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Thu, 13 Mar 2025 20:47:31 -0700 Subject: [PATCH] Fix CUDA clang again with new C++11 usages --- Eigen/src/Core/arch/CUDA/Complex.h | 4 ++-- test/CMakeLists.txt | 6 +----- .../Eigen/CXX11/src/Tensor/TensorContractionCuda.h | 2 +- unsupported/Eigen/CXX11/src/Tensor/TensorConvolution.h | 8 +++----- unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h | 2 +- unsupported/test/CMakeLists.txt | 6 +----- 6 files changed, 9 insertions(+), 19 deletions(-) diff --git a/Eigen/src/Core/arch/CUDA/Complex.h b/Eigen/src/Core/arch/CUDA/Complex.h index 526e59fd0..57d1201f4 100644 --- a/Eigen/src/Core/arch/CUDA/Complex.h +++ b/Eigen/src/Core/arch/CUDA/Complex.h @@ -55,7 +55,7 @@ template struct scalar_difference_op, std::complex struct scalar_product_op, const std::complex > : binary_op_base, const std::complex > { enum { - Vectorizable = packet_traits>::HasMul + Vectorizable = packet_traits >::HasMul }; typedef typename std::complex result_type; @@ -76,7 +76,7 @@ template struct scalar_product_op, std::complex > // Quotient template struct scalar_quotient_op, const std::complex > : binary_op_base, const std::complex > { enum { - Vectorizable = packet_traits>::HasDiv + Vectorizable = packet_traits >::HasDiv }; typedef typename std::complex result_type; diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 014e6a432..a60d3912b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -371,11 +371,7 @@ if (EIGEN_TEST_CUDA) string(REPLACE "-Wnon-virtual-dtor" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") string(REPLACE "-fno-check-new" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") if( (NOT EIGEN_TEST_CXX11) OR (CMAKE_VERSION VERSION_LESS 3.3)) - if (MSVC) - string(APPEND EIGEN_CUDA_CXX11_FLAGS " /std:c++11") - else() - string(APPEND EIGEN_CUDA_CXX11_FLAGS " -std=c++11") - endif(MSVC) + string(APPEND EIGEN_CUDA_CXX_FLAGS " -std=c++11") endif() if(EIGEN_TEST_CUDA_CLANG) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionCuda.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionCuda.h index b78467b2a..678423b44 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionCuda.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionCuda.h @@ -1220,7 +1220,7 @@ struct TensorEvaluator::type PacketReturnType; enum { - Layout = TensorEvaluator::Layout, + Layout = TensorEvaluator::Layout }; // Most of the code is assuming that both input tensors are ColMajor. If the diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorConvolution.h b/unsupported/Eigen/CXX11/src/Tensor/TensorConvolution.h index 8b0e9bf3b..620f523b6 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorConvolution.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorConvolution.h @@ -606,7 +606,7 @@ __global__ void EigenConvolutionKernel1D( } __syncthreads(); } -}; +} template @@ -674,7 +674,7 @@ __global__ void EigenConvolutionKernel2D( __syncthreads(); } -}; +} template __global__ void EigenConvolutionKernel3D( @@ -740,9 +740,7 @@ __global__ void EigenConvolutionKernel3D( } __syncthreads(); } -}; - - +} template struct TensorEvaluator, GpuDevice> diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h b/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h index 615559d44..bf8196ae1 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h @@ -78,7 +78,7 @@ struct PacketType { HasLog = 1, HasLog1p = 0, HasLog10 = 0, - HasPow = 1, + HasPow = 1 }; }; #endif diff --git a/unsupported/test/CMakeLists.txt b/unsupported/test/CMakeLists.txt index a896b42e7..6d32e60d9 100644 --- a/unsupported/test/CMakeLists.txt +++ b/unsupported/test/CMakeLists.txt @@ -218,11 +218,7 @@ if(CUDA_FOUND AND EIGEN_TEST_CUDA) message(STATUS "Flags used to compile cuda code: " ${CMAKE_CXX_FLAGS}) if( (NOT EIGEN_TEST_CXX11) OR (CMAKE_VERSION VERSION_LESS 3.3)) - if (MSVC) - string(APPEND EIGEN_CUDA_CXX11_FLAGS " /std:c++11") - else() - string(APPEND EIGEN_CUDA_CXX11_FLAGS " -std=c++11") - endif(MSVC) + string(APPEND EIGEN_CUDA_CXX_FLAGS " -std=c++11") endif() if(EIGEN_TEST_CUDA_CLANG) string(APPEND CMAKE_CXX_FLAGS " --cuda-path=${CUDA_TOOLKIT_ROOT_DIR}")