Stan Math Library  2.20.0
reverse mode automatic differentiation
Classes | Typedefs | Functions
stan::math::opencl_kernels::internal Namespace Reference

Classes

struct  to_buffer
 meta template struct for changing read/write buffer argument types to cl::Buffer types. More...
 
struct  to_buffer< in_buffer >
 
struct  to_buffer< in_out_buffer >
 
struct  to_buffer< out_buffer >
 
struct  to_matrix_cl
 meta template struct for changing cl::Buffer argument types to matrix_cl. More...
 
struct  to_matrix_cl< cl::Buffer >
 
struct  to_matrix_cl< in_buffer >
 meta template struct for changing read and write buffer argument types to matrix_cl. More...
 
struct  to_matrix_cl< in_out_buffer >
 
struct  to_matrix_cl< out_buffer >
 

Typedefs

template<typename T >
using to_const_matrix_cl_t = const typename internal::to_matrix_cl< T >::type
 
template<typename T >
using to_const_buffer_t = const typename internal::to_buffer< T >::type
 

Functions

template<typename T >
const T & get_kernel_args (const T &t)
 Extracts the kernel's arguments, used in the global and local kernel constructor. More...
 
const cl::Buffer & get_kernel_args (const stan::math::matrix_cl &m)
 
template<typename T >
void assign_event (const cl::Event &, to_const_matrix_cl_t< T > &)
 
template<>
void assign_event< in_buffer > (const cl::Event &e, const stan::math::matrix_cl &m)
 
template<>
void assign_event< out_buffer > (const cl::Event &e, const stan::math::matrix_cl &m)
 
template<>
void assign_event< in_out_buffer > (const cl::Event &e, const stan::math::matrix_cl &m)
 
template<typename T , typename std::enable_if_t< std::is_same< T, cl::Event >::value, int > = 0>
void assign_events (const T &)
 
template<typename Arg , typename... Args>
void assign_events (const cl::Event &new_event, to_const_matrix_cl_t< Arg > &m, to_const_matrix_cl_t< Args > &... args)
 Adds the event to any matrices in the arguments in the event vector specified by the buffer directionality. More...
 
template<typename T >
const std::vector< cl::Event > select_events (to_const_matrix_cl_t< T > &t)
 
template<>
const std::vector< cl::Event > select_events< in_buffer > (const stan::math::matrix_cl &m)
 
template<>
const std::vector< cl::Event > select_events< out_buffer > (const stan::math::matrix_cl &m)
 
template<>
const std::vector< cl::Event > select_events< in_out_buffer > (const stan::math::matrix_cl &m)
 

Typedef Documentation

◆ to_const_buffer_t

template<typename T >
using stan::math::opencl_kernels::internal::to_const_buffer_t = typedef const typename internal::to_buffer<T>::type

Definition at line 94 of file buffer_types.hpp.

◆ to_const_matrix_cl_t

template<typename T >
using stan::math::opencl_kernels::internal::to_const_matrix_cl_t = typedef const typename internal::to_matrix_cl<T>::type

Definition at line 90 of file buffer_types.hpp.

Function Documentation

◆ assign_event()

template<typename T >
void stan::math::opencl_kernels::internal::assign_event ( const cl::Event &  ,
to_const_matrix_cl_t< T > &   
)
inline

Definition at line 47 of file kernel_cl.hpp.

◆ assign_event< in_buffer >()

template<>
void stan::math::opencl_kernels::internal::assign_event< in_buffer > ( const cl::Event &  e,
const stan::math::matrix_cl m 
)
inline

Definition at line 50 of file kernel_cl.hpp.

◆ assign_event< in_out_buffer >()

template<>
void stan::math::opencl_kernels::internal::assign_event< in_out_buffer > ( const cl::Event &  e,
const stan::math::matrix_cl m 
)
inline

Definition at line 62 of file kernel_cl.hpp.

◆ assign_event< out_buffer >()

template<>
void stan::math::opencl_kernels::internal::assign_event< out_buffer > ( const cl::Event &  e,
const stan::math::matrix_cl m 
)
inline

Definition at line 56 of file kernel_cl.hpp.

◆ assign_events() [1/2]

template<typename T , typename std::enable_if_t< std::is_same< T, cl::Event >::value, int > = 0>
void stan::math::opencl_kernels::internal::assign_events ( const T &  )
inline

Definition at line 69 of file kernel_cl.hpp.

◆ assign_events() [2/2]

template<typename Arg , typename... Args>
void stan::math::opencl_kernels::internal::assign_events ( const cl::Event &  new_event,
to_const_matrix_cl_t< Arg > &  m,
to_const_matrix_cl_t< Args > &...  args 
)
inline

Adds the event to any matrices in the arguments in the event vector specified by the buffer directionality.

Template Parameters
ArgArguments given during kernel creation that specify the kernel signature.
ArgsArguments given during kernel creation that specify the kernel signature.
Parameters
new_eventThe cl::Event generated involving the arguments.
mArguments to the kernel that may be matrices or not. Non-matrices ignored.
argsArguments to the kernel that may be matrices or not. Non-matrices ignored.

Definition at line 85 of file kernel_cl.hpp.

◆ get_kernel_args() [1/2]

template<typename T >
const T& stan::math::opencl_kernels::internal::get_kernel_args ( const T &  t)
inline

Extracts the kernel's arguments, used in the global and local kernel constructor.

Template Parameters
Forthis general template the function will just return back the value passed in.
Parameters
tThe type that will be returned.
Returns
the input t.

Definition at line 38 of file kernel_cl.hpp.

◆ get_kernel_args() [2/2]

const cl::Buffer& stan::math::opencl_kernels::internal::get_kernel_args ( const stan::math::matrix_cl m)
inline

Definition at line 42 of file kernel_cl.hpp.

◆ select_events()

template<typename T >
const std::vector<cl::Event> stan::math::opencl_kernels::internal::select_events ( to_const_matrix_cl_t< T > &  t)
inline

Definition at line 93 of file kernel_cl.hpp.

◆ select_events< in_buffer >()

template<>
const std::vector<cl::Event> stan::math::opencl_kernels::internal::select_events< in_buffer > ( const stan::math::matrix_cl m)
inline

Definition at line 98 of file kernel_cl.hpp.

◆ select_events< in_out_buffer >()

template<>
const std::vector<cl::Event> stan::math::opencl_kernels::internal::select_events< in_out_buffer > ( const stan::math::matrix_cl m)
inline

Definition at line 110 of file kernel_cl.hpp.

◆ select_events< out_buffer >()

template<>
const std::vector<cl::Event> stan::math::opencl_kernels::internal::select_events< out_buffer > ( const stan::math::matrix_cl m)
inline

Definition at line 104 of file kernel_cl.hpp.


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