OK, the contest is to generate 100 thousand unique Prime numbers from 2^32 to 2^64-1 in the shortest time possible. There are some limits of course.
1. You cannot load any values from external files.
2. Your entire program must be contained in a single cpp file of less than 64K named PrimeFunc.cpp with a function named PrimeFunc(__int64*) which will be called by the test program.
3. You may use no more than 10 'seed' values none of which may be greater than 2^32-1
4. All code must compile under visual studio 2008 express as a win32 console program. Default optimzation settings will be used.
5. All results must be placed into the __int64* array supplied by the test program.
6. You may not use any file or network access functions.
7. You may use inline assembly, OpenMP, threads, even the GPU as long as you limit GPU code to HLSL.
8. There can be no composite numbers returned
9. You must return exactly 100 thousand primes, no more no less.
10. Programs that crash are disqualified.
11. Programs that take more than 5 minutes to complete are disqualified.
12. Entries should be made public.
13. This contest is open ended so further optimizations should be submitted as a new entry.
14. (Optional)The solution should be general enough so that it could in theory be applied to build a comprehensive list of all primes.
15. You may not include any header files other than <math.h>, some exceptions may be made to this ask first.
The test system is a Pentium 4HT 3.2 GHz with 2GB of 800MHz dual channel memory. The GPU is an 8600 with 1GB of ram. A non-optimized test program was run and completed within the alloted time.