10#ifndef EIGEN_NULLARY_FUNCTORS_H
11#define EIGEN_NULLARY_FUNCTORS_H
17template<
typename Scalar>
20 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
scalar_constant_op(
const Scalar& other) : m_other(other) { }
21 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const Scalar
operator() ()
const {
return m_other; }
22 template<
typename PacketType>
23 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const PacketType packetOp()
const {
return internal::pset1<PacketType>(m_other); }
26template<
typename Scalar>
33 template<
typename IndexType>
34 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const Scalar
operator() (IndexType row, IndexType col)
const {
return row==col ? Scalar(1) : Scalar(0); }
36template<
typename Scalar>
42template <
typename Scalar>
49 m_flip(numext::abs(
high)<numext::abs(
low))
52 template<
typename IndexType>
53 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const Scalar
operator() (IndexType i)
const {
55 return (i==0)? m_low : Scalar(m_high -
RealScalar(m_size1-i)*m_step);
57 return (i==m_size1)? m_high : Scalar(m_low +
RealScalar(i)*m_step);
60 template<
typename Packet,
typename IndexType>
61 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const Packet packetOp(IndexType i)
const
69 if (EIGEN_PREDICT_TRUE(i != 0))
return res;
90template <
typename Scalar>
100 template<
typename IndexType>
101 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
109 const Scalar m_multiplier;
110 const Scalar m_divisor;
111 const bool m_use_divisor;
136 template<
typename IndexType>
137 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const Scalar
operator() (IndexType i)
const {
return impl(i); }
139 template<
typename Packet,
typename IndexType>
140 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const Packet packetOp(IndexType i)
const {
return impl.template
packetOp<Packet>(i); }
155#if !( (EIGEN_COMP_MSVC>1600) || (EIGEN_GNUC_AT_LEAST(4,8)) || (EIGEN_COMP_ICC>=1600))
156template<
typename Scalar,
typename IndexType>
158template<
typename Scalar,
typename IndexType>
160template<
typename Scalar,
typename IndexType>
163template<
typename Scalar,
typename IndexType>
165template<
typename Scalar,
typename IndexType>
167template<
typename Scalar,
typename IndexType>
170template<
typename Scalar,
typename IndexType>
172template<
typename Scalar,
typename IndexType>
174template<
typename Scalar,
typename IndexType>
177template<
typename Scalar,
typename IndexType>
179template<
typename Scalar,
typename IndexType>
181template<
typename Scalar,
typename IndexType>
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
Namespace containing all symbols from the Eigen library.
Definition LDLT.h:16
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
Holds information about the various numeric (i.e.
Definition NumTraits.h:236
Definition NullaryFunctors.h:151
Definition XprHelper.h:176
Definition NullaryFunctors.h:40
Definition NullaryFunctors.h:131
Definition GenericPacketMath.h:107
Definition NullaryFunctors.h:18
Definition NullaryFunctors.h:31
Definition GenericPacketMath.h:133
Definition PacketMath.h:47