const CpuStorage & storage_cpu(const int & s)Returns a const reference to s typed as CpuStorage.
Parameters
sStorageVariant known to hold
CpuStorage.Returns
const CpuStorage&Reference into s.
Raises
:bad_variant_accessThe variant does not currently hold
CpuStorage. Not noexcept, nor are its siblings: a phantom tensor's storage reaching a CPU or GPU kernel has to raise (the binding layer turns this into a LucidError) rather than terminate the process.