<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.2.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vDSP_mmulD",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@vDSP_mmulD"
  },
  "title" : "vDSP_mmulD"
}
-->

# vDSP_mmulD

Performs an out-of-place multiplication of two double-precision real matrices.

```
extern void vDSP_mmulD(const double *__A, vDSP_Stride __IA, const double *__B, vDSP_Stride __IB, double *__C, vDSP_Stride __IC, vDSP_Length __M, vDSP_Length __N, vDSP_Length __P);
```

## Parameters

`__A`

The `M` x `P` left-hand side input matrix.

`__IA`

The distance between the elements in the left-hand side input matrix.

`__B`

The `P` x `N` right-hand side input matrix.

`__IB`

The distance between the elements in the right-hand side input matrix.

`__C`

The `M` x `N` output matrix.

`__IC`

The distance between the elements in the output matrix.

`__M`

The number of rows in matrices `A` and `C`.

`__N`

The number of columns in matrices `B` and `C`.

`__P`

The number of columns in matrix `A` and the number of rows in matrix `B`.

## Discussion

The following code multiplies the matrices `a` and `b`, and writes the result to matrix `c`:

```swift
    let m: vDSP_Length = 2
    let n: vDSP_Length = 5
    let p: vDSP_Length = 3
    
    // `m` rows x `p` columns.
    let a: [Double] = [ 1, 2, 3,
                        4, 5, 6 ]
    
    // `p` rows x `n` columns.
    let b: [Double] = [ 10, 11, 12, 13, 14,
                       15, 16, 17, 18, 19,
                       20, 21, 22, 23, 24 ]
    

    
    // `m` rows x `n` columns.
    var c = [Double](repeating: 0,
                    count: Int(m * n))
    
    let stride = 1
    
    vDSP_mmulD(a, stride,
              b, stride,
              &c, stride,
              m,
              n,
              p)
    
    // Prints:
    // "[ 100.0, 106.0, 112.0, 118.0, 124.0,
    //    235.0, 250.0, 265.0, 280.0, 295.0 ]".
    print(c)
```

---

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)