A standard_layout and trivially_copyable typed array that knows the data type and size it is holding.
More...
|
| | TypedArray () noexcept |
| |
| | TypedArray (TypedArray const &)=default |
| |
| | TypedArray (TypedArray &&)=default |
| |
| TypedArray & | operator= (TypedArray const &) &=default |
| |
| TypedArray & | operator= (TypedArray &&) &=default |
| |
| | ~TypedArray () noexcept=default |
| |
| | TypedArray (float *ptr, uint64_t const bufferSize) noexcept |
| | sets the data to a float ptr. It also sets the current type to kFLOAT More...
|
| |
| | TypedArray (half_t *ptr, uint64_t const bufferSize) noexcept |
| | sets the data to a half_t ptr. It also sets the current type to kHALF More...
|
| |
| | TypedArray (int64_t *ptr, uint64_t const bufferSize) noexcept |
| | sets the data to a int64_t ptr. It also sets the current type to kINT64 More...
|
| |
| | TypedArray (int32_t *ptr, uint64_t const bufferSize) noexcept |
| | sets the data to a int32_t ptr. It also sets the current type to kINT32 More...
|
| |
| | TypedArray (int8_t *ptr, uint64_t const bufferSize) noexcept |
| | sets the data to a int8_t ptr. It also sets the current type to kINT8 More...
|
| |
| | TypedArray (uint8_t *ptr, uint64_t const bufferSize) noexcept |
| | sets the data to a uint8_t ptr. It also sets the current type to kUINT8 More...
|
| |
| | TypedArray (bool *ptr, uint64_t const bufferSize) noexcept |
| | sets the data to a bool ptr. It also sets the current type to kBOOL More...
|
| |
| DataType | getType () const noexcept |
| | This method returns the current type of the data. More...
|
| |
| float * | getFloat () const noexcept |
| | Retrieves the data as float*. It should only be called when the current type is kFLOAT. Returns nullptr otherwise. More...
|
| |
| half_t * | getHalf () const noexcept |
| | Retrieves the data as half_t*. It should only be called when the current type is kFLOAT. Returns nullptr otherwise. More...
|
| |
| int64_t * | getInt64 () const noexcept |
| | Retrieves the data as int64_t*. It should only be called when the current type is kINT64. Returns nullptr otherwise. More...
|
| |
| int32_t * | getInt32 () const noexcept |
| | Retrieves the data as int32_t*. It should only be called when the current type is kINT32. Returns nullptr otherwise. More...
|
| |
| int8_t * | getInt8 () const noexcept |
| | Retrieves the data as int8_t*. It should only be called when the current type is kINT8. Returns nullptr otherwise. More...
|
| |
| uint8_t * | getUint8 () const noexcept |
| | Retrieves the data as uint8_t*. It should only be called when the current type is kUINT8. Returns nullptr otherwise. More...
|
| |
| bool * | getBool () const noexcept |
| | Retrieves the data as bool*. It should only be called when the current type is kBOOL. Returns nullptr otherwise. More...
|
| |
| uint64_t | getSize () const noexcept |
| | Retrieves the size of the array in bytes. More...
|
| |
| void * | getData () const noexcept |
| | Retrieves the data regardless of the type. More...
|
| |
A standard_layout and trivially_copyable typed array that knows the data type and size it is holding.
- Warning
- The user of this class is responsible for making sure the data pointer is set to a valid piece of memory
- Precondition
- user provides a valid data ptr for this object before passing it to TRT's API