|
TVM
0.9.4
|
Typedefs | |
| template<typename MatrixType > | |
| using | isVector = typename std::conditional< MatrixType::ColsAtCompileTime==1, std::true_type, std::false_type >::type |
| template<typename MatrixType > | |
| using | isMatrix = typename std::conditional< MatrixType::ColsAtCompileTime !=1, std::true_type, std::false_type >::type |
Enumerations | |
| enum class | TargetType { Linear , Quadratic } |
| enum | AssignType { COPY , ADD , SUB , MIN , MAX } |
| enum | WeightMult { NONE , MINUS , SCALAR , DIAGONAL } |
| enum | MatrixMult { IDENTITY , GENERAL , INVERSE_DIAGONAL , CUSTOM } |
| enum | Source { EXTERNAL , ZERO , CONSTANT } |
Functions | |
| template<typename T > | |
| std::true_type | hasNoArgCtorDummy (const T &) |
| template<typename T > | |
| decltype(hasNoArgCtorDummy(T(NoArg()))) | hasNoArgCtor_ (int) |
| template<typename > | |
| std::false_type | hasNoArgCtor_ (...) |
| template<typename Problem , typename Scheme > | |
| ProblemComputationData * | getComputationData (Problem &problem, const Scheme &resolutionScheme) |
| bool TVM_DLLAPI | isBound (const ConstraintPtr &c) |
| bool TVM_DLLAPI | isBound (const ConstraintPtr &c, const hint::internal::Substitutions &subs) |
| bool TVM_DLLAPI | isBound (const ConstraintPtr &c, const std::vector< VariablePtr > &x, const std::vector< std::shared_ptr< function::BasicLinearFunction >> &xsub) |
| bool TVM_DLLAPI | canBeUsedAsBound (const ConstraintPtr &c, const hint::internal::Substitutions &subs, constraint::Type targetConvention) |
| bool TVM_DLLAPI | canBeUsedAsBound (const ConstraintPtr &c, const std::vector< VariablePtr > &x, const std::vector< std::shared_ptr< function::BasicLinearFunction >> &xsub, constraint::Type targetConvention) |
Variables | |
| constexpr int | GeneralLevel = -1 |
| constexpr int | NoLimit = GeneralLevel |
| using tvm::scheme::internal::isMatrix = typedef typename std::conditional<MatrixType::ColsAtCompileTime != 1, std::true_type, std::false_type>::type |
| using tvm::scheme::internal::isVector = typedef typename std::conditional<MatrixType::ColsAtCompileTime == 1, std::true_type, std::false_type>::type |
trait-like definition to detect if an Eigen expression MatrixType is describing a vector.
The type of the source. Note there are two considerations for explicitly introducing the CONSTANT case (versus requiring the user to give a Ref to a constant vector):
| Enumerator | |
|---|---|
| EXTERNAL | source is an external vector or matrix (main use-case) |
| ZERO | source is zero |
| CONSTANT | source is a (non-zero) constant |
|
strong |
| bool TVM_DLLAPI tvm::scheme::internal::canBeUsedAsBound | ( | const ConstraintPtr & | c, |
| const hint::internal::Substitutions & | subs, | ||
| constraint::Type | targetConvention | ||
| ) |
Check if the constraint can be used as a bound for a given target convention. For example l <= x <= u is a bound, but it cannot be transformed into x >= lb.
| bool TVM_DLLAPI tvm::scheme::internal::canBeUsedAsBound | ( | const ConstraintPtr & | c, |
| const std::vector< VariablePtr > & | x, | ||
| const std::vector< std::shared_ptr< function::BasicLinearFunction >> & | xsub, | ||
| constraint::Type | targetConvention | ||
| ) |
Version with separated substituted variables and substitution functions.
|
inline |
Get the computation data linked to a particular resolution scheme. If this data does not exist, create it, using the resolution scheme as a factory
| The | resolution scheme for which we want to get back the computation data. It needs to have a method createComputationData. |
| std::false_type tvm::scheme::internal::hasNoArgCtor_ | ( | ... | ) |
Overload that always exists. It will only be chosen if the other overload does not exist.
| decltype(hasNoArgCtorDummy(T(NoArg()))) tvm::scheme::internal::hasNoArgCtor_ | ( | int | ) |
Helper function that exists only if T has a constructor accepting NoArg. We use hasNoArgCtorDummy as a mean to enable SFINAE.
| std::true_type tvm::scheme::internal::hasNoArgCtorDummy | ( | const T & | ) |
A dummy helper function to build hasNoArgCtor
| bool TVM_DLLAPI tvm::scheme::internal::isBound | ( | const ConstraintPtr & | c | ) |
We consider as bound a constraint with a single variable and a diagonal, invertible jacobian. It would be possible to accept non-invertible sparse diagonal jacobians as well, in which case the zero elements of the diagonal would correspond to non-existing bounds, but this requires quite a lot of work for something that is unlikely to happen and could be expressed by changing the bound itself to +/- infinity.
| bool TVM_DLLAPI tvm::scheme::internal::isBound | ( | const ConstraintPtr & | c, |
| const hint::internal::Substitutions & | subs | ||
| ) |
Assert if a constraint is a bound in the presence of substitutions
| c | the constraint |
| subs | the set of substitutions We have a bound if c is a bound and the variable is not substituted or it is by an expression with a single variable and an invertible, diagonal jacobian. |
| bool TVM_DLLAPI tvm::scheme::internal::isBound | ( | const ConstraintPtr & | c, |
| const std::vector< VariablePtr > & | x, | ||
| const std::vector< std::shared_ptr< function::BasicLinearFunction >> & | xsub | ||
| ) |
Assert if a constraint is a bound in the presence of substitutions
| c | the constraint |
| x | the set of variables being substituted |
| xsub | the set of substitution functions corresponding to those variables. We have a bound if c is a bound and the variable is not substituted or it is by an expression with a single variable and an invertible, diagonal jacobian. |
|
inlineconstexpr |
Used to describe any level that is not explicitly specified.
|
inlineconstexpr |
Used to specify that a scheme can handle an unlimited number of levels.