20
20
#include < itertools/omp_chunk.hpp>
21
21
22
22
namespace nda {
23
- /* *
24
- * A structure to capture combinations of complex conjugation and sign flip.
25
- */
23
+ // / A structure to capture combinations of complex conjugation and sign flip.
26
24
struct operation {
27
25
/* @{*/
28
26
bool sgn = false ; /* *< change sign? */
@@ -97,13 +95,13 @@ namespace nda {
97
95
/* *
98
96
* Accessor for symmetry classes
99
97
* @return Vector including the individual classes
100
- */
98
+ */
101
99
[[nodiscard]] std::vector<sym_class_t > const &get_sym_classes () const { return sym_classes; }
102
100
103
101
/* *
104
102
* Accessor for number of symmetry classes
105
103
* @return Number of deduced symmetry classes
106
- */
104
+ */
107
105
long num_classes () const { return sym_classes.size (); }
108
106
109
107
/* *
@@ -112,7 +110,7 @@ namespace nda {
112
110
* @param x An NdArray
113
111
* @param init_func The init function to be used
114
112
* @param parallel Switch to enable parallel evaluation of init_func. Default is false
115
- */
113
+ */
116
114
template <typename H>
117
115
requires (NdaInitFunc<H, A>)
118
116
void init (A &x, H const &init_func, bool parallel = false ) const {
@@ -121,7 +119,7 @@ namespace nda {
121
119
// reset input array to allow for mpi reduction
122
120
x () = 0.0 ;
123
121
124
- #pragma omp parallel
122
+ #pragma omp parallel
125
123
for (auto const &sym_class : itertools::omp_chunk (mpi::chunk (sym_classes))) {
126
124
auto idx = x.indexmap ().to_idx (sym_class[0 ].first );
127
125
auto ref_val = init_func (idx);
@@ -207,17 +205,15 @@ namespace nda {
207
205
}
208
206
};
209
207
210
- /* *
211
- * Default constructor for sym_grp class
212
- */
208
+ // / Default constructor for sym_grp class
213
209
sym_grp () = default ;
214
210
215
211
/* *
216
212
* Constructor for sym_grp class
217
213
* @param x An NdArray
218
214
* @param sym_list List of symmetries modeling the NdaSymmetry concept
219
215
* @param max_length Maximum recursion depth for out-of-bounds projection. Default is 0.
220
- */
216
+ */
221
217
sym_grp (A const &x, std::vector<F> const &sym_list, long const max_length = 0 ) {
222
218
223
219
// array to check whether index has been sorted into a symmetry class already
0 commit comments