waLBerla 7.2
Loading...
Searching...
No Matches
EndianIndependentSerialization.h File Reference

Detailed Description

#include "DataTypes.h"
#include "core/debug/Debug.h"
#include "core/math/Uint.h"
#include <cmath>
#include <limits>
#include <vector>

Namespaces

namespace  walberla
 Storage for detected contacts which can be used to perform actions for all contacts, e.g.
 

Functions

void walberla::uintToByteArray (uint_t value, std::vector< uint8_t > &array, const uint_t offset, const uint_t bytes)
 Stores the 'bytes' least significant bytes of 'value' in 'array' starting at 'array[offset]' (complementary operation/function: byteArrayToUint)
 
uint_t walberla::byteArrayToUint (const std::vector< uint8_t > &array, const uint_t offset, const uint_t bytes)
 Converts 'bytes' bytes stored in 'array' starting at 'array[offset]' into a value of type uint_t (complementary operation/function: uintToByteArray)
 
template<typename REAL_T >
uint_t walberla::realToByteArray (const REAL_T value, std::vector< uint8_t > &array, const uint_t offset)
 
template<typename REAL_T >
REAL_T walberla::byteArrayToReal (const std::vector< uint8_t > &array, const uint_t offset)
 
void walberla::boolVectorToByteArray (const std::vector< bool > &boolVec, std::vector< uint8_t > &array, const uint_t offset)
 
std::vector< bool > walberla::byteArrayToBoolVector (const std::vector< uint8_t > &array, const uint_t offset, const uint_t bytes)