---
title: "vSndot(_:_:_:_:_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/vsndot(_:_:_:_:_:_:)"
---

# vSndot(_:_:_:_:_:_:)

Computes the dot products of n pairs of vectors, accumulating or storing the results in an array of n float values.

## Declaration

```swift
func vSndot(_ n: Int32, _ m: Int32, _ s: UnsafeMutablePointer<Float>, _ isw: Int32, _ x: UnsafePointer<vFloat>, _ y: UnsafePointer<vFloat>)
```

## Parameters

- `n`: Number of dot products to compute, and number of elements in vector s ; must be a multiple of 4.
- `m`: Number of elements in the vectors whose dot products are computed; must be a multiple of 4.
- `s`: Destination vector; the n dot products are accumulated or stored here.
- `isw`: A key that selects one of the four variants of this function: see Discussion below.
- `x`: A matrix whose rows are n floating-point vectors, each containing m values.
- `y`: A second matrix whose rows are n floating-point vectors, each containing m values.

## Discussion

Discussion For i = 0 to n-1, the dot product of vectors x[i] and y[i] is computed.  The dot product is accumulated or stored in s[i], according to the value of isw: if isw = 1, the dot product is stored in s[i]. if isw = 2, the dot product is negated and then stored in s[i]. if isw = 3, the dot product is added to the value in s[i]. if isw = 4, the dot product is negated and then added to the value in s[i].

## See Also

### Vector-Scalar Linear Algebra Functions (from vectorOps.h)

- [vIsamax(_:_:)](accelerate/visamax(_:_:).md)
- [vIsamin(_:_:)](accelerate/visamin(_:_:).md)
- [vIsmax(_:_:)](accelerate/vismax(_:_:).md)
- [vIsmin(_:_:)](accelerate/vismin(_:_:).md)
- [vSasum(_:_:)](accelerate/vsasum(_:_:).md)
- [vSsum(_:_:)](accelerate/vssum(_:_:).md)
- [vSaxpy(_:_:_:_:)](accelerate/vsaxpy(_:_:_:_:).md)
- [vSnaxpy(_:_:_:_:_:)](accelerate/vsnaxpy(_:_:_:_:_:).md)
- [vScopy(_:_:_:)](accelerate/vscopy(_:_:_:).md)
- [vSdot(_:_:_:)](accelerate/vsdot(_:_:_:).md)
- [vSnrm2(_:_:)](accelerate/vsnrm2(_:_:).md)
- [vSnorm2(_:_:)](accelerate/vsnorm2(_:_:).md)
- [vSrot(_:_:_:_:_:)](accelerate/vsrot(_:_:_:_:_:).md)
- [vSscal(_:_:_:)](accelerate/vsscal(_:_:_:).md)
- [vSswap(_:_:_:)](accelerate/vsswap(_:_:_:).md)
