---
title: vDSP_desamp
framework: accelerate
role: symbol
role_heading: Function
path: accelerate/vdsp_desamp
---

# vDSP_desamp

Performs single-precision FIR filtering with decimation and antialiasing.

## Declaration

```occ
extern void vDSP_desamp(const float *__A, vDSP_Stride __DF, const float *__F, float *__C, vDSP_Length __N, vDSP_Length __P);
```

## Parameters

- `__A`: Single-precision real input vector. The size of A must be at least DF * (N-1) + P (see below).
- `__DF`: Decimation factor.
- `__F`: Single-precision real filter vector.
- `__C`: Single-precision real output vector.
- `__N`: Length of output vector C.
- `__P`: Length of filter vector F.

## Mentioned in

Resampling a signal with decimation

## Discussion

Discussion Performs finite impulse response (FIR) filtering at selected positions of the input vector A, with the filter F, using the decimation factor DF. Results are left in the output vector C. This function can run in place, but C cannot be in place with F. This function’s operation is indicated by the following pseudocode: for (n = 0; n < N; ++n) {     sum = 0;     for (p = 0; p < P; ++p)         sum += A[n * DF + p] * F[p];     C[n] = sum; } note: The vDSP_desamp function may rearrange the order of operations and use various floating-point precisions, so actual results may not be calculated in exactly the same way as the pseudocode above.

## See Also

### Real Vectors

- [Resampling a signal with decimation](accelerate/resampling-a-signal-with-decimation.md)
- [vDSP_desampD](accelerate/vdsp_desampd.md)
