Skip to content

Commit

Permalink
Really remove static min and max on simd. One slipped through. (#24283)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentyrone authored Apr 26, 2019
1 parent 209c1d7 commit ba0888d
Showing 1 changed file with 0 additions and 26 deletions.
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

0 comments on commit ba0888d

Please sign in to comment.