---
title: vDSP_vsmsma
framework: Accelerate
role: symbol
role_heading: Function
platforms: [iOS 6.0+, iPadOS 6.0+, Mac Catalyst 13.1+, macOS 10.9+, visionOS 1.0+, watchOS 2.0+]
path: accelerate/vdsp_vsmsma
---

# vDSP_vsmsma

Calculates the single-precision element-wise addition of two vector-scalar products, using the specified stride.

## Declaration

```occ
extern void vDSP_vsmsma(const float *__A, vDSP_Stride __IA, const float *__B, const float *__C, vDSP_Stride __IC, const float *__D, float *__E, vDSP_Stride __IE, vDSP_Length __N);
```

## Parameters

- `__A`: The input vector A in E = (A * B) + (C * D).
- `__IA`: The distance between the elements in the input vector A.
- `__B`: The input scalar value B in E = (A * B) + (C * D).
- `__C`: The input vector C in E = (A * B) + (C * D).
- `__IC`: The distance between the elements in the input vector C.
- `__D`: The input scalar value D in E = (A * B) + (C * D).
- `__E`: The output vector D in E = (A * B) + (C * D).
- `__IE`: The distance between the elements in the output vector E.
- `__N`: The number of elements that the function processes.

## Mentioned in

Using vDSP for vector-based arithmetic

## Discussion

Discussion This function calculates the element-wise vector-scalar products of A and B, and C and D, and writes the sum of the products to vector D, as follows: for (n = 0; n < N; ++n)     E[n] = A[n]*B + C[n]*D;

The following code shows an example of using this function:

## See Also

### Vector-scalar-vector-scalar multiply-multiply-add operations

- [vDSP_vsmsmaD](accelerate/vdsp_vsmsmad.md)
