Skip to content
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

[IMPL] Add core Vector3 functionality #109

Merged

Conversation

FiniteReality
Copy link
Contributor

Fixes #100.

I've not vectorized these, and have instead only provided the software fallback, because I'm not sure I trust myself to correctly implement it. Plus, I believe there probably isn't much benefit to vectorizing these methods specifically, since they deal with small amounts of data - the overhead of shuffling data about would probably outweigh the performance benefits of vectorizing the code currently.

Maybe in the future we can add methods to take vectors in bulk to implement the vectorized versions of these algorithms.

Unit tests are in progress.

@FiniteReality FiniteReality marked this pull request as ready for review October 2, 2020 19:18
@FiniteReality
Copy link
Contributor Author

I've currently omitted the single-parameter constructor since I cannot easily think of many scenarios where it would be clearer than Vector3.One * value.

@FiniteReality FiniteReality changed the title [IMPL] Add core functionality for Vector3 [IMPL] Add core Vector3 functionality Oct 2, 2020
@tannergooding
Copy link
Member

I've currently omitted the single-parameter constructor since I cannot easily think of many scenarios where it would be clearer than Vector3.One * value.

It's also for efficiency in the implementation. Once it's vectorized, it will forward to the implementation that does a broadcast, rather than having some other implementation.

This is in anticipation of vectorization to ensure that our expectations
match reality.
@tannergooding tannergooding merged commit ce57182 into terrafx:main Oct 5, 2020
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.

Expose core functionality on Vector3
2 participants