Alien  1.3.0
Developer documentation
Loading...
Searching...
No Matches
VBlock.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#include <alien/utils/Precomp.h>
28#include <alien/utils/VMap.h>
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
33namespace Alien
34{
35
36/*---------------------------------------------------------------------------*/
37/*---------------------------------------------------------------------------*/
38
45class ALIEN_EXPORT VBlock final
46{
47 public:
50
51 public:
56 VBlock(ValuePerBlock&& all_blocks_sizes);
57
62 VBlock(const ValuePerBlock& all_blocks_sizes);
63
66
71 VBlock(const VBlock& block);
72
73 private:
74 VBlock(VBlock&& block) = delete;
75 VBlock& operator=(const VBlock& block) = delete;
76
77 public:
83 Arccore::Integer size(Arccore::Integer index) const;
84
89 Arccore::Integer maxBlockSize() const;
90
95 const ValuePerBlock& blockSizes() const;
96
101 std::shared_ptr<VBlock> clone() const;
102
103 private:
104 struct Internal;
106 std::shared_ptr<Internal> m_internal;
107};
108
109/*---------------------------------------------------------------------------*/
110/*---------------------------------------------------------------------------*/
111
112} // namespace Alien
113
114/*---------------------------------------------------------------------------*/
115/*---------------------------------------------------------------------------*/
MatrixDistribution.h.
Variable size block elements for block matrices.
Definition VBlock.h:46
std::shared_ptr< Internal > m_internal
Actual implementation of variable blocks size.
Definition VBlock.h:106
~VBlock()
Free resources.
Definition VBlock.h:65
VBlock(ValuePerBlock &&all_blocks_sizes)
Rvalue constructor.
Definition VBlock.cc:98
VMap< Arccore::Integer, Arccore::Integer > ValuePerBlock
Type of the size of each block.
Definition VBlock.h:49
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Definition BackEnd.h:17