Template Class ReadOnlyDeviceMacroProperty
Defined in File DeviceMacroProperty.cuh
Class Documentation
-
template<typename T, unsigned int I = 1, unsigned int J = 1, unsigned int K = 1, unsigned int W = 1>
class ReadOnlyDeviceMacroProperty This template class is used for conveniently converting a multi-dimensional pointer to an array Theoretically the compiler should be able to optimise away most of it at compile time
Public Functions
-
__device__ explicit ReadOnlyDeviceMacroProperty(T *_ptr, unsigned int *_rwf)
Constructor
- Parameters:
_ptr – Pointer to buffer
_rwf – Pointer to read_write_flag
-
__device__ __forceinline__ ReadOnlyDeviceMacroProperty<T, J, K, W, 1> operator[](unsigned int i) const
Access the next dimension of the array
- Throws:
exception::DeviceError – If i >= I.
exception::DeviceError – If template arguments I, J, K , W are all 1. Which denotes the macro property has no dimensions remaining to be indexed.
-
__device__ __forceinline__ operator T() const
Read-only access to the current element
- Throws:
exception::DeviceError – If template arguments I, J, K , W are not all 1. Which denotes the macro property has dimensions remaining to be indexed.
-
__device__ explicit ReadOnlyDeviceMacroProperty(T *_ptr, unsigned int *_rwf)