<!--
{
  "availability" : [
    "iOS: 16.0.0 - 18.0.0",
    "iPadOS: 16.0.0 - 18.0.0",
    "macCatalyst: 16.0.0 - 18.0.0",
    "macOS: 13.0.0 - 15.0.0",
    "tvOS: 16.0.0 - 18.0.0",
    "visionOS: 1.0.0 - 2.0.0",
    "watchOS: 9.0.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNSMatMulWorkspaceSize(_:_:_:_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@BNNSMatMulWorkspaceSize"
  },
  "title" : "BNNSMatMulWorkspaceSize(_:_:_:_:_:_:_:)"
}
-->

# BNNSMatMulWorkspaceSize(_:_:_:_:_:_:_:)

Returns the workspace size that a matrix multiply operation requires.

```
func BNNSMatMulWorkspaceSize(_ transA: Bool, _ transB: Bool, _ alpha: Float, _ inputA: UnsafePointer<BNNSNDArrayDescriptor>, _ inputB: UnsafePointer<BNNSNDArrayDescriptor>, _ output: UnsafePointer<BNNSNDArrayDescriptor>, _ filter_params: UnsafePointer<BNNSFilterParameters>?) -> Int
```

## Parameters

`transA`

A Boolean value that specifies whether the operation should treat `inputA` as transposed.

`transB`

A Boolean value that specifies whether the operation should treat `inputB` as transposed.

`alpha`

A value that the operation uses to scale the result.

`inputA`

A pointer to the `inputA` matrix descriptor.

`inputB`

A pointer to the `inputB` matrix descriptor.

`output`

A pointer to the output matrix descriptor.

`filter_params`

The filter runtime parameters.

## Return Value

The required allocation size for workspace paramter to [`BNNSMatMul(_:_:_:_:_:_:_:_:)`](/documentation/Accelerate/BNNSMatMul(_:_:_:_:_:_:_:_:)), in bytes.

## Discussion

---

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)