OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::ConcreteCommunicatable< ColumnVector< COLUMN, D > > Class Template Referencefinal

#include <columnVector.h>

+ Inheritance diagram for olb::ConcreteCommunicatable< ColumnVector< COLUMN, D > >:
+ Collaboration diagram for olb::ConcreteCommunicatable< ColumnVector< COLUMN, D > >:

Public Member Functions

 ConcreteCommunicatable (ColumnVector< COLUMN, D > &vector)
 
std::size_t size (ConstSpan< CellID > indices) const
 Get serialized size for data at locations indices
 
std::size_t serialize (ConstSpan< CellID > indices, std::uint8_t *buffer) const
 Serialize data at locations indices to buffer
 
std::size_t deserialize (ConstSpan< CellID > indices, const std::uint8_t *buffer)
 Deserialize data at locations indices to buffer
 
- Public Member Functions inherited from olb::Communicatable
virtual ~Communicatable ()
 

Detailed Description

template<typename COLUMN, unsigned D>
class olb::ConcreteCommunicatable< ColumnVector< COLUMN, D > >

Definition at line 280 of file columnVector.h.

Constructor & Destructor Documentation

◆ ConcreteCommunicatable()

template<typename COLUMN , unsigned D>
olb::ConcreteCommunicatable< ColumnVector< COLUMN, D > >::ConcreteCommunicatable ( ColumnVector< COLUMN, D > & vector)
inline

Definition at line 285 of file columnVector.h.

285 :
286 _vector{vector} { }

Member Function Documentation

◆ deserialize()

template<typename COLUMN , unsigned D>
std::size_t olb::ConcreteCommunicatable< ColumnVector< COLUMN, D > >::deserialize ( ConstSpan< CellID > indices,
const std::uint8_t * buffer )
inlinevirtual

Deserialize data at locations indices to buffer

Implements olb::Communicatable.

Definition at line 314 of file columnVector.h.

316 {
317 std::size_t size = ConcreteCommunicatable<COLUMN>(_vector[0]).size(indices);
318 const std::uint8_t* curr = buffer;
319 #ifdef PARALLEL_MODE_OMP
320 #pragma omp parallel for schedule(static,1)
321 #endif
322 for (unsigned iD=0; iD < D; ++iD) {
323 ConcreteCommunicatable<COLUMN>(_vector[iD]).deserialize(indices, curr + iD*size);
324 }
325 return D * size;
326 }
std::size_t size(ConstSpan< CellID > indices) const
Get serialized size for data at locations indices

References olb::ConcreteCommunicatable< COMMUNICATEE >::deserialize(), and olb::ConcreteCommunicatable< COMMUNICATEE >::size().

+ Here is the call graph for this function:

◆ serialize()

template<typename COLUMN , unsigned D>
std::size_t olb::ConcreteCommunicatable< ColumnVector< COLUMN, D > >::serialize ( ConstSpan< CellID > indices,
std::uint8_t * buffer ) const
inlinevirtual

Serialize data at locations indices to buffer

Implements olb::Communicatable.

Definition at line 299 of file columnVector.h.

301 {
302 std::size_t size = ConcreteCommunicatable<COLUMN>(_vector[0]).size(indices);
303 std::uint8_t* curr = buffer;
304 #ifdef PARALLEL_MODE_OMP
305 #pragma omp parallel for schedule(static,1)
306 #endif
307 for (unsigned iD=0; iD < D; ++iD) {
308 ConcreteCommunicatable<COLUMN>(_vector[iD]).serialize(indices, curr + iD*size);
309 }
310 return D * size;
311 }

References olb::ConcreteCommunicatable< COMMUNICATEE >::serialize(), and olb::ConcreteCommunicatable< COMMUNICATEE >::size().

+ Here is the call graph for this function:

◆ size()

template<typename COLUMN , unsigned D>
std::size_t olb::ConcreteCommunicatable< ColumnVector< COLUMN, D > >::size ( ConstSpan< CellID > indices) const
inlinevirtual

Get serialized size for data at locations indices

Implements olb::Communicatable.

Definition at line 289 of file columnVector.h.

290 {
291 std::size_t size = 0;
292 for (unsigned iD=0; iD < D; ++iD) {
293 size += ConcreteCommunicatable<COLUMN>(_vector[iD]).size(indices);
294 }
295 return size;
296 }

References olb::ConcreteCommunicatable< COMMUNICATEE >::size().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: