Repository navigation
Fix Clang build error in ternary generator - #1361
Open
dsuponitskiy wants to merge 4 commits into
Open
dsuponitskiy wants to merge 4 commits into
dsuponitskiy wants to merge 4 commits into
Conversation
dsuponitskiy
force-pushed
the
1360-fix-a-build-error-in-generateinteger
branch
3 times, most recently
from
October 7, 2026 22:03
dfb00ad to
c004eb2
Compare
Make m_distribution an inline static member so it is defined when GenerateInteger is instantiated from the header. This fixes the -Wundefined-var-template error in UnitTestDistrGen.cpp.
- Converted static members with trivial .cpp definitions to C++17 inline (constexpr where possible) across core and pke: PackedEncoding, StdLatticeParm, DiscreteFourierTransform, HashUtil, BigIntegerFixedT, myZZ, CryptoContextImpl/Factory, FHECKKSRNS and the FTT/Bluestein/Arb transform caches in all 4 backends (their definitions in *-impl.h are gone now). - Moved members that were public for no reason to private (Bluestein caches need a friend declaration for ChineseRemainderTransformArb*). Dropped the unused and never defined BigIntegerFixedT::m_modChain. - PseudoRandomNumberGenerator::m_prng has to keep its .cpp definition: gcc rejects "#pragma omp threadprivate" after an in-class definition.
… inline static cleanup Initialize StandardLatticeParmSets from an inline factory function so stdlatticeparms.cpp no longer defines it, turn GLOBALS::precomputeCRTTables into an inline static with friend accessors, and make the Log2/UIntBitWidth type traits constexpr.
Also move the StandardLatticeParmSets table back to the cpp file: the header keeps an inline member initialized from a factory function that is now defined out of line, so the table is compiled only once.
dsuponitskiy
force-pushed
the
1360-fix-a-build-error-in-generateinteger
branch
from
October 11, 2026 03:12
3856a46 to
68a2fb0
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make m_distribution an inline static member so it is defined when GenerateInteger is instantiated from the header. This fixes the -Wundefined-var-template error in UnitTestDistrGen.cpp.