Closed 95-martin-orion closed 4 years ago
Looks good to me! I'll fix uint64_t
--> std::size_t
once we merge #225.
There were a couple of unneeded allocated_space += {...}
lines, so I went ahead and changed to std::size_t
along with that change.
Determine the required space before attempting to allocate it, and cancel the simulation if required space exceeds a user-specified limit (default 1GB). Try it out:
Also replaced
long unsigned int
withuint64_t
, since on some systemslong
will only use 32 bits.This partially addresses #141, but does not fully resolve it (tensors larger than rank 32 will still cause issues until #225 is submitted).