Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_StorageHelpers.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Stokhos Package
4 //
5 // Copyright 2009 NTESS and the Stokhos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef STOKHOS_STORAGE_HELPERS_HPP
11 #define STOKHOS_STORAGE_HELPERS_HPP
12 
13 #define STOKHOS_STORAGE_HELPER_STRINGNAME_DYNAMIC(__storagename__) \
14  namespace Sacado \
15  { \
16  template <typename ordinal_t, typename value_t, typename device_t> \
17  struct StringName<Stokhos::__storagename__<ordinal_t, \
18  value_t, \
19  device_t>> \
20  { \
21  static std::string eval() \
22  { \
23  std::stringstream ss; \
24  ss << "Stokhos::" #__storagename__ "<" \
25  << StringName<ordinal_t>::eval() << "," \
26  << StringName<value_t>::eval() << "," \
27  << StringName<device_t>::eval() << ">"; \
28  return ss.str(); \
29  } \
30  }; \
31  }
32 
33 #define STOKHOS_STORAGE_HELPER_STRINGNAME_STATIC(__storagename__) \
34  namespace Sacado \
35  { \
36  template <typename ordinal_t, typename value_t, int Num, typename device_t> \
37  struct StringName<Stokhos::__storagename__<ordinal_t, \
38  value_t, \
39  Num, \
40  device_t>> \
41  { \
42  static std::string eval() \
43  { \
44  std::stringstream ss; \
45  ss << "Stokhos::" #__storagename__ "<" \
46  << StringName<ordinal_t>::eval() << "," \
47  << StringName<value_t>::eval() << "," \
48  << Num << "," \
49  << StringName<device_t>::eval() << ">"; \
50  return ss.str(); \
51  } \
52  }; \
53  }
54 
55 #endif // STOKHOS_STORAGE_HELPERS_HPP