Alien  1.3.0
Developer documentation
Loading...
Searching...
No Matches
VBlockOffsets.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
27
30#include <alien/utils/Precomp.h>
31
32/*---------------------------------------------------------------------------*/
33/*---------------------------------------------------------------------------*/
34
35namespace Alien
36{
37
38/*---------------------------------------------------------------------------*/
39/*---------------------------------------------------------------------------*/
40
45class ALIEN_EXPORT VBlockImpl final
46{
47 public:
53 VBlockImpl(const VBlock& block, const VectorDistribution& dist);
54
60 VBlockImpl(const VBlock& block, const MatrixDistribution& dist);
61
64
69 VBlockImpl(const VBlockImpl& block);
70
71 private:
72 VBlockImpl(VBlockImpl&& block) = delete;
73 VBlockImpl& operator=(const VBlockImpl& block) = delete;
74
75 public:
81 Arccore::Integer sizeFromLocalIndex(Arccore::Integer index) const;
82
88 Arccore::Integer offsetFromLocalIndex(Arccore::Integer index) const;
89
95 Arccore::Integer offset(Arccore::Integer index) const;
96
101 Arccore::ConstArrayView<Arccore::Integer> sizeOfLocalIndex() const;
102
107 Arccore::ConstArrayView<Arccore::Integer> offsetOfLocalIndex() const;
108
113 std::shared_ptr<VBlockImpl> clone() const;
114
115 private:
121 void compute(Arccore::Integer local_size, Arccore::Integer local_offset);
122
123 struct Internal;
125 std::shared_ptr<Internal> m_internal;
126};
127
128/*---------------------------------------------------------------------------*/
129/*---------------------------------------------------------------------------*/
130
131} // namespace Alien
132
133/*---------------------------------------------------------------------------*/
134/*---------------------------------------------------------------------------*/
MatrixDistribution.h.
VBlock.h.
VectorDistribution.h.
Computes a matrix distribution.
Compute block offsets for variable block elements.
~VBlockImpl()
Free resources.
std::shared_ptr< Internal > m_internal
Actual implementation of the variable block offsets computation tool.
VBlockImpl(const VBlock &block, const VectorDistribution &dist)
Constructor for vectors variable blocks.
Variable size block elements for block matrices.
Definition VBlock.h:46
Computes a vector distribution.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Definition BackEnd.h:17