Fix CUDA clang again with new C++11 usages

This commit is contained in:
Antonio Sanchez 2025-03-13 20:47:31 -07:00
parent 6aa0143851
commit 0ac1fc52dd
6 changed files with 9 additions and 19 deletions

View File

@ -55,7 +55,7 @@ template<typename T> struct scalar_difference_op<std::complex<T>, std::complex<T
// Product
template<typename T> struct scalar_product_op<const std::complex<T>, const std::complex<T> > : binary_op_base<const std::complex<T>, const std::complex<T> > {
enum {
Vectorizable = packet_traits<std::complex<T>>::HasMul
Vectorizable = packet_traits<std::complex<T> >::HasMul
};
typedef typename std::complex<T> result_type;
@ -76,7 +76,7 @@ template<typename T> struct scalar_product_op<std::complex<T>, std::complex<T> >
// Quotient
template<typename T> struct scalar_quotient_op<const std::complex<T>, const std::complex<T> > : binary_op_base<const std::complex<T>, const std::complex<T> > {
enum {
Vectorizable = packet_traits<std::complex<T>>::HasDiv
Vectorizable = packet_traits<std::complex<T> >::HasDiv
};
typedef typename std::complex<T> result_type;

View File

@ -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)

View File

@ -1220,7 +1220,7 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT
typedef typename PacketType<CoeffReturnType, GpuDevice>::type PacketReturnType;
enum {
Layout = TensorEvaluator<LeftArgType, Device>::Layout,
Layout = TensorEvaluator<LeftArgType, Device>::Layout
};
// Most of the code is assuming that both input tensors are ColMajor. If the

View File

@ -606,7 +606,7 @@ __global__ void EigenConvolutionKernel1D(
}
__syncthreads();
}
};
}
template <typename InputEvaluator, typename Index, typename InputDims,
int StaticKernelSizeX, int StaticKernelSizeY>
@ -674,7 +674,7 @@ __global__ void EigenConvolutionKernel2D(
__syncthreads();
}
};
}
template <typename InputEvaluator, typename Index, typename InputDims>
__global__ void EigenConvolutionKernel3D(
@ -740,9 +740,7 @@ __global__ void EigenConvolutionKernel3D(
}
__syncthreads();
}
};
}
template<typename Indices, typename InputArgType, typename KernelArgType>
struct TensorEvaluator<const TensorConvolutionOp<Indices, InputArgType, KernelArgType>, GpuDevice>

View File

@ -78,7 +78,7 @@ struct PacketType<half, GpuDevice> {
HasLog = 1,
HasLog1p = 0,
HasLog10 = 0,
HasPow = 1,
HasPow = 1
};
};
#endif

View File

@ -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}")