vSMC  v3.0.0
Scalable Monte Carlo
Public Member Functions | Static Public Member Functions | List of all members
vsmc::CLMemory Class Reference

OpenCL cl_mem More...

#include <vsmc/utility/opencl.hpp>

Public Member Functions

 CLMemory (::cl_mem ptr=nullptr)
 
 CLMemory (const CLContext &context,::cl_mem_flags flags, std::size_t size, void *host_ptr=nullptr)
 clCreateBuffer More...
 
::cl_int get_info (::cl_mem_info param_name, std::string &param_value) const
 
template<typename ParamType >
::cl_int get_info (::cl_mem_info param_name, ParamType &param_value) const
 
::cl_int get_info (::cl_mem_info param_name, std::size_t param_value_size, void *param_value, std::size_t *param_value_size_ret) const
 clGetMemObjectInfo More...
 
template<typename ParamType >
::cl_int get_info (::cl_mem_info param_name, std::vector< ParamType > &param_value) const
 
CLMemory sub_buffer (::cl_mem_flags flags,::cl_buffer_create_type buffer_create_type, const void *buffer_create_info=nullptr)
 clCreateSubBuffer More...
 
- Public Member Functions inherited from vsmc::CLBase<::cl_mem, CLMemory >
 CLBase ()
 
pointer get () const
 
 operator bool () const
 
void reset (pointer ptr)
 
void swap (CLBase< ::cl_mem, CLMemory > &other)
 
bool unique () const
 
long use_count () const
 

Static Public Member Functions

::cl_int release (::cl_mem ptr)
 clReleaseMemObject More...
 

Additional Inherited Members

- Public Types inherited from vsmc::CLBase<::cl_mem, CLMemory >
using element_type = typename std::remove_pointer< ::cl_mem >::type
 
using pointer = ::cl_mem
 
- Protected Member Functions inherited from vsmc::CLBase<::cl_mem, CLMemory >
void reset_ptr (pointer ptr)
 

Detailed Description

OpenCL cl_mem

Definition at line 545 of file opencl.hpp.

Constructor & Destructor Documentation

vsmc::CLMemory::CLMemory ( ::cl_mem  ptr = nullptr)
inlineexplicit

Definition at line 548 of file opencl.hpp.

vsmc::CLMemory::CLMemory ( const CLContext context,
::cl_mem_flags  flags,
std::size_t  size,
void *  host_ptr = nullptr 
)
inline

clCreateBuffer

Definition at line 551 of file opencl.hpp.

Member Function Documentation

::cl_int vsmc::CLMemory::get_info ( ::cl_mem_info  param_name,
std::size_t  param_value_size,
void *  param_value,
std::size_t *  param_value_size_ret 
) const
inline

clGetMemObjectInfo

Definition at line 578 of file opencl.hpp.

template<typename ParamType >
::cl_int vsmc::CLMemory::get_info ( ::cl_mem_info  param_name,
std::vector< ParamType > &  param_value 
) const
inline

Definition at line 578 of file opencl.hpp.

::cl_int vsmc::CLMemory::get_info ( ::cl_mem_info  param_name,
std::string &  param_value 
) const
inline

Definition at line 578 of file opencl.hpp.

template<typename ParamType >
::cl_int vsmc::CLMemory::get_info ( ::cl_mem_info  param_name,
ParamType &  param_value 
) const
inline

Definition at line 578 of file opencl.hpp.

::cl_int vsmc::CLMemory::release ( ::cl_mem  ptr)
inlinestatic

clReleaseMemObject

Definition at line 581 of file opencl.hpp.

CLMemory vsmc::CLMemory::sub_buffer ( ::cl_mem_flags  flags,
::cl_buffer_create_type  buffer_create_type,
const void *  buffer_create_info = nullptr 
)
inline

clCreateSubBuffer

Definition at line 564 of file opencl.hpp.