---
title: "BNNSMatMulWorkspaceSize(_:_:_:_:_:_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/bnnsmatmulworkspacesize(_:_:_:_:_:_:_:)"
---

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

Returns the workspace size that a matrix multiply operation requires.

## Declaration

```swift
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

Return Value The required allocation size for workspace paramter to BNNSMatMul(_:_:_:_:_:_:_:_:), in bytes.

## See Also

### Matrix multiplication

- [BNNSDirectApplyBroadcastMatMul(_:_:_:_:_:_:_:)](accelerate/bnnsdirectapplybroadcastmatmul(_:_:_:_:_:_:_:).md)
- [BNNS.BroadcastMatrixMultiplyLayer](accelerate/bnns/broadcastmatrixmultiplylayer.md)
- [BNNSLayerParametersBroadcastMatMul](accelerate/bnnslayerparametersbroadcastmatmul.md)
- [BNNSFilterCreateLayerBroadcastMatMul(_:_:)](accelerate/bnnsfiltercreatelayerbroadcastmatmul(_:_:).md)
- [BNNSMatMul(_:_:_:_:_:_:_:_:)](accelerate/bnnsmatmul(_:_:_:_:_:_:_:_:).md)
- [applyMatrixMultiplication(inputA:transposed:inputB:transposed:output:alpha:workspace:filterParameters:)](accelerate/bnns/applymatrixmultiplication(inputa:transposed:inputb:transposed:output:alpha:workspace:filterparameters:).md)
- [matrixMultiplicationWorkspaceSize(inputA:transposed:inputB:transposed:output:alpha:filterParameters:)](accelerate/bnns/matrixmultiplicationworkspacesize(inputa:transposed:inputb:transposed:output:alpha:filterparameters:).md)
