getBytes(_:strides:sliceOrigin:sliceDimensions:)
Copies the data corresponding to a slice of this tensor into a pointer you provide.
Declaration
func getBytes(_ bytes: UnsafeMutableRawPointer, strides: MTLTensorExtents, sliceOrigin: MTLTensorExtents, sliceDimensions: MTLTensorExtents)Parameters
- bytes:
A pointer to bytes of data that this method copies into the slice you specify with
sliceOriginandsliceDimensions. - strides:
An array of strides, in elements, that describes the layout of the data in
bytes. You are responsible for ensuringstridesmeets the following requirements:Elements of
stridesare in monotonically non-decreasing order.For any
ilarger than zero,strides[i]is greater than or equal tostrides[i-1] * dimensions[i-1].
- sliceOrigin:
An array of offsets, in elements, to the first element of the slice that this method reads data from.
- sliceDimensions:
An array of sizes, in elements, of the slice this method reads data from.