Eigen::internal::scalar_opposite_op< Scalar > Struct Template Reference

Template functor to compute the opposite of a scalar. More...

#include <UnaryFunctors.h>

Public Member Functions

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar &a) const
 
template<typename Packet >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp (const Packet &a) const
 

Detailed Description

template<typename Scalar>
struct Eigen::internal::scalar_opposite_op< Scalar >

Template functor to compute the opposite of a scalar.

See also
class CwiseUnaryOp, MatrixBase::operator-

Member Function Documentation

◆ operator()()

template<typename Scalar >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar Eigen::internal::scalar_opposite_op< Scalar >::operator() ( const Scalar a) const
inline
27 { return numext::negate(a); }
const Scalar * a
Definition: level2_cplx_impl.h:32
T negate(const T &x)
Definition: packetmath_test_shared.h:26

References a, and Eigen::test::negate().

◆ packetOp()

template<typename Scalar >
template<typename Packet >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet Eigen::internal::scalar_opposite_op< Scalar >::packetOp ( const Packet a) const
inline
29  {
30  return internal::pnegate(a);
31  }
EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf &a)
Definition: AltiVec/Complex.h:264

References a, and Eigen::internal::pnegate().


The documentation for this struct was generated from the following file: