static func downsample<T, U, V>(_ source: U, decimationFactor: Int, filter: T, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
FIR filtering with decimation and antialiasing; double-precision.
- Parameter source: Double-precision input vector.
- Parameter decimationFactor: The integer factor by which to divide the sampling rate.
- Parameter filter: Filter to use during the downsampling operation.
- Parameter result: Double-precision output vector.
- Precondition: The number of elements in the input must be at
least `decimationFactor * (result.count - 1) + filter.count`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func downsample<T, U, V>(_ source: U, decimationFactor: Int, filter: T, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
FIR filtering with decimation and antialiasing; single-precision.
- Parameter source: Single-precision input vector.
- Parameter decimationFactor: The integer factor by which to divide the sampling rate.
- Parameter filter: Filter to use during the downsampling operation.
- Parameter result: Single-precision output vector.
- Precondition: The number of elements in the input must be at
least `decimationFactor * (result.count - 1) + filter.count`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func downsample<T, U>(_ source: U, decimationFactor: Int, filter: T) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
FIR filtering with decimation and antialiasing; double-precision.
- Parameter source: Double-precision input vector.
- Parameter decimationFactor: The integer factor by which to divide the sampling rate.
- Parameter filter: Filter to use during the downsampling operation.
- Returns: Double-precision output vector.
static func downsample<T, U>(_ source: U, decimationFactor: Int, filter: T) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
FIR filtering with decimation and antialiasing; single-precision.
- Parameter source: Single-precision input vector.
- Parameter decimationFactor: The integer factor by which to divide the sampling rate.
- Parameter filter: Filter to use during the downsampling operation.
- Returns: Single-precision output vector.
static func formWindow<V>(usingSequence sequence: vDSP.WindowSequence, result: inout V, isHalfWindow: Bool) where V : AccelerateMutableBuffer, V.Element == Double
Fills a supplied array with the specified window, double-precision.
- Parameter sequence: Specifies the window sequence.
- Parameter result: Output values.
- Parameter isHalfWindow: When true, creates a window with only the first `(N+1)/2` points.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func formWindow<V>(usingSequence sequence: vDSP.WindowSequence, result: inout V, isHalfWindow: Bool) where V : AccelerateMutableBuffer, V.Element == Float
Fills a supplied array with the specified window, single-precision.
- Parameter sequence: Specifies the window sequence.
- Parameter result: Output values.
- Parameter isHalfWindow: When true, creates a window with only the first `(N+1)/2` points.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static · iOS 13.0+
meanSquare
TypeScript
static meanSquare(vector: Array<number>): number
Swift declaration
static func meanSquare<U>(_ vector: U) -> Double where U : AccelerateBuffer, U.Element == Double
Returns the mean square of the supplied double-precision vector.
- Parameter vector: The input vector.
static · iOS 13.0+
meanSquare
TypeScript
static meanSquare62392(vector: Array<number>): number
Swift declaration
static func meanSquare<U>(_ vector: U) -> Float where U : AccelerateBuffer, U.Element == Float
Returns the mean square of the supplied single-precision vector.
- Parameter vector: The input vector.
static func stereoRamp<U>(withInitialValue initialValue: inout Double, multiplyingBy multiplierOne: U, _ multiplierTwo: U, increment: Double) -> (firstOutput: [Double], secondOutput: [Double]) where U : AccelerateBuffer, U.Element == Double
Returns two arraya containing monotonically monotonically incrementing or decrementing values, multiplying by a source vector, stereo, double-precision.
- Parameter initialValue: Specifies the initial value. Modified on return to hold the next value (including accumulated errors) so that the ramp function can be continued smoothly.
- Parameter multiplierOne: Input values multiplied by the ramp function.
- Parameter multiplierTwo: Input values multiplied by the ramp function.
- Parameter increment: The increment (or decrement if negative) between consecutive elements.
- Returns: A tuple of two arrays containing the specified ramps.
Omit the output parameters from the call. The result contains $ret and $out, with initialValue inside $out.
static func stereoRamp<U>(withInitialValue initialValue: inout Float, multiplyingBy multiplierOne: U, _ multiplierTwo: U, increment: Float) -> (firstOutput: [Float], secondOutput: [Float]) where U : AccelerateBuffer, U.Element == Float
Returns two arraya containing monotonically monotonically incrementing or decrementing values, multiplying by a source vector, stereo, single-precision.
- Parameter initialValue: Specifies the initial value. Modified on return to hold the next value (including accumulated errors) so that the ramp function can be continued smoothly.
- Parameter multiplierOne: Input values multiplied by the ramp function.
- Parameter multiplierTwo: Input values multiplied by the ramp function.
- Parameter increment: The increment (or decrement if negative) between consecutive elements.
- Returns: A tuple of two arrays containing the specified ramps.
Omit the output parameters from the call. The result contains $ret and $out, with initialValue inside $out.
static func invertedClip<U, V>(_ vector: U, to bounds: ClosedRange<Double>, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Populates `result` with the elements of `vector` inverted-clipped to the specified range. Double-precision.
- Parameter vector: Source vector.
- Parameter bounds: Clipping threshold.
- Parameter result: The clipped result.
This function performs the following operation where `A` is `vector`, `B` is `bounds.lowerBound`,
`C` is `bounds.upperBound`, and `D` is the inverted clip result:
```
for (int n = 0; n < N; ++n) {
if (A[n] <= *B || A[n] >= *C)
D[n] = A[n];
else if (A[n] < 0)
D[n] = *B;
else
D[n] = *C;
}
```
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func invertedClip<U, V>(_ vector: U, to bounds: ClosedRange<Float>, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Populates `result` with the elements of `vector` inverted-clipped to the specified range. Single-precision.
- Parameter vector: Source vector.
- Parameter bounds: Clipping threshold.
- Parameter result: The clipped result.
This function performs the following operation where `A` is `vector`, `B` is `bounds.lowerBound`,
`C` is `bounds.upperBound`, and `D` is the inverted clip result:
```
for (int n = 0; n < N; ++n) {
if (A[n] <= *B || A[n] >= *C)
D[n] = A[n];
else if (A[n] < 0)
D[n] = *B;
else
D[n] = *C;
}
```
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func invertedClip<U>(_ vector: U, to bounds: ClosedRange<Double>) -> [Double] where U : AccelerateBuffer, U.Element == Double
Returns the elements of `vector` inverted-clipped to the specified range. Double-precision.
- Parameter vector: Source vector.
- Parameter bounds: Clipping threshold.
- Returns: The clipped result.
This function performs the following operation where `A` is `vector`, `B` is `bounds.lowerBound`,
`C` is `bounds.upperBound`, and `D` is the inverted clip result:
```
for (int n = 0; n < N; ++n) {
if (A[n] <= *B || A[n] >= *C)
D[n] = A[n];
else if (A[n] < 0)
D[n] = *B;
else
D[n] = *C;
}
```
static func invertedClip<U>(_ vector: U, to bounds: ClosedRange<Float>) -> [Float] where U : AccelerateBuffer, U.Element == Float
Returns the elements of `vector` inverted-clipped to the specified range. Single-precision.
- Parameter vector: Source vector.
- Parameter bounds: Clipping threshold.
- Returns: The clipped result.
This function performs the following operation where `A` is `vector`, `B` is `bounds.lowerBound`,
`C` is `bounds.upperBound`, and `D` is the inverted clip result:
```
for (int n = 0; n < N; ++n) {
if (A[n] <= *B || A[n] >= *C)
D[n] = A[n];
else if (A[n] < 0)
D[n] = *B;
else
D[n] = *C;
}
```
static func signedSquare<U, V>(_ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Calculates the signed square of each element in `vector`, writing the result to `result`; double-precision.
- Parameter vector: Input values.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func signedSquare<U, V>(_ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Calculates the signed square of each element in `vector`, writing the result to `result`; single-precision.
- Parameter vector: Input values.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func signedSquare<U>(_ vector: U) -> [Double] where U : AccelerateBuffer, U.Element == Double
Returns an array containing the signed square of each element in `vector`, double-precision.
- Parameter vector: The input vector.
- Returns: The output vector.
static func signedSquare<U>(_ vector: U) -> [Float] where U : AccelerateBuffer, U.Element == Float
Returns an array containing the signed square of each element in `vector`, single-precision.
- Parameter vector: The input vector.
- Returns: The output vector.
static · iOS 13.0+
sumOfSquares
TypeScript
static sumOfSquares(vector: Array<number>): number
Swift declaration
static func sumOfSquares<U>(_ vector: U) -> Double where U : AccelerateBuffer, U.Element == Double
Returns vector sum of squares; double-precision.
- Parameter vector: The input vector.
- Returns: The sum of squares in `vector`.
static · iOS 13.0+
sumOfSquares
TypeScript
static sumOfSquares21210(vector: Array<number>): number
Swift declaration
static func sumOfSquares<U>(_ vector: U) -> Float where U : AccelerateBuffer, U.Element == Float
Returns vector sum of squares; single-precision.
- Parameter vector: The input vector.
- Returns: The sum of squares in `vector`.
static func formStereoRamp<U, V>(withInitialValue initialValue: inout Double, multiplyingBy multiplierOne: U, _ multiplierTwo: U, increment: Double, results resultOne: inout V, _ resultTwo: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Fills a supplied array with monotonically incrementing or decrementing values, multiplying by a source vector, stereo, double-precision.
- Parameter initialValue: Specifies the initial value. Modified on return to hold the next value (including accumulated errors) so that the ramp function can be continued smoothly.
- Parameter multiplierOne: Input values multiplied by the ramp function.
- Parameter multiplierTwo: Input values multiplied by the ramp function.
- Parameter increment: The increment (or decrement if negative) between consecutive elements.
- Parameter resultOne: Output values.
- Parameter resultTwo: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with initialValue, resultOne, resultTwo inside $out.
static func formStereoRamp<U, V>(withInitialValue initialValue: inout Float, multiplyingBy multiplierOne: U, _ multiplierTwo: U, increment: Float, results resultOne: inout V, _ resultTwo: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Fills a supplied array with monotonically incrementing or decrementing values, multiplying by a source vector, stereo, single-precision.
- Parameter initialValue: Specifies the initial value. Modified on return to hold the next value (including accumulated errors) so that the ramp function can be continued smoothly.
- Parameter multiplierOne: Input values multiplied by the ramp function.
- Parameter multiplierTwo: Input values multiplied by the ramp function.
- Parameter increment: The increment (or decrement if negative) between consecutive elements.
- Parameter resultOne: Output values.
- Parameter resultTwo: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with initialValue, resultOne, resultTwo inside $out.
static func indexOfMaximum<U>(_ vector: U) -> (UInt, Double) where U : AccelerateBuffer, U.Element == Double
Returns vector maximum with index; double-precision.
- Parameter vector: The input vector.
- Returns: A tuple containing the maximum value and its index.
static func indexOfMaximum<U>(_ vector: U) -> (UInt, Float) where U : AccelerateBuffer, U.Element == Float
Returns vector maximum with index; single-precision.
- Parameter vector: The input vector.
- Returns: A tuple containing the maximum value and its index.
static func indexOfMinimum<U>(_ vector: U) -> (UInt, Double) where U : AccelerateBuffer, U.Element == Double
Returns vector minimum with index; double-precision.
- Parameter vector: The input vector.
- Returns: A tuple containing the minimum value and its index.
static func indexOfMinimum<U>(_ vector: U) -> (UInt, Float) where U : AccelerateBuffer, U.Element == Float
Returns vector minimum with index; single-precision.
- Parameter vector: The input vector.
- Returns: A tuple containing the minimum value and its index.
static · iOS 13.0+
rootMeanSquare
TypeScript
static rootMeanSquare(vector: Array<number>): number
Swift declaration
static func rootMeanSquare<U>(_ vector: U) -> Double where U : AccelerateBuffer, U.Element == Double
Returns the root-mean-square of the supplied double-precision vector.
- Parameter vector: The input vector.
static · iOS 13.0+
rootMeanSquare
TypeScript
static rootMeanSquare81416(vector: Array<number>): number
Swift declaration
static func rootMeanSquare<U>(_ vector: U) -> Float where U : AccelerateBuffer, U.Element == Float
Returns the root-mean-square of the supplied single-precision vector.
- Parameter vector: The input vector.
static func convertElements<U, V>(of source: U, to destination: inout V, rounding: vDSP.RoundingMode) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Int8
Converts an array of double-precision floating-point values to signed 8-bit integer values using specified rounding.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V, rounding: vDSP.RoundingMode) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Int16
Converts an array of double-precision floating-point values to signed 16-bit integer values using specified rounding.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V, rounding: vDSP.RoundingMode) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Int32
Converts an array of double-precision floating-point values to signed 32-bit integer values using specified rounding.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V, rounding: vDSP.RoundingMode) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == UInt8
Converts an array of double-precision floating-point values to unsigned 8-bit integer values using specified rounding.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V, rounding: vDSP.RoundingMode) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == UInt16
Converts an array of double-precision floating-point values to unsigned 16-bit integer values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V, rounding: vDSP.RoundingMode) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == UInt32
Converts an array of double-precision floating-point values to unsigned 32-bit integer values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V, rounding: vDSP.RoundingMode) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Int8
Converts an array of single-precision floating-point values to signed 8-bit integer values using specified rounding.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V, rounding: vDSP.RoundingMode) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Int16
Converts an array of single-precision floating-point values to signed 16-bit integer values using specified rounding.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V, rounding: vDSP.RoundingMode) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Int32
Converts an array of single-precision floating-point values to signed 32-bit integer values using specified rounding.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V, rounding: vDSP.RoundingMode) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == UInt8
Converts an array of single-precision floating-point values to unsigned 8-bit integer values using specified rounding.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V, rounding: vDSP.RoundingMode) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == UInt16
Converts an array of single-precision floating-point values to unsigned 16-bit integer values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V, rounding: vDSP.RoundingMode) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == UInt32
Converts an array of single-precision floating-point values to unsigned 32-bit integer values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Float
Converts an array of double-precision floating-point values to single-precision floating-point values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Double
Converts an array of single-precision floating-point values to double-precision floating-point values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
@backDeployed(before: macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0)
static func convertElements<U, V>(of source: U, to destination: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float16
Converts an array of single-precision floating-point values to 16-bit floating-point values.
- Parameter source: The source vector.
- Parameter destination: The destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Int8, V.Element == Double
Converts an array of signed 8-bit integers to double-precision floating-point values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Int8, V.Element == Float
Converts an array of signed 8-bit integers to single-precision floating-point values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Int16, V.Element == Double
Converts an array of signed 16-bit integers to double-precision floating-point values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Int16, V.Element == Float
Converts an array of signed 16-bit integers to single-precision floating-point values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Int32, V.Element == Double
Converts an array of signed 32-bit integers to double-precision floating-point values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Int32, V.Element == Float
Converts an array of signed 32-bit integers to single-precision floating-point values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == UInt8, V.Element == Double
Converts an array of unsigned 8-bit integers to double-precision floating-point values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == UInt8, V.Element == Float
Converts an array of unsigned 8-bit integers to single-precision floating-point values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == UInt16, V.Element == Double
Converts an array of unsigned 16-bit integers to double-precision floating-point values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == UInt16, V.Element == Float
Converts an array of unsigned 16-bit integers to single-precision floating-point values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == UInt32, V.Element == Double
Converts an array of unsigned 32-bit integers to double-precision floating-point values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static func convertElements<U, V>(of source: U, to destination: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == UInt32, V.Element == Float
Converts an array of unsigned 32-bit integers to single-precision floating-point values.
- Parameter source: Source vector.
- Parameter destination: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
@backDeployed(before: macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0)
static func convertElements<U, V>(of source: U, to destination: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float16, V.Element == Float
Converts an array of 16-bit floating-point values to single-precision floating-point values.
- Parameter source: The source vector.
- Parameter destination: The destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.
static · iOS 13.0+
distanceSquared
TypeScript
static distanceSquared(pointA: Array<number>, pointB: Array<number>): number
Swift declaration
static func distanceSquared<U, V>(_ pointA: U, _ pointB: V) -> Double where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Returns the distance squared between two points in `n` dimensional space. Double-precision.
- Parameter pointA: First point in `n` dimensional space, where `n` is the collection count.
- Parameter pointB: Second point in `n` dimensional space, where `n` is the collection count.
- Returns: The distance squared between `pointA` and `pointB`.
static · iOS 13.0+
distanceSquared
TypeScript
static distanceSquared82425(pointA: Array<number>, pointB: Array<number>): number
Swift declaration
static func distanceSquared<U, V>(_ pointA: U, _ pointB: V) -> Float where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Returns the distance squared between two points in `n` dimensional space. Single-precision.
- Parameter pointA: First point in `n` dimensional space, where `n` is the collection count.
- Parameter pointB: Second point in `n` dimensional space, where `n` is the collection count.
- Returns: The distance squared between `pointA` and `pointB`.
static func powerToDecibels<U>(_ power: U, zeroReference: Double) -> [Double] where U : AccelerateBuffer, U.Element == Double
Converts power to decibels, double-precision.
- Parameter power: Source vector.
- Parameter zeroReference: Zero reference.
- Returns: `power` converted to decibels.
static func powerToDecibels<U>(_ power: U, zeroReference: Float) -> [Float] where U : AccelerateBuffer, U.Element == Float
Converts power to decibels, single-precision.
- Parameter power: Source vector.
- Parameter zeroReference: Zero reference.
- Returns: `power` converted to decibels.
static · iOS 13.0+
sumOfMagnitudes
TypeScript
static sumOfMagnitudes(vector: Array<number>): number
Swift declaration
static func sumOfMagnitudes<U>(_ vector: U) -> Double where U : AccelerateBuffer, U.Element == Double
Returns vector sum of magnitudes; double-precision.
- Parameter vector: The input vector.
- Returns: The sum of magnitudes in `vector`.
static · iOS 13.0+
sumOfMagnitudes
TypeScript
static sumOfMagnitudes54680(vector: Array<number>): number
Swift declaration
static func sumOfMagnitudes<U>(_ vector: U) -> Float where U : AccelerateBuffer, U.Element == Float
Returns vector sum of magnitudes; single-precision.
- Parameter vector: The input vector.
- Returns: The sum of magnitudes in `vector`.
static · iOS 13.0+
maximumMagnitude
TypeScript
static maximumMagnitude(vector: Array<number>): number
Swift declaration
static func maximumMagnitude<U>(_ vector: U) -> Double where U : AccelerateBuffer, U.Element == Double
Returns vector maximum magnitude; double-precision.
- Parameter vector: The input vector.
- Returns: The maximum magnitude in `vector`.
static · iOS 13.0+
maximumMagnitude
TypeScript
static maximumMagnitude13204(vector: Array<number>): number
Swift declaration
static func maximumMagnitude<U>(_ vector: U) -> Float where U : AccelerateBuffer, U.Element == Float
Returns vector maximum magnitude; single-precision.
- Parameter vector: The input vector.
- Returns: The maximum magnitude in `vector`.
static func negativeAbsolute<U, V>(_ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Populates `result` with the negative absolute values of `vector`,
double-precision.
- Parameter vector: The input vector.
- Parameter result: The output vector.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func negativeAbsolute<U, V>(_ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Populates `result` with the negative absolute values of `vector`,
single-precision.
- Parameter vector: The input vector.
- Parameter result: The output vector.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func negativeAbsolute<U>(_ vector: U) -> [Double] where U : AccelerateBuffer, U.Element == Double
Returns an array containing the negative absolute values of `vector`,
double-precision.
- Parameter vector: The input vector.
- Returns: The output vector.
static func negativeAbsolute<U>(_ vector: U) -> [Float] where U : AccelerateBuffer, U.Element == Float
Returns an array containing the negative absolute values of `vector`,
single-precision.
- Parameter vector: The input vector.
- Returns: The output vector.
static func squareMagnitudes<V>(_ splitComplex: DSPSplitComplex, result: inout V) where V : AccelerateMutableBuffer, V.Element == Float
Calculates the squared magnitude of each element in `vector`, writing the result to `result`; single-precision.
- Parameter splitComplex: Input values.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func linearInterpolate<T, U, V>(elementsOf vector: T, using controlVector: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Vector linear interpolation between neighboring elements; double-precision.
This function interpolates between the elements of `vector` using the following:
for (n = 0; n < N; ++n) {
b = trunc(B[n]);
a = B[n] - b;
C[n] = A[b] + a * (A[b+1] - A[b]);
}
Where `A` is the input vector, `B` is the control vector, and
`C` is the output vector.
- Parameter vector: Input values.
- Parameter controlVector: Vector that controls interpolation.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func linearInterpolate<T, U, V>(elementsOf vector: T, using controlVector: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Vector linear interpolation between neighboring elements; single-precision.
This function interpolates between the elements of `vector` using the following:
for (n = 0; n < N; ++n) {
b = trunc(B[n]);
a = B[n] - b;
C[n] = A[b] + a * (A[b+1] - A[b]);
}
Where `A` is the input vector, `B` is the control vector, and
`C` is the output vector.
- Parameter vector: Input values.
- Parameter controlVector: Vector that controls interpolation.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func linearInterpolate<T, U>(elementsOf vector: T, using controlVector: U) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Vector linear interpolation between neighboring elements; double-precision.
This function interpolates between the elements of `vector` using the following:
for (n = 0; n < N; ++n) {
b = trunc(B[n]);
a = B[n] - b;
C[n] = A[b] + a * (A[b+1] - A[b]);
}
Where `A` is the input vector, `B` is the control vector, and
`C` is the output vector.
- Parameter vector: Input values.
- Parameter controlVector: Vector that controls interpolation.
- Returns: Output values.
static func linearInterpolate<T, U>(elementsOf vector: T, using controlVector: U) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Vector linear interpolation between neighboring elements; single-precision.
This function interpolates between the elements of `vector` using the following:
for (n = 0; n < N; ++n) {
b = trunc(B[n]);
a = B[n] - b;
C[n] = A[b] + a * (A[b+1] - A[b]);
}
Where `A` is the input vector, `B` is the control vector, and
`C` is the output vector.
- Parameter vector: Input values.
- Parameter controlVector: Vector that controls interpolation.
- Returns: Output values.
static func linearInterpolate<T, U, V>(lookupTable: T, withOffsets offsets: U, scale: Double = 1, baseOffset: Double = 0, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Generates a double-precision vector by table lookup interpolation.
- Parameter lookupTable: The lookup table.
- Parameter offsets: The offsets into the lookup table.
- Parameter scale: The scale factor.
- Parameter baseOffset: The base offset.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func linearInterpolate<T, U, V>(lookupTable: T, withOffsets offsets: U, scale: Float = 1, baseOffset: Float = 0, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Generates a single-precision vector by table lookup interpolation.
- Parameter lookupTable: The lookup table.
- Parameter offsets: The offsets into the lookup table.
- Parameter scale: The scale factor.
- Parameter baseOffset: The base offset.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func linearInterpolate<T, U>(lookupTable: T, withOffsets offsets: U, scale: Double = 1, baseOffset: Double = 0) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Returns a double-precision vector generating by table lookup interpolation.
- Parameter lookupTable: The lookup table.
- Parameter offsets: The offsets into the lookup table.
- Parameter scale: The scale factor.
- Parameter baseOffset: The base offset.
- Returns: An array containing the result with a length of `offsets.count`.
static func linearInterpolate<T, U>(lookupTable: T, withOffsets offsets: U, scale: Float = 1, baseOffset: Float = 0) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Returns a single-precision vector generating by table lookup interpolation.
- Parameter lookupTable: The lookup table.
- Parameter offsets: The offsets into the lookup table.
- Parameter scale: The scale factor.
- Parameter baseOffset: The base offset.
- Returns: An array containing the result with a length of `offsets.count`.
static func linearInterpolate<T, U, V>(values: T, atIndices indices: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Fills a double-precision vector by extrapolation and interpolation.
- Parameter values: The values to interpolate, for example, intensities, magnitudes, or some other measurable quantities.
- Parameter indices: The monotonically increasing indices to `result` for the corresponding element in `values`.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func linearInterpolate<T, U, V>(values: T, atIndices indices: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Fills a single-precision vector by extrapolation and interpolation.
- Parameter values: The values to interpolate, for example, intensities, magnitudes, or some other measurable quantities.
- Parameter indices: The monotonically increasing indices to `result` for the corresponding element in `values`.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func linearInterpolate<T, U>(values: T, atIndices indices: U) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Returns a double-precision vector generating by extrapolation and interpolation.
- Parameter values: The values to interpolate, for example, intensities, magnitudes, or some other measurable quantities.
- Parameter indices: The monotonically increasing indices to the result for the corresponding element in `values`.
- Returns: An array containing the extrapolation and interpolation result with a length of `max(indices) + 1`.
static func linearInterpolate<T, U>(values: T, atIndices indices: U) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Returns a single-precision vector generating by extrapolation and interpolation.
- Parameter values: The values to interpolate, for example, intensities, magnitudes, or some other measurable quantities.
- Parameter indices: The monotonically increasing indices to the result for the corresponding element in `values`.
- Returns: An array containing the extrapolation and interpolation result with a length of `max(indices) + 1`.
static func linearInterpolate<T, U, V>(_ vectorA: T, _ vectorB: U, using interpolationConstant: Double, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Vector linear interpolation between vectors; double-precision.
- Parameter vectorA: The `A` in `D[n] = A[n] + C * (B[n] - A[n])`.
- Parameter vectorB: The `B` in `D[n] = A[n] + C * (B[n] - A[n])`.
- Parameter interpolationConstant: The `C` in `D[n] = A[n] + C * (B[n] - A[n])`.
- Parameter result: The `D` in `D[n] = A[n] + C * (B[n] - A[n])`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func linearInterpolate<T, U, V>(_ vectorA: T, _ vectorB: U, using interpolationConstant: Float, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Vector linear interpolation between vectors; single-precision.
- Parameter vectorA: The `A` in `D[n] = A[n] + C * (B[n] - A[n])`.
- Parameter vectorB: The `B` in `D[n] = A[n] + C * (B[n] - A[n])`.
- Parameter interpolationConstant: The `C` in `D[n] = A[n] + C * (B[n] - A[n])`.
- Parameter result: The `D` in `D[n] = A[n] + C * (B[n] - A[n])`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func linearInterpolate<T, U>(_ vectorA: T, _ vectorB: U, using interpolationConstant: Double) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Vector linear interpolation between vectors; double-precision.
- Parameter vectorA: The `A` in `D[n] = A[n] + C * (B[n] - A[n])`.
- Parameter vectorB: The `B` in `D[n] = A[n] + C * (B[n] - A[n])`.
- Parameter interpolationConstant: The `C` in `D[n] = A[n] + C * (B[n] - A[n])`.
- Returns: The `D` in `D[n] = A[n] + C * (B[n] - A[n])`.
static func linearInterpolate<T, U>(_ vectorA: T, _ vectorB: U, using interpolationConstant: Float) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Vector linear interpolation between vectors; single-precision.
- Parameter vectorA: The `A` in `D[n] = A[n] + C * (B[n] - A[n])`.
- Parameter vectorB: The `B` in `D[n] = A[n] + C * (B[n] - A[n])`.
- Parameter interpolationConstant: The `C` in `D[n] = A[n] + C * (B[n] - A[n])`.
- Returns: The `D` in `D[n] = A[n] + C * (B[n] - A[n])`.
static · iOS 13.0+
countZeroCrossings
TypeScript
static countZeroCrossings(vector: Array<number>): number
Swift declaration
static func countZeroCrossings<U>(_ vector: U) -> UInt where U : AccelerateBuffer, U.Element == Double
Returns the number of zero crossings in `vector`; double-precision.
- Parameter vector: Input values.
- Returns: The total number of transitions from positive to negative values and from negative to positive values.
static · iOS 13.0+
countZeroCrossings
TypeScript
static countZeroCrossings74377(vector: Array<number>): number
Swift declaration
static func countZeroCrossings<U>(_ vector: U) -> UInt where U : AccelerateBuffer, U.Element == Float
Returns the number of zero crossings in `vector`; single-precision.
- Parameter vector: Input values.
- Returns: The total number of transitions from positive to negative values and from negative to positive values.
static func rectangularToPolar<U>(_ rectangularCoordinates: U) -> [Float] where U : AccelerateBuffer, U.Element == Float
Rectangular to polar conversion, single-precision.
- Parameter rectangularCoordinates: Source vector, represented as consecutive x, y pairs.
- Returns: Polar coordinates, represented as consecutive rho, (radius) theta (angle in radians) pairs.
static · iOS 13.0+
sumAndSumOfSquares
TypeScript
static sumAndSumOfSquares(vector: Array<number>): { "elementsSum": number; "squaresSum": number }
Swift declaration
static func sumAndSumOfSquares<U>(_ vector: U) -> (elementsSum: Double, squaresSum: Double) where U : AccelerateBuffer, U.Element == Double
Returns sum of elements and sum of elements' squares; double-precision.
- Parameter vector: The input vector.
- Returns: The sum of values and the sum of squares in `vector`.
static · iOS 13.0+
sumAndSumOfSquares
TypeScript
static sumAndSumOfSquares50540(vector: Array<number>): { "elementsSum": number; "squaresSum": number }
Swift declaration
static func sumAndSumOfSquares<U>(_ vector: U) -> (elementsSum: Float, squaresSum: Float) where U : AccelerateBuffer, U.Element == Float
Returns sum of elements and sum of elements' squares; single-precision.
- Parameter vector: The input vector.
- Returns: The sum of values and the sum of squares in `vector`.
static func twoPoleTwoZeroFilter<U, V>(_ source: U, coefficients: (Double, Double, Double, Double, Double), result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Performs two-pole two-zero recursive filtering; double-precision.
- Parameter source: single-precision input vector.
- Parameter coefficients: Filter coefficients.
- Parameter result: single-precision output vector.
This function performs the following calculation:
for (n = 2; n < N+2; ++n)
C[n] =
+ A[n-0]*B[0]
+ A[n-1]*B[1]
+ A[n-2]*B[2]
- C[n-1]*B[3]
- C[n-2]*B[4];
Where `A` is the input vector, `B` is the filter coefficients, and `C`
is the output vector. Note that outputs start with C[2].
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func twoPoleTwoZeroFilter<U, V>(_ source: U, coefficients: (Float, Float, Float, Float, Float), result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Performs two-pole two-zero recursive filtering; single-precision.
- Parameter source: Single-precision input vector.
- Parameter coefficients: Filter coefficients.
- Parameter result: Single-precision output vector.
This function performs the following calculation:
for (n = 2; n < N+2; ++n)
C[n] =
+ A[n-0]*B[0]
+ A[n-1]*B[1]
+ A[n-2]*B[2]
- C[n-1]*B[3]
- C[n-2]*B[4];
Where `A` is the input vector, `B` is the filter coefficients, and `C`
is the output vector. Note that outputs start with C[2].
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func twoPoleTwoZeroFilter<U>(_ source: U, coefficients: (Double, Double, Double, Double, Double)) -> [Double] where U : AccelerateBuffer, U.Element == Double
Performs two-pole two-zero recursive filtering; double-precision.
- Parameter source: Double-precision input vector.
- Parameter coefficients: Filter coefficients.
- Returns: Double-precision output vector.
This function performs the following calculation:
for (n = 2; n < N+2; ++n)
C[n] =
+ A[n-0]*B[0]
+ A[n-1]*B[1]
+ A[n-2]*B[2]
- C[n-1]*B[3]
- C[n-2]*B[4];
Where `A` is the input vector, `B` is the filter coefficients, and `C`
is the output vector. Note that outputs start with C[2].
static func twoPoleTwoZeroFilter<U>(_ source: U, coefficients: (Float, Float, Float, Float, Float)) -> [Float] where U : AccelerateBuffer, U.Element == Float
Performs two-pole two-zero recursive filtering; single-precision.
- Parameter source: Single-precision input vector.
- Parameter coefficients: Filter coefficients.
- Returns: Single-precision output vector.
This function performs the following calculation:
for (n = 2; n < N+2; ++n)
C[n] =
+ A[n-0]*B[0]
+ A[n-1]*B[1]
+ A[n-2]*B[2]
- C[n-1]*B[3]
- C[n-2]*B[4];
Where `A` is the input vector, `B` is the filter coefficients, and `C`
is the output vector. Note that outputs start with C[2].
static func indexOfMaximumMagnitude<U>(_ vector: U) -> (UInt, Double) where U : AccelerateBuffer, U.Element == Double
Returns vector maximum magnitude with index; double-precision.
- Parameter vector: The input vector.
- Returns: A tuple containing the maximum magnitude and its index.
static func indexOfMaximumMagnitude<U>(_ vector: U) -> (UInt, Float) where U : AccelerateBuffer, U.Element == Float
Returns vector maximum magnitude with index; single-precision.
- Parameter vector: The input vector.
- Returns: A tuple containing the maximum magnitude and its index.
static func add<T, U, V>(multiplication multiplicationAB: (a: T, b: Double), multiplication multiplicationCD: (c: U, d: Double), result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Populates `result` with the elementwise sum of two elementwise
vector-scalar products, double-precision.
- Parameter multiplicationAB: the `a` and `b` in `e[i] = (a[i] * b) + (c[i] * d)`.
- Parameter multiplicationCD: the `c` and `d` in `e[i] = (a[i] * b) + (c[i] * d)`.
- Parameter result: the `e` in `e[i] = (a[i] * b) + (c[i] * d)`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func add<T, U, V>(multiplication multiplicationAB: (a: T, b: Float), multiplication multiplicationCD: (c: U, d: Float), result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Populates `result` with the elementwise sum of two elementwise
vector-scalar products, single-precision.
- Parameter multiplicationAB: the `a` and `b` in `e[i] = (a[i] * b) + (c[i] * d)`.
- Parameter multiplicationCD: the `c` and `d` in `e[i] = (a[i] * b) + (c[i] * d)`.
- Parameter result: the `e` in `e[i] = (a[i] * b) + (c[i] * d)`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func add<R, S, T, U, V>(multiplication multiplicationAB: (a: R, b: S), multiplication multiplicationCD: (c: T, d: U), result: inout V) where R : AccelerateBuffer, S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, R.Element == Double, S.Element == Double, T.Element == Double, U.Element == Double, V.Element == Double
Populates `result` with the elementwise sum of two elementwise
vector-vector products, double-precision.
- Parameter multiplicationAB: the `a` and `b` in `e[i] = (a[i] * b[i]) + (c[i] * d[i])`.
- Parameter multiplicationCD: the `c` and `d` in `e[i] = (a[i] * b[i]) + (c[i] * d[i])`.
- Parameter result: the `e` in `e[i] = (a[i] * b[i]) + (c[i] * d[i])`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func add<R, S, T, U, V>(multiplication multiplicationAB: (a: R, b: S), multiplication multiplicationCD: (c: T, d: U), result: inout V) where R : AccelerateBuffer, S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, R.Element == Float, S.Element == Float, T.Element == Float, U.Element == Float, V.Element == Float
Populates `result` with the elementwise sum of two elementwise
vector-vector products, single-precision.
- Parameter multiplicationAB: the `a` and `b` in `e[i] = (a[i] * b[i]) + (c[i] * d[i])`.
- Parameter multiplicationCD: the `c` and `d` in `e[i] = (a[i] * b[i]) + (c[i] * d[i])`.
- Parameter result: the `e` in `e[i] = (a[i] * b[i]) + (c[i] * d[i])`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static · iOS 13.0+
add
TypeScript
static addMultiplicationMultiplication(multiplicationAB: { "a": Array<number>; "b": number }, multiplicationCD: { "c": Array<number>; "d": number }): Array<number>
Swift declaration
static func add<T, U>(multiplication multiplicationAB: (a: T, b: Double), multiplication multiplicationCD: (c: U, d: Double)) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Returns the elementwise sum of two elementwise
vector-scalar products, double-precision.
- Parameter multiplicationAB: the `a` and `b` in `e[i] = (a[i] * b) + (c[i] * d)`.
- Parameter multiplicationCD: the `c` and `d` in `e[i] = (a[i] * b) + (c[i] * d)`.
- Returns: the `e` in `e[i] = (a[i] * b) + (c[i] * d)`.
static func add<R, S, T, U>(multiplication multiplicationAB: (a: R, b: S), multiplication multiplicationCD: (c: T, d: U)) -> [Double] where R : AccelerateBuffer, S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, R.Element == Double, S.Element == Double, T.Element == Double, U.Element == Double
Returns the elementwise sum of two elementwise
vector-vector products, single-precision.
- Parameter multiplicationAB: the `a` and `b` in `e[i] = (a[i] * b[i]) + (c[i] * d[i])`.
- Parameter multiplicationCD: the `c` and `d` in `e[i] = (a[i] * b[i]) + (c[i] * d[i])`.
- Returns: the `e` in `e[i] = (a[i] * b[i]) + (c[i] * d[i])`.
static · iOS 13.0+
add
TypeScript
static addMultiplicationMultiplication52620(multiplicationAB: { "a": Array<number>; "b": number }, multiplicationCD: { "c": Array<number>; "d": number }): Array<number>
Swift declaration
static func add<T, U>(multiplication multiplicationAB: (a: T, b: Float), multiplication multiplicationCD: (c: U, d: Float)) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Returns the elementwise sum of two elementwise
vector-scalar products, single-precision.
- Parameter multiplicationAB: the `a` and `b` in `e[i] = (a[i] * b) + (c[i] * d)`.
- Parameter multiplicationCD: the `c` and `d` in `e[i] = (a[i] * b) + (c[i] * d)`.
- Returns: the `e` in `e[i] = (a[i] * b) + (c[i] * d)`.
static func add<R, S, T, U>(multiplication multiplicationAB: (a: R, b: S), multiplication multiplicationCD: (c: T, d: U)) -> [Float] where R : AccelerateBuffer, S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, R.Element == Float, S.Element == Float, T.Element == Float, U.Element == Float
Returns the elementwise sum of two elementwise
vector-vector products, single-precision.
- Parameter multiplicationAB: the `a` and `b` in `e[i] = (a[i] * b[i]) + (c[i] * d[i])`.
- Parameter multiplicationCD: the `c` and `d` in `e[i] = (a[i] * b[i]) + (c[i] * d[i])`.
- Returns: the `e` in `e[i] = (a[i] * b[i]) + (c[i] * d[i])`.
static func add<U, V>(multiplication: (a: U, b: Double), _ scalar: Double, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Populates `result` with the elementwise sum of an elementwise
vector-scalar product and aa scalar value, double-precision.
- Parameter multiplication: the `a` and `b` in `d[n] = a[n]*b + c`.
- Parameter scalar: the `c`in `d[n] = a[n]*b + c`.
- Parameter result: the `e` in `d[n] = a[n]*b + c`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func add<T, U, V>(multiplication: (a: T, b: Double), _ vector: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Populates `result` with the elementwise sum of `vector`
and the product of the vector and scalar in `multiplication`,
double-precision.
- Parameter multiplication: the `a` and `b` in `d[i] = (a[i] * b) + c[i]`.
- Parameter vector: the `c` in `d[i] = (a[i] * b) + c[i]`.
- Parameter result: the `d` in `d[i] = (a[i] * b) + c[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func add<U, V>(multiplication: (a: U, b: Float), _ scalar: Float, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Populates `result` with the elementwise sum of an elementwise
vector-scalar product and aa scalar value, single-precision.
- Parameter multiplication: the `a` and `b` in `d[n] = a[n]*b + c`.
- Parameter scalar: the `c` in `d[n] = a[n]*b + c`.
- Parameter result: the `e` in `d[n] = a[n]*b + c`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func add<T, U, V>(multiplication: (a: T, b: Float), _ vector: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Populates `result` with the elementwise sum of `vector`
and the product of the vector and scalar in `multiplication`,
single-precision.
- Parameter multiplication: the `a` and `b` in `d[i] = (a[i] * b) + c[i]`.
- Parameter vector: the `c` in `d[i] = (a[i] * b) + c[i]`.
- Parameter result: the `d` in `d[i] = (a[i] * b) + c[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func add<T, U, V>(multiplication: (a: T, b: U), _ scalar: Double, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Populates `result` with the elementwise sum of `scalar`
and the product of the two vectors in `multiplication`,
double-precision.
- Parameter multiplication: the `a` and `b` in `d[i] = a[i]*b[i] + c`.
- Parameter scalar: the `c` in `d[i] = a[i]*b[i] + c`.
- Parameter result: the `d` in `d[i] = a[i]*b[i] + c`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func add<T, U, V>(multiplication: (a: T, b: U), _ scalar: Float, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Populates `result` with the elementwise sum of `scalar`
and the product of the two vectors in `multiplication`,
single-precision.
- Parameter multiplication: the `a` and `b` in `d[i] = a[i]*b[i] + c`.
- Parameter scalar: the `c` in `d[i] = a[i]*b[i] + c`.
- Parameter result: the `d` in `d[i] = a[i]*b[i] + c`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func add<S, T, U, V>(multiplication: (a: S, b: T), _ vector: U, result: inout V) where S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, S.Element == Double, T.Element == Double, U.Element == Double, V.Element == Double
Populates `result` with the elementwise sum of `vector`
and the product of the two vectors in `multiplication`,
double-precision.
- Parameter multiplication: the `a` and `b` in `d[i] = (a[i] * b[i]) + c[i]`.
- Parameter vector: the `c` in `d[i] = (a[i] * b[i]) + c[i]`.
- Parameter result: the `d` in `d[i] = (a[i] * b[i]) + c[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func add<S, T, U, V>(multiplication: (a: S, b: T), _ vector: U, result: inout V) where S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, S.Element == Float, T.Element == Float, U.Element == Float, V.Element == Float
Populates `result` with the elementwise sum of `vector`
and the product of the two vectors in `multiplication`,
single-precision.
- Parameter multiplication: the `a` and `b` in `d[i] = (a[i] * b[i]) + c[i]`.
- Parameter vector: the `c` in `d[i] = (a[i] * b[i]) + c[i]`.
- Parameter result: the `d` in `d[i] = (a[i] * b[i]) + c[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func add<U>(multiplication: (a: U, b: Double), _ scalar: Double) -> [Double] where U : AccelerateBuffer, U.Element == Double
Returns the elementwise sum of an elementwise
vector-scalar product and aa scalar value, double-precision.
- Parameter multiplication: the `a` and `b` in `d[n] = a[n]*b + c`.
- Parameter scalar: the `c` in `d[n] = a[n]*b + c`.
- Returns: the `e` in `d[n] = a[n]*b + c`.
static func add<T, U>(multiplication: (a: T, b: Double), _ vector: U) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Returns the elementwise sum of `vector`
and the product of the vector and scalar in `multiplication`,
double-precision.
- Parameter multiplication: the `a` and `b` in `d[i] = (a[i] * b) + c[i]`.
- Parameter vector: the `c` in `d[i] = (a[i] * b) + c[i]`.
- Returns: the `d` in `d[i] = (a[i] * b) + c[i]`.
static func add<T, U>(multiplication: (a: T, b: U), _ scalar: Double) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Returns the elementwise sum of `scalar`
and the product of the two vectors in `multiplication`,
double-precision.
- Parameter multiplication: the `a` and `b` in `d[i] = a[i]*b[i] + c`.
- Parameter scalar: the `c` in `d[i] = a[i]*b[i] + c`.
- Returns: the `d` in `d[i] = a[i]*b[i] + c`.
static func add<S, T, U>(multiplication: (a: S, b: T), _ vector: U) -> [Double] where S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, S.Element == Double, T.Element == Double, U.Element == Double
Returns the elementwise sum of `vector`
and the product of the two vectors in `multiplication`,
double-precision.
- Parameter multiplication: the `a` and `b` in `d[i] = (a[i] * b[i]) + c[i]`.
- Parameter vector: the `c` in `d[i] = (a[i] * b[i]) + c[i]`.
- Returns: the `d` in `d[i] = (a[i] * b[i]) + c[i]`.
static func add<U>(multiplication: (a: U, b: Float), _ scalar: Float) -> [Float] where U : AccelerateBuffer, U.Element == Float
Returns the elementwise sum of an elementwise
vector-scalar product and aa scalar value, single-precision.
- Parameter multiplication: the `a` and `b` in `d[n] = a[n]*b + c`.
- Parameter scalar: the `c` in `d[n] = a[n]*b + c`.
- Returns: the `e` in `d[n] = a[n]*b + c`.
static func add<T, U>(multiplication: (a: T, b: Float), _ vector: U) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Returns the elementwise sum of `vector`
and the product of the vector and scalar in `multiplication`,
single-precision.
- Parameter multiplication: the `a` and `b` in `d[i] = (a[i] * b) + c[i]`.
- Parameter vector: the `c` in `d[i] = (a[i] * b) + c[i]`.
- Returns: the `d` in `d[i] = (a[i] * b) + c[i]`.
static func add<T, U>(multiplication: (a: T, b: U), _ scalar: Float) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Returns the elementwise sum of `scalar`
and the product of the two vectors in `multiplication`,
single-precision.
- Parameter multiplication: the `a` and `b` in `d[i] = a[i]*b[i] + c`.
- Parameter scalar: the `c` in `d[i] = a[i]*b[i] + c`.
- Returns: the `d` in `d[i] = a[i]*b[i] + c`.
static func add<S, T, U>(multiplication: (a: S, b: T), _ vector: U) -> [Float] where S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, S.Element == Float, T.Element == Float, U.Element == Float
Returns the elementwise sum of `vector`
and the product of the two vectors in `multiplication`,
single-precision.
- Parameter multiplication: the `a` and `b` in `d[i] = (a[i] * b[i]) + c[i]`.
- Parameter vector: the `c` in `d[i] = (a[i] * b[i]) + c[i]`.
- Returns: the `d` in `d[i] = (a[i] * b[i]) + c[i]`.
Populates `result` with the elementwise sum of `splitComplexA` and `splitComplexB`,
single-precision.
- Parameter splitComplexA: the `a` in `c[i] = a[i] + b[i]`.
- Parameter splitComplexB: the `b` in `c[i] = a[i] + b[i]`.
- Parameter count: The number of elements to process.
- Parameter result: The `c` in `c[i] = a[i] + b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
Populates `result` with the elementwise sum of `splitComplexA` and `splitComplexB`,
double-precision.
- Parameter splitComplexA: the `a` in `c[i] = a[i] + b[i]`.
- Parameter splitComplexB: the `b` in `c[i] = a[i] + b[i]`.
- Parameter count: The number of elements to process.
- Parameter result: The `c` in `c[i] = a[i] + b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func add<U, V>(_ scalar: Double, _ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Populates `result` with the elementwise sum of `vector` and `scalar`,
double-precision.
- Parameter scalar: the `b` in `c[i] = a[i] + b`.
- Parameter vector: the `a` in `c[i] = a[i] + b`.
- Parameter result: The `c` in `c[i] = a[i] + b`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func add<U, V>(_ scalar: Float, _ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Populates `result` with the elementwise sum of `vector` and `scalar`,
single-precision.
- Parameter scalar: the `b` in `c[i] = a[i] + b`.
- Parameter vector: the `a` in `c[i] = a[i] + b`.
- Parameter result: The `c` in `c[i] = a[i] + b`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func add<T, U, V>(_ vectorA: T, _ vectorB: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Populates `result` with the elementwise sum of `vectorA` and `vectorB`,
double-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] + b[i]`.
- Parameter vectorB: the `b` in `c[i] = a[i] + b[i]`.
- Parameter result: The `c` in `c[i] = a[i] + b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func add<T, U, V>(_ vectorA: T, _ vectorB: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Populates `result` with the elementwise sum of `vectorA` and `vectorB`,
single-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] + b[i]`.
- Parameter vectorB: the `b` in `c[i] = a[i] + b[i]`.
- Parameter result: The `c` in `c[i] = a[i] + b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func add<U>(_ scalar: Double, _ vector: U) -> [Double] where U : AccelerateBuffer, U.Element == Double
Returns the elementwise sum of `vector` and `scalar`,
double-precision.
- Parameter scalar: the `b` in `c[i] = a[i] + b`.
- Parameter vector: the `a` in `c[i] = a[i] + b`.
- Returns: The `c` in `c[i] = a[i] + b`.
static func add<T, U>(_ vectorA: T, _ vectorB: U) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Returns the elementwise sum of `vectorA` and `vectorB`,
double-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] + b[i]`.
- Parameter vectorB: the `b` in `c[i] = a[i] + b[i]`.
- Returns: The `c` in `c[i] = a[i] + b[i]`.
static func add<U>(_ scalar: Float, _ vector: U) -> [Float] where U : AccelerateBuffer, U.Element == Float
Returns the elementwise sum of `vector` and `scalar`,
single-precision.
- Parameter scalar: the `b` in `c[i] = a[i] + b`.
- Parameter vector: the `a` in `c[i] = a[i] + b`.
- Returns: The `c` in `c[i] = a[i] + b`.
static func add<T, U>(_ vectorA: T, _ vectorB: U) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Returns the elementwise sum of `vectorA` and `vectorB`,
single-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] + b[i]`.
- Parameter vectorB: the `b` in `c[i] = a[i] + b[i]`.
- Returns: The `c` in `c[i] = a[i] + b[i]`.
static · iOS 13.0+
dot
TypeScript
static dot(vectorA: Array<number>, vectorB: Array<number>): number
Swift declaration
static func dot<T, U>(_ vectorA: T, _ vectorB: U) -> Double where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Returns the dot or scalar product of vectors A and B; double-precision.
- Parameter vectorA: Double-precision real input vector A.
- Parameter vectorB: Double-precision real input vector B.
- Returns: The dot product of vectors A and B.
static · iOS 13.0+
dot
TypeScript
static dot83314(vectorA: Array<number>, vectorB: Array<number>): number
Swift declaration
static func dot<T, U>(_ vectorA: T, _ vectorB: U) -> Float where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Returns the dot or scalar product of vectors A and B; single-precision.
- Parameter vectorA: Single-precision real input vector A.
- Parameter vectorB: Single-precision real input vector B.
- Returns: The dot product of vectors A and B.
static · iOS 13.0+
sum
TypeScript
static sum(vector: Array<number>): number
Swift declaration
static func sum<U>(_ vector: U) -> Double where U : AccelerateBuffer, U.Element == Double
Returns vector sum; double-precision.
- Parameter vector: The input vector.
- Returns: The sum of values in `vector`.
static · iOS 13.0+
sum
TypeScript
static sum3769(vector: Array<number>): number
Swift declaration
static func sum<U>(_ vector: U) -> Float where U : AccelerateBuffer, U.Element == Float
Returns vector sum; single-precision.
- Parameter vector: The input vector.
- Returns: The sum of values in `vector`.
static func clip<U, V>(_ vector: U, to bounds: ClosedRange<Double>, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Populates `result` with the elements of `vector` clipped to the specified range. Double-precision.
- Parameter vector: Source vector.
- Parameter bounds: Clipping threshold.
- Parameter result: The clipped result.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func clip<U, V>(_ vector: U, to bounds: ClosedRange<Float>, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Populates `result` with the elements of `vector` clipped to the specified range. Single-precision.
- Parameter vector: Source vector.
- Parameter bounds: Clipping threshold.
- Parameter result: The clipped result.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func clip<U>(_ vector: U, to bounds: ClosedRange<Double>) -> [Double] where U : AccelerateBuffer, U.Element == Double
Returns the elements of `vector` clipped to the specified range. Double-precision.
- Parameter vector: Source vector.
- Parameter bounds: Clipping threshold.
- Returns: The clipped result.
static func clip<U>(_ vector: U, to bounds: ClosedRange<Float>) -> [Float] where U : AccelerateBuffer, U.Element == Float
Returns the elements of `vector` clipped to the specified range. Single-precision.
- Parameter vector: Source vector.
- Parameter bounds: Clipping threshold.
- Returns: The clipped result.
static func ramp<U>(withInitialValue initialValue: inout Double, multiplyingBy vector: U, increment: Double) -> [Double] where U : AccelerateBuffer, U.Element == Double
Returns an array containing monotonically incrementing or decrementing values, multiplying by a source vector, double-precision.
- Parameter initialValue: Specifies the initial value. Modified on return to hold the next value (including accumulated errors) so that the ramp function can be continued smoothly.
- Parameter multiplyingBy: Input values multiplied by the ramp function.
- Parameter increment: The increment (or decrement if negative) between consecutive elements
- Parameter count: The number of elements in the array.
- Returns: An array containing the specified ramp.
Omit the output parameters from the call. The result contains $ret and $out, with initialValue inside $out.
static func ramp<U>(withInitialValue initialValue: inout Float, multiplyingBy vector: U, increment: Float) -> [Float] where U : AccelerateBuffer, U.Element == Float
Returns an array containing monotonically incrementing or decrementing values, multiplying by a source vector, single-precision.
- Parameter initialValue: Specifies the initial value. Modified on return to hold the next value (including accumulated errors) so that the ramp function can be continued smoothly.
- Parameter multiplyingBy: Input values multiplied by the ramp function.
- Parameter increment: The increment (or decrement if negative) between consecutive elements
- Parameter count: The number of elements in the array.
- Returns: An array containing the specified ramp.
Omit the output parameters from the call. The result contains $ret and $out, with initialValue inside $out.
Returns an array containing monotonically incrementing or decrementing values, double-precision.
- Parameter initialValue: Specifies the initial value.
- Parameter increment: The increment (or decrement if negative) between consecutive elements.
- Parameter count: The number of elements in the array.
- Returns: An array containing the specified ramp.
Returns an array containing monotonically incrementing or decrementing values, single-precision.
- Parameter initialValue: Specifies the initial value.
- Parameter increment: The increment (or decrement if negative) between consecutive elements.
- Parameter count: The number of elements in the array.
- Returns: An array containing the specified ramp.
Returns an array containing monotonically incrementing values within a specified range, double-precision.
- Parameter range: Specifies range of the ramp..
- Parameter count: The number of elements in the array.
- Returns: An array containing the specified ramp.
Returns an array containing monotonically incrementing values within a specified range, single-precision.
- Parameter range: Specifies range of the ramp..
- Parameter count: The number of elements in the array.
- Returns: An array containing the specified ramp.
Returns an array containing monotonically incrementing or decrementing values within a specified range, double-precision.
- Parameter start: The start value to use for the ramp.
- Parameter end: The end value to use for the ramp.
- Parameter count: The number of elements in the array.
- Returns: An array containing the specified ramp.
Returns an array containing monotonically incrementing or decrementing values within a specified range, single-precision.
- Parameter start: The start value to use for the ramp.
- Parameter end: The end value to use for the ramp.
- Parameter count: The number of elements in the array.
- Returns: An array containing the specified ramp.
static func hypot<T, U, V>(_ x: T, _ y: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Calculates the hypotenuse of right-angled triangles with sides that are the lengths of
corresponding elements in vectors `x` and `y`; double-precision.
- Parameter x: The `x` in `z[i] = sqrt(x[i]² + y[i]²)`.
- Parameter y: The `y` in `z[i] = sqrt(x[i]² + y[i]²)`.
- Parameter result: The `z` in `z[i] = sqrt(x[i]² + y[i]²)`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func hypot<T, U, V>(_ x: T, _ y: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Calculates the hypotenuse of right-angled triangles with sides that are the lengths of
corresponding elements in vectors `x` and `y`; single-precision.
- Parameter x: The `x` in `z[i] = sqrt(x[i]² + y[i]²)`.
- Parameter y: The `y` in `z[i] = sqrt(x[i]² + y[i]²)`.
- Parameter result: The `z` in `z[i] = sqrt(x[i]² + y[i]²)`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func hypot<U, V>(_ x: U, _ y: V) -> [Double] where U : AccelerateBuffer, V : AccelerateBuffer, U.Element == Double, V.Element == Double
Returns the hypotenuse of right-angled triangles with sides that are the lengths of
corresponding elements in vectors `x` and `y`; double-precision.
- Parameter x: The `x` in `z[i] = sqrt(x[i]² + y[i]²)`.
- Parameter y: The `y` in `z[i] = sqrt(x[i]² + y[i]²)`.
- Parameter result: The `z` in `z[i] = sqrt(x[i]² + y[i]²)`.
static func hypot<U, V>(_ x: U, _ y: V) -> [Float] where U : AccelerateBuffer, V : AccelerateBuffer, U.Element == Float, V.Element == Float
Returns the hypotenuse of right-angled triangles with sides that are the lengths of
corresponding elements in vectors `x` and `y`; single-precision.
- Parameter x: The `x` in `z[i] = sqrt(x[i]² + y[i]²)`.
- Parameter y: The `y` in `z[i] = sqrt(x[i]² + y[i]²)`.
- Parameter result: The `z` in `z[i] = sqrt(x[i]² + y[i]²)`.
static func limit<U, V>(_ vector: U, limit: Double, withOutputConstant outputConstant: Double, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Vector test limit; double-precision.
Compares values from source vector to `limit`. For inputs greater than or equal to `limit`, `outputConstant` is written to `result`. For inputs less than `limit`, the negated value of `outputConstant` is written to `result`.
- Parameter vector: Source vector.
- Parameter limit: Limit.
- Parameter x: Value written to result.
- Parameter result: The clipped result.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func limit<U, V>(_ vector: U, limit: Float, withOutputConstant outputConstant: Float, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Vector test limit; single-precision.
Compares values from source vector to `limit`. For inputs greater than or equal to `limit`, `outputConstant` is written to `result`. For inputs less than `limit`, the negated value of `outputConstant` is written to `result`.
- Parameter vector: Source vector.
- Parameter limit: Limit.
- Parameter x: Value written to result.
- Parameter result: The clipped result.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func limit<U>(_ vector: U, limit: Double, withOutputConstant outputConstant: Double) -> [Double] where U : AccelerateBuffer, U.Element == Double
Vector test limit; double-precision.
Compares values from source vector to `limit`. For inputs greater than or equal to `limit`, `outputConstant` is written to `result`. For inputs less than `limit`, the negated value of `outputConstant` is written to `result`.
- Parameter vector: Source vector.
- Parameter limit: Limit.
- Parameter x: Value written to result.
- Returns: The clipped result.
static func limit<U>(_ vector: U, limit: Float, withOutputConstant outputConstant: Float) -> [Float] where U : AccelerateBuffer, U.Element == Float
Vector test limit; single-precision.
Compares values from source vector to `limit`. For inputs greater than or equal to `limit`, `outputConstant` is written to `result`. For inputs less than `limit`, the negated value of `outputConstant` is written to `result`.
- Parameter vector: Source vector.
- Parameter limit: Limit.
- Parameter x: Value written to result.
- Returns: The clipped result.
static func phase<V>(_ splitComplex: DSPSplitComplex, result: inout V) where V : AccelerateMutableBuffer, V.Element == Float
Populates `result` with the elementwise phase values, in radians, of the supplied complex vector; single-precision.
- Parameter splitComplex: Single-precision complex input vector.
- Parameter result: Single-precision real output vector.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func phase<V>(_ splitComplex: DSPDoubleSplitComplex, result: inout V) where V : AccelerateMutableBuffer, V.Element == Double
Populates `result` with the elementwise phase values, in radians, of the supplied complex vector; double-precision.
- Parameter splitComplex: Double-precision complex input vector.
- Parameter result: Double-precision real output vector.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func trunc<U, V>(_ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Truncates to fraction each element in `vector`, writing the result to `result`; double-precision.
- Parameter vector: Input values.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func trunc<U, V>(_ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Truncates to fraction each element in `vector`, writing the result to `result`; single-precision.
- Parameter vector: Input values.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func trunc<U>(_ vector: U) -> [Double] where U : AccelerateBuffer, U.Element == Double
Returns an array containing each element in `vector` truncated to fraction, double-precision.
- Parameter vector: The input vector.
- Returns: The output vector.
static func trunc<U>(_ vector: U) -> [Float] where U : AccelerateBuffer, U.Element == Float
Returns an array containing each element in `vector` truncated to fraction, single-precision.
- Parameter vector: The input vector.
- Returns: The output vector.
Populates `result` with the elementwise division of `splitComplexA` and `splitComplexB`,
single-precision.
- Parameter splitComplexA: the `a` in `c[i] = a[i] / b[i]`.
- Parameter splitComplexB: the `b` in `c[i] = a[i] / b[i]`.
- Parameter count: The number of elements to process.
- Parameter result: The `c` in `c[i] = a[i] / b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
Populates `result` with the elementwise division of `splitComplexA` and `splitComplexB`,
single-precision.
- Parameter splitComplexA: the `a` in `c[i] = a[i] / b[i]`.
- Parameter splitComplexB: the `b` in `c[i] = a[i] / b[i]`.
- Parameter count: The number of elements to process.
- Parameter result: The `c` in `c[i] = a[i] / b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func divide<U>(_ splitComplex: DSPSplitComplex, by vector: U, result: inout DSPSplitComplex) where U : AccelerateBuffer, U.Element == Float
Populates `result` with the elementwise division of `splitComplex` and `vector`,
single-precision.
- Parameter splitComplex: the `a` in `c[i] = a[i] / b[i]`.
- Parameter vector: the `b` in `c[i] = a[i] / b[i]`.
- Parameter result: The `c` in `c[i] = a[i] / b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func divide<U>(_ splitComplex: DSPDoubleSplitComplex, by vector: U, result: inout DSPDoubleSplitComplex) where U : AccelerateBuffer, U.Element == Double
Populates `result` with the elementwise division of `splitComplex` and `vector`,
double-precision.
- Parameter splitComplex: the `a` in `c[i] = a[i] / b[i]`.
- Parameter vector: the `b` in `c[i] = a[i] / b[i]`.
- Parameter result: The `c` in `c[i] = a[i] / b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func divide<U, V>(_ scalar: Double, _ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Populates `result` with the elementwise division of `scalar` by `vector`,
double-precision.
- Parameter scalar: the `a` in `c[i] = a / b[i]`.
- Parameter vector: the `b` in `c[i] = a / b[i]`.
- Parameter result: The `c` in `c[i] = a / b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func divide<U, V>(_ scalar: Float, _ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Populates `result` with the elementwise division of `scalar` by `vector`,
single-precision.
- Parameter scalar: the `a` in `c[i] = a / b[i]`.
- Parameter vector: the `b` in `c[i] = a / b[i]`.
- Parameter result: The `c` in `c[i] = a / b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func divide<U, V>(_ vector: U, _ scalar: Double, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Populates `result` with the elementwise division of `vector` by `scalar`,
double-precision.
- Parameter vector: the `a` in `c[i] = a[i] / b`.
- Parameter scalar: the `b` in `c[i] = a[i] / b`.
- Parameter result: The `c` in `c[i] = a[i] / b`
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func divide<U, V>(_ vector: U, _ scalar: Float, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Populates `result` with the elementwise division of `vector` by `scalar`,
single-precision.
- Parameter vector: the `a` in `c[i] = a[i] / b`.
- Parameter scalar: the `b` in `c[i] = a[i] / b`.
- Parameter result: The `c` in `c[i] = a[i] / b`
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func divide<T, U, V>(_ vectorA: T, _ vectorB: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Populates `result` with the elementwise division of `vectorA` by `vectorB`,
double-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] / b[i]`.
- Parameter vectorB: the `b` in `c[i] = a[i] / b[i]`.
- Parameter result: The `c` in `c[i] = a[i] / b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func divide<T, U, V>(_ vectorA: T, _ vectorB: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Populates `result` with the elementwise division of `vectorA` by `vectorB`,
single-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] / b[i]`.
- Parameter vectorB: the `b` in `c[i] = a[i] / b[i]`.
- Parameter result: The `c` in `c[i] = a[i] / b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func divide<U>(_ scalar: Double, _ vector: U) -> [Double] where U : AccelerateBuffer, U.Element == Double
Returns the elementwise division of `scalar` by `vector`,
double-precision.
- Parameter scalar: the `a` in `c[i] = a / b[i]`.
- Parameter vector: the `b` in `c[i] = a / b[i]`.
- Returns: The `c` in `c[i] = a / b[i]`.
static func divide<U>(_ vector: U, _ scalar: Double) -> [Double] where U : AccelerateBuffer, U.Element == Double
Returns the elementwise division of `vector` by `scalar`,
double-precision.
- Parameter vector: the `a` in `c[i] = a[i] / b`.
- Parameter scalar: the `b` in `c[i] = a[i] / b`.
- Returns: The `c` in `c[i] = a[i] / b`
static func divide<T, U>(_ vectorA: T, _ vectorB: U) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Returns the elementwise division of `vectorA` by `vectorB`,
double-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] / b[i]`.
- Parameter vectorB: the `b` in `c[i] = a[i] / b[i]`.
- Returns: The `c` in `c[i] = a[i] / b[i]`.
static func divide<U>(_ scalar: Float, _ vector: U) -> [Float] where U : AccelerateBuffer, U.Element == Float
Returns the elementwise division of `scalar` by `vector`,
single-precision.
- Parameter scalar: the `a` in `c[i] = a / b[i]`.
- Parameter vector: the `b` in `c[i] = a / b[i]`.
- Returns: The `c` in `c[i] = a / b[i]`.
static func divide<U>(_ vector: U, _ scalar: Float) -> [Float] where U : AccelerateBuffer, U.Element == Float
Returns the elementwise division of `vector` by `scalar`,
single-precision.
- Parameter vector: the `a` in `c[i] = a[i] / b`.
- Parameter scalar: the `b` in `c[i] = a[i] / b`.
- Returns: The `c` in `c[i] = a[i] / b`
static func divide<T, U>(_ vectorA: T, _ vectorB: U) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Returns the elementwise division of `vectorA` by `vectorB`,
single-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] / b[i]`.
- Parameter vectorB: the `b` in `c[i] = a[i] / b[i]`.
- Returns: The `c` in `c[i] = a[i] / b[i]`.
static func gather<T, U, V>(_ vector: T, indices: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == UInt, V.Element == Double
Gathers double-precision vector based on values in an indices vector.
- Parameter vector: Source vector:
- Parameter indices: One-based indices to copy selected elements of source vector to sequential locations in result.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func gather<T, U, V>(_ vector: T, indices: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == UInt, V.Element == Float
Gathers single-precision vector based on values in an indices vector.
- Parameter vector: Source vector:
- Parameter indices: One-based indices to copy selected elements of source vector to sequential locations in result.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func gather<T, U>(_ vector: T, indices: U) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == UInt
Returns gathered double-precision vector based on values in an indices vector.
- Parameter vector: Source vector:
- Parameter indices: One-based indices to copy selected elements of source vector to sequential locations in result.
- Returns: Output values.
static func gather<T, U>(_ vector: T, indices: U) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == UInt
Returns gathered single-precision vector based on values in an indices vector.
- Parameter vector: Source vector:
- Parameter indices: One-based indices to copy selected elements of source vector to sequential locations in result.
- Returns: Output values.
static func square<U, V>(_ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Calculates the square of each element in `vector`, writing the result to `result`; double-precision.
- Parameter vector: Input values.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func square<U, V>(_ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Calculates the square of each element in `vector`, writing the result to `result`; single-precision.
- Parameter vector: Input values.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func square<U>(_ vector: U) -> [Double] where U : AccelerateBuffer, U.Element == Double
Returns an array containing the square of each element in `vector`, double-precision.
- Parameter vector: The input vector.
- Returns: The output vector.
static func window<T>(ofType: T.Type, usingSequence sequence: vDSP.WindowSequence, count: Int, isHalfWindow: Bool) -> [T] where T : vDSP_FloatingPointGeneratable
Creates an array containing the specified window.
- Parameter ofType: Specifies single- or double-precision.
- Parameter sequence: Specifies the window sequence.
- Parameter count: The number of elements in the array.
- Parameter isHalfWindow: When true, creates a window with only the first `(N+1)/2` points.
- Returns: An array containing the specified window.
static func convert<U, V>(power: U, toDecibels decibels: inout V, zeroReference: Double) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Converts power to decibels, double-precision.
- Parameter power: Source vector.
- Parameter decibels: Destination vector.
- Parameter zeroReference: Zero reference.
Omit the output parameters from the call. The result contains $ret and $out, with decibels inside $out.
static func convert<U, V>(power: U, toDecibels decibels: inout V, zeroReference: Float) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Converts power to decibels, single-precision.
- Parameter power: Source vector.
- Parameter decibels: Destination vector.
- Parameter zeroReference: Zero reference.
Omit the output parameters from the call. The result contains $ret and $out, with decibels inside $out.
static func maximum<U, V>(_ vectorA: U, _ vectorB: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Populates `result` with the greater of the corresponding values in `vectorA` and `vectorB`, double-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] > b[i] ? a[i] : b[i]`
- Parameter vectorB: the `b` in `c[i] = a[i] > b[i] ? a[i] : b[i]`
- Parameter result: the `c` in `c[i] = a[i] > b[i] ? a[i] : b[i]`
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func maximum<U, V>(_ vectorA: U, _ vectorB: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Populates `result` with the greater of the corresponding values in `vectorA` and `vectorB`, single-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] > b[i] ? a[i] : b[i]`
- Parameter vectorB: the `b` in `c[i] = a[i] > b[i] ? a[i] : b[i]`
- Parameter result: the `c` in `c[i] = a[i] > b[i] ? a[i] : b[i]`
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func maximum<U>(_ vectorA: U, _ vectorB: U) -> [Float] where U : AccelerateBuffer, U.Element == Float
Returns an array containing the greater of the corresponding values in `vectorA` and `vectorB`, single-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] > b[i] ? a[i] : b[i]`
- Parameter vectorB: the `b` in `c[i] = a[i] > b[i] ? a[i] : b[i]`
- Returns: the `c` in `c[i] = a[i] > b[i] ? a[i] : b[i]`
static · iOS 13.0+
maximum
TypeScript
static maximum31714(vector: Array<number>): number
Swift declaration
static func maximum<U>(_ vector: U) -> Double where U : AccelerateBuffer, U.Element == Double
Returns vector maximum value; single-precision.
- Parameter vector: The input vector.
- Returns: The maximum value in `vector`.
static · iOS 13.0+
maximum
TypeScript
static maximum43850(vector: Array<number>): number
Swift declaration
static func maximum<U>(_ vector: U) -> Float where U : AccelerateBuffer, U.Element == Float
Returns vector maximum value; single-precision.
- Parameter vector: The input vector.
- Returns: The maximum value in `vector`.
static func minimum<U, V>(_ vectorA: U, _ vectorB: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Populates `result` with the lesser of the corresponding values in `vectorA` and `vectorB`, double-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] < b[i] ? a[i] : b[i]`
- Parameter vectorB: the `b` in `c[i] = a[i] < b[i] ? a[i] : b[i]`
- Parameter result: the `c` in `c[i] = a[i] < b[i] ? a[i] : b[i]`
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func minimum<U, V>(_ vectorA: U, _ vectorB: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Populates `result` with the lesser of the corresponding values in `vectorA` and `vectorB`, single-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] < b[i] ? a[i] : b[i]`
- Parameter vectorB: the `b` in `c[i] = a[i] < b[i] ? a[i] : b[i]`
- Parameter result: the `c` in `c[i] = a[i] < b[i] ? a[i] : b[i]`
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func minimum<U>(_ vectorA: U, _ vectorB: U) -> [Double] where U : AccelerateBuffer, U.Element == Double
Returns an array containing the lesser of the corresponding values in `vectorA` and `vectorB`, double-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] < b[i] ? a[i] : b[i]`
- Parameter vectorB: the `b` in `c[i] = a[i] < b[i] ? a[i] : b[i]`
- Returns: the `c` in `c[i] = a[i] < b[i] ? a[i] : b[i]`
static func minimum<U>(_ vectorA: U, _ vectorB: U) -> [Float] where U : AccelerateBuffer, U.Element == Float
Returns an array containing the lesser of the corresponding values in `vectorA` and `vectorB`, single-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] < b[i] ? a[i] : b[i]`
- Parameter vectorB: the `b` in `c[i] = a[i] < b[i] ? a[i] : b[i]`
- Returns: the `c` in `c[i] = a[i] < b[i] ? a[i] : b[i]`
static · iOS 13.0+
minimum
TypeScript
static minimum5444(vector: Array<number>): number
Swift declaration
static func minimum<U>(_ vector: U) -> Double where U : AccelerateBuffer, U.Element == Double
Returns vector minimum value; single-precision.
- Parameter vector: The input vector.
- Returns: The minimum value in `vector`.
static · iOS 13.0+
minimum
TypeScript
static minimum43324(vector: Array<number>): number
Swift declaration
static func minimum<U>(_ vector: U) -> Float where U : AccelerateBuffer, U.Element == Float
Returns vector minimum value; single-precision.
- Parameter vector: The input vector.
- Returns: The minimum value in `vector`.
static func absolute<V>(_ vector: DSPSplitComplex, result: inout V) where V : AccelerateMutableBuffer, V.Element == Float
Populates `result` with the absolute values of `vector`,
single-precision.
- Parameter vector: The input vector.
- Parameter result: The output vector.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func absolute<V>(_ vector: DSPDoubleSplitComplex, result: inout V) where V : AccelerateMutableBuffer, V.Element == Double
Populates `result` with the absolute values of `vector`,
double-precision.
- Parameter vector: The input vector.
- Parameter result: The output vector.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func absolute<U, V>(_ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Populates `result` with the absolute values of `vector`,
double-precision.
- Parameter vector: The input vector.
- Parameter result: The output vector.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func absolute<U, V>(_ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Populates `result` with the absolute values of `vector`,
single-precision.
- Parameter vector: The input vector.
- Parameter result: The output vector.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func compress<T, U>(_ vector: T, gatingVector: U, nonZeroGatingCount: Int?) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Compresses double-precision vector based on nonzero values in a gating vector.
- Parameter vector: Source vector:
- Parameter gatingVector: Gating vector; for nonzero elements, corresponding elements of source vector are sequentially copied to output result.
- Parameter nonZeroGatingCount: The number of nonzero elements in `gatingVector`; set to `nil` to have vDSP calculate this value for you.
- Returns: Output values.
static func compress<T, U>(_ vector: T, gatingVector: U, nonZeroGatingCount: Int?) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Compresses single-precision vector based on nonzero values in a gating vector.
- Parameter vector: Source vector:
- Parameter gatingVector: Gating vector; for nonzero elements, corresponding elements of source vector are sequentially copied to output result.
- Parameter nonZeroGatingCount: The number of nonzero elements in `gatingVector`; set to `nil` to have vDSP calculate this value for you.
- Returns: Output values.
static func compress<T, U, V>(_ vector: T, gatingVector: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Compresses double-precision vector based on nonzero values in a gating vector.
- Parameter vector: Source vector:
- Parameter gatingVector: Gating vector; for nonzero elements, corresponding elements of source vector are sequentially copied to output result.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func compress<T, U, V>(_ vector: T, gatingVector: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Compresses single-precision vector based on nonzero values in a gating vector.
- Parameter vector: Source vector:
- Parameter gatingVector: Gating vector; for nonzero elements, corresponding elements of source vector are sequentially copied to output result.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func convolve<T, U, V>(_ vector: T, rowCount: Int, columnCount: Int, withKernel kernel: U, kernelRowCount: Int, kernelColumnCount: Int, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Two-dimensional convolution with arbitrarily sized kernel; double-precision.
- Parameter vector: The vector to convolve.
- Parameter rowCount: The number of rows in the input vector.
- Parameter columnCount: The number of columns in the input vector.
- Parameter kernel: Double-precision convolution kernel.
- Parameter kernelRowCount: The number of rows in the kernel.
- Parameter kernelColumnCount: The number of columns in the kernel.
- Parameter result: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func convolve<T, U, V>(_ vector: T, rowCount: Int, columnCount: Int, withKernel kernel: U, kernelRowCount: Int, kernelColumnCount: Int, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Two-dimensional convolution with arbitrarily sized kernel; single-precision.
- Parameter vector: The vector to convolve.
- Parameter rowCount: The number of rows in the input vector.
- Parameter columnCount: The number of columns in the input vector.
- Parameter kernel: Single-precision convolution kernel.
- Parameter kernelRowCount: The number of rows in the kernel.
- Parameter kernelColumnCount: The number of columns in the kernel.
- Parameter result: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func convolve<T, U>(_ vector: T, rowCount: Int, columnCount: Int, withKernel kernel: U, kernelRowCount: Int, kernelColumnCount: Int) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Returns two-dimensional convolution with arbitrarily sized kernel; double-precision.
- Parameter vector: The vector to convolve.
- Parameter rowCount: The number of rows in the input vector.
- Parameter columnCount: The number of columns in the input vector.
- Parameter kernel: Single-precision convolution kernel.
- Parameter kernelRowCount: The number of rows in the kernel.
- Parameter kernelColumnCount: The number of columns in the kernel.
- Returns: Convolution result.
static func convolve<T, U>(_ vector: T, rowCount: Int, columnCount: Int, withKernel kernel: U, kernelRowCount: Int, kernelColumnCount: Int) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Returns two-dimensional convolution with arbitrarily sized kernel; single-precision.
- Parameter vector: The vector to convolve.
- Parameter rowCount: The number of rows in the input vector.
- Parameter columnCount: The number of columns in the input vector.
- Parameter kernel: Single-precision convolution kernel.
- Parameter kernelRowCount: The number of rows in the kernel.
- Parameter kernelColumnCount: The number of columns in the kernel.
- Returns: Convolution result.
static func convolve<T, U, V>(_ vector: T, rowCount: Int, columnCount: Int, with3x3Kernel kernel: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Two-dimensional convolution with a 3 x 3 kernel; double-precision.
- Parameter vector: The vector to convolve.
- Parameter rowCount: The number of rows in the input vector.
- Parameter columnCount: The number of columns in the input vector.
- Parameter kernel: Double-precision 3x3 convolution kernel.
- Parameter result: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func convolve<T, U, V>(_ vector: T, rowCount: Int, columnCount: Int, with3x3Kernel kernel: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Two-dimensional convolution with a 3 x 3 kernel; single-precision.
- Parameter vector: The vector to convolve.
- Parameter rowCount: The number of rows in the input vector.
- Parameter columnCount: The number of columns in the input vector.
- Parameter kernel: Single-precision 3x3 convolution kernel.
- Parameter result: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func convolve<T, U>(_ vector: T, rowCount: Int, columnCount: Int, with3x3Kernel kernel: U) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Returns two-dimensional convolution with a 3 x 3 kernel; double-precision.
- Parameter vector: The vector to convolve.
- Parameter rowCount: The number of rows in the input vector.
- Parameter columnCount: The number of columns in the input vector.
- Parameter kernel: Double-precision 3x3 convolution kernel.
- Returns: Convolution result.
static func convolve<T, U>(_ vector: T, rowCount: Int, columnCount: Int, with3x3Kernel kernel: U) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Returns two-dimensional convolution with a 3 x 3 kernel; single-precision.
- Parameter vector: The vector to convolve.
- Parameter rowCount: The number of rows in the input vector.
- Parameter columnCount: The number of columns in the input vector.
- Parameter kernel: Single-precision 3x3 convolution kernel.
- Returns: Convolution result.
static func convolve<T, U, V>(_ vector: T, rowCount: Int, columnCount: Int, with5x5Kernel kernel: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Two-dimensional convolution with a 5 x 5 kernel; double-precision.
- Parameter vector: The vector to convolve.
- Parameter rowCount: The number of rows in the input vector.
- Parameter columnCount: The number of columns in the input vector.
- Parameter kernel: Double-precision 5x5 convolution kernel.
- Parameter result: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func convolve<T, U, V>(_ vector: T, rowCount: Int, columnCount: Int, with5x5Kernel kernel: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Two-dimensional convolution with a 5 x 5 kernel; single-precision.
- Parameter vector: The vector to convolve.
- Parameter rowCount: The number of rows in the input vector.
- Parameter columnCount: The number of columns in the input vector.
- Parameter kernel: Single-precision 5x5 convolution kernel.
- Parameter result: Destination vector.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func convolve<T, U>(_ vector: T, rowCount: Int, columnCount: Int, with5x5Kernel kernel: U) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Returns two-dimensional convolution with a 5 x 5 kernel; double-precision.
- Parameter vector: The vector to convolve.
- Parameter rowCount: The number of rows in the input vector.
- Parameter columnCount: The number of columns in the input vector.
- Parameter kernel: Double-precision 3x3 convolution kernel.
- Returns: Convolution result.
static func convolve<T, U>(_ vector: T, rowCount: Int, columnCount: Int, with5x5Kernel kernel: U) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Returns two-dimensional convolution with a 5 x 5 kernel; single-precision.
- Parameter vector: The vector to convolve.
- Parameter rowCount: The number of rows in the input vector.
- Parameter columnCount: The number of columns in the input vector.
- Parameter kernel: Single-precision 5x5 convolution kernel.
- Returns: Convolution result.
static func formRamp<U, V>(withInitialValue initialValue: inout Double, multiplyingBy vector: U, increment: Double, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Fills a supplied array with monotonically incrementing or decrementing values, multiplying by a source vector, double-precision.
- Parameter initialValue: Specifies the initial value. Modified on return to hold the next value (including accumulated errors) so that the ramp function can be continued smoothly.
- Parameter multiplyingBy: Input values multiplied by the ramp function.
- Parameter increment: The increment (or decrement if negative) between consecutive elements.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with initialValue, result inside $out.
static func formRamp<U, V>(withInitialValue initialValue: inout Float, multiplyingBy vector: U, increment: Float, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Fills a supplied array with monotonically incrementing or decrementing values, multiplying by a source vector, single-precision.
- Parameter initialValue: Specifies the initial value. Modified on return to hold the next value (including accumulated errors) so that the ramp function can be continued smoothly.
- Parameter multiplyingBy: Input values multiplied by the ramp function.
- Parameter increment: The increment (or decrement if negative) between consecutive elements.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with initialValue, result inside $out.
static func formRamp<V>(withInitialValue initialValue: Double, increment: Double, result: inout V) where V : AccelerateMutableBuffer, V.Element == Double
Fills a supplied array with monotonically incrementing or decrementing values, double-precision.
- Parameter initialValue: Specifies the initial value.
- Parameter increment: The increment (or decrement if negative) between consecutive elements.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func formRamp<V>(withInitialValue initialValue: Float, increment: Float, result: inout V) where V : AccelerateMutableBuffer, V.Element == Float
Fills a supplied array with monotonically incrementing or decrementing values, single-precision.
- Parameter initialValue: Specifies the initial value.
- Parameter increment: The increment (or decrement if negative) between consecutive elements.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func formRamp<V>(in range: ClosedRange<Double>, result: inout V) where V : AccelerateMutableBuffer, V.Element == Double
Fills a supplied array with monotonically incrementing values within a specified range, double-precision.
- Parameter range: Specifies range of the ramp.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func formRamp<V>(in range: ClosedRange<Float>, result: inout V) where V : AccelerateMutableBuffer, V.Element == Float
Fills a supplied array with monotonically incrementing values within a specified range, single-precision.
- Parameter range: Specifies range of the ramp.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func formRamp<V>(from start: Double, through end: Double, result: inout V) where V : AccelerateMutableBuffer, V.Element == Double
Fills a supplied array with monotonically incrementing or decrementing values within a specified range, double-precision.
- Parameter start: The start value to use for the ramp.
- Parameter end: The end value to use for the ramp.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func formRamp<V>(from start: Float, through end: Float, result: inout V) where V : AccelerateMutableBuffer, V.Element == Float
Fills a supplied array with monotonically incrementing or decrementing values within a specified range, single-precision.
- Parameter start: The start value to use for the ramp.
- Parameter end: The end value to use for the ramp.
- Parameter result: Output values.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<T, U, V>(subtraction: (a: T, b: U), _ scalar: Double, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Populates `result` with the elementwise product of the difference of the vectors in `subtraction` and `scalar`,
double-precision.
- Parameter subtraction: the `a` and `b` in `d[i] = (a[i] - b[i]) * c`.
- Parameter scalar: the `c` in `d[i] = `(a[i] - b[i]) * c`.
- Parameter result: The `d` in `d[i] = `(a[i] - b[i]) * c`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<T, U, V>(subtraction: (a: T, b: U), _ scalar: Float, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Populates `result` with the elementwise product of the difference of the vectors in `subtraction` and `scalar`,
single-precision.
- Parameter subtraction: the `a` and `b` in `d[i] = (a[i] - b[i]) * c`.
- Parameter scalar: the `c` in `d[i] = `(a[i] - b[i]) * c`.
- Parameter result: The `d` in `d[i] = `(a[i] - b[i]) * c`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<S, T, U, V>(subtraction: (a: S, b: T), _ vector: U, result: inout V) where S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, S.Element == Double, T.Element == Double, U.Element == Double, V.Element == Double
Populates `result` with the elementwise product of the difference of the vectors in `subtraction` and `vector`,
double-precision.
- Parameter subtraction: the `a` and `b` in `d[i] = (a[i] - b[i]) * c[i]`.
- Parameter vector: the `c` in `d[i] = `(a[i] - b[i]) * c[i]`.
- Parameter result: The `d` in `d[i] = `(a[i] - b[i]) * c[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<S, T, U, V>(subtraction: (a: S, b: T), _ vector: U, result: inout V) where S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, S.Element == Float, T.Element == Float, U.Element == Float, V.Element == Float
Populates `result` with the elementwise product of the difference of the vectors in `subtraction` and `vector`,
single-precision.
- Parameter subtraction: the `a` and `b` in `d[i] = (a[i] - b[i]) * c[i]`.
- Parameter vector: the `c` in `d[i] = `(a[i] - b[i]) * c[i]`.
- Parameter result: The `d` in `d[i] = `(a[i] - b[i]) * c[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<T, U>(subtraction: (a: T, b: U), _ scalar: Double) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Returns the elementwise product of the difference of the vectors in `subtraction` and `scalar`,
double-precision.
- Parameter subtraction: the `a` and `b` in `d[i] = (a[i] - b[i]) * c`.
- Parameter scalar: the `c` in `d[i] = `(a[i] - b[i]) * c`.
- Returns: The `d` in `d[i] = `(a[i] - b[i]) * c`.
static func multiply<S, T, U>(subtraction: (a: S, b: T), _ vector: U) -> [Double] where S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, S.Element == Double, T.Element == Double, U.Element == Double
Returns the elementwise product of the difference of the vectors in `subtraction` and `vector`,
double-precision.
- Parameter subtraction: the `a` and `b` in `d[i] = (a[i] - b[i]) * c[i]`.
- Parameter vector: the `c` in `d[i] = `(a[i] - b[i]) * c[i]`.
- Returns: The `d` in `d[i] = `(a[i] - b[i]) * c[i]`.
static func multiply<T, U>(subtraction: (a: T, b: U), _ scalar: Float) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Returns the elementwise product of the difference of the vectors in `subtraction` and `scalar`,
single-precision.
- Parameter subtraction: the `a` and `b` in `d[i] = (a[i] - b[i]) * c`.
- Parameter scalar: the `c` in `d[i] = `(a[i] - b[i]) * c`.
- Returns: The `d` in `d[i] = `(a[i] - b[i]) * c`.
static func multiply<S, T, U>(subtraction: (a: S, b: T), _ vector: U) -> [Float] where S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, S.Element == Float, T.Element == Float, U.Element == Float
Returns the elementwise product of the difference of the vectors in `subtraction` and `vector`,
single-precision.
- Parameter subtraction: the `a` and `b` in `d[i] = (a[i] - b[i]) * c[i]`.
- Parameter vector: the `c` in `d[i] = `(a[i] - b[i]) * c[i]`.
- Returns: The `d` in `d[i] = `(a[i] - b[i]) * c[i]`.
static func multiply<R, S, T, U, V>(addition: (a: R, b: S), subtraction: (c: T, d: U), result: inout V) where R : AccelerateBuffer, S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, R.Element == Double, S.Element == Double, T.Element == Double, U.Element == Double, V.Element == Double
Populates `result` with the elementwise product of an elementwise
vector-vector sum and an elementwise vector-vector sum, double-precision.
- Parameter addition: the `a` and `b` in `e[i] = (a[i] + b[i]) * (c[i] - d[i])`.
- Parameter subtraction: the `c` and `d` in `e[i] = (a[i] + b[i]) * (c[i] - d[i])`.
- Parameter result: the `e` in `e[i] = (a[i] + b[i]) * (c[i] - d[i])`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<R, S, T, U, V>(addition: (a: R, b: S), subtraction: (c: T, d: U), result: inout V) where R : AccelerateBuffer, S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, R.Element == Float, S.Element == Float, T.Element == Float, U.Element == Float, V.Element == Float
Populates `result` with the elementwise product of an elementwise
vector-vector sum and an elementwise vector-vector sum, single-precision.
- Parameter addition: the `a` and `b` in `e[i] = (a[i] + b[i]) * (c[i] - d[i])`.
- Parameter subtraction: the `c` and `d` in `e[i] = (a[i] + b[i]) * (c[i] - d[i])`.
- Parameter result: the `e` in `e[i] = (a[i] + b[i]) * (c[i] - d[i])`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<R, S, T, U>(addition: (a: R, b: S), subtraction: (c: T, d: U)) -> [Double] where R : AccelerateBuffer, S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, R.Element == Double, S.Element == Double, T.Element == Double, U.Element == Double
Returns the elementwise product of an elementwise
vector-vector sum and an elementwise vector-vector sum, double-precision.
- Parameter addition: the `a` and `b` in `e[i] = (a[i] + b[i]) * (c[i] - d[i])`.
- Parameter subtraction: the `c` and `d` in `e[i] = (a[i] + b[i]) * (c[i] - d[i])`.
- Returns: the `e` in `e[i] = (a[i] + b[i]) * (c[i] - d[i])`.
static func multiply<R, S, T, U>(addition: (a: R, b: S), subtraction: (c: T, d: U)) -> [Float] where R : AccelerateBuffer, S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, R.Element == Float, S.Element == Float, T.Element == Float, U.Element == Float
Returns the elementwise product of an elementwise
vector-vector sum and an elementwise vector-vector sum, single-precision.
- Parameter addition: the `a` and `b` in `e[i] = (a[i] + b[i]) * (c[i] - d[i])`.
- Parameter subtraction: the `c` and `d` in `e[i] = (a[i] + b[i]) * (c[i] - d[i])`.
- Returns: the `e` in `e[i] = (a[i] + b[i]) * (c[i] - d[i])`.
static func multiply<T, U, V>(addition: (a: T, b: U), _ scalar: Double, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Populates `result` with the elementwise product of the sum of the vectors in `addition` and `scalar`,
double-precision.
- Parameter addition: the `a` and `b` in `d[i] = (a[i] + b[i]) * c`.
- Parameter scalar: the `c` in `d[i] = `(a[i] + b[i]) * c`.
- Parameter result: The `d` in `d[i] = `(a[i] + b[i]) * c`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<T, U, V>(addition: (a: T, b: U), _ scalar: Float, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Populates `result` with the elementwise product of the sum of the vectors in `addition` and `scalar`,
single-precision.
- Parameter addition: the `a` and `b` in `d[i] = (a[i] + b[i]) * c`.
- Parameter scalar: the `c` in `d[i] = `(a[i] + b[i]) * c`.
- Parameter result: The `d` in `d[i] = `(a[i] + b[i]) * c`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<S, T, U, V>(addition: (a: S, b: T), _ vector: U, result: inout V) where S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, S.Element == Double, T.Element == Double, U.Element == Double, V.Element == Double
Populates `result` with the elementwise product of the sum of the vectors in `addition` and `vector`,
double-precision.
- Parameter addition: the `a` and `b` in `d[i] = (a[i] + b[i]) * c[i]`.
- Parameter vector: the `c` in `d[i] = (a[i] + b[i]) * c[i]`.
- Parameter result: The `d` in `d[i] = (a[i] + b[i]) * c[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<S, T, U, V>(addition: (a: S, b: T), _ vector: U, result: inout V) where S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, S.Element == Float, T.Element == Float, U.Element == Float, V.Element == Float
Populates `result` with the elementwise product of the sum of the vectors in `addition` and `vector`,
single-precision.
- Parameter addition: the `a` and `b` in `d[i] = (a[i] + b[i]) * c[i]`.
- Parameter vector: the `c` in `d[i] = (a[i] + b[i]) * c[i]`.
- Parameter result: The `d` in `d[i] = (a[i] + b[i]) * c[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<T, U>(addition: (a: T, b: U), _ scalar: Double) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Returns the elementwise product of the sum of the vectors in `addition` and `scalar`,
double-precision.
- Parameter addition: the `a` and `b` in `d[i] = (a[i] + b[i]) * c`.
- Parameter scalar: the `c` in `d[i] = `(a[i] + b[i]) * c`.
- Returns: The `d` in `d[i] = `(a[i] + b[i]) * c`.
static func multiply<S, T, U>(addition: (a: S, b: T), _ vector: U) -> [Double] where S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, S.Element == Double, T.Element == Double, U.Element == Double
Returns the elementwise product of the sum of the vectors in `addition` and `vector`,
double-precision.
- Parameter addition: the `a` and `b` in `d[i] = (a[i] + b[i]) * c[i]`.
- Parameter vector: the `c` in `d[i] = (a[i] + b[i]) * c[i]`.
- Returns: The `d` in `d[i] = (a[i] + b[i]) * c[i]`.
static func multiply<T, U>(addition: (a: T, b: U), _ scalar: Float) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Returns the elementwise product of the sum of the vectors in `addition` and `scalar`,
single-precision.
- Parameter addition: the `a` and `b` in `d[i] = (a[i] + b[i]) * c`.
- Parameter scalar: the `c` in `d[i] = `(a[i] + b[i]) * c`.
- Returns: The `d` in `d[i] = `(a[i] + b[i]) * c`.
static func multiply<S, T, U>(addition: (a: S, b: T), _ vector: U) -> [Float] where S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, S.Element == Float, T.Element == Float, U.Element == Float
Returns the elementwise product of the sum of the vectors in `addition` and `vector`,
single-precision.
- Parameter addition: the `a` and `b` in `d[i] = (a[i] + b[i]) * c[i]`.
- Parameter vector: the `c` in `d[i] = (a[i] + b[i]) * c[i]`.
- Returns: The `d` in `d[i] = (a[i] + b[i]) * c[i]`.
Populates `result` with the elementwise product of `splitComplexA` and `splitComplexB`,
optionally conjugating one of them; single-precision
- Parameter splitComplexA: The `a` in `c[i] = a[i] * b[i]` or `c[i] = conj(a[i]) * b[i]`.
- Parameter splitComplexB: The `b` in `c[i] = a[i] * b[i]` or `c[i] = conj(a[i]) * b[i]`.
- Parameter count: The number of elements to process.
- Parameter useConjugate: Specifies whether to multiply the complex conjugates of `splitComplexA`.
- Parameter result: The `c` in `c[i] = a[i] * b[i]` or `c[i] = conj(a[i]) * b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
Populates `result` with the elementwise product of `splitComplexA` and `splitComplexB`,
optionally conjugating one of them; double-precision
- Parameter splitComplexA: The `a` in `c[i] = a[i] * b[i]` or `c[i] = conj(a[i]) * b[i]`.
- Parameter splitComplexB: The `b` in `c[i] = a[i] * b[i]` or `c[i] = conj(a[i]) * b[i]`.
- Parameter count: The number of elements to process.
- Parameter useConjugate: Specifies whether to multiply the complex conjugates of `splitComplexA`.
- Parameter result: The `c` in `c[i] = a[i] * b[i]` or `c[i] = conj(a[i]) * b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<U>(_ splitComplex: DSPSplitComplex, by vector: U, result: inout DSPSplitComplex) where U : AccelerateBuffer, U.Element == Float
Populates `result` with the elementwise product of `splitComplex` and `vector`,
single-precision.
- Parameter splitComplex: the `a` in `c[i] = a[i] * b[i]`.
- Parameter vector: the `b` in `c[i] = a[i] * b[i]`.
- Parameter result: The `c` in `c[i] = a[i] * b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<U>(_ splitComplex: DSPDoubleSplitComplex, by vector: U, result: inout DSPDoubleSplitComplex) where U : AccelerateBuffer, U.Element == Double
Populates `result` with the elementwise product of `splitComplex` and `vector`,
double-precision.
- Parameter splitComplex: the `a` in `c[i] = a[i] * b[i]`.
- Parameter vector: the `b` in `c[i] = a[i] * b[i]`.
- Parameter result: The `c` in `c[i] = a[i] * b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<U, V>(_ scalar: Double, _ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Populates `result` with the elementwise product of `vector` and `scalar`,
double-precision.
- Parameter vector: the `a` in `c[i] = a[i] * b`.
- Parameter scalar: the `b` in `c[i] = a[i] * b`.
- Parameter result: The `c` in `c[i] = a[i] * b`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<U, V>(_ scalar: Float, _ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Populates `result` with the elementwise product of `vector` and `scalar
single-precision.
- Parameter vector: the `a` in `c[i] = a[i] * b`.
- Parameter scalar: the `b` in `c[i] = a[i] * b`.
- Parameter result: The `c` in `c[i] = a[i] * b`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<T, U, V>(_ vectorA: T, _ vectorB: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Populates `result` with the elementwise product of `vectorA` and `vectorB`,
double-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] * b[i]`.
- Parameter vectorB: the `b` in `c[i] = a[i] * b[i]`.
- Parameter result: The `c` in `c[i] = a[i] * b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<T, U, V>(_ vectorA: T, _ vectorB: U, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Populates `result` with the elementwise product of `vectorA` and `vectorB`,
single-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] * b[i]`.
- Parameter vectorB: the `b` in `c[i] = a[i] * b[i]`.
- Parameter result: The `c` in `c[i] = a[i] * b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func multiply<U>(_ scalar: Double, _ vector: U) -> [Double] where U : AccelerateBuffer, U.Element == Double
Returns the elementwise product of `vector` and `scalar
double-precision.
- Parameter vector: the `a` in `c[i] = a[i] * b`.
- Parameter scalar: the `b` in `c[i] = a[i] * b`.
- Returns: The `c` in `c[i] = a[i] * b`.
static func multiply<T, U>(_ vectorA: T, _ vectorB: U) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Returns the elementwise product of `vectorA` and `vectorB`,
double-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] * b[i]`.
- Parameter vectorB: the `b` in `c[i] = a[i] * b[i]`.
- Parameter result: The `c` in `c[i] = a[i] * b[i]`.
static func multiply<U>(_ scalar: Float, _ vector: U) -> [Float] where U : AccelerateBuffer, U.Element == Float
Returns the elementwise product of `vector` and `scalar
single-precision.
- Parameter vector: the `a` in `c[i] = a[i] * b`.
- Parameter scalar: the `b` in `c[i] = a[i] * b`.
- Returns: The `c` in `c[i] = a[i] * b`.
static func multiply<T, U>(_ vectorA: T, _ vectorB: U) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Returns the elementwise product of `vectorA` and `vectorB`,
single-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] * b[i]`.
- Parameter vectorB: the `b` in `c[i] = a[i] * b[i]`.
- Parameter result: The `c` in `c[i] = a[i] * b[i]`.
static func negative<U, V>(_ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Populates `result` with the negative values of `vector`,
double-precision.
- Parameter vector: The input vector.
- Parameter result: The output vector.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func negative<U, V>(_ vector: U, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Populates `result` with the negative values of `vector`,
single-precision.
- Parameter vector: The input vector.
- Parameter result: The output vector.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func subtract<T, U, V>(multiplication: (a: U, b: Double), _ vector: T, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Populates `result` with the elementwise difference of `vector`
and the product of the vector and scalar in `multiplication`,
double-precision.
- Parameter vector: the `c` in `D[n] = A[n]*B - C[n]`.
- Parameter multiplication: the `a` and `b` in `D[n] = A[n]*B - C[n]`.
- Parameter result: the `d` in `D[n] = A[n]*B - C[n]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func subtract<T, U, V>(multiplication: (a: U, b: Float), _ vector: T, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Populates `result` with the elementwise difference of `vector`
and the product of the vector and scalar in `multiplication`,
single-precision.
- Parameter multiplication: the `a` and `b` in `D[n] = A[n]*B - C[n]`.
- Parameter vector: the `c` in `D[n] = A[n]*B - C[n]`.
- Parameter result: the `d` in `D[n] = A[n]*B - C[n]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func subtract<S, T, U, V>(multiplication: (a: T, b: U), _ vector: S, result: inout V) where S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, S.Element == Double, T.Element == Double, U.Element == Double, V.Element == Double
Populates `result` with the elementwise difference of `vector`
and the product of the two vectors in `multiplication`,
double-precision.
- Parameter multiplication: the `a` and `b` in `d[i] = (a[i] * b[i]) - c[i]`.
- Parameter vector: the `c` in `d[i] = (a[i] * b[i]) - c[i]`.
- Parameter result: the `d` in `d[i] = (a[i] * b[i]) - c[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func subtract<S, T, U, V>(multiplication: (a: T, b: U), _ vector: S, result: inout V) where S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, S.Element == Float, T.Element == Float, U.Element == Float, V.Element == Float
Populates `result` with the elementwise difference of `vector`
and the product of the two vectors in `multiplication`,
single-precision.
- Parameter multiplication: the `a` and `b` in `d[i] = (a[i] * b[i]) - c[i]`.
- Parameter vector: the `c` in `d[i] = (a[i] * b[i]) - c[i]`.
- Parameter result: the `d` in `d[i] = (a[i] * b[i]) - c[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func subtract<T, U>(multiplication: (a: U, b: Double), _ vector: T) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Returns the elementwise difference of `vector`
and the product of the vector and scalar in `multiplication`,
double-precision.
- Parameter multiplication: the `a` and `b` in `D[n] = A[n]*B - C[n]`.
- Parameter vector: the `c` in `D[n] = A[n]*B - C[n]`.
- Returns: the `d` in `D[n] = A[n]*B - C[n]`.
static func subtract<S, T, U>(multiplication: (a: T, b: U), _ vector: S) -> [Double] where S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, S.Element == Double, T.Element == Double, U.Element == Double
Returns the elementwise difference of `vector`
and the product of the two vectors in `multiplication`,
double-precision.
- Parameter multiplication: the `a` and `b` in `d[i] = (a[i] * b[i]) - c[i]`.
- Parameter vector: the `c` in `d[i] = (a[i] * b[i]) - c[i]`.
- Returns: the `d` in `d[i] = (a[i] * b[i]) - c[i]`.
static func subtract<T, U>(multiplication: (a: U, b: Float), _ vector: T) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Returns the elementwise difference of `vector`
and the product of the vector and scalar in `multiplication`,
single-precision.
- Parameter multiplication: the `a` and `b` in `D[n] = A[n]*B - C[n]`.
- Parameter vector: the `c` in `D[n] = A[n]*B - C[n]`.
- Returns: the `d` in `D[n] = A[n]*B - C[n]`.
static func subtract<S, T, U>(multiplication: (a: T, b: U), _ vector: S) -> [Float] where S : AccelerateBuffer, T : AccelerateBuffer, U : AccelerateBuffer, S.Element == Float, T.Element == Float, U.Element == Float
Returns the elementwise difference of `vector`
and the product of the two vectors in `multiplication`,
single-precision.
- Parameter multiplication: the `a` and `b` in `d[i] = (a[i] * b[i]) - c[i]`.
- Parameter vector: the `c` in `d[i] = (a[i] * b[i]) - c[i]`.
- Returns: the `d` in `d[i] = (a[i] * b[i]) - c[i]`.
Populates `result` with the elementwise difference of `splitComplexA` and `splitComplexB`,
single-precision.
- Parameter splitComplexA: the `a` in `c[i] = a[i] - b[i]`.
- Parameter splitComplexB: the `b` in `c[i] = a[i] - b[i]`.
- Parameter count: The number of elements to process.
- Parameter result: The `c` in `c[i] = a[i] - b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
Populates `result` with the elementwise difference of `splitComplexA` and `splitComplexB`,
double-precision.
- Parameter splitComplexA: the `a` in `c[i] = a[i] - b[i]`.
- Parameter splitComplexB: the `b` in `c[i] = a[i] - b[i]`.
- Parameter count: The number of elements to process.
- Parameter result: The `c` in `c[i] = a[i] - b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func subtract<T, U, V>(_ vectorA: U, _ vectorB: T, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Double, U.Element == Double, V.Element == Double
Populates `result` with the elementwise difference of `vectorA` and `vectorB`,
double-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] - b[i]`.
- Parameter vectorB: the `b` in `c[i] = a[i] - b[i]`.
- Parameter result: The `c` in `c[i] = a[i] - b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func subtract<T, U, V>(_ vectorA: U, _ vectorB: T, result: inout V) where T : AccelerateBuffer, U : AccelerateBuffer, V : AccelerateMutableBuffer, T.Element == Float, U.Element == Float, V.Element == Float
Populates `result` with the elementwise difference of `vectorA` and `vectorB`,
single-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] - b[i]`.
- Parameter vectorB: the `b` in `c[i] = a[i] - b[i]`.
- Parameter result: The `c` in `c[i] = a[i] - b[i]`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func subtract<T, U>(_ vectorA: U, _ vectorB: T) -> [Double] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Double, U.Element == Double
Returns the elementwise difference of `vectorA` and `vectorB`,
double-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] - b[i]`.
- Parameter vectorB: the `b` in `c[i] = a[i] - b[i]`.
- Returns: The `c` in `c[i] = a[i] - b[i]`.
static func subtract<T, U>(_ vectorA: U, _ vectorB: T) -> [Float] where T : AccelerateBuffer, U : AccelerateBuffer, T.Element == Float, U.Element == Float
Returns the elementwise difference of `vectorA` and `vectorB`,
single-precision.
- Parameter vectorA: the `a` in `c[i] = a[i] - b[i]`.
- Parameter vectorB: the `b` in `c[i] = a[i] - b[i]`.
- Returns: The `c` in `c[i] = a[i] - b[i]`.
Populates `result` with the conjugate of `splitComplex`; single-precision.
- Parameter splitComplex: the `A` in `C[n] = conj(A[n])`.
- Parameter result: The `C` in `C[n] = conj(A[n])`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
Populates `result` with the conjugate of `splitComplex`; double-precision.
- Parameter splitComplex: the `A` in `C[n] = conj(A[n])`.
- Parameter result: The `C` in `C[n] = conj(A[n])`.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func integrate<U, V>(_ vector: U, using rule: vDSP.IntegrationRule, stepSize: Double = 1, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Integrates source vector using specified rule, double-precision.
- Parameter vector: The vector to integrate.
- Parameter rule: The integration rule.
- Parameter stepSize: The integration step size (weighting factor for running sum).
- Parameter result: The destination vector to receive the result.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func integrate<U, V>(_ vector: U, using rule: vDSP.IntegrationRule, stepSize: Float = 1, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Integrates source vector using specified rule, single-precision.
- Parameter vector: The vector to integrate.
- Parameter rule: The integration rule.
- Parameter stepSize: The integration step size (weighting factor for running sum).
- Parameter result: The destination vector to receive the result.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func threshold<U, V>(_ vector: U, to lowerBound: Double, with rule: vDSP.ThresholdRule<Double>, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Double, V.Element == Double
Populates `result` with with the corresponding value in `vector` after applying a specified thresholding rule. Double-precision.
This function supports the following rules:
* `clampToThreshold` - Returns `lowerBound` if input is less than `lowerBound`; otherwise returns input value.
* `zeroFill` - Returns `0` if input is less than `lowerBound`; otherwise returns input value.
* `signedConstant(x)` - returns `-x` if input is less than `lowerBound`; otherwise `+x`.
- Parameter vector: Source vector.
- Parameter lowerBound: Low clipping threshold.
- Parameter rule: The thresholding rule.
- Parameter result: The threshold result.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func threshold<U, V>(_ vector: U, to lowerBound: Float, with rule: vDSP.ThresholdRule<Float>, result: inout V) where U : AccelerateBuffer, V : AccelerateMutableBuffer, U.Element == Float, V.Element == Float
Populates `result` with with the corresponding value in `vector` after applying a specified thresholding rule. Single-precision.
This function supports the following rules:
* `clampToThreshold` - Returns `lowerBound` if input is less than `lowerBound`; otherwise returns input value.
* `zeroFill` - Returns `0` if input is less than `lowerBound`; otherwise returns input value.
* `signedConstant(x)` - returns `-x` if input is less than `lowerBound`; otherwise `+x`.
- Parameter vector: Source vector.
- Parameter lowerBound: Low clipping threshold.
- Parameter rule: The thresholding rule.
- Parameter result: The threshold result.
Omit the output parameters from the call. The result contains $ret and $out, with result inside $out.
static func threshold<U>(_ vector: U, to lowerBound: Double, with rule: vDSP.ThresholdRule<Double>) -> [Double] where U : AccelerateBuffer, U.Element == Double
Returns the elements of `vector` after applying a specified thresholding rule. Double-precision.
- Parameter vector: Source vector.
- Parameter bounds: Clipping threshold.
- Returns: The clipped result.
static func threshold<U>(_ vector: U, to lowerBound: Float, with rule: vDSP.ThresholdRule<Float>) -> [Float] where U : AccelerateBuffer, U.Element == Float
Returns the elements of `vector` after applying a specified thresholding rule. Single-precision.
- Parameter vector: Source vector.
- Parameter bounds: Clipping threshold.
- Returns: The clipped result.
Skipped declarations
14 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.