Skip to content

Commit d142fab

Browse files
authored
Accelerate deprecate split complex inits (#29221)
* Update FFT Tests I removed SinglePrecisionComplexConversions and DoublePrecisionComplexConversions - they weren't testing any new API. 2DSinglePrecision, 2DDoublePrecision, 1DSinglePrecision, and 1DDoublePrecision have all been updated to no longer use the deprecated initializer and avoid the temporary pointer warnings. * Deprecate Split Complex inits Deprecate init(fromInputArray:realParts:imaginaryParts:) for DSPSplitComplex and DSPDoubleSplitComplex * Fix Availability
1 parent 061c6d0 commit d142fab

File tree

2 files changed

+286
-293
lines changed

2 files changed

+286
-293
lines changed

stdlib/public/Darwin/Accelerate/vDSP_FFT.swift

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,11 @@ struct vDSP_FFTFunctions {
329329
}
330330
}
331331

332-
333-
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
332+
@available(macOS, introduced: 10.15, deprecated, message: "Use the `withUnsafeMutableBufferPointer` method on the real and imaginary arrays to create `DSPSplitComplex` for a defined scope.")
333+
@available(iOS, introduced: 13.0, deprecated, message: "Use the `withUnsafeMutableBufferPointer` method on the real and imaginary arrays to create `DSPSplitComplex` for a defined scope.")
334+
@available(watchOS, introduced: 6.0, deprecated, message: "Use the `withUnsafeMutableBufferPointer` method on the real and imaginary arrays to create `DSPSplitComplex` for a defined scope.")
335+
@available(tvOS, introduced: 13.0, deprecated, message: "Use the `withUnsafeMutableBufferPointer` method on the real and imaginary arrays to create `DSPSplitComplex` for a defined scope.")
336+
@available(*, deprecated, message: "Use the `withUnsafeMutableBufferPointer` method on the real and imaginary arrays to create `DSPSplitComplex` for a defined scope.")
334337
extension DSPSplitComplex {
335338

336339
/// Creates a new `DSPSplitComplex` structure from a real array not in even-odd split configuration.
@@ -353,7 +356,11 @@ extension DSPSplitComplex {
353356
}
354357
}
355358

356-
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
359+
@available(macOS, introduced: 10.15, deprecated, message: "Use the `withUnsafeMutableBufferPointer` method on the real and imaginary arrays to create `DSPSplitComplex` for a defined scope.")
360+
@available(iOS, introduced: 13.0, deprecated, message: "Use the `withUnsafeMutableBufferPointer` method on the real and imaginary arrays to create `DSPSplitComplex` for a defined scope.")
361+
@available(watchOS, introduced: 6.0, deprecated, message: "Use the `withUnsafeMutableBufferPointer` method on the real and imaginary arrays to create `DSPSplitComplex` for a defined scope.")
362+
@available(tvOS, introduced: 13.0, deprecated, message: "Use the `withUnsafeMutableBufferPointer` method on the real and imaginary arrays to create `DSPSplitComplex` for a defined scope.")
363+
@available(*, deprecated, message: "Use the `withUnsafeMutableBufferPointer` method on the real and imaginary arrays to create `DSPSplitComplex` for a defined scope.")
357364
extension DSPDoubleSplitComplex {
358365

359366
/// Creates a new `DSPDoubleSplitComplex` structure from a real array not in even-odd split configuration.

0 commit comments

Comments
 (0)