Go to the documentation of this file.
10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_CUSTOM_OP_H
11 #define EIGEN_CXX11_TENSOR_TENSOR_CUSTOM_OP_H
23 template<
typename CustomUnaryFunc,
typename XprType>
29 typedef typename XprType::Nested
Nested;
36 template<
typename CustomUnaryFunc,
typename XprType>
42 template<
typename CustomUnaryFunc,
typename XprType>
52 template<
typename CustomUnaryFunc,
typename XprType>
80 template<
typename CustomUnaryFunc,
typename XprType,
typename Device>
137 return m_result[index];
140 template<
int LoadMode>
142 return internal::ploadt<PacketReturnType, LoadMode>(m_result + index);
152 #ifdef EIGEN_USE_SYCL
181 template<
typename CustomBinaryFunc,
typename LhsXprType,
typename RhsXprType>
202 template<
typename CustomBinaryFunc,
typename LhsXprType,
typename RhsXprType>
208 template<
typename CustomBinaryFunc,
typename LhsXprType,
typename RhsXprType>
218 template<
typename CustomBinaryFunc,
typename LhsXprType,
typename RhsXprType>
252 template<
typename CustomBinaryFunc,
typename LhsXprType,
typename RhsXprType,
typename Device>
303 if (m_result !=
NULL) {
310 return m_result[index];
313 template<
int LoadMode>
315 return internal::ploadt<PacketReturnType, LoadMode>(m_result + index);
325 #ifdef EIGEN_USE_SYCL
335 m_op.func().eval(m_op.lhsExpression(), m_op.rhsExpression(),
result,
m_device);
347 #endif // EIGEN_CXX11_TENSOR_TENSOR_CUSTOM_OP_H
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Dimensions & dimensions() const
EIGEN_DEVICE_FUNC PacketReturnType packet(Index index) const
EvaluatorPointerType m_result
TensorCustomUnaryOp< CustomUnaryFunc, XprType > ArgType
conditional< Pointer_type_promotion< typename LhsXprType::Scalar, Scalar >::val, typename traits< LhsXprType >::PointerType, typename traits< RhsXprType >::PointerType >::type PointerType
#define EIGEN_DEVICE_FUNC
Namespace containing all symbols from the Eigen library.
EIGEN_STRONG_INLINE TensorEvaluator(const XprType &op, const Device &device)
Generic expression where a coefficient-wise binary operator is applied to two expressions.
internal::promote_storage_type< typename LhsXprType::CoeffReturnType, typename RhsXprType::CoeffReturnType >::ret CoeffReturnType
internal::traits< TensorCustomUnaryOp >::StorageKind StorageKind
EvaluatorPointerType m_result
RhsXprType::Nested m_rhs_xpr
promote_index_type< typename traits< LhsXprType >::Index, typename traits< RhsXprType >::Index >::type Index
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorCustomBinaryOp(const LhsXprType &lhs, const RhsXprType &rhs, const CustomBinaryFunc &func)
XprType::StorageKind StorageKind
traits< XprType >::PointerType PointerType
EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType data)
internal::traits< TensorCustomBinaryOp >::Scalar Scalar
internal::remove_const< typename ArgType::Scalar >::type Scalar
StorageMemory< CoeffReturnType, Device > Storage
EIGEN_STRONG_INLINE void cleanup()
TensorCustomUnaryOp< CustomUnaryFunc, XprType > type
Storage::Type EvaluatorPointerType
TensorCustomBinaryOp< CustomBinaryFunc, LhsXprType, RhsXprType > type
PacketType< CoeffReturnType, Device >::type PacketReturnType
internal::TensorBlockNotImplemented TensorBlock
static const int PacketSize
remove_reference< LhsNested >::type _LhsNested
StorageMemory< CoeffReturnType, Device > Storage
EIGEN_STRONG_INLINE void cleanup()
const CustomBinaryFunc m_func
internal::traits< TensorCustomUnaryOp >::Index Index
internal::remove_const< typename XprType::CoeffReturnType >::type CoeffReturnType
internal::traits< TensorCustomBinaryOp >::CoeffReturnType CoeffReturnType
Eigen::internal::traits< XprType >::PointerType TensorPointerType
internal::nested< TensorCustomUnaryOp >::type Nested
EIGEN_STRONG_INLINE TensorEvaluator(const ArgType &op, const Device &device)
internal::traits< XprType >::Index Index
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Dimensions & dimensions() const
remove_reference< RhsNested >::type _RhsNested
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const
LhsXprType::Nested LhsNested
const EIGEN_DEVICE_FUNC internal::remove_all< typename RhsXprType::Nested >::type & rhsExpression() const
EIGEN_DEVICE_FUNC EvaluatorPointerType data() const
internal::traits< ArgType >::Index Index
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
PacketType< CoeffReturnType, Device >::type PacketReturnType
A tensor expression mapping an existing array of data.
Eigen::internal::traits< XprType >::PointerType TensorPointerType
const EIGEN_DEVICE_FUNC CustomUnaryFunc & func() const
internal::traits< TensorCustomUnaryOp >::Scalar Scalar
promote_storage_type< typename traits< LhsXprType >::StorageKind, typename traits< RhsXprType >::StorageKind >::ret StorageKind
const typedef TensorCustomUnaryOp< CustomUnaryFunc, XprType > EIGEN_DEVICE_REF type
remove_reference< Nested >::type _Nested
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
const Device EIGEN_DEVICE_REF m_device
const Device EIGEN_DEVICE_REF m_device
XprType::CoeffReturnType CoeffReturnType
EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType data)
DSizes< Index, NumDims > Dimensions
const typedef TensorCustomBinaryOp< CustomBinaryFunc, LhsXprType, RhsXprType > & type
const EIGEN_DEVICE_FUNC internal::remove_all< typename LhsXprType::Nested >::type & lhsExpression() const
internal::traits< TensorCustomBinaryOp >::Index Index
Eigen::NumTraits< Scalar >::Real RealScalar
const CustomUnaryFunc m_func
void evalTo(EvaluatorPointerType data)
RhsXprType::Nested RhsNested
internal::promote_storage_type< typename LhsXprType::Scalar, typename RhsXprType::Scalar >::ret Scalar
A cost model used to limit the number of threads used for evaluating tensor expression.
internal::remove_const< typename XprType::CoeffReturnType >::type CoeffReturnType
EIGEN_DEVICE_FUNC PacketReturnType packet(Index index) const
LhsXprType::Nested m_lhs_xpr
const Device EIGEN_DEVICE_REF m_device
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorCustomUnaryOp(const XprType &expr, const CustomUnaryFunc &func)
const EIGEN_DEVICE_FUNC CustomBinaryFunc & func() const
internal::traits< TensorCustomBinaryOp >::StorageKind StorageKind
void evalTo(EvaluatorPointerType data)
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Dimensions & dimensions() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const
internal::nested< TensorCustomBinaryOp >::type Nested
Eigen::NumTraits< Scalar >::Real RealScalar
EIGEN_DEVICE_FUNC EvaluatorPointerType data() const
EIGEN_DEVICE_FUNC EvaluatorPointerType data() const
DSizes< Index, NumDims > Dimensions
Storage::Type EvaluatorPointerType
TensorCustomBinaryOp< CustomBinaryFunc, LhsXprType, RhsXprType > XprType
internal::TensorBlockNotImplemented TensorBlock
const EIGEN_DEVICE_FUNC internal::remove_all< typename XprType::Nested >::type & expression() const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:05:47