Contents

makeTensor(descriptor:)

Creates a tensor by allocating new memory.

Declaration

func makeTensor(descriptor: MTLTensorDescriptor) throws -> any MTLTensor

Parameters

  • descriptor:

    A description of the properties for the new tensor.

Return Value

A new tensor instance that Metal configures using descriptor or nil if an error occurred.