Alien  1.3.0
Developer documentation
Loading...
Searching...
No Matches
ExtractionIndices.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
26#include <alien/utils/Precomp.h>
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31namespace Alien
32{
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
41class ALIEN_EXPORT ExtractionIndices final
42{
43 public:
51 ExtractionIndices(const Arccore::Integer rowStart, const Arccore::Integer rowRange,
52 const Arccore::Integer colStart = -1, const Arccore::Integer colRange = -1);
53
56
57 ExtractionIndices(const ExtractionIndices&) = delete;
59 ExtractionIndices& operator=(const ExtractionIndices&) = delete;
60 ExtractionIndices& operator=(ExtractionIndices&&) = delete;
61
66 Arccore::Integer rowStart() const;
67
72 Arccore::Integer rowRange() const;
73
78 Arccore::Integer colStart() const;
79
84 Arccore::Integer colRange() const;
85
91 Arccore::Integer toLocalRow(const Arccore::Integer uid) const;
92
98 Arccore::Integer toLocalCol(const Arccore::Integer uid) const;
99
100 private:
102 Arccore::Integer m_starting_row;
104 Arccore::Integer m_starting_col;
106 Arccore::Integer m_row_range;
108 Arccore::Integer m_col_range;
109};
110
111/*---------------------------------------------------------------------------*/
112/*---------------------------------------------------------------------------*/
113
114} // namespace Alien
115
116/*---------------------------------------------------------------------------*/
117/*---------------------------------------------------------------------------*/
Arccore::Integer m_starting_row
Index of the starting row.
Arccore::Integer rowStart() const
Get the index of the starting row.
Arccore::Integer rowRange() const
Get the length of the row.
Arccore::Integer colStart() const
Get the index of the starting col.
Arccore::Integer m_col_range
Length of the col.
Arccore::Integer m_row_range
Length of the row.
Arccore::Integer m_starting_col
Index of the starting col.
Arccore::Integer toLocalCol(const Arccore::Integer uid) const
Get the local index of a col given a global index.
Arccore::Integer toLocalRow(const Arccore::Integer uid) const
Get the local index of a row given a global index.
Arccore::Integer colRange() const
Get the length of the col.
ExtractionIndices(const Arccore::Integer rowStart, const Arccore::Integer rowRange, const Arccore::Integer colStart=-1, const Arccore::Integer colRange=-1)
Constructor.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Definition BackEnd.h:17