- 79E6526E650E729CE3925E841085F515E2D57F4B1B629AF5F39F9A0EEF61AAA30A4C67BFC40D222FB4919B22BCBD62D238F2CA36500163AA02D40A8F8FA5672B
+ E85E9FC6E391E1332EC7AA9BBF4331BBA8E462D5C1996B497696C12BB26097F1A3E4F97A342C868C30534FF648D12C2989875ADDE9233507A656C2B28742418F
ffa/libffa/fz_mul.ads
(24 . 39)(24 . 35)
1854
1855 pragma Pure;
1856
1857 -- Karatsuba Threshhold - at or below this many words, we use Comba mult.
1858 -- Karatsuba Threshhold - at or below this many Words, we use Comba mult.
1859 Karatsuba_Thresh : constant Indices := 8;
1860
1861 -- Multiply. (CAUTION: UNBUFFERED)
1862 procedure FZ_Multiply(X : in FZ;
1863 Y : in FZ;
1864 XY : out FZ);
1865 pragma Precondition(X'Length = Y'Length and
1866 XY'Length = (X'Length + Y'Length));
1867 procedure FZ_Multiply_Unbuffered(X : in FZ;
1868 Y : in FZ;
1869 XY : out FZ);
1870 pragma Inline_Always(FZ_Multiply_Unbuffered);
1871
1872 -- Comba's multiplier. (CAUTION: UNBUFFERED)
1873 procedure FZ_Mul_Comba(X : in FZ;
1874 Y : in FZ;
1875 XY : out FZ);
1876 pragma Precondition(X'Length = Y'Length and
1877 XY'Length = (X'Length + Y'Length));
1878 pragma Inline_Always(FZ_Mul_Comba);
1879
1880 -- Karatsuba's Multiplier. (CAUTION: UNBUFFERED)
1881 procedure Mul_Karatsuba(X : in FZ;
1882 Y : in FZ;
1883 XY : out FZ);
1884 pragma Precondition(X'Length = Y'Length and
1885 XY'Length = (X'Length + Y'Length) and
1886 X'Length mod 2 = 0);
1887 XY : out FZ)
1888 with Pre => X'Length = Y'Length and
1889 XY'Length = (X'Length + Y'Length) and
1890 X'Length mod 2 = 0;
1891 -- CAUTION: Inlining prohibited for Mul_Karatsuba !
1892
1893 -- Multiplier. Preserves the inputs.
1894 procedure FZ_Mult(X : in FZ;
1895 Y : in FZ;
1896 XY_Lo : out FZ;
1897 XY_Hi : out FZ);
1898 pragma Precondition(X'Length = Y'Length and
1899 XY_Lo'Length = XY_Hi'Length and
1900 XY_Lo'Length = ((X'Length + Y'Length) / 2));
1901 procedure FZ_Multiply_Buffered(X : in FZ;
1902 Y : in FZ;
1903 XY_Lo : out FZ;
1904 XY_Hi : out FZ);
1905 pragma Inline_Always(FZ_Multiply_Buffered);
1906
1907 end FZ_Mul;