Eigen::TensorDevice< ExpressionType, DeviceType > Class Template Reference

Pseudo expression providing an operator = that will evaluate its argument on the specified computing 'device' (GPU, thread pool, ...) More...

#include <TensorDevice.h>

Public Member Functions

 TensorDevice (const DeviceType &device, ExpressionType &expression)
 
template<typename OtherDerived >
EIGEN_STRONG_INLINE TensorDeviceoperator= (const OtherDerived &other)
 
template<typename OtherDerived >
EIGEN_STRONG_INLINE TensorDeviceoperator+= (const OtherDerived &other)
 
template<typename OtherDerived >
EIGEN_STRONG_INLINE TensorDeviceoperator-= (const OtherDerived &other)
 

Protected Attributes

const DeviceType & m_device
 
ExpressionType & m_expression
 

Detailed Description

template<typename ExpressionType, typename DeviceType>
class Eigen::TensorDevice< ExpressionType, DeviceType >

Pseudo expression providing an operator = that will evaluate its argument on the specified computing 'device' (GPU, thread pool, ...)

Example: C.device(EIGEN_GPU) = A + B;

Todo: operator *= and /=.

Constructor & Destructor Documentation

◆ TensorDevice()

template<typename ExpressionType , typename DeviceType >
Eigen::TensorDevice< ExpressionType, DeviceType >::TensorDevice ( const DeviceType &  device,
ExpressionType &  expression 
)
inline
33 : m_device(device), m_expression(expression) {}
const DeviceType & m_device
Definition: TensorDevice.h:69
ExpressionType & m_expression
Definition: TensorDevice.h:70

Member Function Documentation

◆ operator+=()

template<typename ExpressionType , typename DeviceType >
template<typename OtherDerived >
EIGEN_STRONG_INLINE TensorDevice& Eigen::TensorDevice< ExpressionType, DeviceType >::operator+= ( const OtherDerived &  other)
inline
46  {
47  typedef typename OtherDerived::Scalar Scalar;
48  typedef TensorCwiseBinaryOp<internal::scalar_sum_op<Scalar>, const ExpressionType, const OtherDerived> Sum;
49  Sum sum(m_expression, other);
50  typedef TensorAssignOp<ExpressionType, const Sum> Assign;
51  Assign assign(m_expression, sum);
53  return *this;
54  }
SCALAR Scalar
Definition: bench_gemm.cpp:45
static EIGEN_STRONG_INLINE void run(const Expression &expr, const Device &device=DefaultDevice())
Definition: TensorExecutor.h:92

References Eigen::TensorDevice< ExpressionType, DeviceType >::m_device, Eigen::TensorDevice< ExpressionType, DeviceType >::m_expression, and Eigen::internal::TensorExecutor< Expression, Device, Vectorizable, Tiling >::run().

◆ operator-=()

template<typename ExpressionType , typename DeviceType >
template<typename OtherDerived >
EIGEN_STRONG_INLINE TensorDevice& Eigen::TensorDevice< ExpressionType, DeviceType >::operator-= ( const OtherDerived &  other)
inline
57  {
58  typedef typename OtherDerived::Scalar Scalar;
59  typedef TensorCwiseBinaryOp<internal::scalar_difference_op<Scalar>, const ExpressionType, const OtherDerived>
60  Difference;
61  Difference difference(m_expression, other);
62  typedef TensorAssignOp<ExpressionType, const Difference> Assign;
63  Assign assign(m_expression, difference);
65  return *this;
66  }

References Eigen::TensorDevice< ExpressionType, DeviceType >::m_device, Eigen::TensorDevice< ExpressionType, DeviceType >::m_expression, and Eigen::internal::TensorExecutor< Expression, Device, Vectorizable, Tiling >::run().

◆ operator=()

template<typename ExpressionType , typename DeviceType >
template<typename OtherDerived >
EIGEN_STRONG_INLINE TensorDevice& Eigen::TensorDevice< ExpressionType, DeviceType >::operator= ( const OtherDerived &  other)
inline

Member Data Documentation

◆ m_device

template<typename ExpressionType , typename DeviceType >
const DeviceType& Eigen::TensorDevice< ExpressionType, DeviceType >::m_device
protected

◆ m_expression

template<typename ExpressionType , typename DeviceType >
ExpressionType& Eigen::TensorDevice< ExpressionType, DeviceType >::m_expression
protected

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