Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ntt_test.cc File Reference

Tests for the industrial NTT core, CRT exact multiplier, and high-level algebra helpers. More...

#include <gtest/gtest.h>
#include <algorithm>
#include <chrono>
#include <cstdlib>
#include <random>
#include <string>
#include <modular_arithmetic.H>
#include <ntt.H>
#include <thread_pool.H>
Include dependency graph for ntt_test.cc:

Go to the source code of this file.

Classes

class  NTTIndustrialTest
 

Functions

 TEST_F (NTTIndustrialTest, ReportsSupportedSizesAndRoots)
 
 TEST_F (NTTIndustrialTest, SimdBackendNameIsRecognized)
 
 TEST_F (NTTIndustrialTest, SequentialRoundTripMatchesModuloProjection)
 
 TEST_F (NTTIndustrialTest, ForcedSimdBackendsMatchScalarResults)
 
 TEST_F (NTTIndustrialTest, PolynomialEvalAndDivmodMatchNaiveReference)
 
 TEST_F (NTTIndustrialTest, PolynomialInverseMatchesNaiveReferenceAndIdentity)
 
 TEST_F (NTTIndustrialTest, PolynomialLogExpAndPowerMatchNaiveReference)
 
 TEST_F (NTTIndustrialTest, PolynomialSqrtRecoversKnownSquares)
 
 TEST_F (NTTIndustrialTest, PolynomialInterpolationRoundTripMatchesNaiveReference)
 
 TEST_F (NTTIndustrialTest, BigintMultiplyMatchesKnownProductsAndNaiveReference)
 
 TEST_F (NTTIndustrialTest, ParallelBigintMultiplyMatchesSequentialAndNormalizes)
 
 TEST_F (NTTIndustrialTest, BigintMultiplyLargeDecimalPattern)
 
 TEST_F (NTTIndustrialTest, NegacyclicMultiplyMatchesNaiveReference)
 
 TEST_F (NTTIndustrialTest, BigintMillionDigitPatternIsGuardedByEnvironment)
 
 TEST_F (NTTIndustrialTest, AlternatePrimeRoundTripMatchesModuloProjection)
 
 TEST_F (NTTIndustrialTest, BluesteinMatchesNaiveTransformOnSupportedSizes)
 
 TEST_F (NTTIndustrialTest, MultiplyMatchesNaiveConvolution)
 
 TEST_F (NTTIndustrialTest, PlanMatchesStaticTransformAndMultiply)
 
 TEST_F (NTTIndustrialTest, BatchTransformMatchesItemWiseTransform)
 
 TEST_F (NTTIndustrialTest, BluesteinPlanMatchesStaticAndBatchVariants)
 
 TEST_F (NTTIndustrialTest, ParallelTransformAndMultiplyMatchSequentialResults)
 
 TEST_F (NTTIndustrialTest, ParallelBatchMatchesSequentialBatch)
 
 TEST_F (NTTIndustrialTest, MultiplyInplaceReplacesLeftOperand)
 
 TEST_F (NTTIndustrialTest, ExactMultiplyReportsSupportedProductLengths)
 
 TEST_F (NTTIndustrialTest, ExactMultiplyMatchesNaiveReferenceAboveSinglePrime)
 
 TEST_F (NTTIndustrialTest, ExactMultiplyAcceptsNearTwoToSixtyThreeWhenBoundFits)
 
 TEST_F (NTTIndustrialTest, ParallelExactMultiplyMatchesSequentialAndPrimeResidues)
 
 TEST_F (NTTIndustrialTest, ExactMultiplyRejectsInputsOutsideCRTRange)
 
 TEST_F (NTTIndustrialTest, ErrorPathsAreValidated)
 
 TEST_F (NTTIndustrialTest, PerformanceRegressionIsGuardedByEnvironment)
 

Detailed Description

Tests for the industrial NTT core, CRT exact multiplier, and high-level algebra helpers.

Definition in file ntt_test.cc.

Function Documentation

◆ TEST_F() [1/30]

TEST_F ( NTTIndustrialTest  ,
AlternatePrimeRoundTripMatchesModuloProjection   
)

◆ TEST_F() [2/30]

TEST_F ( NTTIndustrialTest  ,
BatchTransformMatchesItemWiseTransform   
)

Definition at line 1072 of file ntt_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [3/30]

TEST_F ( NTTIndustrialTest  ,
BigintMillionDigitPatternIsGuardedByEnvironment   
)

◆ TEST_F() [4/30]

TEST_F ( NTTIndustrialTest  ,
BigintMultiplyLargeDecimalPattern   
)

◆ TEST_F() [5/30]

TEST_F ( NTTIndustrialTest  ,
BigintMultiplyMatchesKnownProductsAndNaiveReference   
)

Definition at line 885 of file ntt_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [6/30]

TEST_F ( NTTIndustrialTest  ,
BluesteinMatchesNaiveTransformOnSupportedSizes   
)

◆ TEST_F() [7/30]

TEST_F ( NTTIndustrialTest  ,
BluesteinPlanMatchesStaticAndBatchVariants   
)

◆ TEST_F() [8/30]

◆ TEST_F() [9/30]

TEST_F ( NTTIndustrialTest  ,
ExactMultiplyAcceptsNearTwoToSixtyThreeWhenBoundFits   
)

◆ TEST_F() [10/30]

TEST_F ( NTTIndustrialTest  ,
ExactMultiplyMatchesNaiveReferenceAboveSinglePrime   
)

◆ TEST_F() [11/30]

TEST_F ( NTTIndustrialTest  ,
ExactMultiplyRejectsInputsOutsideCRTRange   
)

◆ TEST_F() [12/30]

TEST_F ( NTTIndustrialTest  ,
ExactMultiplyReportsSupportedProductLengths   
)

◆ TEST_F() [13/30]

TEST_F ( NTTIndustrialTest  ,
ForcedSimdBackendsMatchScalarResults   
)

Definition at line 734 of file ntt_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [14/30]

TEST_F ( NTTIndustrialTest  ,
MultiplyInplaceReplacesLeftOperand   
)

Definition at line 1171 of file ntt_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [15/30]

TEST_F ( NTTIndustrialTest  ,
MultiplyMatchesNaiveConvolution   
)

Definition at line 1032 of file ntt_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [16/30]

TEST_F ( NTTIndustrialTest  ,
NegacyclicMultiplyMatchesNaiveReference   
)

◆ TEST_F() [17/30]

TEST_F ( NTTIndustrialTest  ,
ParallelBatchMatchesSequentialBatch   
)

◆ TEST_F() [18/30]

TEST_F ( NTTIndustrialTest  ,
ParallelBigintMultiplyMatchesSequentialAndNormalizes   
)

Definition at line 912 of file ntt_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [19/30]

TEST_F ( NTTIndustrialTest  ,
ParallelExactMultiplyMatchesSequentialAndPrimeResidues   
)

◆ TEST_F() [20/30]

TEST_F ( NTTIndustrialTest  ,
ParallelTransformAndMultiplyMatchSequentialResults   
)

Definition at line 1129 of file ntt_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [21/30]

TEST_F ( NTTIndustrialTest  ,
PerformanceRegressionIsGuardedByEnvironment   
)

◆ TEST_F() [22/30]

TEST_F ( NTTIndustrialTest  ,
PlanMatchesStaticTransformAndMultiply   
)

Definition at line 1049 of file ntt_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [23/30]

TEST_F ( NTTIndustrialTest  ,
PolynomialEvalAndDivmodMatchNaiveReference   
)

Definition at line 780 of file ntt_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [24/30]

TEST_F ( NTTIndustrialTest  ,
PolynomialInterpolationRoundTripMatchesNaiveReference   
)

Definition at line 863 of file ntt_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [25/30]

TEST_F ( NTTIndustrialTest  ,
PolynomialInverseMatchesNaiveReferenceAndIdentity   
)

◆ TEST_F() [26/30]

TEST_F ( NTTIndustrialTest  ,
PolynomialLogExpAndPowerMatchNaiveReference   
)

Definition at line 817 of file ntt_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [27/30]

TEST_F ( NTTIndustrialTest  ,
PolynomialSqrtRecoversKnownSquares   
)

Definition at line 842 of file ntt_test.cc.

References Aleph::divide_and_conquer_partition_dp(), and root().

◆ TEST_F() [28/30]

TEST_F ( NTTIndustrialTest  ,
ReportsSupportedSizesAndRoots   
)

Definition at line 683 of file ntt_test.cc.

References Aleph::divide_and_conquer_partition_dp(), and Aleph::mod_exp().

◆ TEST_F() [29/30]

TEST_F ( NTTIndustrialTest  ,
SequentialRoundTripMatchesModuloProjection   
)

◆ TEST_F() [30/30]

TEST_F ( NTTIndustrialTest  ,
SimdBackendNameIsRecognized   
)

Definition at line 707 of file ntt_test.cc.

References Aleph::and, and Aleph::divide_and_conquer_partition_dp().