mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Fix CUDA compilation
This commit is contained in:
parent
bf91a44f4a
commit
0f350a8b7e
@ -27,6 +27,7 @@ float4 plog<float4>(const float4& a)
|
|||||||
template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||||
double2 plog<double2>(const double2& a)
|
double2 plog<double2>(const double2& a)
|
||||||
{
|
{
|
||||||
|
using ::log;
|
||||||
return make_double2(log(a.x), log(a.y));
|
return make_double2(log(a.x), log(a.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,6 +40,7 @@ float4 pexp<float4>(const float4& a)
|
|||||||
template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||||
double2 pexp<double2>(const double2& a)
|
double2 pexp<double2>(const double2& a)
|
||||||
{
|
{
|
||||||
|
using ::exp;
|
||||||
return make_double2(exp(a.x), exp(a.y));
|
return make_double2(exp(a.x), exp(a.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,6 +53,7 @@ float4 psqrt<float4>(const float4& a)
|
|||||||
template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||||
double2 psqrt<double2>(const double2& a)
|
double2 psqrt<double2>(const double2& a)
|
||||||
{
|
{
|
||||||
|
using ::sqrt;
|
||||||
return make_double2(sqrt(a.x), sqrt(a.y));
|
return make_double2(sqrt(a.x), sqrt(a.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -461,8 +461,8 @@ EigenContractionKernelInternal(const LhsMapper lhs, const RhsMapper rhs,
|
|||||||
#undef writeResultShmem
|
#undef writeResultShmem
|
||||||
#undef writeRow
|
#undef writeRow
|
||||||
|
|
||||||
const int max_i_write = (min)((int)((m_size - base_m - threadIdx.y + 7) / 8), 8);
|
const int max_i_write = numext::mini((int)((m_size - base_m - threadIdx.y + 7) / 8), 8);
|
||||||
const int max_j_write = (min)((int)((n_size - base_n - threadIdx.z + 7) / 8), 8);
|
const int max_j_write = numext::mini((int)((n_size - base_n - threadIdx.z + 7) / 8), 8);
|
||||||
|
|
||||||
if (threadIdx.x < max_i_write) {
|
if (threadIdx.x < max_i_write) {
|
||||||
if (max_j_write == 8) {
|
if (max_j_write == 8) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user