TVM  0.9.4
tvm::scheme::internal::CompiledAssignment< MatrixType, A, W, M, F > Class Template Reference

#include <tvm/scheme/internal/CompiledAssignment.h>

Inheritance diagram for tvm::scheme::internal::CompiledAssignment< MatrixType, A, W, M, F >:
Collaboration diagram for tvm::scheme::internal::CompiledAssignment< MatrixType, A, W, M, F >:

Public Member Functions

template<typename U = MatrixType>
std::enable_if<!use_product_cache< U, A, W, M, F >::value >::type run ()
 
template<typename U = MatrixType>
std::enable_if< use_product_cache< U, A, W, M, F >::value &&!use_assign_cache< U, A, W, M, F >::value >::type run ()
 
template<typename U = MatrixType>
std::enable_if< use_product_cache< U, A, W, M, F >::value &&use_assign_cache< U, A, W, M, F >::value >::type run ()
 
void to (const Eigen::Ref< MatrixType > &to)
 
- Public Member Functions inherited from tvm::scheme::internal::CachedResult< MatrixType, use_assign_cache< MatrixType, A, W, M, EXTERNAL >::value||use_product_cache< MatrixType, A, W, M, EXTERNAL >::value >
 CachedResult (const Eigen::Ref< MatrixType > &)
 
const T & cache (const T &M)
 
- Public Member Functions inherited from tvm::scheme::internal::SourceBase< MatrixType, EXTERNAL >
 SourceBase (const SourceType &from)
 
const SourceTypefrom () const
 
void from (const SourceType &from)
 

Friends

template<typename MatrixType_ >
class CompiledAssignmentWrapper
 

Additional Inherited Members

- Public Types inherited from tvm::scheme::internal::SourceBase< MatrixType, EXTERNAL >
using SourceType = typename std::conditional< F==CONSTANT, double, Eigen::Ref< const MatrixType > >::type
 

Detailed Description

template<typename MatrixType, AssignType A, WeightMult W, MatrixMult M, Source F = EXTERNAL>
class tvm::scheme::internal::CompiledAssignment< MatrixType, A, W, M, F >

The main class. Its run method performs the assignment t = op(t, w*M*f) (if f is a vector) or t = op(t, w*f*M) (if f is a matrix) where

  • t is the target matrix/vector
  • f is the source matrix/vector
  • op is described by A
  • w is a scalar, user supplied if W is SCALAR, +/-1 if W is NONE or MINUS, and a vector if W is DIAGONAL or INVERSE_DIAGONAL
  • M is a matrix, either the identity or user-supplied, depending on the template parameter M (see MatrixMult) If F=EXTERNAl f is a user supplied Eigen::Ref<MatrixType>, if F=ZERO, f=0 and if F=CONSTANT, f is a constant vector (vector only).

This class is meant to be a helper class and should not live on its own, but be create by a higher-level class ensuring its data are valid.

Member Function Documentation

◆ run() [1/3]

template<typename MatrixType , AssignType A, WeightMult W, MatrixMult M, Source F = EXTERNAL>
template<typename U = MatrixType>
std::enable_if<!use_product_cache<U, A, W, M, F>::value>::type tvm::scheme::internal::CompiledAssignment< MatrixType, A, W, M, F >::run ( )
inline

◆ run() [2/3]

template<typename MatrixType , AssignType A, WeightMult W, MatrixMult M, Source F = EXTERNAL>
template<typename U = MatrixType>
std::enable_if<use_product_cache<U, A, W, M, F>::value && !use_assign_cache<U, A, W, M, F>::value>::type tvm::scheme::internal::CompiledAssignment< MatrixType, A, W, M, F >::run ( )
inline

◆ run() [3/3]

template<typename MatrixType , AssignType A, WeightMult W, MatrixMult M, Source F = EXTERNAL>
template<typename U = MatrixType>
std::enable_if<use_product_cache<U, A, W, M, F>::value && use_assign_cache<U, A, W, M, F>::value>::type tvm::scheme::internal::CompiledAssignment< MatrixType, A, W, M, F >::run ( )
inline

◆ to()

template<typename MatrixType , AssignType A, WeightMult W, MatrixMult M, Source F = EXTERNAL>
void tvm::scheme::internal::CompiledAssignment< MatrixType, A, W, M, F >::to ( const Eigen::Ref< MatrixType > &  to)
inline

Friends And Related Function Documentation

◆ CompiledAssignmentWrapper

template<typename MatrixType , AssignType A, WeightMult W, MatrixMult M, Source F = EXTERNAL>
template<typename MatrixType_ >
friend class CompiledAssignmentWrapper
friend

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