Skip to content

rainier features + cpp funct ptr + barret & clmul reduction + const time inv + fast lagrange precomp + interp + div by x-a#3

Open
shibammukherjee wants to merge 1 commit intodkales:mainfrom
shibammukherjee:cppfpandotheroptimizations
Open

rainier features + cpp funct ptr + barret & clmul reduction + const time inv + fast lagrange precomp + interp + div by x-a#3
shibammukherjee wants to merge 1 commit intodkales:mainfrom
shibammukherjee:cppfpandotheroptimizations

Conversation

@shibammukherjee
Copy link

rainier features + cpp funct ptr + barret & clmul reduction + const time inv + fast lagrange precomp + interp + div by x-a

…ime inv + fast lagrange precomp + interp + div by x-a
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wignored-attributes"
static std::function<uint64_t(__m128i)> reduce;
static uint64_t (*reduce_naive)(__m128i);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be only a single function pointer that gets set to the fastest variant for each field size.

return buffer;
}

uint64_t GF2E::get_data() const { return this->data; }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably don't want this, if you need access to data in a function like eval, make it a friend function.

modulus =
(1ULL << 16) | (1ULL << 5) | (1ULL << 3) | (1ULL << 1) | (1ULL << 0);
reduce = reduce_GF2_16;
reduce_naive = reduce_GF2_16;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as mentioned for these, only use the fastest one for each.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants