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

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