Alien
1.3.0
Developer documentation
Loading...
Searching...
No Matches
ExtractionIndices.cc
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
#include "
ExtractionIndices.h
"
25
26
/*---------------------------------------------------------------------------*/
27
/*---------------------------------------------------------------------------*/
28
29
namespace
Alien
30
{
31
32
using namespace
Arccore;
33
34
/*---------------------------------------------------------------------------*/
35
/*---------------------------------------------------------------------------*/
36
37
ExtractionIndices::ExtractionIndices
(
const
Integer rowStart,
const
Integer rowRange,
38
const
Integer colStart,
const
Integer colRange)
39
: m_starting_row(rowStart)
40
, m_starting_col(colStart)
41
, m_row_range(rowRange)
42
, m_col_range(colRange)
43
{}
44
45
/*---------------------------------------------------------------------------*/
46
/*---------------------------------------------------------------------------*/
47
48
ExtractionIndices::~ExtractionIndices
() {}
49
50
/*---------------------------------------------------------------------------*/
51
/*---------------------------------------------------------------------------*/
52
53
Integer
54
ExtractionIndices::rowStart
()
const
55
{
56
return
m_starting_row
;
57
}
58
59
/*---------------------------------------------------------------------------*/
60
/*---------------------------------------------------------------------------*/
61
62
Integer
63
ExtractionIndices::rowRange
()
const
64
{
65
return
m_row_range
;
66
}
67
68
/*---------------------------------------------------------------------------*/
69
/*---------------------------------------------------------------------------*/
70
71
Integer
72
ExtractionIndices::colStart
()
const
73
{
74
return
m_starting_col
;
75
}
76
77
/*---------------------------------------------------------------------------*/
78
/*---------------------------------------------------------------------------*/
79
80
Integer
81
ExtractionIndices::colRange
()
const
82
{
83
return
m_col_range
;
84
}
85
86
/*---------------------------------------------------------------------------*/
87
/*---------------------------------------------------------------------------*/
88
89
Integer
90
ExtractionIndices::toLocalRow
(
const
Integer uid)
const
91
{
92
return
uid -
m_starting_row
;
93
}
94
95
/*---------------------------------------------------------------------------*/
96
/*---------------------------------------------------------------------------*/
97
98
Integer
99
ExtractionIndices::toLocalCol
(
const
Integer uid)
const
100
{
101
return
uid -
m_starting_col
;
102
}
103
104
/*---------------------------------------------------------------------------*/
105
/*---------------------------------------------------------------------------*/
106
107
}
// namespace Alien
108
109
/*---------------------------------------------------------------------------*/
110
/*---------------------------------------------------------------------------*/
ExtractionIndices.h
ExtractionIndices.h.
Alien::ExtractionIndices::m_starting_row
Arccore::Integer m_starting_row
Index of the starting row.
Definition
ExtractionIndices.h:102
Alien::ExtractionIndices::rowStart
Arccore::Integer rowStart() const
Get the index of the starting row.
Definition
ExtractionIndices.cc:54
Alien::ExtractionIndices::rowRange
Arccore::Integer rowRange() const
Get the length of the row.
Definition
ExtractionIndices.cc:63
Alien::ExtractionIndices::~ExtractionIndices
~ExtractionIndices()
Free resources.
Definition
ExtractionIndices.cc:48
Alien::ExtractionIndices::colStart
Arccore::Integer colStart() const
Get the index of the starting col.
Definition
ExtractionIndices.cc:72
Alien::ExtractionIndices::m_col_range
Arccore::Integer m_col_range
Length of the col.
Definition
ExtractionIndices.h:108
Alien::ExtractionIndices::m_row_range
Arccore::Integer m_row_range
Length of the row.
Definition
ExtractionIndices.h:106
Alien::ExtractionIndices::m_starting_col
Arccore::Integer m_starting_col
Index of the starting col.
Definition
ExtractionIndices.h:104
Alien::ExtractionIndices::toLocalCol
Arccore::Integer toLocalCol(const Arccore::Integer uid) const
Get the local index of a col given a global index.
Definition
ExtractionIndices.cc:99
Alien::ExtractionIndices::toLocalRow
Arccore::Integer toLocalRow(const Arccore::Integer uid) const
Get the local index of a row given a global index.
Definition
ExtractionIndices.cc:90
Alien::ExtractionIndices::colRange
Arccore::Integer colRange() const
Get the length of the col.
Definition
ExtractionIndices.cc:81
Alien::ExtractionIndices::ExtractionIndices
ExtractionIndices(const Arccore::Integer rowStart, const Arccore::Integer rowRange, const Arccore::Integer colStart=-1, const Arccore::Integer colRange=-1)
Constructor.
Alien
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Definition
BackEnd.h:17
core
alien
data
utils
ExtractionIndices.cc
Generated on
for Alien by
1.16.1