Conversions to and from core's scalar arrays #
UInt8Array and core's ByteArray have the same runtime representation, a scalar array with
element size 1, and so do Float64Array and core's FloatArray, with element size 8. The
conversions between them are the identity at runtime, so they never copy.
@[implemented_by _private.ScalarArray.Conversions.0.ScalarArray.UInt8Array.ofByteArrayImpl]
The same array as a UInt8Array, without copying.
Equations
Instances For
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem ScalarArray.UInt8Array.getElem_ofByteArray (b : ByteArray) (i : Nat) (h : i < (ofByteArray b).size) :
@[simp]
@[simp]
@[implemented_by _private.ScalarArray.Conversions.0.ScalarArray.Float64Array.toFloatArrayImpl]
The same array as a FloatArray, without copying.
Equations
- a.toFloatArray = { data := a.toArray }
Instances For
@[implemented_by _private.ScalarArray.Conversions.0.ScalarArray.Float64Array.ofFloatArrayImpl]
The same array as a Float64Array, without copying.
Instances For
@[simp]
@[simp]
@[simp]
@[simp]
@[inline]
The same array as a UInt8Array, without copying.
Equations
Instances For
@[simp]
@[inline]
The same array as a Float64Array, without copying.