10 #ifndef EIGEN_MATH_FUNCTIONS_CUDA_H 11 #define EIGEN_MATH_FUNCTIONS_CUDA_H 20 #if defined(__CUDACC__) && defined(EIGEN_USE_GPU) 21 template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
22 float4 plog<float4>(
const float4& a)
24 return make_float4(logf(a.x), logf(a.y), logf(a.z), logf(a.w));
27 template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
28 double2 plog<double2>(
const double2& a)
31 return make_double2(
log(a.x),
log(a.y));
34 template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
35 float4 plog1p<float4>(
const float4& a)
37 return make_float4(log1pf(a.x), log1pf(a.y), log1pf(a.z), log1pf(a.w));
40 template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
41 double2 plog1p<double2>(
const double2& a)
46 template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
47 float4 pexp<float4>(
const float4& a)
49 return make_float4(expf(a.x), expf(a.y), expf(a.z), expf(a.w));
52 template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
53 double2 pexp<double2>(
const double2& a)
56 return make_double2(
exp(a.x),
exp(a.y));
59 template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
60 float4 psqrt<float4>(
const float4& a)
62 return make_float4(sqrtf(a.x), sqrtf(a.y), sqrtf(a.z), sqrtf(a.w));
65 template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
66 double2 psqrt<double2>(
const double2& a)
69 return make_double2(
sqrt(a.x),
sqrt(a.y));
72 template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
73 float4 prsqrt<float4>(
const float4& a)
75 return make_float4(rsqrtf(a.x), rsqrtf(a.y), rsqrtf(a.z), rsqrtf(a.w));
78 template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
79 double2 prsqrt<double2>(
const double2& a)
91 #endif // EIGEN_MATH_FUNCTIONS_CUDA_H const Eigen::CwiseUnaryOp< Eigen::internal::scalar_sqrt_op< typename Derived::Scalar >, const Derived > sqrt(const Eigen::ArrayBase< Derived > &x)
Namespace containing all symbols from the Eigen library.
Definition: Core:287
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_log1p_op< typename Derived::Scalar >, const Derived > log1p(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_rsqrt_op< typename Derived::Scalar >, const Derived > rsqrt(const Eigen::ArrayBase< Derived > &x)
Definition: Eigen_Colamd.h:50
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_log_op< typename Derived::Scalar >, const Derived > log(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_exp_op< typename Derived::Scalar >, const Derived > exp(const Eigen::ArrayBase< Derived > &x)