CudaSpan

template<typename T>
struct CudaSpan

Represents a contiguous sequence of objects of type T stored in GPU memory.

Public Functions

inline CudaSpan(T *ptr, size_t nelements)

Create new span for nelements objects starting at address ptr.

inline CudaSpan()

Create empty span.

inline T *data() const

Returns a pointer to the beginning of the sequence.

inline size_t size() const

Returns the number of elements in the span.