From: <jay...@us...> - 2011-02-08 08:18:20
|
Revision: 412 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=412&view=rev Author: jaysonking Date: 2011-02-08 08:18:14 +0000 (Tue, 08 Feb 2011) Log Message: ----------- Here we have a slight cosmetic issue: For some purposes, it would be useful to ensure that the special_q factor is easily distinguishable in the output file. In earlier versions of the siever, the special_q factor would always come last in the array of found factors. In this version, the optimized TD routines may alter the array by placing repeated small factors at the end. This code is old enough that I don't want to remove the repeated factors, in case someone uses them (msieve does not). So instead, put the special_q factor first and then print the array backward. Modified Paths: -------------- trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c Modified: trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c =================================================================== --- trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c 2011-02-05 09:26:30 UTC (rev 411) +++ trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c 2011-02-08 08:18:14 UTC (rev 412) @@ -3625,6 +3625,11 @@ if(side == first_td_side)fbp_buf= td_buf1[nc1]; else fbp_buf= td_buf[side]; fbp_ptr= fbp_buf; + + if(side == special_q_side) { + *(fbp_ptr++)= special_q; + } + { int np,x; @@ -3673,10 +3678,6 @@ } } - if(side == special_q_side) { - *(fbp_ptr++)= special_q; - } - fbp_ptr= mpz_trialdiv(aux1,fbp_buf,fbp_ptr-fbp_buf, tds_coll[fss_sv[ci]] == 0?"td error":NULL); @@ -4021,46 +4022,31 @@ } mpqs_clock+= clock()-cl; if(s!=2)return; + yield++; + mpz_out_str(g_ofile, 10, sr_a); + fprintf(g_ofile, ","); + mpz_out_str(g_ofile, 10, sr_b); + #define OBASE 16 - yield++; - mpz_out_str(g_ofile, 10, sr_a); - fprintf(g_ofile, ","); - mpz_out_str(g_ofile, 10, sr_b); - { int numR=0; - { u32_t *x; int i; - - fprintf(g_ofile, ":"); - for (i = 0; i < nlp[1]; i++) { /* rational first. */ - if (i>0) fprintf(g_ofile, ","); - mpz_out_str(g_ofile, OBASE, large_primes[1][i]); - numR++; - } - for (x = fbp_buffers[1]; x < fbp_buffers_ub[1];x++) { - if ((unsigned int)*x >1000) { - if (numR>0) fprintf(g_ofile, ",%x", (unsigned int)*x); - else { fprintf(g_ofile, "%x", (unsigned int)*x); numR++;} - } - } - } - { int numA=0; - u32_t *x; int i; - - fprintf(g_ofile, ":"); - for (i = 0; i < nlp[0]; i++) { /* algebraic next. */ - if (i>0) fprintf(g_ofile, ","); - mpz_out_str(g_ofile, OBASE, large_primes[0][i]); - numA++; - } - for (x = fbp_buffers[0]; x < fbp_buffers_ub[0];x++) { - if ((unsigned int)*x > 1000) { - if (numA>0) fprintf(g_ofile, ",%x", (unsigned int)*x); - else { fprintf(g_ofile, "%x", (unsigned int)*x); numA++;} - } - } - } - fprintf(g_ofile, "\n"); - } + for(s= 0;s<2;s++) { + int num = 0; + u32_t *x = fbp_buffers_ub[1-s]; + + fprintf(g_ofile, ":"); + while (num < nlp[1-s]) { + if (num>0) fprintf(g_ofile, ","); + mpz_out_str(g_ofile, OBASE, large_primes[1-s][num]); + num++; + } + while (x-- != fbp_buffers[1-s]) { + if ((unsigned int)*x <1000) continue; + if (num>0) fprintf(g_ofile, ","); + fprintf(g_ofile, "%x", (unsigned int)*x); + num++; + } + } + fprintf(g_ofile, "\n"); } /* #ifdef OFMT_CWI This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |