MADNESS 0.10.1
madness::archive Namespace Reference

Namespace for I/O tools. More...

Namespaces

namespace  detail

Classes

class  archive_array
 Wrapper for dynamic arrays and pointers. More...
class  archive_ptr
 Wrapper for an opaque pointer for serialization purposes. More...
struct  archive_typeinfo
 Used to enable type checking inside archives. More...
struct  ArchiveImpl
 Default implementations of wrap_store and wrap_load. More...
struct  ArchiveImpl< Archive, archive_array< T > >
 Partial specialization of ArchiveImpl for archive_array. More...
struct  ArchiveImpl< Archive, T[n], std::enable_if_t<!std::is_same_v< T, char > &&is_serializable_v< Archive, T > > >
 Partial specialization of ArchiveImpl for fixed-dimension arrays that redirects to archive_array. More...
struct  ArchiveImpl< ParallelInputArchive< localarchiveT >, archive_array< T > >
 Read the archive array and broadcast. More...
struct  ArchiveImpl< ParallelInputArchive< localarchiveT >, T >
 Specialization of ArchiveImpl for parallel input archives. More...
struct  ArchiveImpl< ParallelInputArchive< localarchiveT >, T[n]>
 Forward a fixed-size array to archive_array. More...
struct  ArchiveImpl< ParallelOutputArchive< localarchiveT >, archive_array< T > >
 Write the archive array only from process zero. More...
struct  ArchiveImpl< ParallelOutputArchive< localarchiveT >, T >
 Specialization of ArchiveImpl for parallel output archives. More...
struct  ArchiveImpl< ParallelOutputArchive< localarchiveT >, T[n]>
 Forward a fixed-size array to archive_array. More...
struct  ArchiveLoadImpl
 Default load of an object via serialize(ar, t). More...
struct  ArchiveLoadImpl< Archive, C >
struct  ArchiveLoadImpl< Archive, const DerivativeBase< T, NDIM > * >
struct  ArchiveLoadImpl< Archive, const FunctionImpl< T, NDIM > * >
struct  ArchiveLoadImpl< Archive, const SeparatedConvolution< T, NDIM > * >
struct  ArchiveLoadImpl< Archive, FunctionImpl< T, NDIM > * >
struct  ArchiveLoadImpl< Archive, Future< T >, std::enable_if_t<!std::is_void_v< T > > >
 Deserialize a future into an unassigned future. More...
struct  ArchiveLoadImpl< Archive, Future< void > >
 Deserialize a future into an unassigned future (void specialization). More...
struct  ArchiveLoadImpl< Archive, GenTensor< T > >
 Deserialize a tensor ... existing tensor is replaced. More...
struct  ArchiveLoadImpl< Archive, Key< NDIM > >
struct  ArchiveLoadImpl< Archive, linked_list >
struct  ArchiveLoadImpl< Archive, madness::detail::RemoteCounter >
struct  ArchiveLoadImpl< Archive, madness::detail::WorldPtr< T > >
 Specialization of ArchiveLoadImpl for world pointers. More...
struct  ArchiveLoadImpl< Archive, std::allocator< T >, std::enable_if_t<!is_future< T >::value &&is_serializable_v< Archive, T > > >
 Deserialize a std::allocator. More...
struct  ArchiveLoadImpl< Archive, std::array< T, N >, std::enable_if_t< is_serializable_v< Archive, T > > >
 Deserialize a std::array. MADNESS_ASSERT 's that the size matches. More...
struct  ArchiveLoadImpl< Archive, std::atomic< T >, std::enable_if_t< is_serializable_v< Archive, T > > >
 Deserialize std::atomic. More...
struct  ArchiveLoadImpl< Archive, std::complex< T >, std::enable_if_t< is_serializable_v< Archive, T > > >
 Deserialize a complex number. More...
struct  ArchiveLoadImpl< Archive, std::list< T, Alloc >, std::enable_if_t<!is_future< T >::value &&is_serializable_v< Archive, T > > >
 Deserialize a std::list. Clears and resizes as necessary. More...
struct  ArchiveLoadImpl< Archive, std::map< T, Q, Compare, Alloc >, std::enable_if_t< is_serializable_v< Archive, T > &&is_serializable_v< Archive, Q > > >
 Deserialize an std::map. The map is not cleared; duplicate elements are replaced. More...
struct  ArchiveLoadImpl< Archive, std::set< T, Compare, Alloc >, std::enable_if_t<!is_future< T >::value &&is_serializable_v< Archive, T > > >
 Deserialize a std::set. Clears and resizes as necessary. More...
struct  ArchiveLoadImpl< Archive, std::shared_ptr< const FunctionImpl< T, NDIM > > >
struct  ArchiveLoadImpl< Archive, std::shared_ptr< FunctionImpl< T, NDIM > > >
struct  ArchiveLoadImpl< Archive, std::string >
 Deserialize a std::string. Clears and resizes as necessary. More...
struct  ArchiveLoadImpl< Archive, std::vector< bool, Alloc > >
 Deserialize a std::vector<bool>. Clears and resizes as necessary. More...
struct  ArchiveLoadImpl< Archive, std::vector< Future< T > > >
 Deserialize a vector of futures into a vector of unassigned futures. More...
struct  ArchiveLoadImpl< Archive, std::vector< T, Alloc >, std::enable_if_t<!is_future< T >::value &&is_serializable_v< Archive, T > > >
 Deserialize a std::vector. Clears and resizes as necessary. More...
struct  ArchiveLoadImpl< Archive, Tensor< T > >
 Deserialize a tensor ... existing tensor is replaced. More...
struct  ArchiveLoadImpl< Archive, World * >
 Specialization of ArchiveLoadImpl for World pointers. More...
struct  ArchiveLoadImpl< BinaryFstreamInputArchive, Key< NDIM > >
struct  ArchiveLoadImpl< BufferInputArchive, const WorldObject< Derived > * >
 Specialization of ArchiveLoadImpl for constant, globally-addressable objects. More...
struct  ArchiveLoadImpl< BufferInputArchive, WorldObject< Derived > * >
 Specialization of ArchiveLoadImpl for globally-addressable objects. More...
struct  ArchiveLoadImpl< ParallelInputArchive< archiveT >, CCPairFunction< T, NDIM > >
struct  ArchiveLoadImpl< ParallelInputArchive< archiveT >, Function< T, NDIM > >
struct  ArchiveLoadImpl< ParallelInputArchive< localarchiveT >, WorldContainer< keyT, valueT > >
struct  ArchivePrePostImpl
 Default implementation of the pre/postamble for type checking. More...
struct  ArchivePrePostImpl< BufferInputArchive, T >
 Implement pre/postamble load routines for a BufferInputArchive. More...
struct  ArchivePrePostImpl< BufferOutputArchive, T >
 Implement pre/postamble storage routines for a BufferOutputArchive. More...
struct  ArchivePrePostImpl< ContainerRecordInputArchive, T >
 Implementation of functions for loading the pre/postamble in ContainerRecord archives. More...
struct  ArchivePrePostImpl< ContainerRecordOutputArchive, T >
 Implementation of functions for storing the pre/postamble in ContainerRecord archives. More...
struct  ArchivePrePostImpl< MPIInputArchive, T >
 Implementation of functions for loading the pre/postamble in MPI archives. More...
struct  ArchivePrePostImpl< MPIOutputArchive, T >
 Implementation of functions for storing the pre/postamble in MPI archives. More...
struct  ArchivePrePostImpl< MPIRawInputArchive, T >
 Implementation of functions for loading the pre/postamble in MPI archives. More...
struct  ArchivePrePostImpl< MPIRawOutputArchive, T >
 Implementation of functions for storing the pre/postamble in MPI archives. More...
struct  ArchivePrePostImpl< ParallelInputArchive< localarchiveT >, T >
 Disable type info for parallel input archives. More...
struct  ArchivePrePostImpl< ParallelOutputArchive< localarchiveT >, T >
 Disable type info for parallel output archives. More...
struct  ArchivePrePostImpl< TextFstreamInputArchive, T >
 Implement pre/postamble load routines for a TextFstreamInputArchive. More...
struct  ArchivePrePostImpl< TextFstreamOutputArchive, T >
 Implement pre/postamble storage routines for a TextFstreamOutputArchive. More...
struct  ArchivePrePostImpl< VectorInputArchive, T >
 Implementation of functions for loading the pre/postamble in Vector archives. More...
struct  ArchivePrePostImpl< VectorOutputArchive, T >
 Implementation of functions for storing the pre/postamble in Vector archives. More...
struct  ArchiveSerializeImpl
 Default symmetric serialization of a non-fundamental type that has serialize method. More...
struct  ArchiveSerializeImpl< Archive, B >
struct  ArchiveSerializeImpl< Archive, Key >
struct  ArchiveSerializeImpl< Archive, resT(*)(paramT...), std::enable_if_t<!is_default_serializable_v< Archive, resT(*)(paramT...)> > >
 Serialize a function pointer. More...
struct  ArchiveSerializeImpl< Archive, resT(objT::*)(paramT...) const, std::enable_if_t<!is_default_serializable_v< Archive, resT(objT::*)(paramT...) const > > >
 Serialize a const member function pointer. More...
struct  ArchiveSerializeImpl< Archive, resT(objT::*)(paramT...), std::enable_if_t<!is_default_serializable_v< Archive, resT(objT::*)(paramT...)> > >
 Serialize a member function pointer. More...
struct  ArchiveSerializeImpl< Archive, std::optional< T >, std::enable_if_t< is_serializable_v< Archive, T > > >
 Serialize (deserialize) an std::optional. More...
struct  ArchiveSerializeImpl< Archive, std::pair< T, Q >, std::enable_if_t< is_serializable_v< Archive, T > &&is_serializable_v< Archive, Q > > >
 Serialize (deserialize) an std::pair. More...
struct  ArchiveSerializeImpl< Archive, std::tuple< Types... >, std::enable_if_t<(is_serializable_v< Archive, Types > &&...) > >
 Serialize (deserialize) a std::tuple. More...
struct  ArchiveStoreImpl
 Default store of an object via serialize(ar, t). More...
struct  ArchiveStoreImpl< Archive, C >
struct  ArchiveStoreImpl< Archive, const DerivativeBase< T, NDIM > * >
struct  ArchiveStoreImpl< Archive, const FunctionImpl< T, NDIM > * >
struct  ArchiveStoreImpl< Archive, const SeparatedConvolution< T, NDIM > * >
struct  ArchiveStoreImpl< Archive, FunctionImpl< T, NDIM > * >
struct  ArchiveStoreImpl< Archive, Future< T >, std::enable_if_t<!std::is_void_v< T > > >
 Serialize an assigned future. More...
struct  ArchiveStoreImpl< Archive, Future< void > >
 Serialize an assigned future (void specialization). More...
struct  ArchiveStoreImpl< Archive, GenTensor< T > >
 Serialize a tensor. More...
struct  ArchiveStoreImpl< Archive, Key< NDIM > >
struct  ArchiveStoreImpl< Archive, linked_list >
struct  ArchiveStoreImpl< Archive, madness::detail::RemoteCounter >
struct  ArchiveStoreImpl< Archive, madness::detail::WorldPtr< T > >
 Specialization of ArchiveStoreImpl for world pointers. More...
struct  ArchiveStoreImpl< Archive, std::allocator< T >, std::enable_if_t<!is_future< T >::value &&is_serializable_v< Archive, T > > >
 Serialize a std::allocator. More...
struct  ArchiveStoreImpl< Archive, std::array< T, N >, std::enable_if_t< is_serializable_v< Archive, T > > >
 Serialize a std::array. More...
struct  ArchiveStoreImpl< Archive, std::atomic< T >, std::enable_if_t< is_serializable_v< Archive, T > > >
 Serialize std::atomic. More...
struct  ArchiveStoreImpl< Archive, std::complex< T >, std::enable_if_t< is_serializable_v< Archive, T > > >
 Serialize a complex number. More...
struct  ArchiveStoreImpl< Archive, std::list< T, Alloc >, std::enable_if_t<!is_future< T >::value &&is_serializable_v< Archive, T > > >
 Serialize a std::list. More...
struct  ArchiveStoreImpl< Archive, std::map< T, Q, Compare, Alloc >, std::enable_if_t< is_serializable_v< Archive, T > &&is_serializable_v< Archive, Q > > >
 Serialize an std::map. More...
struct  ArchiveStoreImpl< Archive, std::set< T, Compare, Alloc >, std::enable_if_t<!is_future< T >::value &&is_serializable_v< Archive, T > > >
 Serialize a std::set. More...
struct  ArchiveStoreImpl< Archive, std::shared_ptr< const FunctionImpl< T, NDIM > > >
struct  ArchiveStoreImpl< Archive, std::shared_ptr< FunctionImpl< T, NDIM > > >
struct  ArchiveStoreImpl< Archive, std::string >
 Serialize a 'std::string'. More...
struct  ArchiveStoreImpl< Archive, std::vector< bool, Alloc > >
 Serialize a std::vector<bool> (as a plain array of bool). More...
struct  ArchiveStoreImpl< Archive, std::vector< Future< T > > >
 Serialize a vector of assigned futures. More...
struct  ArchiveStoreImpl< Archive, std::vector< T, Alloc >, std::enable_if_t<!is_future< T >::value &&is_serializable_v< Archive, T > > >
 Serialize a std::vector. More...
struct  ArchiveStoreImpl< Archive, Tensor< T > >
 Serialize a tensor. More...
struct  ArchiveStoreImpl< Archive, World * >
 Specialization of ArchiveStoreImpl for World pointers. More...
struct  ArchiveStoreImpl< BufferOutputArchive, const WorldObject< Derived > * >
 Specialization of ArchiveStoreImpl for constant, globally-addressable objects. More...
struct  ArchiveStoreImpl< BufferOutputArchive, WorldObject< Derived > * >
 Specialization of ArchiveStoreImpl for globally-addressable objects. More...
struct  ArchiveStoreImpl< ParallelOutputArchive< archiveT >, CCPairFunction< T, NDIM > >
struct  ArchiveStoreImpl< ParallelOutputArchive< archiveT >, Function< T, NDIM > >
struct  ArchiveStoreImpl< ParallelOutputArchive< ContainerRecordOutputArchive >, WorldContainer< keyT, valueT > >
struct  ArchiveStoreImpl< ParallelOutputArchive< localarchiveT >, WorldContainer< keyT, valueT > >
 Write container to parallel archive with optional fence. More...
struct  ArchiveStoreImpl< ParallelOutputArchive< VectorOutputArchive >, WorldContainer< keyT, valueT > >
 Write container to parallel archive. More...
class  BaseArchive
 Base class for all archive classes. More...
class  BaseInputArchive
 Base class for input archive classes. More...
class  BaseOutputArchive
 Base class for output archive classes. More...
class  BaseParallelArchive
 Base class for input and output parallel archives. More...
class  BinaryFstreamInputArchive
 Wraps an archive around a binary filestream for input. More...
class  BinaryFstreamOutputArchive
 Wraps an archive around a binary filestream for output. More...
class  BufferInputArchive
 Wraps an archive around a memory buffer for input. More...
class  BufferOutputArchive
 Wraps an archive around a memory buffer for output. More...
class  ContainerRecordInputArchive
class  ContainerRecordOutputArchive
class  MPIInputArchive
 Archive allowing buffering, deserialization of data, and point-to-point communication between processes with MPI. More...
class  MPIOutputArchive
 Archive allowing buffering, serialization of data, and point-to-point communication between processes with MPI. More...
class  MPIRawInputArchive
 Archive allowing deserialization and point-to-point communication between processes with MPI. More...
class  MPIRawOutputArchive
 Archive allowing serialization and point-to-point communication between processes with MPI. More...
class  ParallelInputArchive
 An archive for storing local or parallel data, wrapping a BinaryFstreamInputArchive. More...
class  ParallelOutputArchive
 An archive for storing local or parallel data wrapping a BinaryFstreamOutputArchive. More...
class  ParallelSerializableObject
 Objects that implement their own parallel archive interface should derive from this class. More...
class  TextFstreamInputArchive
 Wraps an archive around a text filestream for input. More...
class  TextFstreamOutputArchive
 Wraps an archive around a text filestream for output. More...
class  VectorInputArchive
 Wraps an archive around an STL vector for input. More...
class  VectorOutputArchive
 Wraps an archive around an STL vector for output. More...

Typedefs

typedef std::map< short, std::complex< double > > map_short_complex_double
typedef std::pair< int, double > pair_int_double
typedef std::pair< short, std::complex< double > > pair_short_complex_double

Enumerations

enum  ContainerRecordTag : unsigned char { RECORD_INLINE = 0x01 , RECORD_CHUNKED = 0x02 , RECORD_CHUNK = 0x03 }

Functions

void archive_initialize_type_names ()
 Initializes the type names for the archives.
 ARCHIVE_REGISTER_TYPE_AND_PTR (A, 128)
 ARCHIVE_REGISTER_TYPE_AND_PTR (B, 129)
 ARCHIVE_REGISTER_TYPE_AND_PTR (C, 130)
 ARCHIVE_REGISTER_TYPE_AND_PTR (linked_list, 131)
 ARCHIVE_REGISTER_TYPE_AND_PTR (map_short_complex_double, 133)
 ARCHIVE_REGISTER_TYPE_AND_PTR (pair_int_double, 132)
 ARCHIVE_REGISTER_TYPE_AND_PTR (pair_short_complex_double, 134)
long container_record_chunk_key (const long key, const std::uint64_t ichunk)
template<class Archive, class T>
std::enable_if_t< is_default_serializable< Archive, T >::value &&is_archive< Archive >::value, void > default_serialize (const Archive &ar, const T &t)
 Redirect serialize(ar, t) to serialize(ar, &t, 1) for fundamental types.
template<class Archive, class T>
std::enable_if_t< is_input_archive< Archive >::value &&is_default_serializable< Archive, T >::value &&!(is_function_pointer_v< T >||std::is_member_function_pointer< T >::value), void > default_serialize (const Archive &ar, const T *t, unsigned int n)
template<class Archive, class T>
std::enable_if_t< is_input_archive< Archive >::value &&is_default_serializable< Archive, T >::value &&std::is_member_function_pointer< T >::value, void > default_serialize (const Archive &ar, const T *t, unsigned int n)
template<class Archive, class T>
std::enable_if_t< is_input_archive< Archive >::value &&is_default_serializable< Archive, T >::value &&is_function_pointer_v< T >, void > default_serialize (const Archive &ar, const T *t, unsigned int n)
 Deserialize an array of fundamental stuff.
template<class Archive, class T>
std::enable_if_t< is_output_archive< Archive >::value &&!(is_function_pointer_v< T >||std::is_member_function_pointer< T >::value) &&is_default_serializable< Archive, T >::value, void > default_serialize (const Archive &ar, const T *t, unsigned int n)
template<class Archive, class T>
std::enable_if_t< is_output_archive< Archive >::value &&is_default_serializable< Archive, T >::value &&std::is_member_function_pointer< T >::value, void > default_serialize (const Archive &ar, const T *t, unsigned int n)
template<class Archive, class T>
std::enable_if_t< is_output_archive< Archive >::value &&is_default_serializable< Archive, T >::value &&is_function_pointer_v< T >, void > default_serialize (const Archive &ar, const T *t, unsigned int n)
 Serialize an array of fundamental stuff.
void erase_container_record (WorldContainer< long, std::vector< unsigned char > > &dc, const long key)
template<typename T>
const char * get_type_name ()
 Returns the name of the type, or unknown if not registered.
template<class Archive, class T>
std::enable_if_t< is_input_archive_v< Archive >, const Archive & > operator& (const Archive &ar, const T &t)
 Redirect & to ArchiveImpl::wrap_load for input archives.
template<class Archive, class T>
std::enable_if_t< is_output_archive_v< Archive >, const Archive & > operator& (const Archive &ar, const T &t)
 Redirect & to ArchiveImpl::wrap_store for output archives.
template<class Archive, class T>
std::enable_if_t< is_output_archive_v< Archive >, const Archive & > operator<< (const Archive &ar, const T &t)
 Redirect << to ArchiveImpl::wrap_store for output archives.
template<class Archive, class T>
std::enable_if_t< is_input_archive_v< Archive >, const Archive & > operator>> (const Archive &ar, const T &t)
 Redirect >> to ArchiveImpl::wrap_load for input archives.
bool parse_container_record_chunk_header (const std::vector< unsigned char > &raw, std::uint64_t &total, std::uint64_t &nchunk)
template<class Archive, class T>
std::enable_if_t<(!is_default_serializable< Archive, T >::value &&has_nonmember_serialize_v< T, Archive >) &&is_archive< Archive >::value, void > serialize (const Archive &ar, const T &t)
 Redirect serialize(ar,t) to ArchiveSerializeImpl for non-fundamental types.
template<class Archive, class T>
std::enable_if_t< ! is_default_serializable< Archive, T >::value &&is_archive< Archive >::value, void > serialize (const Archive &ar, const T *t, unsigned int n)
 Serialize (or deserialize) an array of non-fundamental stuff.
template<class T>
archive_array< T > wrap (const T *ptr, unsigned int n)
 Factory function to wrap a dynamically allocated pointer as a typed archive_array.
template<typename T>
archive_array< unsigned char > wrap_opaque (const RemoteReference< T > &t)
template<class T>
archive_array< unsigned char > wrap_opaque (const T &t)
 Factory function to wrap a contiguous scalar as an opaque (uchar) archive_array.
template<class T>
archive_array< unsigned char > wrap_opaque (const T *ptr, unsigned int n)
 Factory function to wrap a pointer to contiguous data as an opaque (uchar) archive_array.
template<class T>
archive_ptr< T > wrap_ptr (T *p)
 Wrapper for pointers.
function pointer serialization
Note
relative function pointers are represented by std::ptrdiff_t , with member function pointers represented by std::array<std::ptrdiff_t, N> (with N=2 on most common platforms, and a type-dependent constant on some (Microsoft))
Returns
function pointer to serve as the reference for computing relative pointers
Note
the value returned by this function is a pointer to a non-virtual member function, this helps on the platforms that use the parity to distinguish non-virtual and virtual pointers (e.g. Itanium ABI)
std::ptrdiff_t fn_ptr_origin ()
template<typename T, typename = std::enable_if_t<std::is_function<T>::value || is_function_pointer<T>::value>>
std::ptrdiff_t to_rel_fn_ptr (const T &fn)
 converts function or (free or static member) function pointer to the relative function pointer
template<typename T, typename = std::enable_if_t<std::is_member_function_pointer<T>::value>>
auto to_rel_memfn_ptr (const T &fn)
 converts nonstatic member function pointer to the relative equivalent
template<typename T, typename = std::enable_if_t<is_function_pointer_v<T>>>
T to_abs_fn_ptr (std::ptrdiff_t rel_fn_ptr)
 converts relative free or static member function pointer to the absolute function pointer
template<typename T, std::size_t N, typename = std::enable_if_t<std::is_member_function_pointer<std::remove_reference_t<T>>::value>>
auto to_abs_memfn_ptr (std::array< std::ptrdiff_t, N > rel_fn_ptr)
 converts relative (nonstatic) member function pointer to the absolute function pointer

Variables

const char * archive_type_names [256]
 The list of type names for use in archives.
template<typename T>
const unsigned char archive_typeinfo< T >::cookie
static constexpr std::size_t CONTAINER_RECORD_CHUNK_PREFIX = 1 + sizeof(long) + sizeof(std::uint64_t)
 size of a chunk's prefix [RECORD_CHUNK][key][ichunk]
static constexpr std::size_t CONTAINER_RECORD_MAX_CHUNK
static BaseArchive fred_and_mary_sitting_under_a_tree

Detailed Description

Namespace for I/O tools.

Typedef Documentation

◆ map_short_complex_double

typedef std::map< short,std::complex<double> > madness::archive::map_short_complex_double

◆ pair_int_double

typedef std::pair<int,double> madness::archive::pair_int_double

◆ pair_short_complex_double

typedef std::pair< short,std::complex<double> > madness::archive::pair_short_complex_double

Enumeration Type Documentation

◆ ContainerRecordTag

Tag byte that starts every framed record (see ContainerRecordOutputArchive::close).

A record larger than the RMI INT_MAX message limit cannot be sent through WorldContainer::replace in one piece, so it is split: the record at key becomes a header [RECORD_CHUNKED][total][nchunk] and the payload is stored as nchunk records [RECORD_CHUNK][key][i][slice] at container_record_chunk_key(key, i). Any other record is [RECORD_INLINE][payload], so the tag alone tells the reader which it is.

Chunk keys share the container's key space, so a chunk can still collide with an unrelated record. That is unlikely (64-bit keys) but not prevented: ruling it out would need an existence check on the remote owner, and WorldContainer's only remote lookup, find(), copies the value, which may itself exceed 2 GiB. A collision is detected instead: each chunk names its record and index, so the reader throws rather than returning another record's bytes.

Records are write-once: a key holding a chunked record must be freed with erase_container_record() before it is written again, or the old chunks stay allocated (not checked, for the same reason). The cloud never rewrites a key.

An unframed record (framed=false) is the bare payload, never chunked: for containers whose bytes are read directly rather than through ContainerRecordInputArchive (the cloud's batch container, which has its own chunked transport). Framed and unframed records must not share a container.

Enumerator
RECORD_INLINE 
RECORD_CHUNKED 
RECORD_CHUNK 

Function Documentation

◆ ARCHIVE_REGISTER_TYPE_AND_PTR() [1/7]

madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR ( A ,
128  )

◆ ARCHIVE_REGISTER_TYPE_AND_PTR() [2/7]

madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR ( B ,
129  )

◆ ARCHIVE_REGISTER_TYPE_AND_PTR() [3/7]

madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR ( C ,
130  )

◆ ARCHIVE_REGISTER_TYPE_AND_PTR() [4/7]

madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR ( linked_list ,
131  )

◆ ARCHIVE_REGISTER_TYPE_AND_PTR() [5/7]

madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR ( map_short_complex_double ,
133  )

◆ ARCHIVE_REGISTER_TYPE_AND_PTR() [6/7]

madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR ( pair_int_double ,
132  )

◆ ARCHIVE_REGISTER_TYPE_AND_PTR() [7/7]

madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR ( pair_short_complex_double ,
134  )

◆ container_record_chunk_key()

long madness::archive::container_record_chunk_key ( const long key,
const std::uint64_t ichunk )
inline

Key of chunk ichunk of the chunked record at key: hashed, not key+1, key+2, …, so a chunk cannot land on a neighbouring record whose key a caller chose sequentially.

A full 64-bit mix (splitmix64's finalizer, a bijection), not worldhash's hash_value, which folds a long to 32 bits: two records whose keys agreed in those 32 bits would get identical chunk keys.

References mix.

Referenced by madness::archive::ContainerRecordOutputArchive::close(), erase_container_record(), and madness::archive::ContainerRecordInputArchive::load_chunks().

◆ default_serialize() [1/5]

template<class Archive, class T>
std::enable_if_t< is_input_archive< Archive >::value &&is_default_serializable< Archive, T >::value &&!(is_function_pointer_v< T >||std::is_member_function_pointer< T >::value), void > madness::archive::default_serialize ( const Archive & ar,
const T * t,
unsigned int n )

References MAD_ARCHIVE_DEBUG.

◆ default_serialize() [2/5]

template<class Archive, class T>
std::enable_if_t< is_input_archive< Archive >::value &&is_default_serializable< Archive, T >::value &&std::is_member_function_pointer< T >::value, void > madness::archive::default_serialize ( const Archive & ar,
const T * t,
unsigned int n )

◆ default_serialize() [3/5]

template<class Archive, class T>
std::enable_if_t< is_input_archive< Archive >::value &&is_default_serializable< Archive, T >::value &&is_function_pointer_v< T >, void > madness::archive::default_serialize ( const Archive & ar,
const T * t,
unsigned int n )

Deserialize an array of fundamental stuff.

The function only appears (via enable_if) if T is serializable and Archive is an input archive.

Template Parameters
ArchiveThe archive type.
TThe type of data in the array.
Parameters
[in]arThe archive.
[in]tPointer to the start of the array.
[in]nNumber of data items to be deserialized.

References MAD_ARCHIVE_DEBUG, and to_abs_fn_ptr().

◆ default_serialize() [4/5]

template<class Archive, class T>
std::enable_if_t< is_output_archive< Archive >::value &&!(is_function_pointer_v< T >||std::is_member_function_pointer< T >::value) &&is_default_serializable< Archive, T >::value, void > madness::archive::default_serialize ( const Archive & ar,
const T * t,
unsigned int n )

References MAD_ARCHIVE_DEBUG.

◆ default_serialize() [5/5]

template<class Archive, class T>
std::enable_if_t< is_output_archive< Archive >::value &&is_default_serializable< Archive, T >::value &&std::is_member_function_pointer< T >::value, void > madness::archive::default_serialize ( const Archive & ar,
const T * t,
unsigned int n )

◆ erase_container_record()

void madness::archive::erase_container_record ( WorldContainer< long, std::vector< unsigned char > > & dc,
const long key )
inline

Erase a framed record and, if it is chunked, its chunks; erasing only key would leave the chunks allocated.

References c, container_record_chunk_key(), and parse_container_record_chunk_header().

Referenced by madness::Cloud::do_load().

◆ operator&()

template<class Archive, class T>
std::enable_if_t< is_input_archive_v< Archive >, const Archive & > madness::archive::operator& ( const Archive & ar,
const T & t )
inline

Redirect & to ArchiveImpl::wrap_load for input archives.

The function only appears (due to enable_if) if Archive is an input archive.

Template Parameters
ArchiveThe archive type.
TThe data type.
Parameters
[in]arThe archive.
[in]tThe data.

References madness::is_serializable_v, and madness::archive::ArchiveImpl< Archive, T, Enabler >::wrap_load().

◆ parse_container_record_chunk_header()

bool madness::archive::parse_container_record_chunk_header ( const std::vector< unsigned char > & raw,
std::uint64_t & total,
std::uint64_t & nchunk )
inline

parse a chunk header; false if raw is not one

Not in a nested detail namespace: code that says using namespace madness; using namespace archive; would then find detail:: ambiguous.

References RECORD_CHUNKED.

Referenced by erase_container_record(), and madness::archive::ContainerRecordInputArchive::load_raw().

◆ wrap_opaque()

template<typename T>
archive_array< unsigned char > madness::archive::wrap_opaque ( const RemoteReference< T > & t)

Variable Documentation

◆ archive_typeinfo< T >::cookie

◆ CONTAINER_RECORD_CHUNK_PREFIX

std::size_t madness::archive::CONTAINER_RECORD_CHUNK_PREFIX = 1 + sizeof(long) + sizeof(std::uint64_t)
staticconstexpr

◆ CONTAINER_RECORD_MAX_CHUNK

std::size_t madness::archive::CONTAINER_RECORD_MAX_CHUNK
staticconstexpr
Initial value:
=
static_cast<std::size_t>(std::numeric_limits<int>::max()) - (std::size_t(1) << 20)

Largest payload sent through a single WorldContainer::replace.

The worldrmi assert is on the total message size (serialized key + value + AM header), so we leave 1 MiB of headroom below INT_MAX for that overhead.

Referenced by madness::archive::ContainerRecordOutputArchive::close().

◆ fred_and_mary_sitting_under_a_tree

BaseArchive madness::archive::fred_and_mary_sitting_under_a_tree
static
Todo
Investigate if this is necessary...