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