Stan Math Library  2.15.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>
10  struct size_of_helper {
11  static size_t size_of(const T& /*x*/) {
12  return 1U;
13  }
14  };
15 
16  template<typename T>
17  struct size_of_helper<T, true> {
18  static size_t size_of(const T& x) {
19  return x.size();
20  }
21  };
22 
23  template <typename T>
24  size_t size_of(const T& x) {
26  }
27 
28 }
29 #endif
30 
static size_t size_of(const T &)
Definition: size_of.hpp:11
static size_t size_of(const T &x)
Definition: size_of.hpp:18

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