walberla::field::SwapableCompare< FIELD_PTR > Struct Template Reference

Detailed Description

template<typename FIELD_PTR>
struct walberla::field::SwapableCompare< FIELD_PTR >

A comparison functor based on field size / field layout.

Can be used as Compare class for example in std::set's and std::map's Template parameter FIELD_PTR should be either Field * or shared_ptr<Field>

#include <SwapableCompare.h>

Public Member Functions

bool operator() (const FIELD_PTR &lhs, const FIELD_PTR &rhs) const
 Strict weak ordering on fields, using the alloc sizes and sizes if two fields are equal in this ordering, they have equal allocSizes, equal sizes and equal layout and are therefore swap-able. More...
 

Member Function Documentation

◆ operator()()

template<typename FIELD_PTR >
bool walberla::field::SwapableCompare< FIELD_PTR >::operator() ( const FIELD_PTR &  lhs,
const FIELD_PTR &  rhs 
) const
inline

Strict weak ordering on fields, using the alloc sizes and sizes if two fields are equal in this ordering, they have equal allocSizes, equal sizes and equal layout and are therefore swap-able.


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