Re: (Source Code Download) Re: Fast pi program?



On Aug 27, 9:57 pm, mike3 <mike4...@xxxxxxxxx> wrote:
On Aug 26, 8:06 pm, Kai-Uwe Bux <jkherci...@xxxxxxx> wrote:
<snip>

If you want optimization hints particular to the code you wrote (not just
the problem that your code solves), we would need to see your code.

Best

Kai-Uwe Bux

Here it is, the full source codes:

http://www.mediafire.com/download.php?5ryt5g4mcyo

Be sure to read the enclosed copyright notice, by the way.

The code contains parts specifically made for the Pentium
4 and compatible processors, by the way.

After removing the useless header definition <conio.h> in pib26.h, I
was able to compile but not link:

$ make
gcc -g -pg -O3 -Wall -ffast-math -funroll-loops -c nttxfm.c
gcc -g -pg -O3 -Wall -ffast-math -funroll-loops -c crt.c
primes.h:18: warning: 'NTTroots' defined but not used
gcc -g -pg -O3 -Wall -ffast-math -funroll-loops -c bigmul.c
crtmath.h:23: warning: 'crtcopy32' defined but not used
crtmath.h:54: warning: 'crtmulbsm32' defined but not used
crtmath.h:109: warning: 'crtmod32' defined but not used
primes.h:18: warning: 'NTTroots' defined but not used
gcc -g -pg -O3 -Wall -ffast-math -funroll-loops -c blockint.c
gcc -g -pg -O3 -Wall -ffast-math -funroll-loops -c diskint.c
gcc -g -pg -O3 -Wall -ffast-math -funroll-loops -c newton.c
newton.c: In function 'DiskInt_Recip':
newton.c:52: warning: format '%6d' expects type 'int', but argument 2
has type 'long int'
newton.c: In function 'DiskInt_RecipSqrt':
newton.c:149: warning: format '%6d' expects type 'int', but argument 2
has type 'long int'
newton.c: In function 'DiskInt_RecipRoot4':
newton.c:249: warning: format '%6d' expects type 'int', but argument 2
has type 'long int'
gcc -g -pg -O3 -Wall -ffast-math -funroll-loops -c agm.c
agm.c: In function 'AGM1_Loop':
agm.c:88: warning: format '%9d' expects type 'int', but argument 3 has
type 'long int'
agm.c: In function 'AGM2_Loop':
agm.c:364: warning: format '%9d' expects type 'int', but argument 3
has type 'DIGIT'
gcc -g -pg -O3 -Wall -ffast-math -funroll-loops -c pib26.c
pib26.c: In function 'PIB26_GetNumInput':
pib26.c:47: warning: implicit declaration of function 'getch'
pib26.c: In function 'PIB26_WriteComputationInfo':
pib26.c:305: warning: implicit declaration of function 'gmtime_r'
pib26.c:306: warning: implicit declaration of function 'asctime_r'
pib26.c: At top level:
primes.h:5: warning: 'NTTprimes' defined but not used
primes.h:18: warning: 'NTTroots' defined but not used
gcc -g -pg -o pib26 nttxfm.o crt.o bigmul.o blockint.o diskint.o
newton.o agm.o pib26.o -lm -ltz
ld: cannot find -ltz
make: *** [pib26] Error 1

I guess that you used some custom time library. Might be nice to say
what it was in a readme file or something like that.

.



Relevant Pages

  • xemacs installation problems
    ... checking for gcc... ... checking whether we are using GNU C... ... checking size of int... ... configure: warning: No OffiX without generic Drag'n'Drop support ...
    (comp.os.linux.misc)
  • Re: bug in Real-Time Preemption
    ... lib/rwsem.c:153: warning: type defaults to `int' in declaration of `type name' ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: error
    ... foo.c:50: warning: string constant runs past end of line ... foo.c:7: warning: declaration of `n' shadows global declaration ... foo.c:29: warning: return type of `main' is not `int' ... char check(int n_, ...
    (comp.lang.c)
  • 2.6.13-rt14 build problem on Powerpc board
    ... kernel/ntp.c:84: warning: excess elements in scalar initializer ... kernel/ntp.c:104: warning: type defaults to `int' in declaration of ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: want to install
    ... gperl.h:60: warning: type defaults to 'int' in declaration of 'gperl_alloc_temp' ... gperl.h:61: warning: type defaults to 'int' in declaration of 'gperl_filename_from_sv' ... gperl.h:80: error: syntax error before 'type' ...
    (perl.beginners)