Contents

withUnsafeShapedBufferPointer(_:)

Provides read-only access of the shaped array’s underlying memory to a closure.

Declaration

func withUnsafeShapedBufferPointer<R>(_ body: (UnsafeBufferPointer<Self.Scalar>, [Int], [Int]) throws -> R) rethrows -> R

Parameters

  • body:

    A closure that inspects a shaped array’s underlying memory.

Discussion

The method returns the value your closure returns, if applicable.

See Also

Inspecting a shaped array type