Parallel integer gcd algorithms and their application to polynomial gcd
Kenneth Weber, Paul S. Wang · 1994
Two new integer greatest common divisor (GCD) algorithms, the accelerated GCD and the modular GCD, are presented. The former is the fastest procedure known for the practical computation of GCDs for medium- to large-size integers (50 digits or more); the latter appears to be the only integer GCD algorithm employing a modular representation. Design and implementation of the algorithms for both sequential and parallel computers are described. Application of the large-integer GCD algorithm leads to a new parallel version of GCDHEU, an existing algorithm for polynomial GCD. By eliminating two drawbacks that hamper the right-shift k-ary GCD (due to Jonathan Sorenson), the accelerated algorithm becomes fast and practical for integers with 50 or more digits. The key improvements lie in the removal of the need for a large precomputed table and in the fast recovery of the actual result. A sequential implementation of the accelerated algorithm is included in release 2.0 of the GNU Multiple Precision Arithmetic Library. On certain workstations it runs about twice as fast, for 50 digit input, and six times as fast for 2000 digits, as the GCD routine in the previous release. Experiments with parallel implementations of the accelerated algorithm on both a shared memory multiprocessor (Sequent Balance) and a data-parallel computer are discussed. For input of roughly 10,000 digits, our implementation on the Balance displays speedups of 1.6, 2.5, 3.4, and 4.0 using 2, 4, 8 and 16 processors, respectively. The modular integer GCD algorithm, like the accelerated algorithm, uses the basic idea of the k-ary algorithm, but converts multi-precision integer input into a modular representation for most of the processing. It seems to be especially suited to data parallel (SIMD) computers. The heuristic polynomial GCD algorithm GCDHEU is a natural application for the accelerated integer GCD algorithm, since as an intermediate step it must compute greatest common divisors for very large integers. We designed and experimented with a new version of the GCDHEU algorithm, GCDCOLL--the collusive polynomial GCD algorithm, that simultaneously performs more than one search for the result. The collusive algorithm is faster than GCDHEU on the Sequent Balance.
Cited by 3 works.