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