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

OpenCL cl_context More...

#include <vsmc/utility/opencl.hpp>

Public Types

using pfn_notify_type = void(CL_CALLBACK *)(const char *, const void *, std::size_t, void *)
 
- Public Types inherited from vsmc::CLBase<::cl_context, CLContext >
using element_type = typename std::remove_pointer< ::cl_context >::type
 
using pointer = ::cl_context
 

Public Member Functions

 CLContext (::cl_context ptr=nullptr)
 
 CLContext (const CLContextProperties &properties,::cl_uint num_devices, const CLDevice *devices, pfn_notify_type pfn_notify=nullptr, void *user_data=nullptr)
 clCreateContext More...
 
 CLContext (const CLContextProperties &properties,::cl_device_type device_type, pfn_notify_type pfn_notify=nullptr, void *user_data=nullptr)
 clCreateContextFromType More...
 
std::vector< CLDeviceget_device () const
 CL_CONTEXT_DEVICES More...
 
::cl_int get_info (::cl_context_info param_name, std::size_t param_value_size, void *param_value, std::size_t *param_value_size_ret) const
 clGetContextInfo More...
 
::cl_int get_info (::cl_context_info param_name, std::string &param_value) const
 
template<typename ParamType >
::cl_int get_info (::cl_context_info param_name, std::vector< ParamType > &param_value) const
 
template<typename ParamType >
::cl_int get_info (::cl_context_info param_name, ParamType &param_value) const
 
- Public Member Functions inherited from vsmc::CLBase<::cl_context, CLContext >
 CLBase ()
 
pointer get () const
 
 operator bool () const
 
void reset (pointer ptr)
 
void swap (CLBase< ::cl_context, CLContext > &other)
 
bool unique () const
 
long use_count () const
 

Static Public Member Functions

::cl_int release (::cl_context ptr)
 clReleaseContext More...
 

Additional Inherited Members

- Protected Member Functions inherited from vsmc::CLBase<::cl_context, CLContext >
void reset_ptr (pointer ptr)
 

Detailed Description

OpenCL cl_context

Definition at line 406 of file opencl.hpp.

Member Typedef Documentation

using vsmc::CLContext::pfn_notify_type = void(CL_CALLBACK *)( const char *, const void *, std::size_t, void *)

Definition at line 410 of file opencl.hpp.

Constructor & Destructor Documentation

vsmc::CLContext::CLContext ( ::cl_context  ptr = nullptr)
inlineexplicit

Definition at line 412 of file opencl.hpp.

vsmc::CLContext::CLContext ( const CLContextProperties properties,
::cl_uint  num_devices,
const CLDevice devices,
pfn_notify_type  pfn_notify = nullptr,
void *  user_data = nullptr 
)
inline

clCreateContext

Definition at line 415 of file opencl.hpp.

vsmc::CLContext::CLContext ( const CLContextProperties properties,
::cl_device_type  device_type,
pfn_notify_type  pfn_notify = nullptr,
void *  user_data = nullptr 
)
inline

clCreateContextFromType

Definition at line 430 of file opencl.hpp.

Member Function Documentation

std::vector<CLDevice> vsmc::CLContext::get_device ( ) const
inline

CL_CONTEXT_DEVICES

Definition at line 444 of file opencl.hpp.

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

clGetContextInfo

Definition at line 455 of file opencl.hpp.

::cl_int vsmc::CLContext::get_info ( ::cl_context_info  param_name,
std::string &  param_value 
) const
inline

Definition at line 455 of file opencl.hpp.

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

Definition at line 455 of file opencl.hpp.

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

Definition at line 455 of file opencl.hpp.

::cl_int vsmc::CLContext::release ( ::cl_context  ptr)
inlinestatic

clReleaseContext

Definition at line 458 of file opencl.hpp.