QMCPACK
QMCTypes.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2018 QMCPACK developers
6 //
7 // File developed by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
8 // Ye Luo, yeluo@anl.gov, Argonne National Lab
9 //
10 // File created by: Ye Luo, yeluo@anl.gov, Argonne National Lab
11 //////////////////////////////////////////////////////////////////////////////////////
12 
13 #ifndef QMCPLUSPLUS_QMC_TYPES_H
14 #define QMCPLUSPLUS_QMC_TYPES_H
15 
16 #include "OhmmsPETE/TinyVector.h"
17 #include "OhmmsPETE/Tensor.h"
18 #include <complex>
19 
20 namespace qmcplusplus
21 {
22 /* Facilitates use of full/mixed precision without rebuilding the code
23  *
24  * a template class may define its local types
25  * template<typename Prec>
26  * class Foo
27  * {
28  * using FooTypes = QMCTypes<Prec>;
29  * ...
30  * };
31  *
32  */
33 template<typename Precision, int DIM>
34 class QMCTypes final
35 {
36 public:
37  using RealType = Precision;
38  using ComplexType = std::complex<Precision>;
39 #ifdef QMC_COMPLEX
40  using ValueType = ComplexType;
41 #else
43 #endif
47 };
48 
49 } // namespace qmcplusplus
50 #endif
Fixed-size array.
Definition: OhmmsTinyMeta.h:30
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
RealType ValueType
Definition: QMCTypes.h:42
std::complex< Precision > ComplexType
Definition: QMCTypes.h:38
Precision RealType
Definition: QMCTypes.h:37