Automatic Differentiation
 
Loading...
Searching...
No Matches
size.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_OPENCL_PRIM_SIZE_HPP
2#define STAN_MATH_OPENCL_PRIM_SIZE_HPP
3#ifdef STAN_OPENCL
4
6#include <cstdint>
7
8namespace stan {
9namespace math {
10
17template <typename T,
18 require_nonscalar_prim_or_rev_kernel_expression_t<T>* = nullptr>
19int64_t size(const T& m) {
20 return m.rows() * m.cols();
21}
22
23} // namespace math
24} // namespace stan
25
26#endif
27#endif
int64_t size(const T &m)
Returns the size (number of the elements) of a matrix_cl or var_value<matrix_cl<T>>.
Definition size.hpp:19
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...