<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "macCatalyst: 17.4.0 -",
    "macOS: 14.4.0 -",
    "tvOS: 17.4.0 -",
    "visionOS: 1.1.0 -",
    "watchOS: 10.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNSDataLayoutGetRank(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@BNNSDataLayoutGetRank"
  },
  "title" : "BNNSDataLayoutGetRank(_:)"
}
-->

# BNNSDataLayoutGetRank(_:)

```
func BNNSDataLayoutGetRank(_ layout: BNNSDataLayout) -> Int
```

## Return Value

The number of dimensions represented by `layout`, or `SIZE_T_MAX` if unable to determine

## Discussion\abstract Determine the rank of the given layout

---

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)