![]() |
|
|
#67 | ||
|
Aug 2002
3·52·7 Posts |
Quote:
Quote:
|
||
|
|
|
|
|
#68 | |
|
Mar 2003
New Zealand
115710 Posts |
Quote:
I think the only features that might prevent it compiling in Windows without Cygwin are the alarm signals and getrusage() call. |
|
|
|
|
|
|
#69 |
|
"Mark"
Apr 2003
Between here and the
11×577 Posts |
64-bit CPUs give warnings on %ju. Why don't you try this:
#ifdef __ppc64__ #define PRINTF_LLU "%llu" #else #define PRINTF_LLU "%ju" #endif Then use: printf("blah="PRINTF_LLU"\n", blah); instead of printf("blah=%ju\n", blah); If there is an easier way to detect 32-bit vs 64-bit which does not depend upon checking the architecture, then use it. |
|
|
|
|
|
#70 | |
|
Mar 2003
New Zealand
48516 Posts |
Quote:
Meanwhile 0.0.13 should fix the underscore problem on Windows compiles, and provides an alternative to getrusage() if it is not available. |
|
|
|
|
|
|
#71 | |
|
"Mark"
Apr 2003
Between here and the
11×577 Posts |
Quote:
geoff, I've been working on some changes so that the current release can be built on PPC, but I've run into a small problem that I need to work out. I use magic numbers for the mulmod and powmod, but they are only calculated in the in sieve32 and sieve64. There is a call to powmod32 in is_pprime that cannot use the powmod that I've written. I have bypassed it by using my own sieve. I could send it on to you if you're interested. I use the same sieving technique in MultiSieve. It uses a callback which passes the next prime so it is structured a little differently than your sieve. |
|
|
|
|
|
|
#72 |
|
Jun 2003
13BD16 Posts |
%ju is not recognised by gcc (under Cygwin)
Going to find & replace everything to %llu
|
|
|
|
|
|
#73 | ||
|
Mar 2003
New Zealand
13·89 Posts |
I have inlined mulmod62() for a small speedup in the 64 bit sieve, and there is a 'check' target for make that tests the srsieve binary.
Quote:
Quote:
|
||
|
|
|
|
|
#74 |
|
Mar 2003
New Zealand
13·89 Posts |
I have included rogue's prime sieve code, add -DUSE_PRIME_SIEVE to the CFLAGS in the Makefile to use this instead of the existing probable prime functions.
I have lifted the restriction on c in k*b^n+c so it can be any number relatively prime to k and b. I am not 100% sure whether it is correct to allow this, but it seems to work OK. Since the NewPGen file format only allows c=+1,-1 and PRP only reads NewPGen files (I think?), I have added a --pfgw switch which writes the sieve file in a format suitable for input to pfgw. |
|
|
|
|
|
#75 |
|
Mar 2003
New Zealand
13·89 Posts |
This version fixes a problem with the assembler version of mulmod64 that has been present since it was inlined in version 0.0.15. It probably didn't affect any released version of srsieve, but potentially factors could have been missed in the 64 bit sieve. If anyone wants to be sure whether or not the version they have been using is affected by the bug then they can send me a copy of the bsgs.o object file and I will check it. (It depends on compiler version and optimisation flags used).
On a more positive note, a much improved hashtable should speed up large sieves (e.g. the size of the current base 5 project) by about 60%, and small sieves by 5-10%. |
|
|
|
|
|
#76 | |
|
Jun 2003
31×163 Posts |
Quote:
When you said 60% speedup I had imagined 60% improvement in throughtput - I didn't realise that it was 60% _reduction_ in time !!Right now I am getting a better than 2x thruput. This calls for a
|
|
|
|
|
|
|
#77 | |
|
Mar 2003
New Zealand
22058 Posts |
Quote:
Last fiddled with by geoff on 2006-06-16 at 03:02 |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Very Prime Riesel and Sierpinski k | robert44444uk | Open Projects | 587 | 2016-11-13 15:26 |
| Sierpinski/ Riesel bases 6 to 18 | robert44444uk | Conjectures 'R Us | 139 | 2007-12-17 05:17 |
| Sierpinski/Riesel Base 10 | rogue | Conjectures 'R Us | 11 | 2007-12-17 05:08 |
| Sierpinski / Riesel - Base 23 | michaf | Conjectures 'R Us | 2 | 2007-12-17 05:04 |
| Sierpinski / Riesel - Base 22 | michaf | Conjectures 'R Us | 49 | 2007-12-17 05:03 |