OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::ConcreteCommunicatable< MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS... > > Class Template Referencefinal

#include <fieldArrayD.h>

+ Inheritance diagram for olb::ConcreteCommunicatable< MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS... > >:
+ Collaboration diagram for olb::ConcreteCommunicatable< MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS... > >:

Public Member Functions

 ConcreteCommunicatable (MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS... > &communicatee)
 
std::size_t size (ConstSpan< CellID > indices) const override
 Get serialized size for data at locations indices
 
std::size_t serialize (ConstSpan< CellID > indices, std::uint8_t *buffer) const override
 Serialize data at locations indices to buffer
 
std::size_t deserialize (ConstSpan< CellID > indices, const std::uint8_t *buffer) override
 Deserialize data at locations indices to buffer
 
- Public Member Functions inherited from olb::Communicatable
virtual ~Communicatable ()
 

Detailed Description

template<typename T, typename DESCRIPTOR, Platform PLATFORM, typename... FIELDS>
class olb::ConcreteCommunicatable< MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS... > >

Definition at line 523 of file fieldArrayD.h.

Constructor & Destructor Documentation

◆ ConcreteCommunicatable()

template<typename T , typename DESCRIPTOR , Platform PLATFORM, typename... FIELDS>
olb::ConcreteCommunicatable< MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS... > >::ConcreteCommunicatable ( MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS... > & communicatee)
inline

Definition at line 528 of file fieldArrayD.h.

528 :
529 _communicatee{communicatee} { }

Member Function Documentation

◆ deserialize()

template<typename T , typename DESCRIPTOR , Platform PLATFORM, typename... FIELDS>
std::size_t olb::ConcreteCommunicatable< MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS... > >::deserialize ( ConstSpan< CellID > indices,
const std::uint8_t * buffer )
inlineoverridevirtual

Deserialize data at locations indices to buffer

Implements olb::Communicatable.

Definition at line 556 of file fieldArrayD.h.

558 {
559 const std::uint8_t* curr = buffer;
560 meta::list<FIELDS...>::for_each([&](auto field) {
561 using FIELD = typename decltype(field)::type;
563 ColumnVector<typename ImplementationOf<typename FIELD::template column_type<T>,PLATFORM>::type,
564 DESCRIPTOR::template size<FIELD>()>
565 >(_communicatee.get(field)).deserialize(indices, curr);
566 });
567 return curr - buffer;
568 }
std::size_t size(ConstSpan< CellID > indices) const override
Get serialized size for data at locations indices
ConcreteCommunicatable(MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS... > &communicatee)
const FieldArrayD< T, DESCRIPTOR, PLATFORM, FIELD > & get(meta::id< FIELD > field=meta::id< FIELD >()) const
std::enable_if_t< DESCRIPTOR::d==2, std::shared_ptr< SuperF2D< T > > > field(SuperLattice< T, DESCRIPTOR > &sLattice)
Returns external field functor.
static constexpr void for_each(F f)
Calls f for each type of TYPES by-value (in reversed order!)
Definition meta.h:331

References olb::meta::list< TYPES >::for_each(), and olb::ConcreteCommunicatable< COMMUNICATEE >::size().

+ Here is the call graph for this function:

◆ serialize()

template<typename T , typename DESCRIPTOR , Platform PLATFORM, typename... FIELDS>
std::size_t olb::ConcreteCommunicatable< MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS... > >::serialize ( ConstSpan< CellID > indices,
std::uint8_t * buffer ) const
inlineoverridevirtual

Serialize data at locations indices to buffer

Implements olb::Communicatable.

Definition at line 541 of file fieldArrayD.h.

543 {
544 std::uint8_t* curr = buffer;
545 meta::list<FIELDS...>::for_each([&](auto field) {
546 using FIELD = typename decltype(field)::type;
548 ColumnVector<typename ImplementationOf<typename FIELD::template column_type<T>,PLATFORM>::type,
549 DESCRIPTOR::template size<FIELD>()>
550 >(_communicatee.get(field)).serialize(indices, curr);
551 });
552 return curr - buffer;
553 }

References olb::meta::list< TYPES >::for_each(), and olb::ConcreteCommunicatable< COMMUNICATEE >::size().

+ Here is the call graph for this function:

◆ size()

template<typename T , typename DESCRIPTOR , Platform PLATFORM, typename... FIELDS>
std::size_t olb::ConcreteCommunicatable< MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS... > >::size ( ConstSpan< CellID > indices) const
inlineoverridevirtual

Get serialized size for data at locations indices

Implements olb::Communicatable.

Definition at line 532 of file fieldArrayD.h.

533 {
535 ColumnVector<typename ImplementationOf<typename FIELDS::template column_type<T>,PLATFORM>::type,
536 DESCRIPTOR::template size<FIELDS>()>
537 >(_communicatee.template get<FIELDS>()).size(indices) + ... + 0);
538 }

References olb::ConcreteCommunicatable< COMMUNICATEE >::size(), and olb::GenericVector< T, D, IMPL >::size().

+ Here is the call graph for this function:

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