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

#include <mapping_options.h>

Inheritance diagram for tc::CudaDim:
Collaboration diagram for tc::CudaDim:

Public Member Functions

 CudaDim ()
 
 CudaDim (const CudaDim &cudaDim)
 
 CudaDim (const CudaDimProto &proto)
 
 CudaDim (const CudaDimView &view)
 
 CudaDim (std::initializer_list< uint64_t > il)
 
 CudaDim (std::vector< uint64_t > il)
 
 CudaDim (uint64_t x, uint64_t y=CudaDimView::defaultDim, uint64_t z=CudaDimView::defaultDim)
 
- Public Member Functions inherited from tc::CudaDimView
 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...
 

Private Attributes

CudaDimProto ownedProto_
 

Additional Inherited Members

- Public Attributes inherited from tc::CudaDimView
CudaDimProto & proto
 
- Static Public Attributes inherited from tc::CudaDimView
static const uint64_t defaultDim = 1
 

Detailed Description

"Materialized" CudaDimView.

When constructed from values, ignores trailing defaultDim, e.g.,

CudaDim(42, defaultDim);

will only set x, but

CudaDim(42, defaultDim, 32);

will x, y and z.

Constructor & Destructor Documentation

tc::CudaDim::CudaDim ( )
inline
tc::CudaDim::CudaDim ( const CudaDim cudaDim)
inline
tc::CudaDim::CudaDim ( const CudaDimProto &  proto)
inline
tc::CudaDim::CudaDim ( const CudaDimView view)
inline
tc::CudaDim::CudaDim ( std::initializer_list< uint64_t >  il)
inline
tc::CudaDim::CudaDim ( std::vector< uint64_t >  il)
inline
tc::CudaDim::CudaDim ( uint64_t  x,
uint64_t  y = CudaDimView::defaultDim,
uint64_t  z = CudaDimView::defaultDim 
)
inline

Member Data Documentation

CudaDimProto tc::CudaDim::ownedProto_
private

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