10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_EXPR_H
11 #define EIGEN_CXX11_TENSOR_TENSOR_EXPR_H
34 template <
typename NullaryOp,
typename XprType>
40 static constexpr
int NumDimensions = XprTraits::NumDimensions;
41 static constexpr
int Layout = XprTraits::Layout;
48 template <
typename NullaryOp,
typename XprType>
71 template <
typename UnaryOp,
typename XprType>
79 static constexpr
int NumDimensions = XprTraits::NumDimensions;
80 static constexpr
int Layout = XprTraits::Layout;
84 template <
typename UnaryOp,
typename XprType>
89 template <
typename UnaryOp,
typename XprType>
96 template <
typename UnaryOp,
typename XprType>
122 template <
typename BinaryOp,
typename LhsXprType,
typename RhsXprType>
138 static constexpr
int NumDimensions = XprTraits::NumDimensions;
139 static constexpr
int Layout = XprTraits::Layout;
147 template <
typename BinaryOp,
typename LhsXprType,
typename RhsXprType>
152 template <
typename BinaryOp,
typename LhsXprType,
typename RhsXprType>
160 template <
typename BinaryOp,
typename LhsXprType,
typename RhsXprType>
162 :
public TensorBase<TensorCwiseBinaryOp<BinaryOp, LhsXprType, RhsXprType>, ReadOnlyAccessors> {
174 const BinaryOp&
func = BinaryOp())
195 template <
typename TernaryOp,
typename Arg1XprType,
typename Arg2XprType,
typename Arg3XprType>
209 static constexpr
int NumDimensions = XprTraits::NumDimensions;
210 static constexpr
int Layout = XprTraits::Layout;
218 template <
typename TernaryOp,
typename Arg1XprType,
typename Arg2XprType,
typename Arg3XprType>
223 template <
typename TernaryOp,
typename Arg1XprType,
typename Arg2XprType,
typename Arg3XprType>
231 template <
typename TernaryOp,
typename Arg1XprType,
typename Arg2XprType,
typename Arg3XprType>
233 :
public TensorBase<TensorCwiseTernaryOp<TernaryOp, Arg1XprType, Arg2XprType, Arg3XprType>, ReadOnlyAccessors> {
243 const Arg3XprType& arg3,
244 const TernaryOp&
func = TernaryOp())
270 template <
typename IfXprType,
typename ThenXprType,
typename ElseXprType>
281 static constexpr
int NumDimensions = XprTraits::NumDimensions;
282 static constexpr
int Layout = XprTraits::Layout;
288 template <
typename IfXprType,
typename ThenXprType,
typename ElseXprType>
293 template <
typename IfXprType,
typename ThenXprType,
typename ElseXprType>
301 template <
typename IfXprType,
typename ThenXprType,
typename ElseXprType>
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
#define EIGEN_STRONG_INLINE
Definition: Macros.h:834
SCALAR Scalar
Definition: bench_gemm.cpp:45
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition: CwiseBinaryOp.h:79
The tensor base class.
Definition: TensorBase.h:1026
Definition: TensorExpr.h:162
Eigen::internal::traits< TensorCwiseBinaryOp >::Index Index
Definition: TensorExpr.h:171
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorCwiseBinaryOp(const LhsXprType &lhs, const RhsXprType &rhs, const BinaryOp &func=BinaryOp())
Definition: TensorExpr.h:173
EIGEN_DEVICE_FUNC const internal::remove_all_t< typename LhsXprType::Nested > & lhsExpression() const
Definition: TensorExpr.h:180
RhsXprType::Nested m_rhs_xpr
Definition: TensorExpr.h:190
const BinaryOp m_functor
Definition: TensorExpr.h:191
Scalar CoeffReturnType
Definition: TensorExpr.h:168
EIGEN_DEVICE_FUNC const internal::remove_all_t< typename RhsXprType::Nested > & rhsExpression() const
Definition: TensorExpr.h:184
Eigen::internal::nested< TensorCwiseBinaryOp >::type Nested
Definition: TensorExpr.h:169
Eigen::internal::traits< TensorCwiseBinaryOp >::Scalar Scalar
Definition: TensorExpr.h:166
Eigen::internal::traits< TensorCwiseBinaryOp >::StorageKind StorageKind
Definition: TensorExpr.h:170
LhsXprType::Nested m_lhs_xpr
Definition: TensorExpr.h:189
EIGEN_DEVICE_FUNC const BinaryOp & functor() const
Definition: TensorExpr.h:177
Eigen::NumTraits< Scalar >::Real RealScalar
Definition: TensorExpr.h:167
Definition: TensorExpr.h:49
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorCwiseNullaryOp(const XprType &xpr, const NullaryOp &func=NullaryOp())
Definition: TensorExpr.h:58
TensorCwiseNullaryOp< NullaryOp, XprType > Nested
Definition: TensorExpr.h:54
EIGEN_DEVICE_FUNC const internal::remove_all_t< typename XprType::Nested > & nestedExpression() const
Definition: TensorExpr.h:61
Eigen::internal::traits< TensorCwiseNullaryOp >::Scalar Scalar
Definition: TensorExpr.h:51
Eigen::NumTraits< Scalar >::Real RealScalar
Definition: TensorExpr.h:52
Eigen::internal::traits< TensorCwiseNullaryOp >::StorageKind StorageKind
Definition: TensorExpr.h:55
XprType::CoeffReturnType CoeffReturnType
Definition: TensorExpr.h:53
const NullaryOp m_functor
Definition: TensorExpr.h:67
Eigen::internal::traits< TensorCwiseNullaryOp >::Index Index
Definition: TensorExpr.h:56
EIGEN_DEVICE_FUNC const NullaryOp & functor() const
Definition: TensorExpr.h:63
XprType::Nested m_xpr
Definition: TensorExpr.h:66
Definition: TensorExpr.h:233
EIGEN_DEVICE_FUNC const internal::remove_all_t< typename Arg2XprType::Nested > & arg2Expression() const
Definition: TensorExpr.h:254
Eigen::internal::traits< TensorCwiseTernaryOp >::StorageKind StorageKind
Definition: TensorExpr.h:239
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorCwiseTernaryOp(const Arg1XprType &arg1, const Arg2XprType &arg2, const Arg3XprType &arg3, const TernaryOp &func=TernaryOp())
Definition: TensorExpr.h:242
EIGEN_DEVICE_FUNC const internal::remove_all_t< typename Arg3XprType::Nested > & arg3Expression() const
Definition: TensorExpr.h:258
Arg3XprType::Nested m_arg3_xpr
Definition: TensorExpr.h:265
EIGEN_DEVICE_FUNC const internal::remove_all_t< typename Arg1XprType::Nested > & arg1Expression() const
Definition: TensorExpr.h:250
Scalar CoeffReturnType
Definition: TensorExpr.h:237
Eigen::NumTraits< Scalar >::Real RealScalar
Definition: TensorExpr.h:236
EIGEN_DEVICE_FUNC const TernaryOp & functor() const
Definition: TensorExpr.h:247
Arg2XprType::Nested m_arg2_xpr
Definition: TensorExpr.h:264
Eigen::internal::traits< TensorCwiseTernaryOp >::Index Index
Definition: TensorExpr.h:240
Eigen::internal::traits< TensorCwiseTernaryOp >::Scalar Scalar
Definition: TensorExpr.h:235
const TernaryOp m_functor
Definition: TensorExpr.h:266
Arg1XprType::Nested m_arg1_xpr
Definition: TensorExpr.h:263
Eigen::internal::nested< TensorCwiseTernaryOp >::type Nested
Definition: TensorExpr.h:238
Definition: TensorExpr.h:97
Eigen::internal::traits< TensorCwiseUnaryOp >::StorageKind StorageKind
Definition: TensorExpr.h:105
XprType::Nested m_xpr
Definition: TensorExpr.h:117
const UnaryOp m_functor
Definition: TensorExpr.h:118
EIGEN_DEVICE_FUNC const internal::remove_all_t< typename XprType::Nested > & nestedExpression() const
Definition: TensorExpr.h:114
Eigen::internal::traits< TensorCwiseUnaryOp >::Scalar Scalar
Definition: TensorExpr.h:101
Scalar CoeffReturnType
Definition: TensorExpr.h:103
EIGEN_DEVICE_FUNC const UnaryOp & functor() const
Definition: TensorExpr.h:111
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorCwiseUnaryOp(const XprType &xpr, const UnaryOp &func=UnaryOp())
Definition: TensorExpr.h:108
Eigen::internal::traits< TensorCwiseUnaryOp >::Index Index
Definition: TensorExpr.h:106
Eigen::internal::nested< TensorCwiseUnaryOp >::type Nested
Definition: TensorExpr.h:104
Eigen::NumTraits< Scalar >::Real RealScalar
Definition: TensorExpr.h:102
Definition: TensorExpr.h:302
ThenXprType::Nested m_then
Definition: TensorExpr.h:323
Eigen::internal::traits< TensorSelectOp >::Index Index
Definition: TensorExpr.h:310
Eigen::NumTraits< Scalar >::Real RealScalar
Definition: TensorExpr.h:305
Eigen::internal::nested< TensorSelectOp >::type Nested
Definition: TensorExpr.h:308
EIGEN_DEVICE_FUNC TensorSelectOp(const IfXprType &a_condition, const ThenXprType &a_then, const ElseXprType &a_else)
Definition: TensorExpr.h:312
Eigen::internal::traits< TensorSelectOp >::StorageKind StorageKind
Definition: TensorExpr.h:309
Eigen::internal::traits< TensorSelectOp >::Scalar Scalar
Definition: TensorExpr.h:304
EIGEN_DEVICE_FUNC const IfXprType & ifExpression() const
Definition: TensorExpr.h:315
EIGEN_DEVICE_FUNC const ThenXprType & thenExpression() const
Definition: TensorExpr.h:317
IfXprType::Nested m_condition
Definition: TensorExpr.h:322
ElseXprType::Nested m_else
Definition: TensorExpr.h:324
internal::promote_storage_type< typename ThenXprType::CoeffReturnType, typename ElseXprType::CoeffReturnType >::ret CoeffReturnType
Definition: TensorExpr.h:307
EIGEN_DEVICE_FUNC const ElseXprType & elseExpression() const
Definition: TensorExpr.h:319
Eigen::DenseIndex ret
Definition: level1_cplx_impl.h:43
typename remove_all< T >::type remove_all_t
Definition: Meta.h:142
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
Extend namespace for flags.
Definition: fsi_chan_precond_driver.cc:56
val
Definition: calibrate.py:119
type
Definition: compute_granudrum_aor.py:141
Definition: Eigen_Colamd.h:49
Definition: Constants.h:519
T Real
Definition: NumTraits.h:183
Definition: TensorForwardDeclarations.h:54
A * type
Definition: TensorForwardDeclarations.h:55
const TensorCwiseBinaryOp< BinaryOp, LhsXprType, RhsXprType > & type
Definition: TensorExpr.h:149
const TensorCwiseTernaryOp< TernaryOp, Arg1XprType, Arg2XprType, Arg3XprType > & type
Definition: TensorExpr.h:220
const TensorCwiseUnaryOp< UnaryOp, XprType > & type
Definition: TensorExpr.h:86
const TensorSelectOp< IfXprType, ThenXprType, ElseXprType > & type
Definition: TensorExpr.h:290
Definition: XprHelper.h:427
TensorCwiseBinaryOp< BinaryOp, LhsXprType, RhsXprType > type
Definition: TensorExpr.h:155
TensorCwiseTernaryOp< TernaryOp, Arg1XprType, Arg2XprType, Arg3XprType > type
Definition: TensorExpr.h:226
TensorCwiseUnaryOp< UnaryOp, XprType > type
Definition: TensorExpr.h:91
TensorSelectOp< IfXprType, ThenXprType, ElseXprType > type
Definition: TensorExpr.h:296
Definition: TensorTraits.h:152
ref_selector< T >::type type
Definition: TensorTraits.h:153
RhsXprType::Nested RhsNested
Definition: TensorExpr.h:135
std::remove_reference_t< RhsNested > RhsNested_
Definition: TensorExpr.h:137
promote_index_type< typename traits< LhsXprType >::Index, typename traits< RhsXprType >::Index >::type Index
Definition: TensorExpr.h:133
traits< LhsXprType > XprTraits
Definition: TensorExpr.h:129
result_of< BinaryOp(typename LhsXprType::Scalar, typename RhsXprType::Scalar)>::type Scalar
Definition: TensorExpr.h:128
promote_storage_type< typename traits< LhsXprType >::StorageKind, typename traits< RhsXprType >::StorageKind >::ret StorageKind
Definition: TensorExpr.h:131
std::remove_reference_t< LhsNested > LhsNested_
Definition: TensorExpr.h:136
LhsXprType::Nested LhsNested
Definition: TensorExpr.h:134
TypeConversion< Scalar, std::conditional_t< Pointer_type_promotion< typename LhsXprType::Scalar, Scalar >::val, typename traits< LhsXprType >::PointerType, typename traits< RhsXprType >::PointerType > >::type PointerType
Definition: TensorExpr.h:143
XprType::Nested XprTypeNested
Definition: TensorExpr.h:38
XprTraits::PointerType PointerType
Definition: TensorExpr.h:42
XprType::Scalar Scalar
Definition: TensorExpr.h:37
std::remove_reference_t< XprTypeNested > XprTypeNested_
Definition: TensorExpr.h:39
traits< XprType > XprTraits
Definition: TensorExpr.h:36
traits< Arg1XprType > XprTraits
Definition: TensorExpr.h:200
TypeConversion< Scalar, std::conditional_t< Pointer_type_promotion< typename Arg2XprType::Scalar, Scalar >::val, typename traits< Arg2XprType >::PointerType, typename traits< Arg3XprType >::PointerType > >::type PointerType
Definition: TensorExpr.h:214
std::remove_reference_t< Arg1Nested > Arg1Nested_
Definition: TensorExpr.h:206
std::remove_reference_t< Arg2Nested > Arg2Nested_
Definition: TensorExpr.h:207
Arg2XprType::Nested Arg2Nested
Definition: TensorExpr.h:204
Arg3XprType::Nested Arg3Nested
Definition: TensorExpr.h:205
traits< Arg1XprType >::StorageKind StorageKind
Definition: TensorExpr.h:201
traits< Arg1XprType >::Index Index
Definition: TensorExpr.h:202
result_of< TernaryOp(typename Arg1XprType::Scalar, typename Arg2XprType::Scalar, typename Arg3XprType::Scalar)>::type Scalar
Definition: TensorExpr.h:199
std::remove_reference_t< Arg3Nested > Arg3Nested_
Definition: TensorExpr.h:208
Arg1XprType::Nested Arg1Nested
Definition: TensorExpr.h:203
XprType::Nested XprTypeNested
Definition: TensorExpr.h:77
result_of< UnaryOp(typename XprType::Scalar)>::type Scalar
Definition: TensorExpr.h:75
std::remove_reference_t< XprTypeNested > XprTypeNested_
Definition: TensorExpr.h:78
TypeConversion< Scalar, typename XprTraits::PointerType >::type PointerType
Definition: TensorExpr.h:81
traits< XprType > XprTraits
Definition: TensorExpr.h:76
promote_storage_type< typename traits< ThenXprType >::StorageKind, typename traits< ElseXprType >::StorageKind >::ret StorageKind
Definition: TensorExpr.h:275
traits< ThenXprType > XprTraits
Definition: TensorExpr.h:273
traits< ThenXprType >::Scalar Scalar
Definition: TensorExpr.h:272
IfXprType::Nested IfNested
Definition: TensorExpr.h:278
std::conditional_t< Pointer_type_promotion< typename ThenXprType::Scalar, Scalar >::val, typename traits< ThenXprType >::PointerType, typename traits< ElseXprType >::PointerType > PointerType
Definition: TensorExpr.h:285
ThenXprType::Nested ThenNested
Definition: TensorExpr.h:279
promote_index_type< typename traits< ElseXprType >::Index, typename traits< ThenXprType >::Index >::type Index
Definition: TensorExpr.h:277
ElseXprType::Nested ElseNested
Definition: TensorExpr.h:280
Definition: ForwardDeclarations.h:21
Definition: benchGeometry.cpp:21