Stan Math Library  2.20.0
reverse mode automatic differentiation
Functions
stan::math::opencl Namespace Reference

Functions

template<TriangularViewCL triangular_view_A = TriangularViewCL::Entire, TriangularViewCL triangular_view_B = TriangularViewCL::Entire>
auto multiply (const matrix_cl &A, const matrix_cl &B)
 Computes the product of the specified matrices with the option of specifying the triangularity of either input matrices. More...
 
template<int N>
cl::size_t< N > to_size_t (const size_t(&values)[N])
 A helper function to convert an array to a cl::size_t<N>. More...
 
template<>
cl::size_t< 3 > to_size_t (const size_t(&values)[3])
 A template specialization of the helper function to convert an array to a cl::size_t<3>. More...
 

Function Documentation

◆ multiply()

template<TriangularViewCL triangular_view_A = TriangularViewCL::Entire, TriangularViewCL triangular_view_B = TriangularViewCL::Entire>
auto stan::math::opencl::multiply ( const matrix_cl A,
const matrix_cl B 
)
inline

Computes the product of the specified matrices with the option of specifying the triangularity of either input matrices.

Computes the matrix multiplication C[M, K] = A[M, N] x B[N, K]

Parameters
Afirst matrix
Bsecond matrix
Template Parameters
triangular_view_Aspecifies whether the matrix A is a lower/upper triangular or a rectangular matrix
triangular_view_Bspecifies whether the matrix B is a lower/upper triangular or a rectangular matrix
Returns
the product of the first and second matrix
Exceptions
<code>std::invalid_argument</code>if the number of columns in A and rows in B do not match

Definition at line 36 of file multiply.hpp.

◆ to_size_t() [1/2]

template<int N>
cl::size_t<N> stan::math::opencl::to_size_t ( const size_t(&)  values[N])
inline

A helper function to convert an array to a cl::size_t<N>.

This implementation throws because cl::size_t<N> for N!=3 should throw.

Parameters
valuesthe input array to be converted
Returns
the cl::size_t<N> converted from the input array

Definition at line 45 of file opencl_context.hpp.

◆ to_size_t() [2/2]

template<>
cl::size_t<3> stan::math::opencl::to_size_t ( const size_t(&)  values[3])
inline

A template specialization of the helper function to convert an array to a cl::size_t<3>.

Parameters
valuesthe input array to be converted
Returns
the cl::size_t<3> converted from the input array

Definition at line 57 of file opencl_context.hpp.


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