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

# vDSP_dotpr_s1_15

Calculates the dot product of two fixed-point 1.15 format vectors.

```
void vDSP_dotpr_s1_15(const short *__A, vDSP_Stride __IA, const short *__B, vDSP_Stride __IB, short *__C, vDSP_Length __N);
```

## Parameters

`__A`

The input vector `A`.

`__IA`

The distance between the elements in the input vector `A`.

`__B`

The input vector `B`.

`__IB`

The distance between the elements in the input vector `B`.

`__C`

On output, the dot product of the two vectors.

`__N`

The number of elements to process.

## Discussion

This function calculates the dot product of two vectors, using the following operation:

```objc
C[0] = sum(A[n] * B[n], 0 <= n < N);
```

For example, the following code calculates the dot product of the two vectors `[1, 2, 3]` and `[4, 5, 6]` as `(1*4)+(2*5)+(3*6)=32`:

```swift
    let stride = 1
    let n = 3
    
    let a: [Double] = [1.0, 2.0, 3.0]
    let b: [Double] = [4.0, 5.0, 6.0]
    
    var c = Double()
    
    vDSP_dotprD(a, stride,
                b, stride,
                &c,
                vDSP_Length(n))
    
    // Prints "32.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)