Contents

copy(sourceTensor:sourceOrigin:sourceDimensions:destinationTensor:destinationOrigin:destinationDimensions:)

Encodes a command to copy data from a tensor instance into another.

Declaration

func copy(sourceTensor: any MTLTensor, sourceOrigin: MTLTensorExtents, sourceDimensions: MTLTensorExtents, destinationTensor: any MTLTensor, destinationOrigin: MTLTensorExtents, destinationDimensions: MTLTensorExtents)

Parameters

  • sourceTensor:

    An Mtltensor instance the command copies data from.

  • destinationTensor:

    An Mtltensor instance the command copies data to.

Discussion

If the sourceTensor and destinationTensor instances are not aliasable, this command applies the correct reshapes to enable this operation.

See Also

Encoding texture copy commands