---
title: bnns_graph_context_t
framework: accelerate
role: symbol
role_heading: Structure
path: accelerate/bnns_graph_context_t
---

# bnns_graph_context_t

An object that wraps a compiled graph object.

## Declaration

```swift
struct bnns_graph_context_t
```

## Overview

Overview The bnns_graph_context_t object wraps a bnns_graph_t instance and adds mutable data storage. BNNS requires mutability to support dynamic shapes and other execution objects. You must ensure that the underlying bnns_graph_t instance remains valid throughout the lifetime of the context.

## Topics

### Initializing a context

- [init()](accelerate/bnns_graph_context_t/init().md)
- [init(data:size:)](accelerate/bnns_graph_context_t/init(data:size:).md)

### Specifying a context’s properties

- [data](accelerate/bnns_graph_context_t/data.md)
- [size](accelerate/bnns_graph_context_t/size.md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)

## See Also

### Creating and destroying a context

- [BNNSGraphContextMake(_:)](accelerate/bnnsgraphcontextmake(_:).md)
- [BNNSGraphContextMakeStreaming(_:_:_:_:)](accelerate/bnnsgraphcontextmakestreaming(_:_:_:_:).md)
- [BNNSGraphContextDestroy(_:)](accelerate/bnnsgraphcontextdestroy(_:).md)
