Skip to content
fn

storage_cpu

→const CpuStorage&
const CpuStorage & storage_cpu(const int & s)

Returns a const reference to s typed as CpuStorage.

Parameters

sStorage
Variant known to hold CpuStorage.

Returns

const CpuStorage&

Reference into s.

Raises

:bad_variant_access
The 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.