Stan Math Library  2.20.0
reverse mode automatic differentiation
size_of.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_SIZE_OF_HPP
2 #define STAN_MATH_PRIM_SCAL_META_SIZE_OF_HPP
3 
5 #include <cstddef>
6 
7 namespace stan {
8 
9 template <typename T, bool is_vec>
11  static size_t size_of(const T& /*x*/) { return 1U; }
12 };
13 
14 template <typename T>
15 struct size_of_helper<T, true> {
16  static size_t size_of(const T& x) { return x.size(); }
17 };
18 
26 template <typename T>
27 size_t size_of(const T& x) {
29 }
30 
31 } // namespace stan
32 #endif
static size_t size_of(const T &)
Definition: size_of.hpp:11
static size_t size_of(const T &x)
Definition: size_of.hpp:16

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