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 -> RParameters
- body:
A closure that inspects a shaped array’s underlying memory.
Discussion
The method returns the value your closure returns, if applicable.