TVM  0.9.4
tvm::internal Namespace Reference

Classes

class  CallbackManager
 
class  FirstOrderProvider
 
class  IdProvider
 
class  MatrixProperties
 
class  ObjectWithProperties
 
class  KeepProperties
 
struct  is_base
 
class  always_true
 
class  always_false
 
class  ObjWithId
 
class  PairElementTokenHandle
 
class  PairElementToken
 
class  RangeCounting
 
class  VariableCountingVector
 
class  VariableVectorPartition
 

Typedefs

using MatrixWithProperties = ObjectWithProperties< Eigen::MatrixXd >
 
using VectorWithProperties = ObjectWithProperties< Eigen::VectorXd >
 
using MatrixConstRefWithProperties = ObjectWithProperties< Eigen::Ref< const Eigen::MatrixXd > >
 
template<typename T , typename... Base>
using enable_for_t = std::enable_if_t<(...||(std::is_same_v< T, Base >||derives_from< T, Base >())), int >
 
template<typename T , template< typename... > class... Base>
using enable_for_templated_t = std::enable_if_t<(...||derives_from< T, Base >()), int >
 
template<typename T , template< typename... > class... Base>
using disable_for_templated_t = std::enable_if_t<!(...||derives_from< T, Base >()), int >
 
template<typename T , bool c>
using const_if = std::conditional< c, const T, T >
 
template<typename T , bool c>
using const_if_t = typename const_if< T, c >::type
 

Functions

TVM_DLLAPI MatrixProperties operator- (const MatrixProperties &)
 
TVM_DLLAPI MatrixProperties operator* (double, const MatrixProperties &)
 
TVM_DLLAPI MatrixProperties operator+ (const MatrixProperties &, const MatrixProperties &)
 
TVM_DLLAPI MatrixProperties operator- (const MatrixProperties &, const MatrixProperties &)
 
TVM_DLLAPI MatrixProperties operator* (const MatrixProperties &, const MatrixProperties &)
 
template<typename T , template< typename... > class Base>
constexpr bool derives_from ()
 

Detailed Description

Copyright 2017-2020 CNRS-AIST JRL and CNRS-UM LIRMM

Typedef Documentation

◆ const_if

template<typename T , bool c>
using tvm::internal::const_if = typedef std::conditional<c, const T, T>

Conditionally add const to T.

◆ const_if_t

template<typename T , bool c>
using tvm::internal::const_if_t = typedef typename const_if<T, c>::type

C++14-style helper

◆ disable_for_templated_t

template<typename T , template< typename... > class... Base>
using tvm::internal::disable_for_templated_t = typedef std::enable_if_t<!(... || derives_from<T, Base>()), int>

Used to disable a function for a list of templated classes.

◆ enable_for_t

template<typename T , typename... Base>
using tvm::internal::enable_for_t = typedef std::enable_if_t<(... || (std::is_same_v<T, Base> || derives_from<T, Base>())), int>

Used to enable a function for a list of types.

To have a function work for T equal or deriving from any B1, B2, ... or Bk where Bi are types. Use as template<typename T, enable_for_t<T,B1, B2, ..., ..., Bk>=0>

◆ enable_for_templated_t

template<typename T , template< typename... > class... Base>
using tvm::internal::enable_for_templated_t = typedef std::enable_if_t<(... || derives_from<T, Base>()), int>

Used to enable a function for a list of templated classes.

To have a function work for T equal or deriving from any B1, B2, ... or Bk where Bi are a templated classes. Use as template<typename T, enable_for_templated_t<T,B1, B2, ..., ..., Bk>=0>

◆ MatrixConstRefWithProperties

using tvm::internal::MatrixConstRefWithProperties = typedef ObjectWithProperties<Eigen::Ref<const Eigen::MatrixXd> >

◆ MatrixWithProperties

◆ VectorWithProperties

Function Documentation

◆ derives_from()

template<typename T , template< typename... > class Base>
constexpr bool tvm::internal::derives_from ( )
constexpr

Check if class \t T derives from the templated class \t Base.

This relies on tvm::internal::is_base::check: if T derives from \t Base, the overload returning std::true_type will be selected, otherwise, it will be the one returning std::false_type.

Adapted from https://stackoverflow.com/a/5998303/11611648

Check if class \t T derives from the non-templated class \t Base This returns false if \t Base is not a class.

◆ operator*() [1/2]

TVM_DLLAPI MatrixProperties tvm::internal::operator* ( const MatrixProperties ,
const MatrixProperties  
)

◆ operator*() [2/2]

TVM_DLLAPI MatrixProperties tvm::internal::operator* ( double  ,
const MatrixProperties  
)

◆ operator+()

TVM_DLLAPI MatrixProperties tvm::internal::operator+ ( const MatrixProperties ,
const MatrixProperties  
)

◆ operator-() [1/2]

TVM_DLLAPI MatrixProperties tvm::internal::operator- ( const MatrixProperties )

◆ operator-() [2/2]

TVM_DLLAPI MatrixProperties tvm::internal::operator- ( const MatrixProperties ,
const MatrixProperties  
)