Block-Structured AMR Software Framework
amrex::Gpu::Buffer< T, > Class Template Reference

#include <AMReX_GpuBuffer.H>

Public Member Functions

 Buffer (std::initializer_list< T > init)
 
 Buffer (T const *h_p, const std::size_t n)
 
 ~Buffer ()
 
 Buffer (Buffer const &)=delete
 
 Buffer (Buffer &&)=delete
 
void operator= (Buffer const &)=delete
 
void operator= (Buffer &&)=delete
 
T const * data () const noexcept
 
T * data () noexcept
 
T const * hostData () const noexcept
 
T * hostData () noexcept
 
std::size_t size () const noexcept
 
void clear ()
 
T * copyToHost ()
 

Private Attributes

std::size_t m_size
 
T * d_data = nullptr
 
T * h_data = nullptr
 

Constructor & Destructor Documentation

◆ Buffer() [1/4]

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, int > = 0>
amrex::Gpu::Buffer< T, >::Buffer ( std::initializer_list< T >  init)
inline

◆ Buffer() [2/4]

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, int > = 0>
amrex::Gpu::Buffer< T, >::Buffer ( T const *  h_p,
const std::size_t  n 
)
inline

◆ ~Buffer()

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, int > = 0>
amrex::Gpu::Buffer< T, >::~Buffer ( )
inline

◆ Buffer() [3/4]

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, int > = 0>
amrex::Gpu::Buffer< T, >::Buffer ( Buffer< T, > const &  )
delete

◆ Buffer() [4/4]

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, int > = 0>
amrex::Gpu::Buffer< T, >::Buffer ( Buffer< T, > &&  )
delete

Member Function Documentation

◆ clear()

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, int > = 0>
void amrex::Gpu::Buffer< T, >::clear ( )
inline

◆ copyToHost()

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, int > = 0>
T* amrex::Gpu::Buffer< T, >::copyToHost ( )
inline

◆ data() [1/2]

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, int > = 0>
T const* amrex::Gpu::Buffer< T, >::data ( ) const
inlinenoexcept

◆ data() [2/2]

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, int > = 0>
T* amrex::Gpu::Buffer< T, >::data ( )
inlinenoexcept

◆ hostData() [1/2]

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, int > = 0>
T const* amrex::Gpu::Buffer< T, >::hostData ( ) const
inlinenoexcept

◆ hostData() [2/2]

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, int > = 0>
T* amrex::Gpu::Buffer< T, >::hostData ( )
inlinenoexcept

◆ operator=() [1/2]

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, int > = 0>
void amrex::Gpu::Buffer< T, >::operator= ( Buffer< T, > &&  )
delete

◆ operator=() [2/2]

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, int > = 0>
void amrex::Gpu::Buffer< T, >::operator= ( Buffer< T, > const &  )
delete

◆ size()

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, int > = 0>
std::size_t amrex::Gpu::Buffer< T, >::size ( ) const
inlinenoexcept

Member Data Documentation

◆ d_data

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, int > = 0>
T* amrex::Gpu::Buffer< T, >::d_data = nullptr
private

◆ h_data

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, int > = 0>
T* amrex::Gpu::Buffer< T, >::h_data = nullptr
private

◆ m_size

template<typename T , std::enable_if_t< std::is_trivially_copyable_v< T >, int > = 0>
std::size_t amrex::Gpu::Buffer< T, >::m_size
private

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