Stan Math Library  2.20.0
reverse mode automatic differentiation
Public Member Functions | List of all members
stan::math::opencl_context Class Reference

The API to access the methods and values in opencl_context_base. More...

#include <opencl_context.hpp>

Public Member Functions

 opencl_context ()=default
 
std::string description () const
 Returns the description of the OpenCL platform and device that is used. More...
 
std::string capabilities () const
 Returns the description of the OpenCL platforms and devices that are available. More...
 
cl::Context & context ()
 Returns the reference to the OpenCL context. More...
 
cl::CommandQueue & queue ()
 Returns the reference to the active OpenCL command queue for the device. More...
 
opencl_context_base::map_base_opts base_opts ()
 Returns a copy of the map of kernel defines. More...
 
int max_thread_block_size ()
 Returns the maximum thread block size defined by CL_DEVICE_MAX_WORK_GROUP_SIZE for the device in the context. More...
 
opencl_context_base::tuning_structtuning_opts ()
 Returns the thread block size for the Cholesky Decompositions L_11. More...
 
std::vector< cl::Device > device ()
 Returns a vector containing the OpenCL device used to create the context. More...
 
std::vector< cl::Platform > platform ()
 Returns a vector containing the OpenCL platform used to create the context. More...
 

Detailed Description

The API to access the methods and values in opencl_context_base.

Definition at line 215 of file opencl_context.hpp.

Constructor & Destructor Documentation

◆ opencl_context()

stan::math::opencl_context::opencl_context ( )
default

Member Function Documentation

◆ base_opts()

opencl_context_base::map_base_opts stan::math::opencl_context::base_opts ( )
inline

Returns a copy of the map of kernel defines.

Definition at line 359 of file opencl_context.hpp.

◆ capabilities()

std::string stan::math::opencl_context::capabilities ( ) const
inline

Returns the description of the OpenCL platforms and devices that are available.

Devices will be an OpenCL and Platforms are a specific OpenCL implimenation such as AMD SDK's or Nvidia's OpenCL implimentation.

Definition at line 280 of file opencl_context.hpp.

◆ context()

cl::Context& stan::math::opencl_context::context ( )
inline

Returns the reference to the OpenCL context.

The OpenCL context manages objects such as the device, memory, command queue, program, and kernel objects. For stan, there should only be one context, queue, device, and program with multiple kernels.

Definition at line 345 of file opencl_context.hpp.

◆ description()

std::string stan::math::opencl_context::description ( ) const
inline

Returns the description of the OpenCL platform and device that is used.

Devices will be an OpenCL and Platforms are a specific OpenCL implimenation such as AMD SDK's or Nvidia's OpenCL implimentation.

Definition at line 224 of file opencl_context.hpp.

◆ device()

std::vector<cl::Device> stan::math::opencl_context::device ( )
inline

Returns a vector containing the OpenCL device used to create the context.

Definition at line 383 of file opencl_context.hpp.

◆ max_thread_block_size()

int stan::math::opencl_context::max_thread_block_size ( )
inline

Returns the maximum thread block size defined by CL_DEVICE_MAX_WORK_GROUP_SIZE for the device in the context.

This is the maximum product of thread block dimensions for a particular device. IE a max workgoup of 256 would allow thread blocks of sizes (16,16), (128,2), (8, 32), etc.

Definition at line 369 of file opencl_context.hpp.

◆ platform()

std::vector<cl::Platform> stan::math::opencl_context::platform ( )
inline

Returns a vector containing the OpenCL platform used to create the context.

Definition at line 390 of file opencl_context.hpp.

◆ queue()

cl::CommandQueue& stan::math::opencl_context::queue ( )
inline

Returns the reference to the active OpenCL command queue for the device.

One command queue will exist per device where kernels are placed on the command queue and by default executed in order.

Definition at line 353 of file opencl_context.hpp.

◆ tuning_opts()

opencl_context_base::tuning_struct& stan::math::opencl_context::tuning_opts ( )
inline

Returns the thread block size for the Cholesky Decompositions L_11.

Definition at line 376 of file opencl_context.hpp.


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

     [ Stan Home Page ] © 2011–2018, Stan Development Team.