Alien  1.3.0
Developer documentation
Loading...
Searching...
No Matches
VBlockSizes.h
Go to the documentation of this file.
1/*
2 * Copyright 2020 IFPEN-CEA
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * SPDX-License-Identifier: Apache-2.0
17 */
18
23
24#pragma once
25
29#include <alien/utils/Precomp.h>
30
31/*---------------------------------------------------------------------------*/
32/*---------------------------------------------------------------------------*/
33
34namespace Alien
35{
36
37/*---------------------------------------------------------------------------*/
38/*---------------------------------------------------------------------------*/
39
50class ALIEN_EXPORT VBlockSizes final
51{
52 public:
58 VBlockSizes(const VBlock& block, const VectorDistribution& dist);
59
65 VBlockSizes(const VBlock& block, const MatrixDistribution& dist);
66
69
70 private:
71 VBlockSizes(VBlockSizes&& block) = delete;
72 VBlockSizes& operator=(const VBlockSizes& block) = delete;
73
74 public:
79 Arccore::Integer localSize() const;
80
85 Arccore::Integer globalSize() const;
86
91 Arccore::Integer offset() const;
92
97 // FIXME: not implemented yet !
98 std::shared_ptr<VBlockSizes> clone() const;
99
100 private:
108 void compute(const VBlock::ValuePerBlock& all_blocks_sizes, Arccore::Integer local_size,
109 Arccore::Integer local_offset,
110 Arccore::MessagePassing::IMessagePassingMng* parallel_mng);
111
113 Arccore::Integer m_local_scalarized_size;
115 Arccore::Integer m_global_scalarized_size;
117 Arccore::Integer m_scalarized_offset;
118};
119
120/*---------------------------------------------------------------------------*/
121/*---------------------------------------------------------------------------*/
122
123} // namespace Alien
124
125/*---------------------------------------------------------------------------*/
126/*---------------------------------------------------------------------------*/
MatrixDistribution.h.
VBlock.h.
VectorDistribution.h.
Computes a matrix distribution.
Compute the actual size of variable block size algebraic elements.
Definition VBlockSizes.h:51
Arccore::Integer m_local_scalarized_size
Scalarized local size.
void compute(const VBlock::ValuePerBlock &all_blocks_sizes, Arccore::Integer local_size, Arccore::Integer local_offset, Arccore::MessagePassing::IMessagePassingMng *parallel_mng)
Compute the actual sizes and offset of variable block size algebraic elements.
Arccore::Integer m_global_scalarized_size
Scalarized global size.
Arccore::Integer m_scalarized_offset
Scalarized offset.
std::shared_ptr< VBlockSizes > clone() const
Copy this object.
VBlockSizes(const VBlock &block, const VectorDistribution &dist)
Constructor for vectors variable blocks.
~VBlockSizes()
Free resources.
Definition VBlockSizes.h:68
Variable size block elements for block matrices.
Definition VBlock.h:46
VMap< Arccore::Integer, Arccore::Integer > ValuePerBlock
Type of the size of each block.
Definition VBlock.h:49
Computes a vector distribution.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Definition BackEnd.h:17