<!--
{
  "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_vrampmul2_s8_24",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@vDSP_vrampmul2_s8_24"
  },
  "title" : "vDSP_vrampmul2_s8_24"
}
-->

# vDSP_vrampmul2_s8_24

Generates a fixed-point, 8.24 format, stereo ramped vector and multiplies that vector by an input vector.

```
void vDSP_vrampmul2_s8_24(const int *__I0, const int *__I1, vDSP_Stride __IS, int *__Start, const int *__Step, int *__O0, int *__O1, vDSP_Stride __OS, vDSP_Length __N);
```

## Parameters

`__I0`

The first input vector, multiplied by the ramp function.

`__I1`

The second input vector, multiplied by the ramp function.

`__IS`

The stride for both input vectors.

`__Start`

On input, the initial value of the ramp. On output, the next value in the ramp.

`__Step`

The increment, or decrement if negative, between each generated element.

`__O0`

The first output vector.

`__O1`

The second output vector.

`__OS`

The stride for both output vectors.

`__N`

The number of elements that the function processes.

## Discussion

The functions in this group function populate a vector, by multiplying the values in an input vector with the corresponding values of a ramp generated by the `Start` and `Step` parameters. The following code describes the calculation:

```c
for (i = 0; i < N; ++i) {
    O[i*OS] = *Start * I[i*IS];
    *Start += *Step;
}
```

For example, the following code fills the array `i` with sine values:

```swift
let n = vDSP_Length(1024)

let i: [Float] = (0 ..< n).map {
    return sin(Float($0) / 20)
}
```

The following illustrates the values of `i`:

![Visualization of a sine wave.](images/com.apple.accelerate/media-3239946@2x.png)

Use `i` as the input vector to [`vDSP_vrampmul`](/documentation/Accelerate/vDSP_vrampmul):

```swift
let stride = vDSP_Stride(1)

var start: Float = 0
var step: Float = 0.1
var o = [Float](repeating: 0,
                count: Int(n))

vDSP_vrampmul(i,
              stride,
              &start,
              &step,
              &o,
              stride,
              n)
```

On return, the output vector, `o`, is filled with a ramped-sine wave:

![Visualization of the generated vector.](images/com.apple.accelerate/media-3239859@2x.png)

---

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)