<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/bnns_graph_shape_t",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@SA@bnns_graph_shape_t"
  },
  "title" : "bnns_graph_shape_t"
}
-->

# bnns_graph_shape_t

The specification of the shape of an argument.

```
struct bnns_graph_shape_t
```

## Overview

Use a [`bnns_graph_shape_t`](/documentation/Accelerate/bnns_graph_shape_t) structure to pass the rank and dimensions of tensors to the [`BNNSGraphContextSetDynamicShapes(_:_:_:_:)`](/documentation/Accelerate/BNNSGraphContextSetDynamicShapes(_:_:_:_:)) function.

## Topics

### Initializing a graph shape

[`init()`](/documentation/Accelerate/bnns_graph_shape_t/init())

Creates an empty shape structure.

[`init(rank:shape:)`](/documentation/Accelerate/bnns_graph_shape_t/init(rank:shape:))

Creates a shape structure with the specified rank and dimensions.

### Specifying a shape’s properties

[`rank`](/documentation/Accelerate/bnns_graph_shape_t/rank)

The rank of the shape.

[`shape`](/documentation/Accelerate/bnns_graph_shape_t/shape)

An array of unsigned-integer elements that specify the size of the shape.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)