My Project
Loading...
Searching...
No Matches
Opm::gpuistl::PointerView< T > Class Template Reference

A view towards a smart pointer to GPU-allocated memory. More...

#include <gpu_smart_pointer.hpp>

Public Member Functions

 PointerView (const PointerView &other)=default
 
 PointerView (const std::shared_ptr< T > &ptr)
 
template<class Deleter >
 PointerView (const std::unique_ptr< T, Deleter > &ptr)
 
 PointerView (T *ptr)
 
OPM_HOST_DEVICE T * get () const
 
OPM_HOST_DEVICE T & operator* () const
 
OPM_HOST_DEVICE T * operator-> () const
 

Detailed Description

template<class T>
class Opm::gpuistl::PointerView< T >

A view towards a smart pointer to GPU-allocated memory.

This will emulate a smart pointer to GPU-allocated memory, but without ownership semantics, and being compatible with the requirements of the GPU kernels. This is useful when we want to pass a smart pointer to a GPU kernel, but we do not want to transfer the ownership of the memory.


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