-
Notifications
You must be signed in to change notification settings - Fork 225
Implement BatchNormalize
for NonIdentity
#1896
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
Implement BatchNormalize
for NonIdentity
#1896
Conversation
1c8e9df
to
e2c3a8f
Compare
I completely removed any usage of One notably change: instead of |
225884b
to
e3e5f8f
Compare
e3e5f8f
to
0a351c7
Compare
21d93b8
to
ced7993
Compare
ced7993
to
6edc705
Compare
@daxpedda can you also add It would also be good to find a way to exercise this code with tests somewhere in this repo, possibly leveraging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now. I can handle the CI changes as a followup.
Already on it. Trying to add a test right now. |
|
||
#[allow(unsafe_code)] | ||
// SAFETY: `NonIdentity` is `repr(transparent)`. | ||
let points: &[P; N] = unsafe { &*points.as_ptr().cast() }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious if you could extract an AsRef
impl here, but perhaps I can experiment with that myself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently not, because array
is a foreign type. Same applies to slices.
I guess we could add it as a method?
* Update to changes in `BatchNormalize` (RustCrypto/traits#1896) * Update to hash2curve changes (RustCrypto/traits#1901)
As discussed in #1889. I will add some tests in
elliptic-curves
as well.Resolves #1889.
Companion PR: RustCrypto/elliptic-curves#1248.