Hex  2.2
Hydrogen-electron collision solver
Public Types | Public Member Functions | Protected Attributes
clArrayView< T > Class Template Reference

OpenCL array wrapper. More...

#include <clarrays.h>

Inheritance diagram for clArrayView< T >:
Inheritance graph
[legend]
Collaboration diagram for clArrayView< T >:
Collaboration graph
[legend]

Public Types

typedef T DataType
 
typedef T * iterator
 
typedef T const * const_iterator
 

Public Member Functions

 clArrayView ()
 
 clArrayView (std::size_t n, T const *ptr)
 
 clArrayView (ArrayView< T > v, std::size_t i=0, std::size_t n=0)
 
 clArrayView (clArrayView< T > const &v)
 
 clArrayView (ArrayView< T > &&v)
 
 clArrayView (clArrayView< T > &&v)
 
virtual ~clArrayView ()
 
std::size_t size () const
 
T const & operator[] (std::size_t i) const
 
T & operator[] (std::size_t i)
 
T const * data () const
 
T * data ()
 
const_iterator begin () const
 
iterator begin ()
 
const_iterator end () const
 
iterator end ()
 
T const & front (std::size_t i=0) const
 
T & front (std::size_t i=0)
 
T const & back (std::size_t i=0) const
 
T & back (std::size_t i=0)
 
bool is_connected () const
 
void connect (cl_context context, cl_mem_flags flags)
 
void disconnect ()
 
cl_int EnqueueUpload (cl_command_queue queue)
 
cl_int EnqueueDownload (cl_command_queue queue)
 
cl_mem const & handle () const
 

Protected Attributes

cl_mem cl_handle_
 Memory handle to the data copy on the GPU. More...
 

Detailed Description

template<class T>
class clArrayView< T >

This class equips ArrayView<T> with an OpenCL context handle and provides several service methods for upload and download to / from the compute device (mostly GPU).

Member Typedef Documentation

◆ const_iterator

template<class T>
typedef T const* clArrayView< T >::const_iterator

◆ DataType

template<class T>
typedef T clArrayView< T >::DataType

◆ iterator

template<class T>
typedef T* clArrayView< T >::iterator

Constructor & Destructor Documentation

◆ clArrayView() [1/6]

template<class T>
clArrayView< T >::clArrayView ( )
inline

◆ clArrayView() [2/6]

template<class T>
clArrayView< T >::clArrayView ( std::size_t  n,
T const *  ptr 
)
inline

◆ clArrayView() [3/6]

template<class T>
clArrayView< T >::clArrayView ( ArrayView< T >  v,
std::size_t  i = 0,
std::size_t  n = 0 
)
inline

◆ clArrayView() [4/6]

template<class T>
clArrayView< T >::clArrayView ( clArrayView< T > const &  v)
inline

◆ clArrayView() [5/6]

template<class T>
clArrayView< T >::clArrayView ( ArrayView< T > &&  v)
inline

◆ clArrayView() [6/6]

template<class T>
clArrayView< T >::clArrayView ( clArrayView< T > &&  v)
inline

◆ ~clArrayView()

template<class T>
virtual clArrayView< T >::~clArrayView ( )
inlinevirtual

Member Function Documentation

◆ back() [1/2]

template<class T>
T const& clArrayView< T >::back ( std::size_t  i = 0) const
inline

◆ back() [2/2]

template<class T>
T& clArrayView< T >::back ( std::size_t  i = 0)
inline

◆ begin() [1/2]

template<class T>
const_iterator clArrayView< T >::begin ( ) const
inline

◆ begin() [2/2]

template<class T>
iterator clArrayView< T >::begin ( )
inline

◆ connect()

template<class T>
void clArrayView< T >::connect ( cl_context  context,
cl_mem_flags  flags 
)
inline

◆ data() [1/2]

template<class T>
T const* clArrayView< T >::data ( ) const
inline

◆ data() [2/2]

template<class T>
T* clArrayView< T >::data ( )
inline

◆ disconnect()

template<class T>
void clArrayView< T >::disconnect ( )
inline

◆ end() [1/2]

template<class T>
const_iterator clArrayView< T >::end ( ) const
inline

◆ end() [2/2]

template<class T>
iterator clArrayView< T >::end ( )
inline

◆ EnqueueDownload()

template<class T>
cl_int clArrayView< T >::EnqueueDownload ( cl_command_queue  queue)
inline

◆ EnqueueUpload()

template<class T>
cl_int clArrayView< T >::EnqueueUpload ( cl_command_queue  queue)
inline

◆ front() [1/2]

template<class T>
T const& clArrayView< T >::front ( std::size_t  i = 0) const
inline

◆ front() [2/2]

template<class T>
T& clArrayView< T >::front ( std::size_t  i = 0)
inline

◆ handle()

template<class T>
cl_mem const& clArrayView< T >::handle ( ) const
inline

◆ is_connected()

template<class T>
bool clArrayView< T >::is_connected ( ) const
inline

◆ operator[]() [1/2]

template<class T>
T const& clArrayView< T >::operator[] ( std::size_t  i) const
inline

◆ operator[]() [2/2]

template<class T>
T& clArrayView< T >::operator[] ( std::size_t  i)
inline

◆ size()

template<class T>
std::size_t clArrayView< T >::size ( ) const
inline

Field Documentation

◆ cl_handle_

template<class T>
cl_mem clArrayView< T >::cl_handle_
protected

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