1 #ifndef STAN_MATH_OPENCL_KERNELS_COPY_HPP 2 #define STAN_MATH_OPENCL_KERNELS_COPY_HPP 11 namespace opencl_kernels {
13 static const char *copy_kernel_code =
STRINGIFY(
26 __kernel
void copy(__global
double *A, __global
double *B,
27 unsigned int rows,
unsigned int cols) {
28 int i = get_global_id(0);
29 int j = get_global_id(1);
30 if (i < rows && j < cols) {
int rows(const Eigen::Matrix< T, R, C > &m)
Return the number of rows in the specified matrix, vector, or row vector.
static const char * indexing_helpers
int cols(const Eigen::Matrix< T, R, C > &m)
Return the number of columns in the specified matrix, vector, or row vector.
Creates functor for kernels.
const kernel_cl< in_buffer, out_buffer, int, int > copy("copy", {indexing_helpers, copy_kernel_code})
See the docs for copy() .