---
title: BNNSGraph.Shape
framework: accelerate
role: symbol
role_heading: Structure
path: accelerate/bnnsgraph/shape
---

# BNNSGraph.Shape

The specification of the shape of an argument.

## Declaration

```swift
struct Shape
```

## Overview

Overview The setDynamicShapes(_:forFunction:) function uses arrays of BNNSGraph.Shape structures as its input and output. This structure wraps the C API bnns_graph_shape_t type and derives its rank from the number of elements in the dimensions array.

## Topics

### Creating a shape structure

- [init(arrayLiteral:)](accelerate/bnnsgraph/shape/init(arrayliteral:).md)
- [init(_:)](accelerate/bnnsgraph/shape/init(_:).md)

### Querying a shape structure’s properties

- [dimensions](accelerate/bnnsgraph/shape/dimensions.md)

### Type Aliases

- [BNNSGraph.Shape.ArrayLiteralElement](accelerate/bnnsgraph/shape/arrayliteralelement.md)

## Relationships

### Conforms To

- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)

## See Also

### Specifying and querying a graph context’s properties

- [setDynamicShapes(_:forFunction:)](accelerate/bnnsgraph/context/setdynamicshapes(_:forfunction:).md)
- [argumentCount(forFunction:)](accelerate/bnnsgraph/context/argumentcount(forfunction:).md)
- [argumentNames(forFunction:)](accelerate/bnnsgraph/context/argumentnames(forfunction:).md)
- [argumentPosition(forFunction:argument:)](accelerate/bnnsgraph/context/argumentposition(forfunction:argument:).md)
- [functionCount](accelerate/bnnsgraph/context/functioncount.md)
- [functionNames](accelerate/bnnsgraph/context/functionnames.md)
- [checkForNaNsAndInfinities](accelerate/bnnsgraph/context/checkfornansandinfinities.md)
