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