Contents

withUnsafeMutableShapedBufferPointer(_:)

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

Declaration

mutating func withUnsafeMutableShapedBufferPointer<R>(_ body: (inout UnsafeMutableBufferPointer<Self.Scalar>, [Int], [Int]) throws -> R) rethrows -> R

Parameters

  • body:

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

Discussion

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

See Also

Modifying a shaped array type