TVM  0.9.4
ProtoTask.h File Reference
Include dependency graph for ProtoTask.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tvm::utils::ProtoTaskCommon< T, FunT >
 
class  tvm::utils::ProtoTaskCommon< constraint::Type::DOUBLE_SIDED, FunT >
 

Namespaces

 tvm
 
 tvm::utils
 

Macros

#define TVM_ID(x)   std::make_shared<tvm::function::IdentityFunction>(x)
 
#define TVM_LIN(x)   std::make_shared<tvm::function::BasicLinearFunction>(x)
 

Typedefs

template<constraint::Type T>
using tvm::utils::ProtoTask = ProtoTaskCommon< T, FunctionPtr >
 
template<constraint::Type T>
using tvm::utils::LinearProtoTask = ProtoTaskCommon< T, LinearFunctionPtr >
 
template<typename T , typename IfNotLinearFunction , typename IfLinearFunction >
using tvm::utils::ProtoChoice = typename std::enable_if< std::is_base_of< tvm::function::abstract::Function, T >::value, typename std::conditional< std::is_base_of< tvm::function::abstract::LinearFunction, T >::value, IfLinearFunction, IfNotLinearFunction >::type >::type
 
using tvm::utils::ProtoTaskEQ = ProtoTask< constraint::Type::EQUAL >
 
using tvm::utils::LinearProtoTaskEQ = LinearProtoTask< constraint::Type::EQUAL >
 
template<typename T >
using tvm::utils::ProtoTaskEQRet = ProtoChoice< T, tvm::utils::ProtoTaskEQ, tvm::utils::LinearProtoTaskEQ >
 
using tvm::utils::ProtoTaskLT = ProtoTask< constraint::Type::LOWER_THAN >
 
using tvm::utils::LinearProtoTaskLT = LinearProtoTask< constraint::Type::LOWER_THAN >
 
template<typename T >
using tvm::utils::ProtoTaskLTRet = ProtoChoice< T, tvm::utils::ProtoTaskLT, tvm::utils::LinearProtoTaskLT >
 
using tvm::utils::ProtoTaskGT = ProtoTask< constraint::Type::GREATER_THAN >
 
using tvm::utils::LinearProtoTaskGT = LinearProtoTask< constraint::Type::GREATER_THAN >
 
template<typename T >
using tvm::utils::ProtoTaskGTRet = ProtoChoice< T, tvm::utils::ProtoTaskGT, tvm::utils::LinearProtoTaskGT >
 
using tvm::utils::ProtoTaskDS = ProtoTask< constraint::Type::DOUBLE_SIDED >
 
using tvm::utils::LinearProtoTaskDS = LinearProtoTask< constraint::Type::DOUBLE_SIDED >
 
template<typename T >
using tvm::utils::ProtoTaskDSRet = ProtoChoice< T, tvm::utils::ProtoTaskDS, tvm::utils::LinearProtoTaskDS >
 

Functions

template<typename F >
tvm::utils::ProtoTaskEQRet< F > operator== (std::shared_ptr< F > f, const tvm::utils::internal::RHS &rhs)
 
template<typename F >
tvm::utils::ProtoTaskEQRet< F > operator== (const tvm::utils::internal::RHS &rhs, std::shared_ptr< F > f)
 
template<typename F >
tvm::utils::ProtoTaskGTRet< F > operator>= (std::shared_ptr< F > f, const tvm::utils::internal::RHS &rhs)
 
template<typename F >
tvm::utils::ProtoTaskLTRet< F > operator>= (const tvm::utils::internal::RHS &rhs, std::shared_ptr< F > f)
 
template<typename F >
tvm::utils::ProtoTaskLTRet< F > operator<= (std::shared_ptr< F > f, const tvm::utils::internal::RHS &rhs)
 
template<typename F >
tvm::utils::ProtoTaskGTRet< F > operator<= (const tvm::utils::internal::RHS &rhs, std::shared_ptr< F > f)
 
tvm::utils::ProtoTaskDS operator>= (const tvm::utils::ProtoTaskLT &ptl, const tvm::utils::internal::RHS &rhs)
 
tvm::utils::ProtoTaskDS operator<= (const tvm::utils::ProtoTaskGT &ptg, const tvm::utils::internal::RHS &rhs)
 
tvm::utils::LinearProtoTaskEQ operator== (tvm::VariablePtr x, const tvm::utils::internal::RHS &rhs)
 
tvm::utils::LinearProtoTaskEQ operator== (const tvm::utils::internal::RHS &rhs, tvm::VariablePtr x)
 
tvm::utils::LinearProtoTaskGT operator>= (tvm::VariablePtr x, const tvm::utils::internal::RHS &rhs)
 
tvm::utils::LinearProtoTaskLT operator>= (const tvm::utils::internal::RHS &rhs, tvm::VariablePtr x)
 
tvm::utils::LinearProtoTaskLT operator<= (tvm::VariablePtr x, const tvm::utils::internal::RHS &rhs)
 
tvm::utils::LinearProtoTaskGT operator<= (const tvm::utils::internal::RHS &rhs, tvm::VariablePtr x)
 
template<typename Derived >
tvm::utils::LinearProtoTaskEQ operator== (const tvm::utils::LinearExpr< Derived > &lin, const tvm::utils::internal::RHS &rhs)
 
template<typename Derived >
tvm::utils::LinearProtoTaskEQ operator== (const tvm::utils::internal::RHS &rhs, const tvm::utils::LinearExpr< Derived > &lin)
 
template<typename Derived >
tvm::utils::LinearProtoTaskGT operator>= (const tvm::utils::LinearExpr< Derived > &lin, const tvm::utils::internal::RHS &rhs)
 
template<typename Derived >
tvm::utils::LinearProtoTaskLT operator>= (const tvm::utils::internal::RHS &rhs, const tvm::utils::LinearExpr< Derived > &lin)
 
template<typename Derived >
tvm::utils::LinearProtoTaskLT operator<= (const tvm::utils::LinearExpr< Derived > &lin, const tvm::utils::internal::RHS &rhs)
 
template<typename Derived >
tvm::utils::LinearProtoTaskGT operator<= (const tvm::utils::internal::RHS &rhs, const tvm::utils::LinearExpr< Derived > &lin)
 
template<typename CstDerived , typename... Derived>
tvm::utils::LinearProtoTaskEQ operator== (const tvm::utils::AffineExpr< CstDerived, Derived... > &aff, const tvm::utils::internal::RHS &rhs)
 
template<typename CstDerived , typename... Derived>
tvm::utils::LinearProtoTaskEQ operator== (const tvm::utils::internal::RHS &rhs, const tvm::utils::AffineExpr< CstDerived, Derived... > &aff)
 
template<typename CstDerived , typename... Derived>
tvm::utils::LinearProtoTaskGT operator>= (const tvm::utils::AffineExpr< CstDerived, Derived... > &aff, const tvm::utils::internal::RHS &rhs)
 
template<typename CstDerived , typename... Derived>
tvm::utils::LinearProtoTaskLT operator>= (const tvm::utils::internal::RHS &rhs, const tvm::utils::AffineExpr< CstDerived, Derived... > &aff)
 
template<typename CstDerived , typename... Derived>
tvm::utils::LinearProtoTaskLT operator<= (const tvm::utils::AffineExpr< CstDerived, Derived... > &aff, const tvm::utils::internal::RHS &rhs)
 
template<typename CstDerived , typename... Derived>
tvm::utils::LinearProtoTaskGT operator<= (const tvm::utils::internal::RHS &rhs, const tvm::utils::AffineExpr< CstDerived, Derived... > &aff)
 

Macro Definition Documentation

◆ TVM_ID

#define TVM_ID (   x)    std::make_shared<tvm::function::IdentityFunction>(x)

◆ TVM_LIN

#define TVM_LIN (   x)    std::make_shared<tvm::function::BasicLinearFunction>(x)

Function Documentation

◆ operator<=() [1/9]

template<typename CstDerived , typename... Derived>
tvm::utils::LinearProtoTaskLT operator<= ( const tvm::utils::AffineExpr< CstDerived, Derived... > &  aff,
const tvm::utils::internal::RHS rhs 
)
inline

Convenience operators to form a LinearProtoTask expr op rhs (or l <= expr <= u) where expr is a linear expression of the form matrixExpr * VariablePtr or an affine expression as a sum of linear expressions and vectorExpr.

Parameters
linthe linear expression to form the task
affthe affine expression to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you don't need to explicitly write a double (e.g 0.) to the contrary of the operators working with shared_ptr on Function.

◆ operator<=() [2/9]

template<typename CstDerived , typename... Derived>
tvm::utils::LinearProtoTaskGT operator<= ( const tvm::utils::internal::RHS rhs,
const tvm::utils::AffineExpr< CstDerived, Derived... > &  aff 
)
inline

Convenience operators to form a LinearProtoTask expr op rhs (or l <= expr <= u) where expr is a linear expression of the form matrixExpr * VariablePtr or an affine expression as a sum of linear expressions and vectorExpr.

Parameters
linthe linear expression to form the task
affthe affine expression to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you don't need to explicitly write a double (e.g 0.) to the contrary of the operators working with shared_ptr on Function.

◆ operator<=() [3/9]

template<typename Derived >
tvm::utils::LinearProtoTaskGT operator<= ( const tvm::utils::internal::RHS rhs,
const tvm::utils::LinearExpr< Derived > &  lin 
)
inline

Convenience operators to form a LinearProtoTask expr op rhs (or l <= expr <= u) where expr is a linear expression of the form matrixExpr * VariablePtr or an affine expression as a sum of linear expressions and vectorExpr.

Parameters
linthe linear expression to form the task
affthe affine expression to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you don't need to explicitly write a double (e.g 0.) to the contrary of the operators working with shared_ptr on Function.

◆ operator<=() [4/9]

template<typename F >
tvm::utils::ProtoTaskGTRet<F> operator<= ( const tvm::utils::internal::RHS rhs,
std::shared_ptr< F >  f 
)
inline

Convenience operators to form a ProtoTask or LinearProtoTask f op rhs (or l <= f <= u)

Parameters
fthe function to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you need to explicitly write a double (e.g 0., not 0), otherwise the compiler won't be able to decide which overload to pick between this and shared_ptr operator.

◆ operator<=() [5/9]

tvm::utils::LinearProtoTaskGT operator<= ( const tvm::utils::internal::RHS rhs,
tvm::VariablePtr  x 
)
inline

Convenience operators to form a LinearProtoTask x op rhs (or l <= x <= u)

Parameters
xthe variable used in the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you need to explicitly write a double (e.g 0., not 0), otherwise the compiler won't be able to decide which overload to pick between this and shared_ptr operator.

◆ operator<=() [6/9]

template<typename Derived >
tvm::utils::LinearProtoTaskLT operator<= ( const tvm::utils::LinearExpr< Derived > &  lin,
const tvm::utils::internal::RHS rhs 
)
inline

Convenience operators to form a LinearProtoTask expr op rhs (or l <= expr <= u) where expr is a linear expression of the form matrixExpr * VariablePtr or an affine expression as a sum of linear expressions and vectorExpr.

Parameters
linthe linear expression to form the task
affthe affine expression to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you don't need to explicitly write a double (e.g 0.) to the contrary of the operators working with shared_ptr on Function.

◆ operator<=() [7/9]

tvm::utils::LinearProtoTaskDS operator<= ( const tvm::utils::ProtoTaskGT ptg,
const tvm::utils::internal::RHS rhs 
)
inline

Convenience operators to form a ProtoTask or LinearProtoTask f op rhs (or l <= f <= u)

Parameters
fthe function to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you need to explicitly write a double (e.g 0., not 0), otherwise the compiler won't be able to decide which overload to pick between this and shared_ptr operator.

◆ operator<=() [8/9]

template<typename F >
tvm::utils::ProtoTaskLTRet<F> operator<= ( std::shared_ptr< F >  f,
const tvm::utils::internal::RHS rhs 
)
inline

Convenience operators to form a ProtoTask or LinearProtoTask f op rhs (or l <= f <= u)

Parameters
fthe function to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you need to explicitly write a double (e.g 0., not 0), otherwise the compiler won't be able to decide which overload to pick between this and shared_ptr operator.

◆ operator<=() [9/9]

tvm::utils::LinearProtoTaskLT operator<= ( tvm::VariablePtr  x,
const tvm::utils::internal::RHS rhs 
)
inline

Convenience operators to form a LinearProtoTask x op rhs (or l <= x <= u)

Parameters
xthe variable used in the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you need to explicitly write a double (e.g 0., not 0), otherwise the compiler won't be able to decide which overload to pick between this and shared_ptr operator.

◆ operator==() [1/8]

template<typename CstDerived , typename... Derived>
tvm::utils::LinearProtoTaskEQ operator== ( const tvm::utils::AffineExpr< CstDerived, Derived... > &  aff,
const tvm::utils::internal::RHS rhs 
)
inline

Convenience operators to form a LinearProtoTask expr op rhs (or l <= expr <= u) where expr is a linear expression of the form matrixExpr * VariablePtr or an affine expression as a sum of linear expressions and vectorExpr.

Parameters
linthe linear expression to form the task
affthe affine expression to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you don't need to explicitly write a double (e.g 0.) to the contrary of the operators working with shared_ptr on Function.

◆ operator==() [2/8]

template<typename CstDerived , typename... Derived>
tvm::utils::LinearProtoTaskEQ operator== ( const tvm::utils::internal::RHS rhs,
const tvm::utils::AffineExpr< CstDerived, Derived... > &  aff 
)
inline

Convenience operators to form a LinearProtoTask expr op rhs (or l <= expr <= u) where expr is a linear expression of the form matrixExpr * VariablePtr or an affine expression as a sum of linear expressions and vectorExpr.

Parameters
linthe linear expression to form the task
affthe affine expression to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you don't need to explicitly write a double (e.g 0.) to the contrary of the operators working with shared_ptr on Function.

◆ operator==() [3/8]

template<typename Derived >
tvm::utils::LinearProtoTaskEQ operator== ( const tvm::utils::internal::RHS rhs,
const tvm::utils::LinearExpr< Derived > &  lin 
)
inline

Convenience operators to form a LinearProtoTask expr op rhs (or l <= expr <= u) where expr is a linear expression of the form matrixExpr * VariablePtr or an affine expression as a sum of linear expressions and vectorExpr.

Parameters
linthe linear expression to form the task
affthe affine expression to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you don't need to explicitly write a double (e.g 0.) to the contrary of the operators working with shared_ptr on Function.

◆ operator==() [4/8]

template<typename F >
tvm::utils::ProtoTaskEQRet<F> operator== ( const tvm::utils::internal::RHS rhs,
std::shared_ptr< F >  f 
)
inline

Convenience operators to form a ProtoTask or LinearProtoTask f op rhs (or l <= f <= u)

Parameters
fthe function to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you need to explicitly write a double (e.g 0., not 0), otherwise the compiler won't be able to decide which overload to pick between this and shared_ptr operator.

◆ operator==() [5/8]

tvm::utils::LinearProtoTaskEQ operator== ( const tvm::utils::internal::RHS rhs,
tvm::VariablePtr  x 
)
inline

Convenience operators to form a LinearProtoTask x op rhs (or l <= x <= u)

Parameters
xthe variable used in the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you need to explicitly write a double (e.g 0., not 0), otherwise the compiler won't be able to decide which overload to pick between this and shared_ptr operator.

◆ operator==() [6/8]

template<typename Derived >
tvm::utils::LinearProtoTaskEQ operator== ( const tvm::utils::LinearExpr< Derived > &  lin,
const tvm::utils::internal::RHS rhs 
)
inline

Convenience operators to form a LinearProtoTask expr op rhs (or l <= expr <= u) where expr is a linear expression of the form matrixExpr * VariablePtr or an affine expression as a sum of linear expressions and vectorExpr.

Parameters
linthe linear expression to form the task
affthe affine expression to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you don't need to explicitly write a double (e.g 0.) to the contrary of the operators working with shared_ptr on Function.

◆ operator==() [7/8]

template<typename F >
tvm::utils::ProtoTaskEQRet<F> operator== ( std::shared_ptr< F >  f,
const tvm::utils::internal::RHS rhs 
)
inline

Convenience operators to form a ProtoTask or LinearProtoTask f op rhs (or l <= f <= u)

Parameters
fthe function to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you need to explicitly write a double (e.g 0., not 0), otherwise the compiler won't be able to decide which overload to pick between this and shared_ptr operator.

◆ operator==() [8/8]

tvm::utils::LinearProtoTaskEQ operator== ( tvm::VariablePtr  x,
const tvm::utils::internal::RHS rhs 
)
inline

Convenience operators to form a LinearProtoTask x op rhs (or l <= x <= u)

Parameters
xthe variable used in the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you need to explicitly write a double (e.g 0., not 0), otherwise the compiler won't be able to decide which overload to pick between this and shared_ptr operator.

◆ operator>=() [1/9]

template<typename CstDerived , typename... Derived>
tvm::utils::LinearProtoTaskGT operator>= ( const tvm::utils::AffineExpr< CstDerived, Derived... > &  aff,
const tvm::utils::internal::RHS rhs 
)
inline

Convenience operators to form a LinearProtoTask expr op rhs (or l <= expr <= u) where expr is a linear expression of the form matrixExpr * VariablePtr or an affine expression as a sum of linear expressions and vectorExpr.

Parameters
linthe linear expression to form the task
affthe affine expression to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you don't need to explicitly write a double (e.g 0.) to the contrary of the operators working with shared_ptr on Function.

◆ operator>=() [2/9]

template<typename CstDerived , typename... Derived>
tvm::utils::LinearProtoTaskLT operator>= ( const tvm::utils::internal::RHS rhs,
const tvm::utils::AffineExpr< CstDerived, Derived... > &  aff 
)
inline

Convenience operators to form a LinearProtoTask expr op rhs (or l <= expr <= u) where expr is a linear expression of the form matrixExpr * VariablePtr or an affine expression as a sum of linear expressions and vectorExpr.

Parameters
linthe linear expression to form the task
affthe affine expression to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you don't need to explicitly write a double (e.g 0.) to the contrary of the operators working with shared_ptr on Function.

◆ operator>=() [3/9]

template<typename Derived >
tvm::utils::LinearProtoTaskLT operator>= ( const tvm::utils::internal::RHS rhs,
const tvm::utils::LinearExpr< Derived > &  lin 
)
inline

Convenience operators to form a LinearProtoTask expr op rhs (or l <= expr <= u) where expr is a linear expression of the form matrixExpr * VariablePtr or an affine expression as a sum of linear expressions and vectorExpr.

Parameters
linthe linear expression to form the task
affthe affine expression to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you don't need to explicitly write a double (e.g 0.) to the contrary of the operators working with shared_ptr on Function.

◆ operator>=() [4/9]

template<typename F >
tvm::utils::ProtoTaskLTRet<F> operator>= ( const tvm::utils::internal::RHS rhs,
std::shared_ptr< F >  f 
)
inline

Convenience operators to form a ProtoTask or LinearProtoTask f op rhs (or l <= f <= u)

Parameters
fthe function to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you need to explicitly write a double (e.g 0., not 0), otherwise the compiler won't be able to decide which overload to pick between this and shared_ptr operator.

◆ operator>=() [5/9]

tvm::utils::LinearProtoTaskLT operator>= ( const tvm::utils::internal::RHS rhs,
tvm::VariablePtr  x 
)
inline

Convenience operators to form a LinearProtoTask x op rhs (or l <= x <= u)

Parameters
xthe variable used in the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you need to explicitly write a double (e.g 0., not 0), otherwise the compiler won't be able to decide which overload to pick between this and shared_ptr operator.

◆ operator>=() [6/9]

template<typename Derived >
tvm::utils::LinearProtoTaskGT operator>= ( const tvm::utils::LinearExpr< Derived > &  lin,
const tvm::utils::internal::RHS rhs 
)
inline

Convenience operators to form a LinearProtoTask expr op rhs (or l <= expr <= u) where expr is a linear expression of the form matrixExpr * VariablePtr or an affine expression as a sum of linear expressions and vectorExpr.

Parameters
linthe linear expression to form the task
affthe affine expression to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you don't need to explicitly write a double (e.g 0.) to the contrary of the operators working with shared_ptr on Function.

◆ operator>=() [7/9]

tvm::utils::LinearProtoTaskDS operator>= ( const tvm::utils::ProtoTaskLT ptl,
const tvm::utils::internal::RHS rhs 
)
inline

Convenience operators to form a ProtoTask or LinearProtoTask f op rhs (or l <= f <= u)

Parameters
fthe function to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you need to explicitly write a double (e.g 0., not 0), otherwise the compiler won't be able to decide which overload to pick between this and shared_ptr operator.

◆ operator>=() [8/9]

template<typename F >
tvm::utils::ProtoTaskGTRet<F> operator>= ( std::shared_ptr< F >  f,
const tvm::utils::internal::RHS rhs 
)
inline

Convenience operators to form a ProtoTask or LinearProtoTask f op rhs (or l <= f <= u)

Parameters
fthe function to form the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you need to explicitly write a double (e.g 0., not 0), otherwise the compiler won't be able to decide which overload to pick between this and shared_ptr operator.

◆ operator>=() [9/9]

tvm::utils::LinearProtoTaskGT operator>= ( tvm::VariablePtr  x,
const tvm::utils::internal::RHS rhs 
)
inline

Convenience operators to form a LinearProtoTask x op rhs (or l <= x <= u)

Parameters
xthe variable used in the task
rhsa double or a Eigen::Vector with the same size as the function. Note that for a double you need to explicitly write a double (e.g 0., not 0), otherwise the compiler won't be able to decide which overload to pick between this and shared_ptr operator.