DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
DNDS::vector_DeviceView< B, T, TSize > Class Template Reference

Non-owning device-callable view {pointer, size} over a typed array. More...

#include <Vector.hpp>

Public Member Functions

DNDS_DEVICE_CALLABLE vector_DeviceView (T *n_data, TSize n_size)
 
DNDS_DEVICE_CALLABLEoperator[] (TSize i) const
 
DNDS_DEVICE_CALLABLE T & operator[] (TSize i)
 
DNDS_DEVICE_CALLABLE TSize size () const
 

Detailed Description

template<DeviceBackend B, typename T, typename TSize = int64_t>
class DNDS::vector_DeviceView< B, T, TSize >

Non-owning device-callable view {pointer, size} over a typed array.

Analogue of std::span<T> that compiles inside __device__ code. Constant copy semantics (trivially copyable); must not outlive its backing storage.

Definition at line 147 of file Vector.hpp.

Constructor & Destructor Documentation

◆ vector_DeviceView()

template<DeviceBackend B, typename T , typename TSize = int64_t>
DNDS_DEVICE_CALLABLE DNDS::vector_DeviceView< B, T, TSize >::vector_DeviceView ( T *  n_data,
TSize  n_size 
)
inline

Definition at line 157 of file Vector.hpp.

Member Function Documentation

◆ operator[]() [1/2]

template<DeviceBackend B, typename T , typename TSize = int64_t>
DNDS_DEVICE_CALLABLE T & DNDS::vector_DeviceView< B, T, TSize >::operator[] ( TSize  i)
inline

Definition at line 164 of file Vector.hpp.

◆ operator[]() [2/2]

template<DeviceBackend B, typename T , typename TSize = int64_t>
DNDS_DEVICE_CALLABLE T DNDS::vector_DeviceView< B, T, TSize >::operator[] ( TSize  i) const
inline

Definition at line 159 of file Vector.hpp.

◆ size()

template<DeviceBackend B, typename T , typename TSize = int64_t>
DNDS_DEVICE_CALLABLE TSize DNDS::vector_DeviceView< B, T, TSize >::size ( ) const
inline

Definition at line 169 of file Vector.hpp.


The documentation for this class was generated from the following file: