Opm::gpuistl::GpuView< T > Class Template Reference The GpuView class is provides a view of some data allocated on the GPU Essenstially is only stores a pointer and a size. More...
Detailed Descriptiontemplate<typename T> class Opm::gpuistl::GpuView< T > The GpuView class is provides a view of some data allocated on the GPU Essenstially is only stores a pointer and a size. This class supports being used from inside a CUDA/HIP Kernel. Implementations are placed in this headerfile for functions that may be called inside a kernel to avoid expensive RDC (relocatable device code) The view will typically provide a view into a GpuBuffer and be able to manipulate the data within it
Member Typedef Documentation◆ value_type
template<typename T >
Constructor & Destructor Documentation◆ GpuView() [1/3]
template<typename T >
Default constructor that will initialize cublas and allocate 0 bytes of memory. ◆ GpuView() [2/3]
template<typename T >
constructor based on std::vectors, this will make a view on the CPU
◆ GpuView() [3/3]
template<typename T >
GpuView allocates new GPU memory of size numberOfElements * sizeof(T) and copies numberOfElements from data.
◆ ~GpuView()
template<typename T >
~GpuView calls cudaFree Member Function Documentation◆ asStdVector()
template<typename T >
creates an std::vector of the same size and copies the GPU data to this std::vector
◆ back() [1/2]
template<typename T >
◆ back() [2/2]
template<typename T >
◆ begin() [1/2]
template<typename T >
Get an iterator pointing to the first element of the buffer.
◆ begin() [2/2]
template<typename T >
Get a const iterator pointing to the first element of the buffer.
◆ copyFromHost() [1/2]
template<typename T >
copyToHost copies data from an std::vector
◆ copyFromHost() [2/2]
template<typename T >
copyFromHost copies numberOfElements from the CPU memory dataPointer
◆ copyToHost() [1/2]
template<typename T >
copyToHost copies data to an std::vector
◆ copyToHost() [2/2]
template<typename T >
copyFromHost copies numberOfElements to the CPU memory dataPointer
◆ data() [1/2]
template<typename T >
◆ data() [2/2]
template<typename T >
◆ end() [1/2]
template<typename T >
Get an iterator pointing to the address after the last element of the buffer.
◆ end() [2/2]
template<typename T >
Get a const iterator pointing to the address after the last element of the buffer.
◆ front() [1/2]
template<typename T >
◆ front() [2/2]
template<typename T >
◆ operator[]() [1/2]
template<typename T >
operator[] to retrieve a reference to an item in the buffer
◆ operator[]() [2/2]
template<typename T >
operator[] to retrieve a copy of an item in the buffer
◆ size()
template<typename T >
size returns the size (number of T elements) in the vector
The documentation for this class was generated from the following file: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||