Skip to content

Commit 6d80e22

Browse files
committed
---
yaml --- r: 283903 b: refs/heads/master-next c: f454132 h: refs/heads/master i: 283901: 1cd860c 283899: a0b27ec 283895: 94d9eb9 283887: 8db9aef 283871: 1b8250d 283839: 7dff0f2 283775: 32eac47 283647: 629dc2e
1 parent d238783 commit 6d80e22

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 913a1f57faca996135623c287c09060d8d0532ec
3-
refs/heads/master-next: f1e98b61477a26c77653d4dd71f6ec8a49aaef4b
3+
refs/heads/master-next: f454132641befffb61024b442294eb2cb85609b8
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/stdlib/public/Darwin/Accelerate/vDSP_ClippingLimitThreshold.swift

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,19 @@ extension vDSP {
141141
/// - Parameter vector: Source vector.
142142
/// - Parameter bounds: Clipping threshold.
143143
/// - Returns: The clipped result.
144+
///
145+
/// This function performs the following operation where `A` is `vector`, `B` is `bounds.lowerBound`,
146+
/// `C` is `bounds.upperBound`, and `D` is the inverted clip result:
147+
/// ```
148+
/// for (int n = 0; n < N; ++n) {
149+
/// if (A[n] <= *B || A[n] >= *C)
150+
/// D[n] = A[n];
151+
/// else if (A[n] < 0)
152+
/// D[n] = *B;
153+
/// else
154+
/// D[n] = *C;
155+
/// }
156+
/// ```
144157
@inline(__always)
145158
@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
146159
public static func invertedClip<U>(_ vector: U,
@@ -167,6 +180,19 @@ extension vDSP {
167180
/// - Parameter vector: Source vector.
168181
/// - Parameter bounds: Clipping threshold.
169182
/// - Parameter result: The clipped result.
183+
///
184+
/// This function performs the following operation where `A` is `vector`, `B` is `bounds.lowerBound`,
185+
/// `C` is `bounds.upperBound`, and `D` is the inverted clip result:
186+
/// ```
187+
/// for (int n = 0; n < N; ++n) {
188+
/// if (A[n] <= *B || A[n] >= *C)
189+
/// D[n] = A[n];
190+
/// else if (A[n] < 0)
191+
/// D[n] = *B;
192+
/// else
193+
/// D[n] = *C;
194+
/// }
195+
/// ```
170196
@inline(__always)
171197
@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
172198
public static func invertedClip<U, V>(_ vector: U,
@@ -200,6 +226,19 @@ extension vDSP {
200226
/// - Parameter vector: Source vector.
201227
/// - Parameter bounds: Clipping threshold.
202228
/// - Returns: The clipped result.
229+
///
230+
/// This function performs the following operation where `A` is `vector`, `B` is `bounds.lowerBound`,
231+
/// `C` is `bounds.upperBound`, and `D` is the inverted clip result:
232+
/// ```
233+
/// for (int n = 0; n < N; ++n) {
234+
/// if (A[n] <= *B || A[n] >= *C)
235+
/// D[n] = A[n];
236+
/// else if (A[n] < 0)
237+
/// D[n] = *B;
238+
/// else
239+
/// D[n] = *C;
240+
/// }
241+
/// ```
203242
@inline(__always)
204243
@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
205244
public static func invertedClip<U>(_ vector: U,
@@ -226,6 +265,19 @@ extension vDSP {
226265
/// - Parameter vector: Source vector.
227266
/// - Parameter bounds: Clipping threshold.
228267
/// - Parameter result: The clipped result.
268+
///
269+
/// This function performs the following operation where `A` is `vector`, `B` is `bounds.lowerBound`,
270+
/// `C` is `bounds.upperBound`, and `D` is the inverted clip result:
271+
/// ```
272+
/// for (int n = 0; n < N; ++n) {
273+
/// if (A[n] <= *B || A[n] >= *C)
274+
/// D[n] = A[n];
275+
/// else if (A[n] < 0)
276+
/// D[n] = *B;
277+
/// else
278+
/// D[n] = *C;
279+
/// }
280+
/// ```
229281
@inline(__always)
230282
@available(iOS 9999, OSX 9999, tvOS 9999, watchOS 9999, *)
231283
public static func invertedClip<U, V>(_ vector: U,

0 commit comments

Comments
 (0)