mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Fix use of arg function in CUDA.
This commit is contained in:
parent
8f927fb52e
commit
63dcb429cd
@ -482,12 +482,8 @@ struct arg_default_impl<Scalar, true> {
|
|||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
static inline RealScalar run(const Scalar& x)
|
static inline RealScalar run(const Scalar& x)
|
||||||
{
|
{
|
||||||
#if defined(EIGEN_HIP_DEVICE_COMPILE)
|
// There is no official ::arg on device in CUDA/HIP, so we always need to use std::arg.
|
||||||
// HIP does not seem to have a native device side implementation for the math routine "arg"
|
|
||||||
using std::arg;
|
using std::arg;
|
||||||
#else
|
|
||||||
EIGEN_USING_STD(arg);
|
|
||||||
#endif
|
|
||||||
return static_cast<RealScalar>(arg(x));
|
return static_cast<RealScalar>(arg(x));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user