Shape::Expand()
Expand shape of Shape object.
Synopsis
Shape<N + 1> Expand(int axis)
Arguments
axis
: given axis.Return
Shape object in (N+1)-dimensions.
Shape::GetDim()
Get i-th dimension in Shape object.
Synopsis
size_t GetDim(int i)
Arguments
i
: index of dimensions.Return
the i-th dimension.
Shape::GetND()
Get number of dimensions in Shape object.
Synopsis
int GetND()
Return
number of dimensions.
Shape::GetSize()
Get size of Shape object.
Synopsis
size_t GetSize()
Return
size of shape.
Shape::GetStart()
Get the i-th start postion in Shape object.
Synopsis
int64_t GetStart(int i)
Arguments
i
: index of dimensions.Return
start position in i-th dimension.
Shape::GetStride()
Get i-th stride in Shape object.
Synopsis
int64_t GetStride(int i)
Arguments
i
: index of dimensions.Return
stride in i-th dimension.
Shape::operator!=()
Use operator ‘!=’ to compare with other Shape object.
Synopsis
bool operator!=(const Shape<N> &other)
Arguments
other
: other Shape object.Return
True if shape is not the same.
Shape::operator==()
Use operator ‘==’ to compare with other Shape object.
Synopsis
bool operator==(const Shape<N> &other)
Arguments
other
: other Shape object.Return
True if shape is the same.
Shape::Represent()
String representation of Shape object.
Synopsis
std::string Represent(int type)
Arguments
type
: 0: dimensions; 1: strides; 2: starts.Return
string object.
Shape::Squeeze()
Remove axis of length 1 from Shape object.
Synopsis
Shape<N - 1> Squeeze(int axis)
Arguments
axis
: given axis, where the length is 1.Return
Shape object in (N-1)-dimensions.