mirror of
https://github.com/aicodix/code.git
synced 2026-04-27 14:30:36 +00:00
added code that might be faster on smaller CPUs
This commit is contained in:
parent
e96e4abe0e
commit
7ec6a47c89
1 changed files with 6 additions and 0 deletions
|
|
@ -376,7 +376,13 @@ template <int M, int64_t POLY, typename TYPE>
|
|||
GaloisFieldReference<M, POLY, TYPE> operator * (GaloisFieldReference<M, POLY, TYPE> a, GaloisFieldReference<M, POLY, TYPE> b)
|
||||
{
|
||||
GaloisFieldReference<M, POLY, TYPE> p(0);
|
||||
#if 0
|
||||
if (a.v < b.v)
|
||||
std::swap(a, b);
|
||||
while (a.v && b.v) {
|
||||
#else
|
||||
for (int i = 0; i < M; ++i) {
|
||||
#endif
|
||||
if (b.v & 1)
|
||||
p.v ^= a.v;
|
||||
if (a.v & (TYPE(1) << (M - 1)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue