These are testing for bitwise identical results, but don't guarantee that
the buffers being used always have identical alignment. This will result
in small rounding differences when vector codepaths are used for different
elements of some results.
This is partially an underlying bug in Accelerate (which is outside the
scope of this project to fix), and partly a test bug (which we can address
by adopting approximate comparisons here). In the short term, though, I'm
going to disable these.
* Swift overlay to vDSP cascaded biquad IIR filter.
* update comment in test
* Swift overlay to vDSP Discrete Cosine Transform
* Swift Overlays to vDSP Fast Fourier Transform and Discrete Fourier Transform
* Tests for DFT and FFT
* Some refactoring and begin documentation.
* Swift overlays to FFT and DFT operations.
* Expand docs.
* Implement `vDSP_destroy_fftsetup` and `vDSP_destroy_fftsetupD`
* Refactor Tests
* Refactor Tests
* Provide transform function that returns the result. Refactoring: parameter names more consistent with other vDSP operations, push `fileprivate` symbols to bottom of file.
* Add apply() function that returns the result.
* Added a version of DFT transform that returns the result.
* update some DFT comments
* Remove FFT overlays from this branch to separate DFT and FFT pull requests.
* [Accelerate] [vDSP] Swift Overlays to FFT Operations
This PR contains Swift overlays to simplify performing 1D and 2D fast Fourier transforms on single- and double-precision data.
This PR includes a subset of the operations (e.g. vDSP_fft_zrop for FFT). My plan is to add the additional operations (e.g. multiple signals, in-place operations, etc.) in a subsequent PR once this is approved.
cc: @moiseev @airspeedswift @stephentyrone
* Composite Branch
Contains FFT, DFT, DCT, and Biquad branches.
* [Accelerate] [vForce] New vForce Overlay
This PR contains a suite of overlays to the vForce transcendental and trigonometric functions on vectors of any length. The overlays simplify the API to the existing functions and accept collections that implement a new protocol called AccelerateBuffer. Conformances are provided for the most useful stdlib Collections.
* [Accelerate] [Quadrature] New Quadrature Overlay
A class that simplifies approximating the definite integral of a function.
* Fixes in response to PR Review.
Change `@_exported import Accelerate` to `import Accelerate`.
Correct date in copyright comment.
* Code Review Fixes.
* Remove mutable integrator, simply set options in init().
* Remove mutable `maxIntervals` and `qagPointsPerInterval`.
* Update tests.
* Code Review Fixes.
* Use standard library `Result`.
* Implement `QAGPointsPerInterval` as a struct.
* Tidy up Passing Integrand to `quadrature_integrate_function`.
Pass the integrand closure directly to the `quadrature_integrate_function` initialiser rather than attaching as a property of the `Quadrature` class.
* Make `Quadrature` a struct, and remove requirement for `integrand` to be escaping.
* Code Review Changes
* Add long-form integrator algorithm aliases (update tests to use these aliases).
* Make quadrature error description public.
* New tests for error description and `QAGPointsPerInterval`.
* Vectorized Integrand for Quadrature
Create an alternative implementation of `integrate` that accepts an integrand of type `(_ input: UnsafeBufferPointer<Double>, _ result: UnsafeMutableBufferPointer<Double>)`.
* Vectorized Integrand for Quadrature
Create an alternative implementation of `integrate` that accepts an integrand of type `(_ input: UnsafeBufferPointer<Double>, _ result: UnsafeMutableBufferPointer<Double>)`.
* Vectorized Integrand for Quadrature
Remove _ContiguousCollection - it's no longer used.
* Delete ContiguousCollection.swift
Not required.
* Refactor tests.