Commit Graph

361 Commits

Author SHA1 Message Date
simon gladman
990a408794 Swift overlays to vDSP_vswsum and vDSP_vswsumD for sliding
window summation over single- and double-precision vectors.
2019-03-18 17:34:08 +00:00
simon gladman
d8e73fc99d Remove unnecessary prefixes to tuple parameters. 2019-03-18 16:21:32 +00:00
simon gladman
034a33adde Add missing operations: vDSP_zvabs and vDSP_zvmags. 2019-03-18 12:51:22 +00:00
simon gladman
781f163149 Better naming for tuple parameters. 2019-03-18 10:49:11 +00:00
simon gladman
9b833319b0 * Remove parameter labels from commutative operations.
* Fix parameter / operation naming mismatch.
2019-03-18 10:16:07 +00:00
Simon Gladman
8f9c475939 Swift Overlays to vDSP Linear Interpolation Operations 2019-03-17 07:24:20 +00:00
Simon Gladman
171f6e27de vDSP Swift Overlays to Complex Vector Operations
Swift overlays for calculating phase, copying, conjugating, and general arithmetic against `DSPSplitComplex`.
2019-03-17 06:30:16 +00:00
swift-ci
6e7202e0f6 Merge pull request #23174 from lorentey/tacoma-narrows 2019-03-15 14:48:33 -07:00
Karoy Lorentey
300595eed4 [Foundation] Collapse as AnyObject as! Foo cast sequences 2019-03-15 13:26:58 -07:00
simon gladman
0ab30574eb vDSP Swift Overlays to Vector-Vector Extrema and Single-Vector Operations
A suite of Swift overlays to vDSP operations for vector-vector extrema, absolute and negation, in-place reversing and sorting, and single-vector arithmetic.
2019-03-14 16:41:27 +00:00
simon gladman
6fad0cf948 Code review changes - better parameter naming for downsample, and rename differenceEquation to twoPoleTwoZeroFilter. 2019-03-14 14:13:24 +00:00
simon gladman
e6e3d424f2 Swift overlays to Accelerate.vDSP 1D and 2D convolution operations. 2019-03-14 13:45:18 +00:00
simon gladman
f3bdb4b835 Swift overlays to vDSP dot product, hypotenuse, and distance squared operations. 2019-03-14 10:50:00 +00:00
simon gladman
d069a1e063 Rename vDSP reduction functions to disambiguate at every use site. 2019-03-13 16:49:54 +00:00
simon gladman
99d8e573c6 vDSP - Swift overlays to vDSP_desamp and vDSP_deq22. 2019-03-13 15:34:11 +00:00
simon gladman
34e8b1afbe Add missing operations: vDSP_sve_svesq and vDSP_sve_svesqD. 2019-03-13 14:57:27 +00:00
simon gladman
92dc74330a vDSP Vector Reduction Functions
Swift overlays to functions for summing, averaging, and finding extrema in collections.

Note current guidance is to not abbreviate "minimum" and "maximum" in new APIs, hence me avoiding `min` and `max` function names.
2019-03-13 13:40:47 +00:00
simon gladman
49246470f8 vDSP Elementwise Vector-Vector and Vector-Scalar Arithmetic
A suite of Swift overlays to the vDSP elementwise arithmetic operations.
2019-03-13 10:53:45 +00:00
simon gladman
c64f42a763 Replace using single element arrays to pass scalar values with withUnsafePointer. 2019-03-13 10:08:10 +00:00
Itai Ferber
0235a81cd5 Merge pull request #23244 from itaiferber/data-underestimated-sequence-initializer-fix
Fix off-by-one when initializing Data with discontiguous, underestimated Sequences
2019-03-12 19:25:06 -07:00
Itai Ferber
7ce6f840d1 Fix off-by-one when initializing Data with discontiguous, underestimated sequences 2019-03-12 14:26:58 -07:00
simon gladman
c2d286bbf5 vDSP Miscellaneous Conversions
This commit contains operations for:

* Split complex to/from interleaved complex conversion.
* Polar to/from rectangular coordinate conversion.
* Power and amplitude to decibel conversion.
2019-03-12 15:27:36 +00:00
simon gladman
12374f3a49 Swift Overlays to Accelerate vDSP Polynomial Evaluation Functions 2019-03-12 11:54:40 +00:00
simon gladman
d80065d5c6 Swift overlays to Accelerate.vDSP clipping, limit, and threshold operations. 2019-03-12 11:06:09 +00:00
Saleem Abdulrasool
8ed5c1a4bc build: introduce and switch to GYB_SOURCES
This avoids us having to pattern match every source file which should
help speed up the CMake generation.  A secondary optimization is
possible with CMake 3.14 which has the ability to remove the last
extension component without having to resort to regular expressions.  It
also helps easily identify the GYB'ed sources.
2019-03-11 13:48:54 -07:00
simon gladman
6b7d7f6702 Merge remote-tracking branch 'refs/remotes/origin/accelerate-vDSP-conversion' 2019-03-11 16:57:27 +00:00
simon gladman
be81f917ee fix version numbers 2019-03-11 16:51:58 +00:00
simon gladman
5d63ddea51 Fix version numbers 2019-03-11 16:50:38 +00:00
simon gladman
6e502046c5 version number fix. 2019-03-11 16:47:24 +00:00
simon gladman
3cf79534b6 Accelerate vDSP Fill, Clear, and Generation Operations
A suite of Swift overlays to vDSP's fill, clear, window, and ramp generation operations.
2019-03-11 16:32:17 +00:00
simon gladman
6b2467337e Reorder parameters in comments. 2019-03-11 13:47:57 +00:00
simon gladman
f7360adac4 Swift Overlays to Accelerate.vDSP Integration Operations 2019-03-11 13:46:41 +00:00
Simon Gladman
d840cd9a21 Code Review Fixes
* Correct copyright year from 2017 to 2019
* `towardsZero` -> `towardZero`
* `towardsNearestInteger` -> `towardNearestInteger`
2019-03-09 15:26:59 +00:00
simon gladman
e9e9b4eac7 Fix availability check in tests. 2019-03-08 17:39:11 +00:00
Karoy Lorentey
5b9ab59515 [Foundation] NSSet, NSDictionary: Use as! casts to force-bridge elements
This traps with a clear runtime error on failure, rather than simply crashing in the runtime.
2019-03-07 19:57:13 -08:00
simon gladman
df1d85f6df [Accelerate] [vDSP] Large Vector Type Conversion Operations
This PR contains a suite of overlays to the vDSP conversion functions.
2019-03-07 13:53:14 +00:00
Maxim Moiseev
52c6e03c44 Add availability annotations to NWConnection.maximumDatagramSize
Since it did not exist pre-ABI.
<rdar://problem/48314607>
2019-03-05 10:55:14 -08:00
Max Moiseev
c903186fa4 Merge pull request #22885 from moiseev/os-log-unshadow
[os_log] Un-shadow buffer so the correct copy happens
2019-02-28 10:07:16 -08:00
Max Moiseev
67f62a14f0 Merge pull request #22272 from moiseev/intents-warnings
Remove access specifiers on some extensions to avoid warnings
2019-02-25 12:53:31 -08:00
Maxim Moiseev
a0326f6514 Un-shadow buffer so the correct copy happens
Fixes: rdar://problem/48299301
2019-02-25 11:19:53 -08:00
Michael Ilseman
f87960746c Merge pull request #22108 from milseman/en_gadus_offset
[String.Index] Obsolete encodedOffset var/init
2019-02-19 14:43:26 -08:00
Michael Ilseman
415cc8fb0c [String.Index] Deprecate encodedOffset var/init
String.Index has an encodedOffset-based initializer and computed
property that exists for serialization purposes. It was documented as
UTF-16 in the SE proposal introducing it, which was String's
underlying encoding at the time, but the dream of String even then was
to abstract away whatever encoding happend to be used.

Serialization needs an explicit encoding for serialized indices to
make sense: the offsets need to align with the view. With String
utilizing UTF-8 encoding for native contents in Swift 5, serialization
isn't necessarily the most efficient in UTF-16.

Furthermore, the majority of usage of encodedOffset in the wild is
buggy and operates under the assumption that a UTF-16 code unit was a
Swift Character, which isn't even valid if the String is known to be
all-ASCII (because CR-LF).

This change introduces a pair of semantics-preserving alternatives to
encodedOffset that explicitly call out the UTF-16 assumption. These
serve as a gentle off-ramp for current mis-uses of encodedOffset.
2019-02-13 18:42:40 -08:00
Philippe Hausler
1fe1b86556 Add a safe API for NSValue and migrate NSValue value fetching to the size variants for validation (#22265) 2019-02-13 14:14:41 -08:00
Maxim Moiseev
d904d25fef Accelerate overlay does not seem to need -parse-stdlib 2019-02-11 10:50:16 -08:00
Maxim Moiseev
caac1bf850 [overlay] Size the os_log pack buffer appropriately
Fixes: rdar://problem/31799909
2019-02-07 14:19:07 -08:00
Jordan Rose
b0f5815d2b Merge pull request #20951 from pitiphong-p/encoders-nested-key-edge-case-bug
Reuse the container when requesting for a new nested container with the old key in JSONEncoder and PlistEncoder
2019-02-04 13:19:42 -08:00
Lily Vulcano
337904fb2e Merge pull request #22311 from millenomi/fix_kvo-take-2
Take 2 of “[SDK] Fix multiple issues with Swift KVO”
2019-02-01 17:18:53 -08:00
Mishal Shah
cc78af105f Merge pull request #22274 from apple/update-master-xcode-10.2-beta-1
Update master to build with Xcode 10.2 beta 1
2019-02-01 16:30:58 -08:00
Lily Vulcano
bdb4686375 Take 2 of “[SDK] Fix multiple issues with Swift KVO”
This reproposes @lilyball’s fixes in https://github.com/apple/swift/pull/20103 while adding her fix to ensure observations are removed before observed objects in 32-bit testing.
2019-02-01 14:07:44 -08:00
Joe Shajrawi
596dfd9dfb Merge pull request #22297 from millenomi/revert-fix_kvo
Simulator build fix — (temporarily) revert "Merge pull request #20103 from lilyball/fix_kvo"
2019-02-01 13:02:56 -08:00