Commit Graph

2 Commits

Author SHA1 Message Date
Steve (Numerics) Canon
d4b90f4837 Temporarily disable all the Accelerate tests.
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.
2019-05-03 09:12:30 -04:00
simon gladman
802d516ad5 [Accelerate] [Quadrature] New Quadrature Overlay (#23127)
* [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.
2019-04-19 02:09:41 +02:00