Loading...
Searching...
No Matches
DataLBInterface.tpp
1/*---------------------------------------------------------------------------*\
2 *
3 * bitpit
4 *
5 * Copyright (C) 2015-2021 OPTIMAD engineering Srl
6 *
7 * -------------------------------------------------------------------------
8 * License
9 * This file is part of bitpit.
10 *
11 * bitpit is free software: you can redistribute it and/or modify it
12 * under the terms of the GNU Lesser General Public License v3 (LGPL)
13 * as published by the Free Software Foundation.
14 *
15 * bitpit is distributed in the hope that it will be useful, but WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 * License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with bitpit. If not, see <http://www.gnu.org/licenses/>.
22 *
23\*---------------------------------------------------------------------------*/
24
25namespace bitpit {
26
27template<class Impl>
28inline DataLBInterface<Impl>::DataLBInterface() {};
29
34template<class Impl>
35inline size_t DataLBInterface<Impl>::size(const uint32_t e) const {
36 return getImpl().size(e);
37}
38
42template<class Impl>
43inline size_t DataLBInterface<Impl>::fixedSize() const {
44 return getImpl().fixedSize();
45}
46
51template<class Impl>
52inline void DataLBInterface<Impl>::move(const uint32_t from, const uint32_t to) {
53 return getImpl().move(from,to);
54}
55
73template<class Impl>
74template<class Buffer>
75inline void DataLBInterface<Impl>::gather(Buffer& buff, const uint32_t e) {
76 return getImpl().gather(buff,e);
78
96template<class Impl>
97template<class Buffer>
98inline void DataLBInterface<Impl>::scatter(Buffer& buff, const uint32_t e) {
99 return getImpl().scatter(buff,e);
100}
101
108template<class Impl>
109inline void DataLBInterface<Impl>::assign(uint32_t stride, uint32_t length){
110 return getImpl().assign(stride, length);
111}
112
116template<class Impl>
117inline void DataLBInterface<Impl>::resize(uint32_t newSize){
118 return getImpl().resize(newSize);
119}
120
124template<class Impl>
125inline void DataLBInterface<Impl>::resizeGhost(uint32_t newSize){
126 return getImpl().resizeGhost(newSize);
127}
128
132template<class Impl>
134 return getImpl().shrink();
135}
136
137template<class Impl>
138inline Impl& DataLBInterface<Impl>::getImpl() {
139 return static_cast<Impl &>(*this);
140}
141
142template<class Impl>
143inline const Impl& DataLBInterface<Impl>::getImpl() const {
144 return static_cast<const Impl &>(*this);
145}
146
147template<class Buffer>
148void DummyDataLBImpl::gather(Buffer & buff,const uint32_t e)
149{
150 BITPIT_UNUSED(buff);
151 BITPIT_UNUSED(e);
152
153 return;
154}
155
156template<class Buffer>
157void DummyDataLBImpl::scatter(Buffer & buff,const uint32_t e)
158{
159 BITPIT_UNUSED(buff);
160 BITPIT_UNUSED(e);
161
162 return;
163}
164
165}
Base class for data communications.
void gather(Buffer &buff, const uint32_t e)
void assign(uint32_t stride, uint32_t length)
void move(const uint32_t from, const uint32_t to)
void scatter(Buffer &buff, const uint32_t e)
size_t size(const uint32_t e) const
void resizeGhost(uint32_t newSize)
void resize(uint32_t newSize)
#define BITPIT_UNUSED(variable)
Definition compiler.hpp:63
--- layout: doxygen_footer ---