Electromagnetic Template Library (EMTL)
Loading...
Searching...
No Matches
emFixStorage Class Reference

emFixStorage is aligned storage for fix local data, i.e. More...

#include <fix.h>

Public Member Functions

const void * front () const
 Retur pointer on data after element.
 
template<typename FixType >
std::size_t push_back (const FixType &fix)
 There are two ways to write into this structure, one is to write whole class into it.
 
std::size_t write (const void *newdata, std::size_t size)
 The other way writes specified size in bytes from pointer If the pointer is NULL, no actual write is performed, only reserves space It also returns shift of the written data begining.
 
size_t size () const
 Size of written data in bytes.
 
void * jump_forward (std::ptrdiff_t &dif, size_t bytes) const
 moves pointer to bytes and returns a pointer to data there
 
void fill_aligned (size_t bytes)
 Fills the storage (with undefined values) up to the nearest position aligned in bytes

 
void * jump_aligned (std::ptrdiff_t &dif, size_t bytes) const
 moves dif shift to the nearest position aligned in bytes
 

Detailed Description

emFixStorage is aligned storage for fix local data, i.e.

data stored for EACH cell. It's based on std::vector of char with custom allocator. Aligment 64 is enough for AVX512 vectors.

Member Function Documentation

◆ jump_aligned()

void * emFixStorage::jump_aligned ( std::ptrdiff_t &  dif,
size_t  bytes 
) const
inline

moves dif shift to the nearest position aligned in bytes

Returns
a pointer to the found position

◆ push_back()

template<typename FixType >
std::size_t emFixStorage::push_back ( const FixType &  fix)
inline

There are two ways to write into this structure, one is to write whole class into it.

Both functions return shift of the written data start.

◆ write()

std::size_t emFixStorage::write ( const void *  newdata,
std::size_t  size 
)
inline

The other way writes specified size in bytes from pointer If the pointer is NULL, no actual write is performed, only reserves space It also returns shift of the written data begining.



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