Alien  1.3.0
Developer documentation
Loading...
Searching...
No Matches
Block.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
44class ALIEN_EXPORT Block final
45{
46 public:
51 explicit Block(Arccore::Integer block_size);
52
58 Block(Arccore::Integer block_sizeX, Arccore::Integer block_sizeY);
59
64 Block(const Block& block);
65
67 ~Block() = default;
68
69 Block(Block&& block) = delete;
70 Block& operator=(const Block& block) = delete;
71
72 public:
77 Arccore::Integer size() const;
78
83 Arccore::Integer sizeX() const;
84
89 Arccore::Integer sizeY() const;
90
95 std::shared_ptr<Block> clone() const;
96
97 private:
98 struct Internal;
100 std::shared_ptr<Internal> m_internal;
101};
102
103/*---------------------------------------------------------------------------*/
104/*---------------------------------------------------------------------------*/
105
106} // namespace Alien
107
108/*---------------------------------------------------------------------------*/
109/*---------------------------------------------------------------------------*/
Block(Arccore::Integer block_sizeX, Arccore::Integer block_sizeY)
Rectangular block constructor.
Arccore::Integer size() const
Get square block size.
Definition Block.cc:90
Arccore::Integer sizeX() const
Get rectangular block size in the "X" direction.
Definition Block.cc:99
Arccore::Integer sizeY() const
Get rectangular block size in the "Y" direction.
Definition Block.cc:108
Block(Arccore::Integer block_size)
Square block constructor.
std::shared_ptr< Block > clone() const
Clone this object.
Definition Block.cc:117
std::shared_ptr< Internal > m_internal
Actual implementation.
Definition Block.h:100
~Block()=default
Free resources.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Definition BackEnd.h:17
Internal structure for square or rectangular blocks.
Definition Block.cc:41