tvm
Public Types | Public Member Functions | List of all members
tvm::runtime::metadata::ArrayAccessor< C, Ref > Class Template Reference

A span-like class which permits access to Array fields with complex elements. These array fields should be accessed from C++ using the Metadata wrapper classes. This class lazily instantiates those wrappers as they are accessed. More...

#include <metadata_base.h>

Collaboration diagram for tvm::runtime::metadata::ArrayAccessor< C, Ref >:

Public Types

using value_type = Ref
 
using iterator = ArrayIterator< C, Ref >
 
using const_iterator = iterator
 

Public Member Functions

template<typename T = typename std::enable_if<std::is_base_of<ObjectRef, Ref>::value>::type>
 ArrayAccessor (const C *data, size_t num_data)
 
size_t size () const
 
Ref operator[] (size_t index) const
 
ArrayIterator< C, Ref > begin () const
 
ArrayIterator< C, Ref > end () const
 

Detailed Description

template<typename C, class Ref>
class tvm::runtime::metadata::ArrayAccessor< C, Ref >

A span-like class which permits access to Array fields with complex elements. These array fields should be accessed from C++ using the Metadata wrapper classes. This class lazily instantiates those wrappers as they are accessed.

Member Typedef Documentation

◆ const_iterator

template<typename C , class Ref >
using tvm::runtime::metadata::ArrayAccessor< C, Ref >::const_iterator = iterator

◆ iterator

template<typename C , class Ref >
using tvm::runtime::metadata::ArrayAccessor< C, Ref >::iterator = ArrayIterator<C, Ref>

◆ value_type

template<typename C , class Ref >
using tvm::runtime::metadata::ArrayAccessor< C, Ref >::value_type = Ref

Constructor & Destructor Documentation

◆ ArrayAccessor()

template<typename C , class Ref >
template<typename T = typename std::enable_if<std::is_base_of<ObjectRef, Ref>::value>::type>
tvm::runtime::metadata::ArrayAccessor< C, Ref >::ArrayAccessor ( const C *  data,
size_t  num_data 
)
inline

Member Function Documentation

◆ begin()

template<typename C , class Ref >
ArrayIterator<C, Ref> tvm::runtime::metadata::ArrayAccessor< C, Ref >::begin ( ) const
inline

◆ end()

template<typename C , class Ref >
ArrayIterator<C, Ref> tvm::runtime::metadata::ArrayAccessor< C, Ref >::end ( ) const
inline

◆ operator[]()

template<typename C , class Ref >
Ref tvm::runtime::metadata::ArrayAccessor< C, Ref >::operator[] ( size_t  index) const
inline

◆ size()

template<typename C , class Ref >
size_t tvm::runtime::metadata::ArrayAccessor< C, Ref >::size ( ) const
inline

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