20031221, 18:35  #1 
Dec 2002
2^{2}·3·71 Posts 
/. Video processor compiler

20031221, 19:55  #2  
Sep 2003
Borg HQ, Delta Quadrant
2BE_{16} Posts 
Wow. Only works on a few vid cards apparently (GeForceFX and above and ATI 97/9800). Also, briefly reading through the documentation, there appears to be a stumbling block:
From this page: Quote:


20031221, 19:55  #3 
Sep 2003
13·199 Posts 
Unfortunately, all my farm boxes use VGA cards that I bought for literally $1 each on eBay.

20031221, 20:06  #4 
Sep 2003
13×199 Posts 
Once upon a time, Nick CraigWood wrote an integer LucasLehmer tester for the ARM chip.
http://www.craigwood.com/nick/armprime/ The ARM chip had no divide instruction, but he found an ingenious way to calculate x mod p without division. Perhaps this code could be revived for use on graphics cards. Unfortunately it doesn't seem like he's worked on it since 1999. 
20031223, 17:39  #5 
Sep 2002
2·331 Posts 
If division isn't available then subtraction of multiples x from p until the amount left is less then x.
If divistion and subtraction aren't available then add multiples of x while less than p. Shifts can be used for multiplying and dividing by 2. I think integers in 2's complement will add negatives. 
20031224, 06:25  #6 
Aug 2002
Portland, OR USA
2×137 Posts 
For the LL test everything is done mod Mp, so there are other tricks to replace division and subtraction.
 Tho I'm not sure adding (Mp  2) instead of subtracting 2 is reasonable. 
20031224, 06:52  #7 
Aug 2002
101000000_{2} Posts 
http://www.cs.unm.edu/~kmorel/documents/fftgpu/
FFT's can be done on a GPU. However, as usual, the problem is precision. Anyone know any useful tricks to use two singles as a double? 
20031224, 22:20  #8 
Apr 2003
Berlin, Germany
551_{8} Posts 
There is an older thread about using GPUs for calculations:
http://mersenneforum.org/showthread.php?s=&threadid=432 Even something simple like game of life is hard to port to a GPU by using an efficient algorithm (like calculating one life cell per bit) 
20031226, 16:49  #9  
∂^{2}ω=0
Sep 2002
República de California
3×7×13×43 Posts 
Quote:
In Nick's case, any mods that would have been needed would have been with respect to the prime he used for his allinteger transform, p = 2^64  2^32 + 1. That prime has a nice binary form that allows efficient modding without division. For general primes of no special form, we can use the wellknown Montgomery divisionless mod, which effects the mod via a clever precomputation of the inverse of p modulo a power of two, typically one chosen to coincide with the natural wordsize boundary of the hardware. This inverse can be efficiently computed using a Newtonstyle iteration of the same kind used to quickly find floatingpoint inverses without dividing, and using the fact that the standard hardware integer multiply of two (say) 64bit ints is really mod2^64 multiply. Once one has p^(1) mod 2^n, a few more muls (including several which require a full doublewide integer product) suffice to return x*y*2^(n) mod p, which can easily be converted to the desired x*y mod p. My sievebased factoring code uses the Montgomery mod. I believe George's uses a completely different (but similarly fast, especially on hardware which doesn't support doublewide integer muls) way to get x*y mod p. 

20031227, 10:16  #10 
Nov 2003
European Union
2^{3}·13 Posts 
BrookGPU
General Programming of GPUs with C:
http://developers.slashdot.org/arti...052&tid=185 http://www.xbitlabs.com/news/video/...1222075229.html http://graphics.stanford.edu/projects/brookgpu/ http://sourceforge.net/projects/brook maybe we could use this to speed up Prime95/MPrime ?????? 
20031227, 16:43  #11  
Sep 2003
Borg HQ, Delta Quadrant
2×3^{3}×13 Posts 
Re: BrookGPU
Quote:


Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
mprime 28.10 compiler warning  Explorer09  Software  1  20170123 02:50 
GCC/compiler warnings  Dubslow  Programming  2  20160227 06:55 
compiler/assembler optimizations possible?  ixfd64  Software  7  20110225 20:05 
Help! Compiler bug  R.D. Silverman  Cunningham Tables  30  20101002 22:12 
Linux32 > Windows64 C compiler?  geoff  Programming  3  20070926 03:09 