mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-17 03:43:13 +08:00
Added missing typedefs
This commit is contained in:
parent
608b1acd6d
commit
26f9907542
@ -25,6 +25,8 @@ namespace internal {
|
|||||||
// building for CUDA to avoid non-constexpr methods.
|
// building for CUDA to avoid non-constexpr methods.
|
||||||
|
|
||||||
template<typename T> struct scalar_sum_op<std::complex<T>> {
|
template<typename T> struct scalar_sum_op<std::complex<T>> {
|
||||||
|
typedef typename std::complex<T> result_type;
|
||||||
|
|
||||||
EIGEN_EMPTY_STRUCT_CTOR(scalar_sum_op)
|
EIGEN_EMPTY_STRUCT_CTOR(scalar_sum_op)
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const std::complex<T> operator() (const std::complex<T>& a, const std::complex<T>& b) const {
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const std::complex<T> operator() (const std::complex<T>& a, const std::complex<T>& b) const {
|
||||||
return std::complex<T>(numext::real(a) + numext::real(b),
|
return std::complex<T>(numext::real(a) + numext::real(b),
|
||||||
@ -33,6 +35,8 @@ template<typename T> struct scalar_sum_op<std::complex<T>> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<typename T> struct scalar_difference_op<std::complex<T>> {
|
template<typename T> struct scalar_difference_op<std::complex<T>> {
|
||||||
|
typedef typename std::complex<T> result_type;
|
||||||
|
|
||||||
EIGEN_EMPTY_STRUCT_CTOR(scalar_difference_op)
|
EIGEN_EMPTY_STRUCT_CTOR(scalar_difference_op)
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const std::complex<T> operator() (const std::complex<T>& a, const std::complex<T>& b) const {
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const std::complex<T> operator() (const std::complex<T>& a, const std::complex<T>& b) const {
|
||||||
return std::complex<T>(numext::real(a) - numext::real(b),
|
return std::complex<T>(numext::real(a) - numext::real(b),
|
||||||
@ -44,6 +48,8 @@ template<typename T> struct scalar_product_op<std::complex<T>, 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;
|
||||||
|
|
||||||
EIGEN_EMPTY_STRUCT_CTOR(scalar_product_op)
|
EIGEN_EMPTY_STRUCT_CTOR(scalar_product_op)
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const std::complex<T> operator() (const std::complex<T>& a, const std::complex<T>& b) const {
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const std::complex<T> operator() (const std::complex<T>& a, const std::complex<T>& b) const {
|
||||||
const T a_real = numext::real(a);
|
const T a_real = numext::real(a);
|
||||||
@ -59,6 +65,8 @@ template<typename T> struct scalar_quotient_op<std::complex<T>, 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;
|
||||||
|
|
||||||
EIGEN_EMPTY_STRUCT_CTOR(scalar_quotient_op)
|
EIGEN_EMPTY_STRUCT_CTOR(scalar_quotient_op)
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const std::complex<T> operator() (const std::complex<T>& a, const std::complex<T>& b) const {
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const std::complex<T> operator() (const std::complex<T>& a, const std::complex<T>& b) const {
|
||||||
const T a_real = numext::real(a);
|
const T a_real = numext::real(a);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user