Skip to content

Really remove static min and max on simd. One slipped through. #24283

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
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
26 changes: 0 additions & 26 deletions stdlib/public/core/SIMDVector.swift
Original file line number Diff line number Diff line change
Expand Up @@ -549,32 +549,6 @@ extension SIMD where Scalar: FloatingPoint {
return Self(repeating: 1)
}

/// The lanewise minimum of two vectors.
///
/// Each element of the result is the minimum of the corresponding elements
/// of the inputs.
@_alwaysEmitIntoClient
public static func min(_ a: Self, _ b: Self) -> Self {
var result = Self()
for i in result.indices {
result[i] = Scalar.minimum(a[i], b[i])
}
return result
}

/// The lanewise maximum of two vectors.
///
/// Each element of the result is the minimum of the corresponding elements
/// of the inputs.
@_alwaysEmitIntoClient
public static func max(_ a: Self, _ b: Self) -> Self {
var result = Self()
for i in result.indices {
result[i] = Scalar.maximum(a[i], b[i])
}
return result
}

@_alwaysEmitIntoClient
public mutating func clamp(lowerBound: Self, upperBound: Self) {
self = self.clamped(lowerBound: lowerBound, upperBound: upperBound)
Expand Down