-
Notifications
You must be signed in to change notification settings - Fork 145
Support for SIMD types #80
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
Comments
It would certainly be a breaking change to split up the traits. Maybe there's some useful commonality that we could redesign someday, just as I'd like to eventually revisit how I think it would be easier to create new traits for SIMD, merely inspired by those in
As a point of procedure, I'm not keen on taking on additional crates in the rust-num org, as I'm basically the only active maintainer. But generally, sure, a crate like |
From what I understand, there is no way to compatibly implement a standalone So a standalone I'm not really set on any particular way of solving this (changing
Sorry for pushing a bit here, but I'm reading mixed messages. Are you saying you don't want to change However, if you think packed support should be part of |
Are these necessarily exclusive? I don't want to make breaking changes to You're right that you can't implement foreign traits on foreign types. But right now, types like When those types are stable in |
@ralfbiedert , did you ever publish this library? Are you aware of any other crates or repos that address this? |
I sort of gave up on this as |
packed_simd is now in nightly rust std library. Any consideration for supporting them? |
Uh oh!
There was an error while loading. Please reload this page.
I am creating a library where I would like to abstract math over scalar (
f32
) or packed SIMD types (f32x8
) as defined in RFC 2366.For example, I would like to express:
And then call either
kernel(1.0, 2.0)
orkernel(f32x8::splat(1.0), f32x8::splat(2.0))
, depending on what data structure I am operating with.As part of that I was looking into
num-traits
, in particular I was about to create anum-packed
crate, that implementsNum
& friends for RFC 2366 packed types.The problem, however, is that many traits such as
Integer
,Float
,Signed
, ... not only providef(Self) -> Self
mathematical functions, but alsof(Self) -> bool
utilities, such asis_even
orinteger_decode
, which do not directly make sense anymore.Two questions:
num-packed
make sense as an addition tonum
, or am I on the wrong path?The text was updated successfully, but these errors were encountered: