MPQC  3.0.0-alpha
conc_cache_fwd.h
1 //
2 // conc_cache_fwd.h
3 //
4 // Forward declarations for conc_cache.h
5 //
6 // Copyright (C) 2014 David Hollman
7 //
8 // Author: David Hollman
9 // Maintainer: DSH
10 // Created: Feb 13, 2014
11 //
12 // This file is part of the SC Toolkit.
13 //
14 // The SC Toolkit is free software; you can redistribute it and/or modify
15 // it under the terms of the GNU Library General Public License as published by
16 // the Free Software Foundation; either version 2, or (at your option)
17 // any later version.
18 //
19 // The SC Toolkit is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU Library General Public License for more details.
23 //
24 // You should have received a copy of the GNU Library General Public License
25 // along with the SC Toolkit; see the file COPYING.LIB. If not, write to
26 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
27 //
28 // The U.S. Government is granted a limited license as per AL 91-7.
29 //
30 
31 #ifndef _util_misc_conc_cache_fwd_h
32 #define _util_misc_conc_cache_fwd_h
33 
34 namespace sc {
35 
36 template<int n_indices, int... PermutedIndices>
37 struct KeyPermutation;
38 
39 template<int n_indices, int idx_1, int idx_2>
40 struct KeyTransposition;
41 
42 template<typename... Permutations>
43 struct KeySymmetry;
44 
45 template <int nkeys>
46 struct IdentityKeyPermutation;
47 
48 template <int nkeys>
49 using IdentityKeySymmetry =
50  KeySymmetry<
51  IdentityKeyPermutation<nkeys>
52  >;
53 
54 template <int nkeys, int idx1, int idx2>
55 using SingleTranspositionKeySymmetry =
56  KeySymmetry<
57  IdentityKeyPermutation<nkeys>,
58  KeyTransposition<nkeys, idx1, idx2>
59  >;
60 
61 template <typename val_type, typename... key_types>
62 class ConcurrentCacheBase;
63 
64 template <typename val_type, typename symmetry, typename... key_types>
65 class ConcurrentCacheWithSymmetry;
66 
67 template <typename val_type, typename... key_types>
68 class ConcurrentCacheWithSymmetry<
69  val_type,
70  KeySymmetry<IdentityKeyPermutation<sizeof...(key_types)>>,
71  key_types...
72 >;
73 
74 template <typename val_type, int n_keys, int idx1, int idx2, typename... key_types>
75 class ConcurrentCacheWithSymmetry<
76  val_type,
77  KeySymmetry<
78  IdentityKeyPermutation<sizeof...(key_types)>,
79  KeyTransposition<n_keys, idx1, idx2>
80  >,
81  key_types...
82 >;
83 
87 template <typename val_type, typename... key_types>
88 using ConcurrentCache = ConcurrentCacheBase<val_type, key_types...>;
89 
90 
91 } // end namespace sc
92 
93 #endif /* _util_misc_conc_cache_fwd_h */
sc::ConcurrentCacheBase< val_type, key_types... >
sc
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14

Generated at Sun Jan 26 2020 23:24:01 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.