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#include <cstdint>
8
9namespace stan {
10namespace math {
11
18template <typename T,
19 require_nonscalar_prim_or_rev_kernel_expression_t<T>* = nullptr>
20int64_t num_elements(const T& m) {
21 return math::size(m);
22}
23
24} // namespace math
25} // namespace stan
26
27#endif
28#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
int64_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 ...