Tensor Comprehensions
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
tc::CudaDimView Class Reference

#include <mapping_options.h>

Inheritance diagram for tc::CudaDimView:

Public Member Functions

 CudaDimView (const CudaDimView &)=default
 Construct a view that refers to a protocol buffers message. More...
 
 CudaDimView (CudaDimProto &buf)
 
size_t size () const
 Number of values held. More...
 
std::vector< uint64_t > extractVector () const
 Return a copy of values as std::vector. More...
 
std::array< uint64_t, 3 > extractDefaultedArray () const
 Return a copy of values as std::array of size 3 padded with defaultDim. More...
 
ValueAccessor< uint64_t > operator[] (size_t i)
 
uint64_t operator[] (size_t i) const
 Access the values positionally (x=0, y=1, z=2). More...
 
CudaDimViewoperator= (const CudaDimView &view)
 Assign the values from another view. More...
 
bool operator== (const CudaDimView &view) const
 Compare the values with those from another view. More...
 
bool operator!= (const CudaDimView &view) const
 
std::string toCommaSeparatedString () const
 Conversion to string and output operators. More...
 

Public Attributes

CudaDimProto & proto
 

Static Public Attributes

static const uint64_t defaultDim = 1
 

Private Member Functions

 CudaDimView ()=default
 

Friends

std::ostream & operator<< (std::ostream &os, const CudaDimView &view)
 

Detailed Description

View of a CudaDimProto.

Provides sequence container-like access to a CudaDimProto, which holds at least one (x) and at most three (x,y,z) values.

Constructor & Destructor Documentation

tc::CudaDimView::CudaDimView ( )
privatedefault
tc::CudaDimView::CudaDimView ( const CudaDimView )
default

Construct a view that refers to a protocol buffers message.

tc::CudaDimView::CudaDimView ( CudaDimProto &  buf)
inlineexplicit

Member Function Documentation

std::array< uint64_t, 3 > tc::CudaDimView::extractDefaultedArray ( ) const
inline

Return a copy of values as std::array of size 3 padded with defaultDim.

std::vector< uint64_t > tc::CudaDimView::extractVector ( ) const
inline

Return a copy of values as std::vector.

bool tc::CudaDimView::operator!= ( const CudaDimView view) const
inline
CudaDimView & tc::CudaDimView::operator= ( const CudaDimView view)
inline

Assign the values from another view.

bool tc::CudaDimView::operator== ( const CudaDimView view) const
inline

Compare the values with those from another view.

ValueAccessor< uint64_t > tc::CudaDimView::operator[] ( size_t  i)
inline

Return a modifiable object which replicates assignments back to the underlying protocol buffers message.

uint64_t tc::CudaDimView::operator[] ( size_t  i) const
inline

Access the values positionally (x=0, y=1, z=2).

size_t tc::CudaDimView::size ( ) const
inline

Number of values held.

std::string tc::CudaDimView::toCommaSeparatedString ( ) const

Conversion to string and output operators.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CudaDimView view 
)
friend

Member Data Documentation

const uint64_t tc::CudaDimView::defaultDim = 1
static
CudaDimProto& tc::CudaDimView::proto

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