TypeMeta is a thin class that allows us to store the type of a container such as a blob, or the data type of a tensor, with a unique run-time id. More...
#include <typeid.h>
Public Member Functions | |
| TypeMeta () noexcept | |
| Create a dummy TypeMeta object. More... | |
| constexpr | TypeMeta (const TypeMeta &src) noexcept=default |
| Copy constructor. | |
| AT_CPP14_CONSTEXPR TypeMeta & | operator= (const TypeMeta &src) noexcept=default |
| Assignment operator. | |
| constexpr | TypeMeta (TypeMeta &&rhs) noexcept=default |
| constexpr TypeIdentifier | id () const noexcept |
| Returns the type id. | |
| constexpr size_t | itemsize () const noexcept |
| Returns the size of the item. | |
| constexpr New * | newFn () const noexcept |
| constexpr PlacementNew * | placementNew () const noexcept |
| Returns the placement new function pointer for individual items. | |
| constexpr Copy * | copy () const noexcept |
| Returns the typed copy function pointer for individual iterms. | |
| constexpr PlacementDelete * | placementDelete () const noexcept |
| Returns the destructor function pointer for individual items. | |
| constexpr Delete * | deleteFn () const noexcept |
| constexpr const char * | name () const noexcept |
| Returns a printable name for the type. | |
| template<typename T > | |
| constexpr bool | Match () const noexcept |
Static Public Member Functions | |
| template<class T > | |
| static TypeIdentifier | Id () noexcept |
| template<class T > | |
| static const char * | TypeName () noexcept |
| template<class T > | |
| static constexpr size_t | ItemSize () noexcept |
| template<typename T > | |
| static TypeMeta | Make () |
| Returns a TypeMeta object that corresponds to the typename T. | |
Friends | |
| bool | operator== (const TypeMeta &lhs, const TypeMeta &rhs) noexcept |
TypeMeta is a thin class that allows us to store the type of a container such as a blob, or the data type of a tensor, with a unique run-time id.
It also stores some additional data such as the item size and the name of the type for run-time inspection.
|
inlinenoexcept |
Create a dummy TypeMeta object.
To create a TypeMeta object for a specific type, use TypeMeta::Make<T>().
1.8.11