Shape class provide information about of a Tensor's shape.
More...
#include <Shape.h>
|
bool | enable_dynamic = false |
|
std::size_t | _rank |
| rank of the shape
|
|
std::vector< std::size_t * > | _dims_ptr |
| pointers to dimensions for each rank
|
|
std::vector< std::size_t > | _dims |
| dimensions for each rank
|
|
std::vector< std::size_t > | _ldims |
| leading dimensions
|
|
std::size_t | _size |
| size of data
|
|
Shape class provide information about of a Tensor's shape.
Definition at line 50 of file Shape.h.
◆ Shape() [1/3]
PROJECT_NS::Shape::Shape |
( |
std::size_t | size | ) |
|
|
inline |
< construct from a number (rank-1 Shape)
construct from a vector (static shape)
Definition at line 53 of file Shape.h.
References size().
◆ Shape() [2/3]
PROJECT_NS::Shape::Shape |
( |
std::vector< std::size_t > | dims | ) |
|
|
inline |
construct from a vector of std::size_t pointer (dynamic shape)
Definition at line 56 of file Shape.h.
◆ Shape() [3/3]
PROJECT_NS::Shape::Shape |
( |
std::vector< std::size_t * > | dims_ptr | ) |
|
|
inline |
◆ dims()
std::vector< std::size_t > & PROJECT_NS::Shape::dims |
( |
| ) |
|
|
inline |
◆ operator()()
int PROJECT_NS::Shape::operator() |
( |
| ) |
|
|
inline |
◆ rank()
int PROJECT_NS::Shape::rank |
( |
| ) |
|
|
inline |
get data size described by a Shape
Definition at line 72 of file Shape.h.
◆ size()
int PROJECT_NS::Shape::size |
( |
| ) |
|
|
inline |
◆ static_build()
void PROJECT_NS::Shape::static_build |
( |
| ) |
|
|
inline |
◆ to_string()
std::string PROJECT_NS::Shape::to_string |
( |
| ) |
|
|
inline |
◆ update()
void PROJECT_NS::Shape::update |
( |
| ) |
|
|
inlineprivate |
◆ _dims
std::vector<std::size_t> PROJECT_NS::Shape::_dims |
|
private |
dimensions for each rank
Definition at line 122 of file Shape.h.
◆ _dims_ptr
std::vector<std::size_t*> PROJECT_NS::Shape::_dims_ptr |
|
private |
pointers to dimensions for each rank
Definition at line 121 of file Shape.h.
◆ _ldims
std::vector<std::size_t> PROJECT_NS::Shape::_ldims |
|
private |
leading dimensions
Definition at line 123 of file Shape.h.
◆ _rank
std::size_t PROJECT_NS::Shape::_rank |
|
private |
rank of the shape
Definition at line 120 of file Shape.h.
◆ _size
std::size_t PROJECT_NS::Shape::_size |
|
private |
size of data
Definition at line 124 of file Shape.h.
◆ enable_dynamic
bool PROJECT_NS::Shape::enable_dynamic = false |
|
private |
The documentation for this class was generated from the following file: