Stan Math Library  2.20.0
reverse mode automatic differentiation
Public Member Functions | Public Attributes | List of all members
stan::math::opencl_kernels::kernel_cl< Args > Struct Template Reference

Creates functor for kernels. More...

#include <kernel_cl.hpp>

Public Member Functions

 kernel_cl (const char *name, const char *source, const std::map< const char *, int > &options={})
 Creates functor for kernels that only need access to defining the global work size. More...
 
 kernel_cl (const char *name, const std::vector< const char *> &sources, const std::map< const char *, int > &options={})
 Creates functor for kernels that only need access to defining the global work size. More...
 
auto operator() (cl::NDRange global_thread_size, internal::to_const_matrix_cl_t< Args > &... args) const
 Executes a kernel. More...
 
auto operator() (cl::NDRange global_thread_size, cl::NDRange thread_block_size, internal::to_const_matrix_cl_t< Args > &... args) const
 Executes a kernel. More...
 

Public Attributes

const kernel_functor< internal::to_const_buffer_t< Args > &... > make_functor
 

Detailed Description

template<typename... Args>
struct stan::math::opencl_kernels::kernel_cl< Args >

Creates functor for kernels.

Template Parameters
ArgsParameter pack of all kernel argument types.

Definition at line 201 of file kernel_cl.hpp.

Constructor & Destructor Documentation

◆ kernel_cl() [1/2]

template<typename... Args>
stan::math::opencl_kernels::kernel_cl< Args >::kernel_cl ( const char *  name,
const char *  source,
const std::map< const char *, int > &  options = {} 
)
inline

Creates functor for kernels that only need access to defining the global work size.

Parameters
nameThe name for the kernel
sourceA string literal containing the code for the kernel.
optionsThe values of macros to be passed at compile time.

Definition at line 210 of file kernel_cl.hpp.

◆ kernel_cl() [2/2]

template<typename... Args>
stan::math::opencl_kernels::kernel_cl< Args >::kernel_cl ( const char *  name,
const std::vector< const char *> &  sources,
const std::map< const char *, int > &  options = {} 
)
inline

Creates functor for kernels that only need access to defining the global work size.

Parameters
nameThe name for the kernel
sourcesA std::vector of strings containing the code for the kernel.
optionsThe values of macros to be passed at compile time.

Definition at line 220 of file kernel_cl.hpp.

Member Function Documentation

◆ operator()() [1/2]

template<typename... Args>
auto stan::math::opencl_kernels::kernel_cl< Args >::operator() ( cl::NDRange  global_thread_size,
internal::to_const_matrix_cl_t< Args > &...  args 
) const
inline

Executes a kernel.

Parameters
global_thread_sizeThe global work size.
argsThe arguments to pass to the kernel.
Template Parameters
ArgsParameter pack of all kernel argument types.

Definition at line 229 of file kernel_cl.hpp.

◆ operator()() [2/2]

template<typename... Args>
auto stan::math::opencl_kernels::kernel_cl< Args >::operator() ( cl::NDRange  global_thread_size,
cl::NDRange  thread_block_size,
internal::to_const_matrix_cl_t< Args > &...  args 
) const
inline

Executes a kernel.

Parameters
global_thread_sizeThe global work size.
thread_block_sizeThe thread block size.
argsThe arguments to pass to the kernel.
Template Parameters
ArgsParameter pack of all kernel argument types.

Definition at line 248 of file kernel_cl.hpp.

Member Data Documentation

◆ make_functor

template<typename... Args>
const kernel_functor<internal::to_const_buffer_t<Args>&...> stan::math::opencl_kernels::kernel_cl< Args >::make_functor

Definition at line 202 of file kernel_cl.hpp.


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

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