Hermes
|
Holds 2-dimensional size. More...
Public Member Functions | |
HERMES_DEVICE_CALLABLE | Size2 () |
Default constructor. | |
HERMES_DEVICE_CALLABLE | Size2 (T size) |
Single value constructor. More... | |
HERMES_DEVICE_CALLABLE | Size2 (T width, T height) |
Constructor. More... | |
HERMES_DEVICE_CALLABLE T | operator[] (int i) const |
Dimension size const access. More... | |
HERMES_DEVICE_CALLABLE T & | operator[] (int i) |
Dimension size access. More... | |
HERMES_DEVICE_CALLABLE Size2< T > | operator+ (const Size2< T > &b) const |
Addition. More... | |
HERMES_DEVICE_CALLABLE Size2< T > | operator/ (T n) const |
HERMES_DEVICE_CALLABLE Size2< T > | operator* (T s) const |
Scalar multiplication. More... | |
HERMES_DEVICE_CALLABLE bool | operator== (const Size2< T > &b) const |
Comparison. More... | |
HERMES_DEVICE_CALLABLE bool | operator!= (const Size2< T > &b) const |
Comparison. More... | |
HERMES_DEVICE_CALLABLE T | total () const |
Computes total size area. More... | |
HERMES_DEVICE_CALLABLE bool | contains (int i, int j) const |
Checks if coordinate is inside half-open range [0, size) More... | |
Public Attributes | |
T | width {0} |
0-th dimension size | |
T | height {0} |
1-th dimension size | |
Holds 2-dimensional size.
T |
|
inlineexplicit |
Single value constructor.
size |
|
inline |
Constructor.
width | |
height |
|
inline |
Checks if coordinate is inside half-open range [0, size)
i | |
j |
|
inline |
Comparison.
b |
|
inline |
Scalar multiplication.
s |
|
inline |
Addition.
b |
|
inline |
n |
|
inline |
Comparison.
b |
|
inline |
Dimension size access.
i |
|
inline |
Dimension size const access.
i |
|
inline |
Computes total size area.