From 9e30e2742ec48c5502dccde5047b63e871edf892 Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Wed, 3 Apr 2024 17:17:24 -0400 Subject: [PATCH] Minor formatting simplifications consistency changes in sym_grp.hpp --- c++/nda/sym_grp.hpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/c++/nda/sym_grp.hpp b/c++/nda/sym_grp.hpp index 46f2f5b52..7ef91c50a 100644 --- a/c++/nda/sym_grp.hpp +++ b/c++/nda/sym_grp.hpp @@ -20,9 +20,7 @@ #include namespace nda { - /** - * A structure to capture combinations of complex conjugation and sign flip. - */ + /// A structure to capture combinations of complex conjugation and sign flip. struct operation { /*@{*/ bool sgn = false; /**< change sign? */ @@ -97,13 +95,13 @@ namespace nda { /** * Accessor for symmetry classes * @return Vector including the individual classes - */ + */ [[nodiscard]] std::vector const &get_sym_classes() const { return sym_classes; } /** * Accessor for number of symmetry classes * @return Number of deduced symmetry classes - */ + */ long num_classes() const { return sym_classes.size(); } /** @@ -112,7 +110,7 @@ namespace nda { * @param x An NdArray * @param init_func The init function to be used * @param parallel Switch to enable parallel evaluation of init_func. Default is false - */ + */ template requires(NdaInitFunc) void init(A &x, H const &init_func, bool parallel = false) const { @@ -121,7 +119,7 @@ namespace nda { // reset input array to allow for mpi reduction x() = 0.0; - #pragma omp parallel +#pragma omp parallel for (auto const &sym_class : itertools::omp_chunk(mpi::chunk(sym_classes))) { auto idx = x.indexmap().to_idx(sym_class[0].first); auto ref_val = init_func(idx); @@ -207,9 +205,7 @@ namespace nda { } }; - /** - * Default constructor for sym_grp class - */ + /// Default constructor for sym_grp class sym_grp() = default; /** @@ -217,7 +213,7 @@ namespace nda { * @param x An NdArray * @param sym_list List of symmetries modeling the NdaSymmetry concept * @param max_length Maximum recursion depth for out-of-bounds projection. Default is 0. - */ + */ sym_grp(A const &x, std::vector const &sym_list, long const max_length = 0) { // array to check whether index has been sorted into a symmetry class already