Skip to content

[Accelerate] [vForce] New vForce Overlay #23153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from

Conversation

FlexMonkey
Copy link
Contributor

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 _ContiguousCollection.

This PR contains a Swift-friendly version of each function in vForce, removing the requirement for the developer to separately supply the element count of the source and destination vectors.

cc: @moiseev @airspeedswift @stephentyrone

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 `_ContiguousCollection`.
Mainly renames of functions (e.g. `ceiling` to `ceil`) and parameters (e.g. `numerators` to `dividends`).
* Create individual `log2`and `log10` functions.
* Rename `exponent` to `logb`
@xwu
Copy link
Collaborator

xwu commented Mar 30, 2019

Based on our discussion on the basic scalar math functions with logGamma, sounds like sinPi would be the "less wild" option with precedent in IEEE 754. Similarly, given the direction that it's taken, copySign would be more consistent than copysign, and I think sqrt is still preferred over squareRoot. By that reasoning, rSqrt would be the reciprocal.

Wdyt, @stephentyrone?

@stephentyrone
Copy link
Contributor

Keep copysign. Switch to sinPi, cosPi, sqrt. I don't love rSqrt--I'll leave that one up to @FlexMonkey, but please choose either reciprocalSquareRoot or rsqrt.

Simon Gladman added 2 commits April 18, 2019 10:54
* `squareRoot` -> `sqrt`
* `reciprocalSquareRoot` -> `rsqrt`
* `xxx(piTimes:...)` -> `xxxPi(:_....)`
@FlexMonkey
Copy link
Contributor Author

Keep copysign. Switch to sinPi, cosPi, sqrt. I don't love rSqrt--I'll leave that one up to @FlexMonkey, but please choose either reciprocalSquareRoot or rsqrt.

Changed all the xxx(piTimes:...) to xxxPi(_:...).

Cheers.

@stephentyrone
Copy link
Contributor

I landed this (with some minor changes) as #24152. This PR can be closed out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants