Automatic Differentiation
 
Loading...
Searching...
No Matches
OpenCL Context

Detailed Description

Initialization for OpenCL Context:

  1. create context
  2. Find OpenCL platforms and devices available
  3. set up command queue
  4. set architecture dependent kernel parameters

Classes

class  stan::math::opencl_context_base
 The opencl_context_base class represents an OpenCL context in the standard Meyers singleton design pattern. More...
 
struct  stan::math::opencl_context_base::tuning_struct
 
class  stan::math::opencl_context
 The API to access the methods and values in opencl_context_base. More...
 

Functions

 stan::math::opencl_context_base::opencl_context_base (int platform_id=1, int device_id=1)
 Construct the opencl_context by initializing the OpenCL context, devices, command queues, and kernel groups.
 
std::string stan::math::opencl_context::description () const
 Returns the description of the OpenCL platform and device that is used.
 
std::string stan::math::opencl_context::capabilities () const
 Returns the description of the OpenCL platforms and devices that are available.
 
cl::Context & stan::math::opencl_context::context () noexcept
 Returns the reference to the OpenCL context.
 
cl::CommandQueue & stan::math::opencl_context::queue () noexcept
 Returns the reference to the active OpenCL command queue for the device.
 
opencl_context_base::map_base_optsstan::math::opencl_context::base_opts () noexcept
 Returns a copy of the map of kernel defines.
 
int stan::math::opencl_context::max_thread_block_size () noexcept
 Returns the maximum thread block size defined by CL_DEVICE_MAX_WORK_GROUP_SIZE for the device in the context.
 
opencl_context_base::tuning_structstan::math::opencl_context::tuning_opts () noexcept
 Returns the thread block size for the Cholesky Decompositions L_11.
 
std::vector< cl::Device > & stan::math::opencl_context::device () noexcept
 Returns a vector containing the OpenCL device used to create the context.
 
std::vector< cl::Platform > & stan::math::opencl_context::platform () noexcept
 Returns a vector containing the OpenCL platform used to create the context.
 
bool & stan::math::opencl_context::in_order () noexcept
 Return a bool representing whether the write to the OpenCL device are blocking.