38#include "../../../misc/byteDataView.hpp"
40#include "../../../misc/temporaryMemory.hpp"
56 template<
typename T_T,
typename T_S = T_T,
typename =
void>
75#ifndef DOXYGEN_DISABLE
78 template<
typename T_T,
typename T_S>
92 storeSize +=
sizeof(
S);
99 CODI_INLINE static void restore(ByteDataView* dataStore, TemporaryMemory& allocator,
size_t size,
100 bool storeRequired,
Store& value) {
103 value = *dataStore->template read<S>(1);
108 CODI_INLINE static void store(ByteDataView* dataStore, TemporaryMemory& allocator,
T const& value,
size_t size,
109 bool storeRequired) {
113 dataStore->write<
S>(value);
#define CODI_INLINE
See codi::Config::ForcedInlines.
Definition config.h:457
#define CODI_DD(Type, Default)
Abbreviation for CODI_DECLARE_DEFAULT.
Definition macros.hpp:94
CoDiPack - Code Differentiation Package.
Definition codi.hpp:90
void CODI_UNUSED(Args const &...)
Disable unused warnings for an arbitrary number of arguments.
Definition macros.hpp:46
Definition byteDataView.hpp:51
Traits for storing passive arguments in byte streams.
Definition passiveArgumentStoreTraits.hpp:57
static void restore(ByteDataView *store, TemporaryMemory &allocator, size_t size, bool storeRequired, Store &value)
Restore the data for this type.
static void store(ByteDataView *dataStore, TemporaryMemory &allocator, T const &value, size_t size, bool storeRequired)
Store the data for the type in the data store.
T_T T
See PassiveArgumentStoreTraits.
Definition passiveArgumentStoreTraits.hpp:58
T_S S
See PassiveArgumentStoreTraits.
Definition passiveArgumentStoreTraits.hpp:59
static size_t countSize(T &&value, size_t size, bool storeRequired)
Count the required size for storing the data.
T Store
Type for the variable declaration for restoring the data.
Definition passiveArgumentStoreTraits.hpp:61
Allocator for temporary used memory.
Definition temporaryMemory.hpp:54