Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
ed7a950
Remove warnings from br.c.
ldesnogu Jul 26, 2024
bd8d58b
Remove warnings from dft_macro.c.
ldesnogu Jul 26, 2024
cda32ec
Remove warnings from fermat_mod_square.c.
ldesnogu Jul 26, 2024
51d75d9
Move xmalloc and xcalloc in threadpool.c.
ldesnogu Jul 26, 2024
1b61b13
Remove warnings from mers_mod_square.c.
ldesnogu Jul 26, 2024
8129527
Remove warnings from mi64.c.
ldesnogu Jul 26, 2024
8d00ca1
Remove warnings from Mlucas.c.
ldesnogu Jul 26, 2024
88fc342
Remove warnings from pairFFT_mul.c.
ldesnogu Jul 26, 2024
2cf2d96
Remove warnings from pm1.c.
ldesnogu Jul 26, 2024
9670749
Remove warnings from qfloat.c.
ldesnogu Jul 26, 2024
ec04267
Remove VAR_WARN from utils.
ldesnogu Jul 27, 2024
59065fd
Remove warnings from util.c.
ldesnogu Jul 27, 2024
700c90d
Remove warnings from twopmodq.c.
ldesnogu Jul 27, 2024
2f7b1ba
Remove warnings from twopmodq96.c.
ldesnogu Jul 27, 2024
151c814
Remove nested comments in twopmodq80.h.
ldesnogu Jul 28, 2024
b434081
Remove warnings from twopmodq80.c.
ldesnogu Jul 28, 2024
f88f420
Remove warnings from twopmodq256.c.
ldesnogu Jul 29, 2024
df01ddc
Remove warnings from twopmodq192.c.
ldesnogu Jul 29, 2024
839a20c
Remove warnings from twopmodq128.c.
ldesnogu Jul 29, 2024
2ca2100
prefetch_p_doubles empty macro definition fakes use of parameter.
ldesnogu Jul 29, 2024
5c0bc90
Remove warnings from radix9_ditN_cy_dif1.c.
ldesnogu Jul 29, 2024
aef2c5e
Remove warnings from radix992_ditN_cy_dif1.c.
ldesnogu Jul 29, 2024
43fb19a
Remove warnings from radix960_ditN_cy_dif1.c.
ldesnogu Jul 29, 2024
e165878
Remove warnings from radix18_ditN_cy_dif1.c.
ldesnogu Aug 4, 2024
acad1db
Remove warnings from radix10_ditN_cy_dif1.c.
ldesnogu Aug 4, 2024
81ab448
Remove warnings from radix11_ditN_cy_dif1.c.
ldesnogu Aug 4, 2024
60ba3e4
Remove warnings from radix14_ditN_cy_dif1.c.
ldesnogu Aug 4, 2024
70066f7
Remove warnings from radix22_ditN_cy_dif1.c.
ldesnogu Aug 4, 2024
8b93cd1
Remove warnings from radix5_ditN_cy_dif1.c.
ldesnogu Aug 4, 2024
0a7d736
Remove warnings from radix7_ditN_cy_dif1.c.
ldesnogu Aug 4, 2024
88eea48
Remove warnings from radix30_ditN_cy_dif1.c.
ldesnogu Aug 4, 2024
02e6264
Remove warnings from radix26_ditN_cy_dif1.c.
ldesnogu Aug 4, 2024
b8b4663
Remove warnings from radix6_ditN_cy_dif1.c.
ldesnogu Aug 4, 2024
4db20b8
Remove warnings from radix13_ditN_cy_dif1.c.
ldesnogu Aug 4, 2024
8ce2992
Remove warnings from radix17_ditN_cy_dif1.c.
ldesnogu Aug 4, 2024
2e15ee5
Remove warnings from radix31_ditN_cy_dif1.c.
ldesnogu Aug 4, 2024
73844ec
Remove warnings from radix63_ditN_cy_dif1.c.
ldesnogu Aug 4, 2024
bdfce8a
Remove warnings from radix72_ditN_cy_dif1.c.
ldesnogu Aug 4, 2024
46ad1d8
Remove warnings from radix160_ditN_cy_dif1.c.
ldesnogu Aug 5, 2024
a257a97
Remove warnings from radix20_ditN_cy_dif1.c.
ldesnogu Aug 5, 2024
0c53edb
Remove warnings from radix56_ditN_cy_dif1.c.
ldesnogu Aug 6, 2024
6cfe9e9
Remove warnings from radix28_ditN_cy_dif1.c.
ldesnogu Aug 9, 2024
c55977a
Remove warnings from radix1024_ditN_cy_dif1.c.
ldesnogu Aug 11, 2024
9604738
Remove warnings from radix12_ditN_cy_dif1.c.
ldesnogu Aug 12, 2024
29103cd
Remove warnings from radix15_ditN_cy_dif1.c.
ldesnogu Aug 13, 2024
9b5d754
Remove warnings from radix16_ditN_cy_dif1.c.
ldesnogu Aug 13, 2024
c98bb6d
Remove warnings from radix24_ditN_cy_dif1.c.
ldesnogu Aug 13, 2024
77e39e2
Remove warnings from radix32_ditN_cy_dif1.c.
ldesnogu Aug 14, 2024
50c86f4
Remove warnings from radix36_ditN_cy_dif1.c.
ldesnogu Aug 14, 2024
21c704a
Remove warnings from radix40_ditN_cy_dif1.c.
ldesnogu Aug 15, 2024
56a99ff
Remove warnings from radix44_ditN_cy_dif1.c.
ldesnogu Aug 15, 2024
12d7824
Remove warnings from radix48_ditN_cy_dif1.c.
ldesnogu Aug 16, 2024
ff072b3
Remove warnings from radix52_ditN_cy_dif1.c.
ldesnogu Aug 16, 2024
4c260d0
Remove warnings from radix60_ditN_cy_dif1.c.
ldesnogu Aug 17, 2024
762f380
Remove warnings from radix64_ditN_cy_dif1.c.
ldesnogu Aug 17, 2024
123e967
Remove warnings from radix128_ditN_cy_dif1.c.
ldesnogu Aug 18, 2024
6b6d441
Remove warnings from radix144_ditN_cy_dif1.c.
ldesnogu Aug 18, 2024
d530d00
Remove warnings from radix176_ditN_cy_dif1.c.
ldesnogu Aug 18, 2024
bc1f9c5
Remove warnings from radix192_ditN_cy_dif1.c.
ldesnogu Aug 19, 2024
55fa053
Remove warnings from radix208_ditN_cy_dif1.c.
ldesnogu Aug 19, 2024
cdc6a0c
Remove warnings from radix224_ditN_cy_dif1.c.
ldesnogu Aug 20, 2024
ec02830
Remove warnings from radix240_ditN_cy_dif1.c.
ldesnogu Aug 21, 2024
b2f0c4c
Remove warnings from radix256_ditN_cy_dif1.c.
ldesnogu Aug 21, 2024
6dac03e
Remove warnings from radix288_ditN_cy_dif1.c.
ldesnogu Aug 21, 2024
0ff2e44
Remove warnings from radix320_ditN_cy_dif1.c.
ldesnogu Aug 21, 2024
644524e
Remove warnings from radix352_ditN_cy_dif1.c.
ldesnogu Aug 21, 2024
3ecdcc4
Remove warnings from radix384_ditN_cy_dif1.c.
ldesnogu Aug 21, 2024
fc3a352
Remove warnings from radix768_ditN_cy_dif1.c.
ldesnogu Aug 22, 2024
e9e0b42
Remove warnings from radix1008_ditN_cy_dif1.c.
ldesnogu Aug 22, 2024
b779e34
Remove warnings from radix4032_ditN_cy_dif1.c.
ldesnogu Aug 22, 2024
2b697ae
Remove warnings from radix8_dif_dit_pass.c.
ldesnogu Aug 22, 2024
852e2f1
Remove warnings from radix16_dif_dit_pass.c.
ldesnogu Aug 22, 2024
ee66f79
Remove warnings from radix32_dif_dit_pass.c.
ldesnogu Aug 23, 2024
4fce66c
Remove warnings from radix16_dyadic_square.c.
ldesnogu Aug 23, 2024
29242e9
Remove warnings from radix32_dyadic_square.c.
ldesnogu Aug 23, 2024
36d54ab
Remove warnings from radix16_wrapper_square.c.
ldesnogu Aug 23, 2024
b84723c
Remove warnings from radix32_wrapper_square.c.
ldesnogu Aug 23, 2024
6fd5c5a
Remove warnings from pm1.c.
ldesnogu Aug 23, 2024
f4cf5a5
Remove warnings from twopmodq100.c.
ldesnogu Aug 23, 2024
f6efad6
Remove warnings from threadpool.c when hwloc is used.
ldesnogu Aug 25, 2024
58eb72c
Add stuff to get rid of gcc warnings for strict aliasing rule when co…
ldesnogu Sep 1, 2024
c143a98
Remove aliasing warnings from rng_isaac.c.
ldesnogu Sep 1, 2024
ecdb499
Remove aliasing warnings from mi64.c.
ldesnogu Sep 1, 2024
6e11d2b
Remove aliasing warnings from fermat_mod_square.c.
ldesnogu Sep 1, 2024
3db0533
Remove aliasing warnings from mers_mod_square.c.
ldesnogu Sep 1, 2024
832c05f
Remove aliasing warnings from qfloat.c.
ldesnogu Sep 1, 2024
fffa9a5
Remove aliasing warnings from util.c.
ldesnogu Sep 1, 2024
b5f02a2
Remove aliasing warnings from dft_macro.c.
ldesnogu Sep 1, 2024
8e7fd5d
Remove aliasing warnings from twopmodq80.c.
ldesnogu Sep 1, 2024
8bc07f1
Remove aliasing warnings from radix8_dif_dit_pass.c.
ldesnogu Sep 1, 2024
fcc1180
Remove aliasing warnings from radix32_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
8ff1203
Remove aliasing warnings from radix28_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
901ece3
Remove aliasing warnings from radix16_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
6d3b793
Remove aliasing warnings from radix40_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
4b49b48
Remove aliasing warnings from radix48_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
1095f9b
Remove aliasing warnings from radix56_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
7e1af92
Remove aliasing warnings from radix60_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
6847e2e
Remove aliasing warnings from radix64_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
7dd1533
Remove aliasing warnings from radix128_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
d27671e
Remove aliasing warnings from radix144_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
d2a1b2e
Remove aliasing warnings from radix160_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
0c68df0
Remove aliasing warnings from radix176_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
dcc7b48
Remove aliasing warnings from radix208_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
f4be375
Remove aliasing warnings from radix224_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
4bfa773
Remove aliasing warnings from radix240_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
c2c994d
Remove aliasing warnings from radix256_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
8997865
Remove aliasing warnings from radix352_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
d821cc0
Remove aliasing warnings from radix384_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
1cdd303
Remove aliasing warnings from radix768_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
35517a3
Remove aliasing warnings from radix960_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
7577ee0
Remove aliasing warnings from radix992_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
1e8d385
Remove aliasing warnings from radix1008_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
494cb74
Remove aliasing warnings from radix1024_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
7acae71
Remove aliasing warnings from radix4032_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
705e70f
Add missing initialization of j1 in radix12_ditN_cy_dif1.c.
ldesnogu Sep 1, 2024
ac28c59
Define qfldbl and ldbl_to_q only for x87 code.
ldesnogu Sep 1, 2024
7136a86
Fix type used in ALLOC_UINT and ALIGN_UINT macros.
ldesnogu Sep 1, 2024
8f3bc15
Fix Linux warnings in threadpool.c.
ldesnogu Sep 1, 2024
fb7e7d7
Fix format warning in mi64.c.
ldesnogu Sep 1, 2024
3c14045
Use sizeof instead of explicit STR_MAX_LEN in Mlucas.c.
ldesnogu Sep 7, 2024
4d07697
Whitespace cosmetics in Mlucas.[ch].
ldesnogu Sep 7, 2024
5b9dcf9
Directly print to stderr the warning extract_known_factors.
ldesnogu Sep 7, 2024
a62e487
Rename global cstr variable to g_cstr.
ldesnogu Sep 7, 2024
e5d2675
Rename parameter cstr to p_cstr.
ldesnogu Sep 7, 2024
a70ffb8
Rename in_line to g_in_line for global and p_in_line for parameter.
ldesnogu Sep 7, 2024
3d46403
Remove warning due to using strncpy.
ldesnogu Sep 7, 2024
4fd24cd
Fix singlethread compilation of factor.c.
ldesnogu Sep 7, 2024
36c39c5
Remove warnings from factor_test.h.
ldesnogu Sep 7, 2024
2f6536d
Remove warnings from factor.c.
ldesnogu Sep 7, 2024
f28e202
Remove format warnings from Mlucas.c.
ldesnogu Sep 8, 2024
3a965da
Make mi64_div_y32 source array const.
ldesnogu Sep 8, 2024
708a8ef
Remove copy warnings from factor.c.
ldesnogu Sep 8, 2024
24f651a
Fix warnings found on Windows in util.c.
ldesnogu Sep 11, 2024
f4eebd5
Fix warnings about not initialized bjmodn/cy variables in radix16_dit…
ldesnogu Sep 15, 2024
6d42439
Remove warnings from radix12_ditN_cy_dif1.c.
ldesnogu Sep 15, 2024
9186a16
Remove warnings from radix24_ditN_cy_dif1.c.
ldesnogu Sep 15, 2024
e2e0b75
Remove warnings from radix20_ditN_cy_dif1.c.
ldesnogu Sep 15, 2024
bb6fe82
Remove warnings from radix160_ditN_cy_dif1.c.
ldesnogu Sep 15, 2024
cd5594c
Remove warnings from radix224_ditN_cy_dif1.c.
ldesnogu Sep 15, 2024
3721386
Remove warnings from radix192_ditN_cy_dif1.c.
ldesnogu Sep 15, 2024
aa9d01c
Remove warnings from radix320_ditN_cy_dif1.c.
ldesnogu Sep 15, 2024
e213797
Remove warnings from radix240_ditN_cy_dif1.c.
ldesnogu Sep 15, 2024
d204aa3
Remove warnings from radix288_ditN_cy_dif1.c.
ldesnogu Sep 15, 2024
eff1d28
Remove warnings from radix352_ditN_cy_dif1.c.
ldesnogu Sep 15, 2024
ea9fb86
Remove warnings from radix384_ditN_cy_dif1.c.
ldesnogu Sep 15, 2024
2ba3bf5
Remove warnings from radix1024_ditN_cy_dif1.c.
ldesnogu Sep 15, 2024
cbd20c9
Remove warnings from radix992_ditN_cy_dif1.c.
ldesnogu Sep 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions docs/ConvertInlineAsm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Recipe for MSVC --> GCC inline ASM conversion:

Before you begin tranmslation:
- Max. number of input variables GCC allows = 30 ... if you're using more than that,
trying reducing the count e.g. by using var2 = var1 + memoffset in the ASM.
DO THIS USING THE MSVC CODE, i.e. only *after* you've successfully reduced
the inline ASM macro arg count should you proceed with syntax translation.
That allows you to work through small chunks of inline ASM at a time, doing
quick-build-and-debug to check the changes, i.e. greatly eases debug.

0. Remove all but most-crucial comments to ease conversion, as follows:
[blockmode] space all "keeper" comments to extreme left
multistatement __asm lines --> one __asm pre line, realign __asm to left-justify, delete __asm\t
For non-keeper comments: /* --> @@
[regexp] @@ --> \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t@@
(delete all @@... stuff)\
\t\n --> \n (repeat until no more trailing tabs)
[/regexp]
Repeat /* --> @@, [regexp] @@ --> \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t@@ steps for keeper comments, to move out of harm's way.
1. [...] --> (...)
2. ALU ops [e.g. mov, add, shl] --> spaces to tabs, then append "l" [if e*x] or "q" [if r*x] to instruction name
3. Numeric literals in above kinds of instructions: Prepend "$" [",0x" --> ",$0x"]
4. Address offsets of form (...+0x100) --> 0x100(...), (...-0x100) --> -0x100(...)
5. External variable names get wrapped in %[]
6. Line up commas in vertically stacked columns, then reverse operand order columnwise [for both 2 and 3-operand instructions].
7. Prepend "%%" to all register names
8. Only e*x/r*x registers appear in clobber list, not special regs like mmx and xmm.

Additional Notes:
- Need to strip off any leading white space from named vars inside [], e.g. for "movl %[ c4],%%ecx \n\t" get "undefined named operand ' c4'" error;
- Offsets with explicit + sign, e.g. "+0x10(%%eax)", not allowed
6 changes: 3 additions & 3 deletions src/Mdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ representation of N, specifically for the following currently-supported modulus
MODULUS_TYPE_FERMAT: A = 2, E = 2^findex, B = +1, pstring = "F{findex}"
*/
extern char ESTRING[STR_MAX_LEN]; /* Exponent in string form */
extern char PSTRING[STR_MAX_LEN]; /* Number being tested in string form, typically estring concatenated with several other descriptors, e.g. strcat("M",estring) for Mersennes */
extern char PSTRING[STR_MAX_LEN+1]; /* Number being tested in string form, typically estring concatenated with several other descriptors, e.g. strcat("M",estring) for Mersennes */

// The index following 'mask' here = log2(#doubles in SIMD register) = log2(#bits in SIMD register) - 6 :
#ifdef USE_AVX512
Expand All @@ -222,8 +222,8 @@ extern char PSTRING[STR_MAX_LEN]; /* Number being tested in string form, typical
#endif

extern const int hex_chars[16];
extern char cbuf[STR_MAX_LEN*2], cstr[STR_MAX_LEN];
extern char in_line[STR_MAX_LEN];
extern char cbuf[STR_MAX_LEN*2+200], g_cstr[STR_MAX_LEN];
extern char g_in_line[STR_MAX_LEN];
extern char *char_addr;
extern int char_offset;
extern FILE *fp, *fq;
Expand Down
584 changes: 291 additions & 293 deletions src/Mlucas.c

Large diffs are not rendered by default.

154 changes: 77 additions & 77 deletions src/Mlucas.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,56 +76,56 @@ uint32 ernstMain
);

uint64 parse_cmd_args_get_shift_value(void);
int is_hex_string(char*s, int len);
char* check_kbnc(char*in_str, uint64*p);
int is_hex_string(const char *s, int len);
char *check_kbnc(char *in_str, uint64 *p);
void generate_JSON_report(
const uint32 isprime, const uint64 p, const uint32 n, const uint64 Res64, const char* Res2048, const char*timebuffer,
const uint32 B1, const uint64 B2, const char*factor, const uint32 s2_partial, char*cstr
const uint32 isprime, const uint64 p, const uint32 n, const uint64 Res64, const char *Res2048, const char *timebuffer,
const uint32 B1, const uint64 B2, const char *factor, const uint32 s2_partial, char *p_cstr
);
void print_help(void);
int cfgNeedsUpdating(char*in_line);
const char*returnMlucasErrCode(uint32 ierr);
int cfgNeedsUpdating(const char *p_in_line);
const char *returnMlucasErrCode(uint32 ierr);
void printMlucasErrCode(uint32 ierr);
uint64 shift_word(double a[], int n, const uint64 p, const uint64 shift, const double cy_in);
uint32 Suyama_CF_PRP(uint64 p, uint64*Res64, uint32 nfac, double a[], double b[], uint64 ci[], uint32 ilo,
uint32 Suyama_CF_PRP(uint64 p, uint64 *Res64, uint32 nfac, double a[], double b[], uint64 ci[], uint32 ilo,
int (*func_mod_square)(double [], int [], int, int, int, uint64, uint64, int, double *, int, double *),
int n, int scrnFlag, double *tdiff, char*const gcd_str);
int n, int scrnFlag, double *tdiff, char *const gcd_str);
int test_types_compatible(uint32 t1, uint32 t2);
int read_ppm1_residue(const uint32 nbytes, FILE*fp, uint8 arr_tmp[], uint64*Res64, uint64*Res35m1, uint64*Res36m1);
void write_ppm1_residue(const uint32 nbytes, FILE*fp, const uint8 arr_tmp[], const uint64 Res64, const uint64 Res35m1, const uint64 Res36m1);
int read_ppm1_savefiles(const char*fname, uint64 p, uint32*kblocks, FILE*fp, uint64*ilo, uint8 arr1[], uint64*Res64, uint64*Res35m1, uint64*Res36m1, uint8 arr2[], uint64*i1, uint64*i2, uint64*i3);
void write_ppm1_savefiles(const char*fname, uint64 p, int n, FILE*fp, uint64 ihi, uint8 arr1[], uint64 Res64, uint64 Res35m1, uint64 Res36m1, uint8 arr2[], uint64 i1, uint64 i2, uint64 i3);
int read_ppm1_residue(const uint32 nbytes, FILE *fp, uint8 arr_tmp[], uint64 *Res64, uint64 *Res35m1, uint64 *Res36m1);
void write_ppm1_residue(const uint32 nbytes, FILE *fp, const uint8 arr_tmp[], const uint64 Res64, const uint64 Res35m1, const uint64 Res36m1);
int read_ppm1_savefiles(const char *fname, uint64 p, uint32 *kblocks, FILE *fp, uint64 *ilo, uint8 arr1[], uint64 *Res64, uint64 *Res35m1, uint64 *Res36m1, uint8 arr2[], uint64 *i1, uint64 *i2, uint64 *i3);
void write_ppm1_savefiles(const char *fname, uint64 p, int n, FILE *fp, uint64 ihi, uint8 arr1[], uint64 Res64, uint64 Res35m1, uint64 Res36m1, uint8 arr2[], uint64 i1, uint64 i2, uint64 i3);
int convert_res_bytewise_FP(const uint8 ui64_arr_in[], double a[], int n, const uint64 p);
void convert_res_FP_bytewise(const double a[], uint8 ui64_arr_out[], int n, const uint64 p, uint64*Res64, uint64*Res35m1, uint64*Res36m1);
void res_SH(uint64 a[], uint32 len, uint64*Res64, uint64*Res35m1, uint64*Res36m1);
void convert_res_FP_bytewise(const double a[], uint8 ui64_arr_out[], int n, const uint64 p, uint64 *Res64, uint64 *Res35m1, uint64 *Res36m1);
void res_SH(uint64 a[], uint32 len, uint64 *Res64, uint64 *Res35m1, uint64 *Res36m1);
uint32 get_default_factoring_depth(uint64 p);
// Sets function pointers for DIF|DIT pass1 based on value of radix0:
void dif1_dit1_func_name(
const int radix0,
void (**func_dif_pass1)(double [], int),
void (**func_dit_pass1)(double [], int)
);
uint32 extract_known_factors(uint64 p, char*fac_start);
uint32 gcd(uint32 stage, uint64 p, uint64*vec1, uint64*vec2, uint32 nlimb, char*const gcd_str);
void modinv(uint64 p, uint64*vec1, uint64*vec2, uint32 nlimb);
int restart_file_valid(const char*fname, const uint64 p, uint8*arr1, uint8*arr2);
uint32 filegrep(const char*fname, const char*find_str, char*cstr, uint32 find_before_line_number);
uint32 extract_known_factors(uint64 p, char *fac_start);
uint32 gcd(uint32 stage, uint64 p, uint64 *vec1, uint64 *vec2, uint32 nlimb, char *const gcd_str);
void modinv(uint64 p, uint64 *vec1, uint64 *vec2, uint32 nlimb);
int restart_file_valid(const char *fname, const uint64 p, uint8 *arr1, uint8 *arr2);
uint32 filegrep(const char *fname, const char *find_str, char *p_cstr, uint32 find_before_line_number);
void write_fft_debug_data(double a[], int jlo, int jhi);

/* pm1.c: */
uint32 pm1_set_bounds(const uint64 p, const uint32 n, const uint32 tf_bits, const double tests_saved);
uint32 pm1_check_bounds();
uint32 compute_pm1_s1_product(const uint64 p);
uint32 pm1_s1_ppow_prod(const uint64 iseed, const uint32 b1, uint64 accum[], uint32 *nmul, uint64 *maxmult);
int read_pm1_s1_prod(const char*fname, uint64 p, uint32*nbits, uint64 arr[], uint64*sum64);
int write_pm1_s1_prod(const char*fname, uint64 p, uint32 nbits, uint64 arr[], uint64 sum64);
void pm1_bigstep_size(uint32 *nbuf, uint32*bigstep, uint32*m, const uint32 psmall);
int read_pm1_s1_prod(const char *fname, uint64 p, uint32 *nbits, uint64 arr[], uint64 *sum64);
int write_pm1_s1_prod(const char *fname, uint64 p, uint32 nbits, uint64 arr[], uint64 sum64);
void pm1_bigstep_size(uint32 *nbuf, uint32 *bigstep, uint32 *m, const uint32 psmall);
int modpow(double a[], double b[], uint32 input_is_int, uint64 pow,
int (*func_mod_square)(double [], int [], int, int, int, uint64, uint64, int, double *, int, double *),
uint64 p, int n, int scrnFlag, double *tdiff);
int pm1_stage2(uint64 p, uint32 bigstep, uint32 m, double pow[], double*mult[], uint64 arr_scratch[],
int pm1_stage2(uint64 p, uint32 bigstep, uint32 m, double pow[], double *mult[], uint64 arr_scratch[],
int (*func_mod_square)(double [], int [], int, int, int, uint64, uint64, int, double *, int, double *),
int n, int scrnFlag, double *tdiff, char*const gcd_str);
int n, int scrnFlag, double *tdiff, char *const gcd_str);

/* br.c: */
void print_pow2_twiddles(const uint32 n, const uint32 p, const uint32 q);
Expand Down Expand Up @@ -369,60 +369,60 @@ void radix32_dit_pass (double a[], int n, struct complex rt0[], struct complex r

#ifdef MULTITHREAD
/* Multithreaded version must be in form of 1-arg functor */
void *mers_process_chunk (void*targ);
void *fermat_process_chunk(void*targ);
void *mers_process_chunk (void *targ);
void *fermat_process_chunk(void *targ);
// These are shared by both mers and fermat-mod, although the code contains switches to invoke the corr. carry macros:
void *cy12_process_chunk(void*targ);
void *cy16_process_chunk(void*targ);
void *cy20_process_chunk(void*targ);
void *cy24_process_chunk(void*targ);
void *cy28_process_chunk(void*targ);
void *cy32_process_chunk(void*targ);
void *cy36_process_chunk(void*targ);
void *cy40_process_chunk(void*targ);
void *cy44_process_chunk(void*targ);
void *cy48_process_chunk(void*targ);
void *cy52_process_chunk(void*targ);
void *cy56_process_chunk(void*targ);
void *cy60_process_chunk(void*targ);
void *cy63_process_chunk(void*targ);
void *cy64_process_chunk(void*targ);
void *cy72_process_chunk(void*targ);
void *cy80_process_chunk(void*targ);
void *cy88_process_chunk(void*targ);
void *cy96_process_chunk(void*targ);
void *cy104_process_chunk(void*targ);
void *cy112_process_chunk(void*targ);
void *cy120_process_chunk(void*targ);
void *cy128_process_chunk(void*targ);
void *cy144_process_chunk(void*targ);
void *cy160_process_chunk(void*targ);
void *cy176_process_chunk(void*targ);
void *cy192_process_chunk(void*targ);
void *cy208_process_chunk(void*targ);
void *cy224_process_chunk(void*targ);
void *cy240_process_chunk(void*targ);
void *cy256_process_chunk(void*targ);
void *cy288_process_chunk(void*targ);
void *cy320_process_chunk(void*targ);
void *cy352_process_chunk(void*targ);
void *cy384_process_chunk(void*targ);
void *cy416_process_chunk(void*targ);
void *cy448_process_chunk(void*targ);
void *cy480_process_chunk(void*targ);
void *cy512_process_chunk(void*targ);
void *cy576_process_chunk(void*targ);
void *cy640_process_chunk(void*targ);
void *cy704_process_chunk(void*targ);
void *cy768_process_chunk(void*targ);
void *cy832_process_chunk(void*targ);
void *cy896_process_chunk(void*targ);
void *cy960_process_chunk(void*targ);
void *cy992_process_chunk(void*targ);
void *cy1008_process_chunk(void*targ);
void *cy1024_process_chunk(void*targ);
void *cy4032_process_chunk(void*targ);
void *cy4096_process_chunk(void*targ);
void *cy12_process_chunk(void *targ);
void *cy16_process_chunk(void *targ);
void *cy20_process_chunk(void *targ);
void *cy24_process_chunk(void *targ);
void *cy28_process_chunk(void *targ);
void *cy32_process_chunk(void *targ);
void *cy36_process_chunk(void *targ);
void *cy40_process_chunk(void *targ);
void *cy44_process_chunk(void *targ);
void *cy48_process_chunk(void *targ);
void *cy52_process_chunk(void *targ);
void *cy56_process_chunk(void *targ);
void *cy60_process_chunk(void *targ);
void *cy63_process_chunk(void *targ);
void *cy64_process_chunk(void *targ);
void *cy72_process_chunk(void *targ);
void *cy80_process_chunk(void *targ);
void *cy88_process_chunk(void *targ);
void *cy96_process_chunk(void *targ);
void *cy104_process_chunk(void *targ);
void *cy112_process_chunk(void *targ);
void *cy120_process_chunk(void *targ);
void *cy128_process_chunk(void *targ);
void *cy144_process_chunk(void *targ);
void *cy160_process_chunk(void *targ);
void *cy176_process_chunk(void *targ);
void *cy192_process_chunk(void *targ);
void *cy208_process_chunk(void *targ);
void *cy224_process_chunk(void *targ);
void *cy240_process_chunk(void *targ);
void *cy256_process_chunk(void *targ);
void *cy288_process_chunk(void *targ);
void *cy320_process_chunk(void *targ);
void *cy352_process_chunk(void *targ);
void *cy384_process_chunk(void *targ);
void *cy416_process_chunk(void *targ);
void *cy448_process_chunk(void *targ);
void *cy480_process_chunk(void *targ);
void *cy512_process_chunk(void *targ);
void *cy576_process_chunk(void *targ);
void *cy640_process_chunk(void *targ);
void *cy704_process_chunk(void *targ);
void *cy768_process_chunk(void *targ);
void *cy832_process_chunk(void *targ);
void *cy896_process_chunk(void *targ);
void *cy960_process_chunk(void *targ);
void *cy992_process_chunk(void *targ);
void *cy1008_process_chunk(void *targ);
void *cy1024_process_chunk(void *targ);
void *cy4032_process_chunk(void *targ);
void *cy4096_process_chunk(void *targ);
#else
#ifdef USE_FGT61
void mers_process_chunk (double a[], int arr_scratch[], int n, struct complex rt0[], struct complex rt1[], uint128 mt0[], uint128 mt1[], int index[], int block_index[], int ii, int nradices_prim, int radix_prim[], int ws_i[], int ws_j1[], int ws_j2[], int ws_j2_start[], int ws_k[], int ws_m[], int ws_blocklen[], int ws_blocklen_sum[], uint64 fwd_fft_only);
Expand Down
4 changes: 2 additions & 2 deletions src/align.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ util.c::check_nbits_in_types()>
#define ALLOC_INT(_p,_n) (int *)realloc(_p,(_n)*sizeof(int )+256)
#define ALIGN_INT(_p) (int *)(((intptr_t)(_p) | 63)+1)

#define ALLOC_UINT(_p,_n) (uint *)realloc(_p,(_n)*sizeof(uint )+256)
#define ALIGN_UINT(_p) (uint *)(((intptr_t)(_p) | 63)+1)
#define ALLOC_UINT(_p,_n) (uint32 *)realloc(_p,(_n)*sizeof(uint32 )+256)
#define ALIGN_UINT(_p) (uint32 *)(((intptr_t)(_p) | 63)+1)

#define ALLOC_INT64(_p,_n) (int64 *)realloc(_p,(_n)*sizeof(int64 )+256)
#define ALIGN_INT64(_p) (int64 *)(((intptr_t)(_p) | 63)+1)
Expand Down
2 changes: 1 addition & 1 deletion src/br.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
void print_pow2_twiddles(const uint32 n, const uint32 p, const uint32 q)
{
const uint32 n2 = n>>1, n4 = n>>2, n8 = n>>3, lgn = trailz32(n),lgp = trailz32(p), lgq = trailz32(q);
uint32 pow2,odd, re_im_idx, sigma,signs;
uint32 pow2,odd, re_im_idx, signs;
int i,ir,j,k,pow;
const char csigns[2] = {'+','-'};
const char re_im[2] = {'c','s'};
Expand Down
Loading
Loading