---
title: "withUnsafeMutableBufferPointer(_:)"
framework: accelerate
role: symbol
role_heading: Instance Method
path: "accelerate/acceleratemutablebuffer/withunsafemutablebufferpointer(_:)"
---

# withUnsafeMutableBufferPointer(_:)

Calls the given closure with a pointer to the object’s mutable contiguous storage.

## Declaration

```swift
mutating func withUnsafeMutableBufferPointer<R>(_ body: (inout UnsafeMutableBufferPointer<Self.Element>) throws -> R) rethrows -> R
```

## Parameters

- `body`: A closure that receives an doc://com.apple.documentation/documentation/Swift/UnsafeMutableBufferPointer to the sequence’s contiguous storage.
