1 #ifndef STAN_MATH_OPENCL_KERNELS_TRIANGULAR_TRANSPOSE_HPP 2 #define STAN_MATH_OPENCL_KERNELS_TRIANGULAR_TRANSPOSE_HPP 10 namespace opencl_kernels {
12 static const char* triangular_transpose_kernel_code =
STRINGIFY(
31 unsigned int copy_direction) {
32 int i = get_global_id(0);
33 int j = get_global_id(1);
34 if (i < rows && j < cols) {
35 if (copy_direction == LOWER_TO_UPPER && i > j) {
37 }
else if (copy_direction == UPPER_TO_LOWER && i > j) {
51 "triangular_transpose",
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
const kernel_cl< in_out_buffer, int, int, TriangularMapCL > triangular_transpose("triangular_transpose", {indexing_helpers, triangular_transpose_kernel_code})
See the docs for triangular_transpose() .
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.