mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-19 16:19:37 +08:00
Fix CUDA clang again with new C++11 usages
This commit is contained in:
parent
6aa0143851
commit
0ac1fc52dd
@ -55,7 +55,7 @@ template<typename T> struct scalar_difference_op<std::complex<T>, std::complex<T
|
|||||||
// Product
|
// 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> > {
|
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 {
|
enum {
|
||||||
Vectorizable = packet_traits<std::complex<T>>::HasMul
|
Vectorizable = packet_traits<std::complex<T> >::HasMul
|
||||||
};
|
};
|
||||||
typedef typename std::complex<T> result_type;
|
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
|
// 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> > {
|
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 {
|
enum {
|
||||||
Vectorizable = packet_traits<std::complex<T>>::HasDiv
|
Vectorizable = packet_traits<std::complex<T> >::HasDiv
|
||||||
};
|
};
|
||||||
typedef typename std::complex<T> result_type;
|
typedef typename std::complex<T> result_type;
|
||||||
|
|
||||||
|
@ -371,11 +371,7 @@ if (EIGEN_TEST_CUDA)
|
|||||||
string(REPLACE "-Wnon-virtual-dtor" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
string(REPLACE "-Wnon-virtual-dtor" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||||
string(REPLACE "-fno-check-new" "" 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( (NOT EIGEN_TEST_CXX11) OR (CMAKE_VERSION VERSION_LESS 3.3))
|
||||||
if (MSVC)
|
string(APPEND EIGEN_CUDA_CXX_FLAGS " -std=c++11")
|
||||||
string(APPEND EIGEN_CUDA_CXX11_FLAGS " /std:c++11")
|
|
||||||
else()
|
|
||||||
string(APPEND EIGEN_CUDA_CXX11_FLAGS " -std=c++11")
|
|
||||||
endif(MSVC)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EIGEN_TEST_CUDA_CLANG)
|
if(EIGEN_TEST_CUDA_CLANG)
|
||||||
|
@ -1220,7 +1220,7 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT
|
|||||||
typedef typename PacketType<CoeffReturnType, GpuDevice>::type PacketReturnType;
|
typedef typename PacketType<CoeffReturnType, GpuDevice>::type PacketReturnType;
|
||||||
|
|
||||||
enum {
|
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
|
// Most of the code is assuming that both input tensors are ColMajor. If the
|
||||||
|
@ -606,7 +606,7 @@ __global__ void EigenConvolutionKernel1D(
|
|||||||
}
|
}
|
||||||
__syncthreads();
|
__syncthreads();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
template <typename InputEvaluator, typename Index, typename InputDims,
|
template <typename InputEvaluator, typename Index, typename InputDims,
|
||||||
int StaticKernelSizeX, int StaticKernelSizeY>
|
int StaticKernelSizeX, int StaticKernelSizeY>
|
||||||
@ -674,7 +674,7 @@ __global__ void EigenConvolutionKernel2D(
|
|||||||
|
|
||||||
__syncthreads();
|
__syncthreads();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
template <typename InputEvaluator, typename Index, typename InputDims>
|
template <typename InputEvaluator, typename Index, typename InputDims>
|
||||||
__global__ void EigenConvolutionKernel3D(
|
__global__ void EigenConvolutionKernel3D(
|
||||||
@ -740,9 +740,7 @@ __global__ void EigenConvolutionKernel3D(
|
|||||||
}
|
}
|
||||||
__syncthreads();
|
__syncthreads();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template<typename Indices, typename InputArgType, typename KernelArgType>
|
template<typename Indices, typename InputArgType, typename KernelArgType>
|
||||||
struct TensorEvaluator<const TensorConvolutionOp<Indices, InputArgType, KernelArgType>, GpuDevice>
|
struct TensorEvaluator<const TensorConvolutionOp<Indices, InputArgType, KernelArgType>, GpuDevice>
|
||||||
|
@ -78,7 +78,7 @@ struct PacketType<half, GpuDevice> {
|
|||||||
HasLog = 1,
|
HasLog = 1,
|
||||||
HasLog1p = 0,
|
HasLog1p = 0,
|
||||||
HasLog10 = 0,
|
HasLog10 = 0,
|
||||||
HasPow = 1,
|
HasPow = 1
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -218,11 +218,7 @@ if(CUDA_FOUND AND EIGEN_TEST_CUDA)
|
|||||||
message(STATUS "Flags used to compile cuda code: " ${CMAKE_CXX_FLAGS})
|
message(STATUS "Flags used to compile cuda code: " ${CMAKE_CXX_FLAGS})
|
||||||
|
|
||||||
if( (NOT EIGEN_TEST_CXX11) OR (CMAKE_VERSION VERSION_LESS 3.3))
|
if( (NOT EIGEN_TEST_CXX11) OR (CMAKE_VERSION VERSION_LESS 3.3))
|
||||||
if (MSVC)
|
string(APPEND EIGEN_CUDA_CXX_FLAGS " -std=c++11")
|
||||||
string(APPEND EIGEN_CUDA_CXX11_FLAGS " /std:c++11")
|
|
||||||
else()
|
|
||||||
string(APPEND EIGEN_CUDA_CXX11_FLAGS " -std=c++11")
|
|
||||||
endif(MSVC)
|
|
||||||
endif()
|
endif()
|
||||||
if(EIGEN_TEST_CUDA_CLANG)
|
if(EIGEN_TEST_CUDA_CLANG)
|
||||||
string(APPEND CMAKE_CXX_FLAGS " --cuda-path=${CUDA_TOOLKIT_ROOT_DIR}")
|
string(APPEND CMAKE_CXX_FLAGS " --cuda-path=${CUDA_TOOLKIT_ROOT_DIR}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user