void syten::loadFile | ( | std::string | file, |
bool const | fromCache, | ||
bool const | clearAfter, | ||
Type & | r | ||
) |
Loads an object of type Type
from file
into r
.
If fromCache
is given, the file will be deleted on completion.
loadFile(std::string, bool)
below, this version has the advantage to preserve not-overwritten properties of r
. This can be used to enable caching on an MPS::State object of type r
first and then loading into it, causing every individual tensor to be stored on disk immediately to minimise memory usage. References cacheFilename(), clearCache(), std::ifstream::good(), and load_archive().
Referenced by loadCacheRef(), loadCheckpointRef(), loadFile(), and loadInputRef().