MCPcopy Create free account
hub / github.com/c3d/tao3D / RecursiveMultiplyBottom

Function RecursiveMultiplyBottom

libcryptopp/cryptopp/integer.cpp:2126–2142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2124// B[N] - multiplicant
2125
2126void RecursiveMultiplyBottom(word *R, word *T, const word *A, const word *B, size_t N)
2127{
2128 assert(N>=2 && N%2==0);
2129
2130 if (N <= s_recursionLimit)
2131 s_pBot[N/4](R, A, B);
2132 else
2133 {
2134 const size_t N2 = N/2;
2135
2136 RecursiveMultiply(R, T, A0, B0, N2);
2137 RecursiveMultiplyBottom(T0, T1, A1, B0, N2);
2138 Add(R1, R1, T0, N2);
2139 RecursiveMultiplyBottom(T0, T1, A0, B1, N2);
2140 Add(R1, R1, T0, N2);
2141 }
2142}
2143
2144// R[N] --- upper half of A*B
2145// T[2*N] - temporary work space

Callers 1

MultiplyBottomFunction · 0.85

Calls 2

RecursiveMultiplyFunction · 0.85
AddFunction · 0.85

Tested by

no test coverage detected