---
title: InferenceFunction.AsyncMutableValue
framework: coreai
role: symbol
role_heading: Structure
path: coreai/inferencefunction/asyncmutablevalue
---

# InferenceFunction.AsyncMutableValue

An async value which can be provided as a mutable argument to an inference function.

## Declaration

```swift
struct AsyncMutableValue
```

## Overview

Overview When dispatching an encode(inputs:states:outputViews:to:), mutable values are what is included in the states and output vaiews. Similar to InferenceFunction.AsyncValue, this type is a wrapper around an underlying inference value, however this type may be mutated repeatedly after construction by providing it as a state argument in sequence to one or more inference functions. When encoding a sequence of inferences which each mutate the same AsyncMutableValue, the framework will insert the necessary synchronization to avoid it being read or written while a previous write is occurring.

## Topics

### Initializers

- [init(_:)](coreai/inferencefunction/asyncmutablevalue/init(_:)-4aqgq.md)
- [init(_:)](coreai/inferencefunction/asyncmutablevalue/init(_:)-x6se.md)
- [init(descriptor:)](coreai/inferencefunction/asyncmutablevalue/init(descriptor:).md)
- [init(unsafeBuffer:byteOffset:scalarType:shape:strides:interleaveLayout:)](coreai/inferencefunction/asyncmutablevalue/init(unsafebuffer:byteoffset:scalartype:shape:strides:interleavelayout:).md)

### Instance Properties

- [ndArray](coreai/inferencefunction/asyncmutablevalue/ndarray.md)
- [pixelBuffer](coreai/inferencefunction/asyncmutablevalue/pixelbuffer.md)
