OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
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 465 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 470 of file fieldArrayD.h.

470 :
471 _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 498 of file fieldArrayD.h.

500 {
501 const std::uint8_t* curr = buffer;
502 meta::list<FIELDS...>::for_each([&](auto field) {
503 using FIELD = typename decltype(field)::type;
505 ColumnVector<typename ImplementationOf<typename FIELD::template column_type<T>,PLATFORM>::type,
506 DESCRIPTOR::template size<FIELD>()>
507 >(_communicatee.template get(field)).deserialize(indices, curr);
508 });
509 return curr - buffer;
510 }
std::size_t deserialize(ConstSpan< CellID > indices, const std::uint8_t *buffer) override
Deserialize data at locations indices to buffer
ConcreteCommunicatable(MultiFieldArrayD< T, DESCRIPTOR, PLATFORM, FIELDS... > &communicatee)
std::enable_if_t< DESCRIPTOR::d==2, std::shared_ptr< SuperF2D< T > > > field(SuperLattice< T, DESCRIPTOR > &sLattice)
Returns external field functor.
int get()
Get current device.
Definition device.hh:71
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::ConcreteCommunicatable< COMMUNICATEE >::deserialize(), and olb::meta::list< TYPES >::for_each().

+ 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 483 of file fieldArrayD.h.

485 {
486 std::uint8_t* curr = buffer;
487 meta::list<FIELDS...>::for_each([&](auto field) {
488 using FIELD = typename decltype(field)::type;
490 ColumnVector<typename ImplementationOf<typename FIELD::template column_type<T>,PLATFORM>::type,
491 DESCRIPTOR::template size<FIELD>()>
492 >(_communicatee.template get(field)).serialize(indices, curr);
493 });
494 return curr - buffer;
495 }
std::size_t serialize(ConstSpan< CellID > indices, std::uint8_t *buffer) const override
Serialize data at locations indices to buffer

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

+ 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 474 of file fieldArrayD.h.

475 {
477 ColumnVector<typename ImplementationOf<typename FIELDS::template column_type<T>,PLATFORM>::type,
478 DESCRIPTOR::template size<FIELDS>()>
479 >(_communicatee.template get<FIELDS>()).size(indices) + ... + 0);
480 }

References 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: