SyTen
syten::requires_inmemory_rump_during_cache< T > Struct Template Reference

Specialise this class template for any types which require special treatment during caching. More...

#include <cached_type.h>

+ Inheritance diagram for syten::requires_inmemory_rump_during_cache< T >:
+ Collaboration diagram for syten::requires_inmemory_rump_during_cache< T >:

Detailed Description

template<typename T>
struct syten::requires_inmemory_rump_during_cache< T >

Specialise this class template for any types which require special treatment during caching.

At the moment, this is primarily STensor<>, which keeps a shared pointer alive in memory even if cached out to disk. This way, that pointer is not lost during a calculation (although they are not stored between calculations).

If you specialise this template, functions "Type initialise_rump() const" will be called after caching the object to disk normally and "void restore_from_rump(Type&&)" will be called after reloading the object from disk.

Note that if the AsyncCached<> object itself is saved to or loaded from disk, also this data will be lost.


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