MADNESS
version 0.9
|
Interface templates for the archives (serialization) More...
#include <complex>
#include <iostream>
#include <cstdio>
#include <vector>
#include <map>
#include <madness/world/typestuff.h>
#include <madness/world/enable_if.h>
#include <madness/world/worldexc.h>
Go to the source code of this file.
Namespaces | |
madness | |
Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces. | |
madness::archive | |
Macros | |
#define | ARCHIVE_COOKIE "archive" |
#define | ARCHIVE_MAJOR_VERSION 0 |
#define | ARCHIVE_MINOR_VERSION 1 |
#define | MAD_ARCHIVE_DEBUG(s) |
#define | ARCHIVE_REGISTER_TYPE_XLC_EXTRA(T) |
#define | ARCHIVE_REGISTER_TYPE(T, cooky) |
Used to associate type with cookie value inside archive. More... | |
#define | ARCHIVE_REGISTER_TYPE_AND_PTR(T, cooky) |
Used to associate type and ptr to type with cookie value inside archive. More... | |
#define | ATN ::madness::archive::archive_type_names |
#define | ATI ::madness::archive::archive_typeinfo |
#define | ARCHIVE_REGISTER_TYPE_NAME(T) |
Used to associate names with types. More... | |
#define | ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(T) |
Used to associate names with types and pointers. More... | |
Functions | |
template<class T > | |
archive_array< T > | madness::archive::wrap (const T *ptr, unsigned int n) |
Factory function to wrap dynamically allocated pointer as typed archive_array. More... | |
template<class T > | |
archive_array< unsigned char > | madness::archive::wrap_opaque (const T *ptr, unsigned int n) |
Factory function to wrap pointer to contiguous data as opaque (uchar) archive_array. More... | |
template<class T > | |
archive_array< unsigned char > | madness::archive::wrap_opaque (const T &t) |
Factory function to wrap contiguous scalar as opaque (uchar) archive_array. More... | |
void | madness::archive::archive_initialize_type_names () |
template<typename T > | |
const char * | madness::archive::get_type_name () |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (unsigned char, 0) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (unsigned short, 1) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (unsigned int, 2) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (unsigned long, 3) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (unsigned long long, 4) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (signed char, 5) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (char, 5) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (signed short, 6) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (signed int, 7) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (signed long, 8) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (signed long long, 9) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (bool, 10) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (float, 11) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (double, 12) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (long double, 13) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (std::complex< float >, 14) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (std::complex< double >, 15) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (std::vector< char >, 20) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (std::vector< unsigned char >, 21) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (std::vector< short >, 22) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (std::vector< unsigned short >, 23) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (std::vector< int >, 24) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (std::vector< unsigned int >, 25) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (std::vector< long >, 26) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (std::vector< unsigned long >, 27) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (std::vector< bool >, 28) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (std::vector< float >, 29) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (std::vector< double >, 30) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (std::string, 31) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (Tensor< int >, 32) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (Tensor< long >, 33) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (Tensor< float >, 34) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (Tensor< double >, 35) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (Tensor< std::complex< float > >, 36) | |
madness::archive::ARCHIVE_REGISTER_TYPE_AND_PTR (Tensor< std::complex< double > >, 37) | |
template<class Archive , class T > | |
enable_if_c< is_serializable < T >::value &&is_output_archive< Archive > ::value >::type | madness::archive::serialize (const Archive &ar, const T *t, unsigned int n) |
template<class Archive , class T > | |
enable_if_c< is_serializable < T >::value &&is_input_archive< Archive > ::value >::type | madness::archive::serialize (const Archive &ar, const T *t, unsigned int n) |
template<class Archive , class T > | |
enable_if_c< !is_serializable < T >::value &&is_archive < Archive >::value >::type | madness::archive::serialize (const Archive &ar, const T *t, unsigned int n) |
template<class Archive , class T > | |
enable_if_c< is_serializable < T >::value &&is_archive < Archive >::value >::type | madness::archive::serialize (const Archive &ar, const T &t) |
template<class Archive , class T > | |
enable_if_c< !is_serializable < T >::value &&is_archive < Archive >::value >::type | madness::archive::serialize (const Archive &ar, const T &t) |
template<class Archive , class T > | |
enable_if< is_output_archive < Archive >, const Archive & > ::type | madness::archive::operator<< (const Archive &ar, const T &t) |
template<class Archive , class T > | |
enable_if< is_input_archive < Archive >, const Archive & > ::type | madness::archive::operator>> (const Archive &ar, const T &t) |
template<class Archive , class T > | |
enable_if< is_output_archive < Archive >, const Archive & > ::type | madness::archive::operator& (const Archive &ar, const T &t) |
template<class Archive , class T > | |
enable_if< is_input_archive < Archive >, const Archive & > ::type | madness::archive::operator& (const Archive &ar, const T &t) |
template<class T > | |
archive_ptr< T > | madness::archive::wrap_ptr (T *p) |
Variables | |
const char * | madness::archive::archive_type_names [256] |
Interface templates for the archives (serialization)
#define ARCHIVE_COOKIE "archive" |
#define ARCHIVE_MAJOR_VERSION 0 |
#define ARCHIVE_MINOR_VERSION 1 |
#define ARCHIVE_REGISTER_TYPE | ( | T, | |
cooky | |||
) |
Used to associate type with cookie value inside archive.
#define ARCHIVE_REGISTER_TYPE_AND_PTR | ( | T, | |
cooky | |||
) |
Used to associate type and ptr to type with cookie value inside archive.
#define ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES | ( | T | ) |
Used to associate names with types and pointers.
Referenced by madness::archive::archive_initialize_type_names().
#define ARCHIVE_REGISTER_TYPE_NAME | ( | T | ) |
Used to associate names with types.
#define ARCHIVE_REGISTER_TYPE_XLC_EXTRA | ( | T | ) |
#define ATI ::madness::archive::archive_typeinfo |
#define ATN ::madness::archive::archive_type_names |
#define MAD_ARCHIVE_DEBUG | ( | s | ) |
Referenced by madness::archive::ArchiveLoadImpl< Archive, T >::load(), madness::archive::ArchiveLoadImpl< Archive, Future< T > >::load(), madness::archive::ArchiveLoadImpl< Archive, std::vector< Future< T > > >::load(), madness::archive::ArchiveLoadImpl< Archive, std::complex< T > >::load(), madness::archive::ArchiveLoadImpl< Archive, std::vector< T > >::load(), madness::archive::ArchiveLoadImpl< Archive, std::vector< bool > >::load(), madness::archive::ArchiveLoadImpl< Archive, std::string >::load(), madness::archive::ArchiveLoadImpl< Archive, std::map< T, Q > >::load(), madness::archive::ArchivePrePostImpl< Archive, T >::preamble_load(), madness::archive::ArchivePrePostImpl< Archive, T >::preamble_store(), madness::archive::serialize(), madness::archive::ArchiveSerializeImpl< Archive, std::pair< T, Q > >::serialize(), madness::archive::ArchiveStoreImpl< Archive, T >::store(), madness::archive::ArchiveStoreImpl< Archive, Future< T > >::store(), madness::archive::ArchiveStoreImpl< Archive, std::vector< Future< T > > >::store(), madness::archive::ArchiveStoreImpl< Archive, std::complex< T > >::store(), madness::archive::ArchiveStoreImpl< Archive, std::vector< T > >::store(), madness::archive::ArchiveStoreImpl< Archive, std::vector< bool > >::store(), madness::archive::ArchiveStoreImpl< Archive, std::string >::store(), madness::archive::ArchiveStoreImpl< Archive, std::map< T, Q > >::store(), madness::archive::TextFstreamOutputArchive::store_start_tag(), madness::archive::ArchiveImpl< Archive, T >::wrap_load(), madness::archive::ArchiveImpl< Archive, archive_array< T > >::wrap_load(), madness::archive::ArchiveImpl< Archive, T[n]>::wrap_load(), madness::archive::ArchiveImpl< Archive, T >::wrap_store(), madness::archive::ArchiveImpl< Archive, archive_array< T > >::wrap_store(), and madness::archive::ArchiveImpl< Archive, T[n]>::wrap_store().