From 2d65cc8d930d8406047672e0e8938f86eda9ceb5 Mon Sep 17 00:00:00 2001 From: ginkgo-bot Date: Wed, 2 Dec 2020 12:33:12 +0000 Subject: [PATCH] Format files Co-authored-by: Tobias Ribizel --- core/preconditioner/jacobi_utils.hpp | 18 ++++-- core/test/base/executor.cpp | 2 +- core/test/utils/matrix_generator.hpp | 12 ++-- include/ginkgo/core/base/abstract_factory.hpp | 4 +- include/ginkgo/core/base/combination.hpp | 10 ++-- include/ginkgo/core/base/composition.hpp | 6 +- include/ginkgo/core/base/dim.hpp | 2 +- include/ginkgo/core/base/executor.hpp | 4 +- include/ginkgo/core/base/lin_op.hpp | 6 +- include/ginkgo/core/base/mtx_io.hpp | 2 +- .../ginkgo/core/base/polymorphic_object.hpp | 2 +- include/ginkgo/core/base/range.hpp | 59 ++++++++++--------- include/ginkgo/core/factorization/ilu.hpp | 2 +- include/ginkgo/core/factorization/par_ict.hpp | 2 +- include/ginkgo/core/factorization/par_ilu.hpp | 2 +- .../ginkgo/core/factorization/par_ilut.hpp | 2 +- include/ginkgo/core/log/logger.hpp | 4 +- include/ginkgo/core/matrix/dense.hpp | 8 +-- include/ginkgo/core/matrix/sellp.hpp | 8 +-- include/ginkgo/core/preconditioner/jacobi.hpp | 8 +-- 20 files changed, 86 insertions(+), 77 deletions(-) diff --git a/core/preconditioner/jacobi_utils.hpp b/core/preconditioner/jacobi_utils.hpp index 7d8bbe81725..904820cbce2 100644 --- a/core/preconditioner/jacobi_utils.hpp +++ b/core/preconditioner/jacobi_utils.hpp @@ -89,12 +89,18 @@ struct precision_reduction_descriptor { static constexpr GKO_ATTRIBUTES uint32 singleton(const precision_reduction &pr) { - return pr == precision_reduction(0, 0) ? p0n0 - : pr == precision_reduction(0, 1) ? p0n1 - : pr == precision_reduction(0, 2) ? p0n2 - : pr == precision_reduction(1, 0) ? p1n0 - : pr == precision_reduction(1, 1) ? p1n1 - : pr == precision_reduction(2, 0) ? p2n0 + return pr == precision_reduction(0, 0) + ? p0n0 + : pr == precision_reduction(0, 1) + ? p0n1 + : pr == precision_reduction(0, 2) + ? p0n2 + : pr == precision_reduction(1, 0) + ? p1n0 + : pr == precision_reduction(1, 1) + ? p1n1 + : pr == precision_reduction(2, 0) + ? p2n0 : p0n0; } }; diff --git a/core/test/base/executor.cpp b/core/test/base/executor.cpp index c1568fae8f2..b968bbe210a 100644 --- a/core/test/base/executor.cpp +++ b/core/test/base/executor.cpp @@ -481,7 +481,7 @@ struct mock_free : T { * with `()` operator instead of `{}`. */ template - mock_free(Params &&...params) : T(std::forward(params)...) + mock_free(Params &&... params) : T(std::forward(params)...) {} void raw_free(void *ptr) const noexcept override diff --git a/core/test/utils/matrix_generator.hpp b/core/test/utils/matrix_generator.hpp index 649ca13e86a..171e4b2dd69 100644 --- a/core/test/utils/matrix_generator.hpp +++ b/core/test/utils/matrix_generator.hpp @@ -93,7 +93,7 @@ template , typename NonzeroDistribution, std::unique_ptr generate_random_matrix( size_type num_rows, size_type num_cols, NonzeroDistribution &&nonzero_dist, ValueDistribution &&value_dist, Engine &&engine, - std::shared_ptr exec, MatrixArgs &&...args) + std::shared_ptr exec, MatrixArgs &&... args) { using value_type = typename MatrixType::value_type; using index_type = typename MatrixType::index_type; @@ -151,7 +151,7 @@ template , typename NonzeroDistribution, std::unique_ptr generate_random_sparsity_matrix( size_type num_rows, size_type num_cols, NonzeroDistribution &&nonzero_dist, typename MatrixType::value_type value, Engine &&engine, - std::shared_ptr exec, MatrixArgs &&...args) + std::shared_ptr exec, MatrixArgs &&... args) { using value_type = typename MatrixType::value_type; using index_type = typename MatrixType::index_type; @@ -213,7 +213,7 @@ std::unique_ptr generate_random_triangular_matrix( size_type num_rows, size_type num_cols, bool ones_on_diagonal, bool lower_triangular, NonzeroDistribution &&nonzero_dist, ValueDistribution &&value_dist, Engine &&engine, - std::shared_ptr exec, MatrixArgs &&...args) + std::shared_ptr exec, MatrixArgs &&... args) { using value_type = typename MatrixType::value_type; using index_type = typename MatrixType::index_type; @@ -297,7 +297,8 @@ template , typename NonzeroDistribution, std::unique_ptr generate_random_lower_triangular_matrix( size_type num_rows, size_type num_cols, bool ones_on_diagonal, NonzeroDistribution &&nonzero_dist, ValueDistribution &&value_dist, - Engine &&engine, std::shared_ptr exec, MatrixArgs &&...args) + Engine &&engine, std::shared_ptr exec, + MatrixArgs &&... args) { return generate_random_triangular_matrix( num_rows, num_cols, ones_on_diagonal, true, nonzero_dist, value_dist, @@ -330,7 +331,8 @@ template , typename NonzeroDistribution, std::unique_ptr generate_random_upper_triangular_matrix( size_type num_rows, size_type num_cols, bool ones_on_diagonal, NonzeroDistribution &&nonzero_dist, ValueDistribution &&value_dist, - Engine &&engine, std::shared_ptr exec, MatrixArgs &&...args) + Engine &&engine, std::shared_ptr exec, + MatrixArgs &&... args) { return generate_random_triangular_matrix( num_rows, num_cols, ones_on_diagonal, false, nonzero_dist, value_dist, diff --git a/include/ginkgo/core/base/abstract_factory.hpp b/include/ginkgo/core/base/abstract_factory.hpp index d3f77b13e55..ff185509224 100644 --- a/include/ginkgo/core/base/abstract_factory.hpp +++ b/include/ginkgo/core/base/abstract_factory.hpp @@ -89,7 +89,7 @@ class AbstractFactory * @return an instance of AbstractProductType */ template - std::unique_ptr generate(Args &&...args) const + std::unique_ptr generate(Args &&... args) const { auto product = this->generate_impl({std::forward(args)...}); for (auto logger : this->loggers_) { @@ -159,7 +159,7 @@ class EnableDefaultFactory using components_type = typename PolymorphicBase::components_type; template - std::unique_ptr generate(Args &&...args) const + std::unique_ptr generate(Args &&... args) const { auto product = std::unique_ptr(static_cast( this->generate_impl({std::forward(args)...}).release())); diff --git a/include/ginkgo/core/base/combination.hpp b/include/ginkgo/core/base/combination.hpp index a632ac6b16f..5ca773bbc3e 100644 --- a/include/ginkgo/core/base/combination.hpp +++ b/include/ginkgo/core/base/combination.hpp @@ -67,8 +67,8 @@ class Combination : public EnableLinOp>, * * @return a list of coefficients */ - const std::vector> &get_coefficients() - const noexcept + const std::vector> &get_coefficients() const + noexcept { return coefficients_; } @@ -78,8 +78,8 @@ class Combination : public EnableLinOp>, * * @return a list of operators */ - const std::vector> &get_operators() - const noexcept + const std::vector> &get_operators() const + noexcept { return operators_; } @@ -152,7 +152,7 @@ class Combination : public EnableLinOp>, */ template explicit Combination(std::shared_ptr coef, - std::shared_ptr oper, Rest &&...rest) + std::shared_ptr oper, Rest &&... rest) : Combination(std::forward(rest)...) { GKO_ASSERT_EQUAL_DIMENSIONS(coef, dim<2>(1, 1)); diff --git a/include/ginkgo/core/base/composition.hpp b/include/ginkgo/core/base/composition.hpp index 35c41708bcd..dfcfb13c5ad 100644 --- a/include/ginkgo/core/base/composition.hpp +++ b/include/ginkgo/core/base/composition.hpp @@ -75,8 +75,8 @@ class Composition : public EnableLinOp>, * * @return a list of operators */ - const std::vector> &get_operators() - const noexcept + const std::vector> &get_operators() const + noexcept { return operators_; } @@ -133,7 +133,7 @@ class Composition : public EnableLinOp>, * @param rest remainging operators */ template - explicit Composition(std::shared_ptr oper, Rest &&...rest) + explicit Composition(std::shared_ptr oper, Rest &&... rest) : Composition(std::forward(rest)...) { GKO_ASSERT_CONFORMANT(oper, operators_[0]); diff --git a/include/ginkgo/core/base/dim.hpp b/include/ginkgo/core/base/dim.hpp index 300919c5e10..3030f0d1442 100644 --- a/include/ginkgo/core/base/dim.hpp +++ b/include/ginkgo/core/base/dim.hpp @@ -79,7 +79,7 @@ struct dim { */ template constexpr GKO_ATTRIBUTES dim(const dimension_type &first, - const Rest &...rest) + const Rest &... rest) : first_{first}, rest_{static_cast(rest)...} {} diff --git a/include/ginkgo/core/base/executor.hpp b/include/ginkgo/core/base/executor.hpp index f552e35919e..2cc18bf3502 100644 --- a/include/ginkgo/core/base/executor.hpp +++ b/include/ginkgo/core/base/executor.hpp @@ -339,7 +339,7 @@ private: \ ::gko::syn::as_list<::gko::syn::range<0, sizeof...(Args)>>; \ \ public: \ - explicit _name##_operation(Args &&...args) \ + explicit _name##_operation(Args &&... args) \ : data(std::forward(args)...) \ {} \ \ @@ -365,7 +365,7 @@ private: \ }; \ \ template \ - static _name##_operation make_##_name(Args &&...args) \ + static _name##_operation make_##_name(Args &&... args) \ { \ return _name##_operation(std::forward(args)...); \ } \ diff --git a/include/ginkgo/core/base/lin_op.hpp b/include/ginkgo/core/base/lin_op.hpp index 4e79803b142..1512802edb6 100644 --- a/include/ginkgo/core/base/lin_op.hpp +++ b/include/ginkgo/core/base/lin_op.hpp @@ -978,7 +978,7 @@ public: \ mutable _name{__VA_ARGS__}; \ \ template \ - auto with_##_name(Args &&..._value) \ + auto with_##_name(Args &&... _value) \ const->const std::decay_t & \ { \ using type = decltype(this->_name); \ @@ -1029,7 +1029,7 @@ public: \ mutable _name{__VA_ARGS__}; \ \ template \ - auto with_##_name(Args &&..._value) \ + auto with_##_name(Args &&... _value) \ const->const std::decay_t & \ { \ GKO_NOT_IMPLEMENTED; \ @@ -1058,7 +1058,7 @@ public: \ mutable _name{__VA_ARGS__}; \ \ template \ - auto with_##_name(Args &&..._value) \ + auto with_##_name(Args &&... _value) \ const->const std::decay_t & \ { \ using type = decltype(this->_name); \ diff --git a/include/ginkgo/core/base/mtx_io.hpp b/include/ginkgo/core/base/mtx_io.hpp index 91e226a5d07..38977fe04c0 100644 --- a/include/ginkgo/core/base/mtx_io.hpp +++ b/include/ginkgo/core/base/mtx_io.hpp @@ -110,7 +110,7 @@ void write_raw(std::ostream &os, const matrix_data &data, * @return A MatrixType LinOp filled with data from filename */ template -inline std::unique_ptr read(StreamType &&is, MatrixArgs &&...args) +inline std::unique_ptr read(StreamType &&is, MatrixArgs &&... args) { auto mtx = MatrixType::create(std::forward(args)...); mtx->read(read_raw class EnableCreateMethod { public: template - static std::unique_ptr create(Args &&...args) + static std::unique_ptr create(Args &&... args) { return std::unique_ptr( new ConcreteType(std::forward(args)...)); diff --git a/include/ginkgo/core/base/range.hpp b/include/ginkgo/core/base/range.hpp index 0f521015e14..6e59ee3c637 100644 --- a/include/ginkgo/core/base/range.hpp +++ b/include/ginkgo/core/base/range.hpp @@ -321,7 +321,7 @@ class range { * @param params parameters forwarded to Accessor constructor. */ template - GKO_ATTRIBUTES constexpr explicit range(AccessorParams &&...params) + GKO_ATTRIBUTES constexpr explicit range(AccessorParams &&... params) : accessor_{std::forward(params)...} {} @@ -338,7 +338,7 @@ class range { * @return a value on position `(dimensions...)`. */ template - GKO_ATTRIBUTES constexpr auto operator()(DimensionTypes &&...dimensions) + GKO_ATTRIBUTES constexpr auto operator()(DimensionTypes &&... dimensions) const -> decltype(std::declval()( std::forward(dimensions)...)) { @@ -448,7 +448,7 @@ struct implement_unary_operation { template GKO_ATTRIBUTES constexpr auto operator()( - const DimensionTypes &...dimensions) const + const DimensionTypes &... dimensions) const -> decltype(Operation::evaluate(std::declval(), dimensions...)) { @@ -490,7 +490,7 @@ struct implement_binary_operation GKO_ATTRIBUTES constexpr auto operator()( - const DimensionTypes &...dimensions) const + const DimensionTypes &... dimensions) const -> decltype(Operation::evaluate_range_by_range( std::declval(), std::declval(), dimensions...)) @@ -523,7 +523,7 @@ struct implement_binary_operation GKO_ATTRIBUTES constexpr auto operator()( - const DimensionTypes &...dimensions) const + const DimensionTypes &... dimensions) const -> decltype(Operation::evaluate_scalar_by_range( std::declval(), std::declval(), dimensions...)) @@ -557,7 +557,7 @@ struct implement_binary_operation GKO_ATTRIBUTES constexpr auto operator()( - const DimensionTypes &...dimensions) const + const DimensionTypes &... dimensions) const -> decltype(Operation::evaluate_range_by_scalar( std::declval(), std::declval(), dimensions...)) @@ -611,24 +611,25 @@ struct implement_binary_operation \ - GKO_ATTRIBUTES static constexpr auto simple_evaluate_impl( \ - const Operand &operand) -> decltype(__VA_ARGS__) \ - { \ - return __VA_ARGS__; \ - } \ - \ - public: \ - template \ - GKO_ATTRIBUTES static constexpr auto evaluate( \ - const AccessorType &accessor, const DimensionTypes &...dimensions) \ - -> decltype(simple_evaluate_impl(accessor(dimensions...))) \ - { \ - return simple_evaluate_impl(accessor(dimensions...)); \ - } \ +#define GKO_DEFINE_SIMPLE_UNARY_OPERATION(_name, ...) \ + struct _name { \ + private: \ + template \ + GKO_ATTRIBUTES static constexpr auto simple_evaluate_impl( \ + const Operand &operand) -> decltype(__VA_ARGS__) \ + { \ + return __VA_ARGS__; \ + } \ + \ + public: \ + template \ + GKO_ATTRIBUTES static constexpr auto evaluate( \ + const AccessorType &accessor, \ + const DimensionTypes &... dimensions) \ + -> decltype(simple_evaluate_impl(accessor(dimensions...))) \ + { \ + return simple_evaluate_impl(accessor(dimensions...)); \ + } \ } @@ -708,7 +709,7 @@ struct transpose_operation { GKO_ATTRIBUTES constexpr auto operator()( const FirstDimensionType &first_dim, const SecondDimensionType &second_dim, - const DimensionTypes &...dims) const + const DimensionTypes &... dims) const -> decltype(std::declval()(second_dim, first_dim, dims...)) { return operand(second_dim, first_dim, dims...); @@ -824,7 +825,7 @@ GKO_BIND_UNARY_RANGE_OPERATION_TO_OPERATOR(transpose_operation, transpose); typename... DimensionTypes> \ GKO_ATTRIBUTES static constexpr auto evaluate_range_by_range( \ const FirstAccessor &first, const SecondAccessor &second, \ - const DimensionTypes &...dims) \ + const DimensionTypes &... dims) \ -> decltype(simple_evaluate_impl(first(dims...), second(dims...))) \ { \ return simple_evaluate_impl(first(dims...), second(dims...)); \ @@ -834,7 +835,7 @@ GKO_BIND_UNARY_RANGE_OPERATION_TO_OPERATOR(transpose_operation, transpose); typename... DimensionTypes> \ GKO_ATTRIBUTES static constexpr auto evaluate_scalar_by_range( \ const FirstOperand &first, const SecondAccessor &second, \ - const DimensionTypes &...dims) \ + const DimensionTypes &... dims) \ -> decltype(simple_evaluate_impl(first, second(dims...))) \ { \ return simple_evaluate_impl(first, second(dims...)); \ @@ -844,7 +845,7 @@ GKO_BIND_UNARY_RANGE_OPERATION_TO_OPERATOR(transpose_operation, transpose); typename... DimensionTypes> \ GKO_ATTRIBUTES static constexpr auto evaluate_range_by_scalar( \ const FirstAccessor &first, const SecondOperand &second, \ - const DimensionTypes &...dims) \ + const DimensionTypes &... dims) \ -> decltype(simple_evaluate_impl(first(dims...), second)) \ { \ return simple_evaluate_impl(first(dims...), second); \ @@ -962,7 +963,7 @@ struct mmul_operation { typename... DimensionTypes> GKO_ATTRIBUTES auto operator()(const FirstDimension &row, const SecondDimension &col, - const DimensionTypes &...rest) const + const DimensionTypes &... rest) const -> decltype(std::declval()(row, 0, rest...) * std::declval()(0, col, rest...) + std::declval()(row, 1, rest...) * diff --git a/include/ginkgo/core/factorization/ilu.hpp b/include/ginkgo/core/factorization/ilu.hpp index 4597f5ec5e2..a1322116250 100644 --- a/include/ginkgo/core/factorization/ilu.hpp +++ b/include/ginkgo/core/factorization/ilu.hpp @@ -91,7 +91,7 @@ class Ilu : public Composition { // Remove the possibility of calling `create`, which was enabled by // `Composition` template - static std::unique_ptr> create(Args &&...args) = + static std::unique_ptr> create(Args &&... args) = delete; GKO_CREATE_FACTORY_PARAMETERS(parameters, Factory) diff --git a/include/ginkgo/core/factorization/par_ict.hpp b/include/ginkgo/core/factorization/par_ict.hpp index 4d1f4ff98ed..fd89af6aa47 100644 --- a/include/ginkgo/core/factorization/par_ict.hpp +++ b/include/ginkgo/core/factorization/par_ict.hpp @@ -116,7 +116,7 @@ class ParIct : public Composition { // Remove the possibility of calling `create`, which was enabled by // `Composition` template - static std::unique_ptr> create(Args &&...args) = + static std::unique_ptr> create(Args &&... args) = delete; GKO_CREATE_FACTORY_PARAMETERS(parameters, Factory) diff --git a/include/ginkgo/core/factorization/par_ilu.hpp b/include/ginkgo/core/factorization/par_ilu.hpp index dd6e33a5ad0..c92abd88ba1 100644 --- a/include/ginkgo/core/factorization/par_ilu.hpp +++ b/include/ginkgo/core/factorization/par_ilu.hpp @@ -116,7 +116,7 @@ class ParIlu : public Composition { // Remove the possibility of calling `create`, which was enabled by // `Composition` template - static std::unique_ptr> create(Args &&...args) = + static std::unique_ptr> create(Args &&... args) = delete; GKO_CREATE_FACTORY_PARAMETERS(parameters, Factory) diff --git a/include/ginkgo/core/factorization/par_ilut.hpp b/include/ginkgo/core/factorization/par_ilut.hpp index 762bbc7cd58..4ee0acf2612 100644 --- a/include/ginkgo/core/factorization/par_ilut.hpp +++ b/include/ginkgo/core/factorization/par_ilut.hpp @@ -120,7 +120,7 @@ class ParIlut : public Composition { // Remove the possibility of calling `create`, which was enabled by // `Composition` template - static std::unique_ptr> create(Args &&...args) = + static std::unique_ptr> create(Args &&... args) = delete; GKO_CREATE_FACTORY_PARAMETERS(parameters, Factory) diff --git a/include/ginkgo/core/log/logger.hpp b/include/ginkgo/core/log/logger.hpp index 62043cf5986..d84e51c8ed6 100644 --- a/include/ginkgo/core/log/logger.hpp +++ b/include/ginkgo/core/log/logger.hpp @@ -130,7 +130,7 @@ protected: \ public: \ template \ std::enable_if_t on( \ - Params &&...params) const \ + Params &&... params) const \ { \ if (enabled_events_ & (mask_type{1} << _id)) { \ this->on_##_event_name(std::forward(params)...); \ @@ -541,7 +541,7 @@ class EnableLogging : public Loggable { protected: template - void log(Params &&...params) const + void log(Params &&... params) const { for (auto &logger : loggers_) { logger->template on(std::forward(params)...); diff --git a/include/ginkgo/core/matrix/dense.hpp b/include/ginkgo/core/matrix/dense.hpp index b6689dabc7a..ad689c8ad1f 100644 --- a/include/ginkgo/core/matrix/dense.hpp +++ b/include/ginkgo/core/matrix/dense.hpp @@ -711,7 +711,7 @@ class Dense template std::unique_ptr initialize( size_type stride, std::initializer_list vals, - std::shared_ptr exec, TArgs &&...create_args) + std::shared_ptr exec, TArgs &&... create_args) { using dense = matrix::Dense; size_type num_rows = vals.size(); @@ -750,7 +750,7 @@ std::unique_ptr initialize( template std::unique_ptr initialize( std::initializer_list vals, - std::shared_ptr exec, TArgs &&...create_args) + std::shared_ptr exec, TArgs &&... create_args) { return initialize(1, vals, std::move(exec), std::forward(create_args)...); @@ -783,7 +783,7 @@ std::unique_ptr initialize( size_type stride, std::initializer_list> vals, - std::shared_ptr exec, TArgs &&...create_args) + std::shared_ptr exec, TArgs &&... create_args) { using dense = matrix::Dense; size_type num_rows = vals.size(); @@ -831,7 +831,7 @@ template std::unique_ptr initialize( std::initializer_list> vals, - std::shared_ptr exec, TArgs &&...create_args) + std::shared_ptr exec, TArgs &&... create_args) { return initialize(vals.size() > 0 ? begin(vals)->size() : 0, vals, std::move(exec), diff --git a/include/ginkgo/core/matrix/sellp.hpp b/include/ginkgo/core/matrix/sellp.hpp index 676b4127180..b99746ec3b6 100644 --- a/include/ginkgo/core/matrix/sellp.hpp +++ b/include/ginkgo/core/matrix/sellp.hpp @@ -247,8 +247,8 @@ class Sellp : public EnableLinOp>, /** * @copydoc Sellp::val_at(size_type, size_type, size_type) */ - value_type val_at(size_type row, size_type slice_set, - size_type idx) const noexcept + value_type val_at(size_type row, size_type slice_set, size_type idx) const + noexcept { return values_ .get_const_data()[this->linearize_index(row, slice_set, idx)]; @@ -275,8 +275,8 @@ class Sellp : public EnableLinOp>, /** * @copydoc Sellp::col_at(size_type, size_type, size_type) */ - index_type col_at(size_type row, size_type slice_set, - size_type idx) const noexcept + index_type col_at(size_type row, size_type slice_set, size_type idx) const + noexcept { return this ->get_const_col_idxs()[this->linearize_index(row, slice_set, idx)]; diff --git a/include/ginkgo/core/preconditioner/jacobi.hpp b/include/ginkgo/core/preconditioner/jacobi.hpp index b0b6783b483..4828609d077 100644 --- a/include/ginkgo/core/preconditioner/jacobi.hpp +++ b/include/ginkgo/core/preconditioner/jacobi.hpp @@ -107,8 +107,8 @@ struct block_interleaved_storage_scheme { * blocks is not known, for a special input `size_type{} - 1` * the method returns `0` to avoid overallocation of memory. */ - GKO_ATTRIBUTES size_type - compute_storage_space(size_type num_blocks) const noexcept + GKO_ATTRIBUTES size_type compute_storage_space(size_type num_blocks) const + noexcept { return (num_blocks + 1 == size_type{0}) ? size_type{0} @@ -146,8 +146,8 @@ struct block_interleaved_storage_scheme { * * @return the offset of the block with ID `block_id` */ - GKO_ATTRIBUTES IndexType - get_global_block_offset(IndexType block_id) const noexcept + GKO_ATTRIBUTES IndexType get_global_block_offset(IndexType block_id) const + noexcept { return this->get_group_offset(block_id) + this->get_block_offset(block_id);