-
Notifications
You must be signed in to change notification settings - Fork 6
Simplify SIMD operations #284
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
Conversation
fcad024 to
fae4de8
Compare
slaperche-scality
left a comment
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.
Great PR, lot of simplifications.
It's really nice 🙂
test/quadiron_c_utest.cpp
Outdated
| } | ||
| } | ||
|
|
||
| // FIXME: for non-systematic FNT, `quadiron_fnt32_decode` will |
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.
IMHO, it's cleaner to have a copy of _data/call quadiron_fnt32_decode on a copy instead of relying on the order of the test.
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.
yes, it's better. A copy of encoded fragments will be used to avoid such cases.
Some global variables are no longer used as we support only FNT for `w=T/2`, i.e. - FNT(257) using uint16_t - FNT(65537) using uint32_t To clarify reader, we use const reference for VecType variable if it's necessary.
The only support FNT with `w=T/2`, i.e. - FNT(257) using uint16_t - FNT(65537) using uint32_t gives advantages: - Operations are simplified by avoiding the argument cardinal. - Some branches can be avoided.
In butterfly operations, there are three cases depending on the coefficient `r`: - r = 1 - r = q - 1 - 1 < r < q - 1 We use an enum class to clarify such cases.
according changes in modular arithmetics
388d6c0 to
09181fb
Compare
|
@slaperche-scality : it's updated. Thanks for your next reviews :) |
- Reset metadata of decoded data: for non-systematic code, we use first k parities to store decoded data. These metadata should be reset. - Remove an useless initialisation of data_vec for non-systematic codes.
Note that for non-systematic FNT, in encoding and decoding of QuadIron C API, input data will be overwritten by output data: - `quadiron_fnt32_encode` will store first `k` parities in the input data buffers, and the next `m` parities in the usual parity buffers. - `quadiron_fnt32_decode` will overwrite input data pointers (that stores actually encoded fragments) by decoded data. In the test, coded fragments will be stored to use correct fragments. They will be used to check reconstructed data.
856fe81 to
7147e6f
Compare
NB: the PR is split/extracted from the big one #282
The purpose is to eliminate as much as possible branches, particularly in essential operations s.t. modular operations.
Currently, we support vectorized operations of FNT in the cases:
uint16_tanduint32_tuint32_tBut the support of FNT(257) using
uint32_traises additional branches of checking the cardinal of the field. And its encoding/decoding speeds are obviously smaller than the two other cases: FNT(257) usinguin16_tand FNT(65537) usinguint32_t.Hence, for FNT, we support only FNT(257) using
uin16_tand FNT(65537) usinguint32_t.