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
7namespace stan {
8namespace math {
9
16template <typename T,
17 require_nonscalar_prim_or_rev_kernel_expression_t<T>* = nullptr>
18size_t size(const T& m) {
19 return m.rows() * m.cols();
20}
21
22} // namespace math
23} // namespace stan
24
25#endif
26#endif
size_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:18
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9