Skip to content

Fix a case where vDSP is missing a cast #24197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/// In practice, most types conforming to this protocol will be Collections,
/// but they need not be--they need only have an Element type and count, and
/// provide the withUnsafeBufferPointer function.
@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
@available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *)
public protocol AccelerateBuffer {
/// The buffer's element type.
associatedtype Element
Expand All @@ -34,7 +34,7 @@ public protocol AccelerateBuffer {
///
/// In practice, most types conforming to this protocol will be
/// MutableCollections, but they need not be.
@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
@available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *)
public protocol AccelerateMutableBuffer: AccelerateBuffer {
/// Calls the given closure with a pointer to the object's mutable
/// contiguous storage.
Expand All @@ -43,7 +43,7 @@ public protocol AccelerateMutableBuffer: AccelerateBuffer {
) rethrows -> R
}

@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
@available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *)
public extension AccelerateBuffer where Self: Collection {
func withUnsafeBufferPointer<R>(
_ body: (UnsafeBufferPointer<Element>) throws -> R
Expand All @@ -52,7 +52,7 @@ public extension AccelerateBuffer where Self: Collection {
}
}

@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
@available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *)
extension AccelerateMutableBuffer where Self: MutableCollection {
public mutating func withUnsafeMutableBufferPointer<R>(
_ body: (inout UnsafeMutableBufferPointer<Element>) throws -> R
Expand All @@ -61,23 +61,23 @@ extension AccelerateMutableBuffer where Self: MutableCollection {
}
}

@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
@available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *)
extension Array: AccelerateMutableBuffer { }

@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
@available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *)
extension ContiguousArray: AccelerateMutableBuffer { }

@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
@available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *)
extension ArraySlice: AccelerateMutableBuffer { }

@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
@available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *)
extension UnsafeBufferPointer: AccelerateBuffer { }

@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
@available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *)
extension UnsafeMutableBufferPointer: AccelerateMutableBuffer { }

@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
@available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *)
extension Slice: AccelerateBuffer where Base: Collection { }

@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
@available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *)
extension Slice: AccelerateMutableBuffer where Base: MutableCollection { }
30 changes: 15 additions & 15 deletions stdlib/public/Darwin/Accelerate/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@ include("../../../../cmake/modules/StandaloneOverlay.cmake")

add_swift_target_library(swiftAccelerate ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_OVERLAY
Accelerate.swift
Quadrature.swift
ContiguousCollection.swift
vForce_Operations.swift
vDSP_SlidingWindow.swift
vDSP_Interpolation.swift
AccelerateBuffer.swift
vDSP_Arithmetic.swift
vDSP_ClippingLimitThreshold.swift
vDSP_ComplexConversion.swift
vDSP_ComplexOperations.swift
vDSP_Conversion.swift
vDSP_Convolution.swift
vDSP_Geometry.swift
vDSP_RecursiveFilters.swift
vDSP_FIR.swift
vDSP_Reduction.swift
vDSP_Arithmetic.swift
vDSP_PolarRectangularConversion.swift
vDSP_DecibelConversion.swift
vDSP_ComplexConversion.swift
vDSP_PolynomialEvaluation.swift
vDSP_ClippingLimitThreshold.swift
vDSP_FIR.swift
vDSP_FillClearGenerate.swift
vDSP_Geometry.swift
vDSP_Integration.swift
vDSP_Conversion.swift
vDSP_Interpolation.swift
vDSP_PolarRectangularConversion.swift
vDSP_PolynomialEvaluation.swift
vDSP_RecursiveFilters.swift
vDSP_Reduction.swift
vDSP_SingleVectorOperations.swift
vDSP_SlidingWindow.swift
vForce_Operations.swift
Quadrature.swift

"${SWIFT_SOURCE_DIR}/stdlib/linker-support/magic-symbols-for-install-name.c"

Expand Down
Loading