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

Explore the idea of peeking SIMD data #209

Open
ebassi opened this issue Feb 5, 2021 · 0 comments
Open

Explore the idea of peeking SIMD data #209

ebassi opened this issue Feb 5, 2021 · 0 comments

Comments

@ebassi
Copy link
Owner

ebassi commented Feb 5, 2021

It might be possible to return a pointer to the start of a graphene_simd4_t (or graphene_simd4x4f_t) to functions that expect an array of floating point values; this would allow removing a stack allocation when all we care about is passing a bunch of floats to, say, GL.

Experiments on x86_64 seem to yield positive results, but it could be a combination of recent compilers and specific SIMD types, so this would require further investigation:

  • does passing the reference to an __m128 or a float32x4 type actually lead to a SIMD register read?
  • if the read happens, is it dependent on the OS?
  • if the read happens, is it dependent on the type or version of the compiler?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant