Contents

init(bytesNoCopy:length:deallocator:)

Creates a tensor data instance with a data buffer, byte length, and custom deallocator closure you specify.

Declaration

convenience init(bytesNoCopy bytes: UnsafeMutableRawPointer, length: Int, deallocator: @escaping (UnsafeMutableRawPointer, Int) -> Void)

Parameters

  • bytes:

    A buffer that contains data.

  • length:

    The number of bytes you want to reference from bytes. This number must not exceed the length of bytes.

  • deallocator:

    A callback to invoke after the system deallocates the object instance.

Return Value

A new MLCTensorData instance.

See Also

Creating Tensor Data