Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ opencl_context_base()

stan::math::opencl_context_base::opencl_context_base ( int  platform_id = 1,
int  device_id = 1 
)
inlineprivate

Construct the opencl_context by initializing the OpenCL context, devices, command queues, and kernel groups.

This constructor does the following:

  1. Gets the available platforms and selects the platform with given id.
  2. Gets the available devices and selects the device with given id.
  3. Creates the OpenCL context with the device.
  4. Creates the OpenCL command queue for the selected device.
  5. Sets OpenCL device dependent kernel parameters
Parameters
platform_idid of the OpenCL platform to use
device_idid of the OpenCL device to use
Exceptions
std::system_errorif an OpenCL error occurs.

Definition at line 75 of file opencl_context.hpp.