20140404, 18:27  #1 
I moo ablest echo power!
May 2013
5·349 Posts 
CUDA Tutorials/Learning with an eye to large numbers
I have a good amount of free time on my hands right now, and I would like to start poking around in CUDA programming, but I'm having some trouble finding good beginner's tutorials. I understand the general process of "Prepare some data, move it to the GPU, do a lot of repetitive tasks, move the results back to the host" but I'd like some more indepth teaching about what kinds of tasks are good for parallel processes.
I'd also like to learn how to handle large numbers like those used with the GPU implementation of GMPECM and things like LLRCUDA and the like. Can anyone provide suggestions (either books or online) where I might get a good start? Thanks! 
20140404, 18:45  #2 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
24DC_{16} Posts 
You might want to decouple the two parts of this: CUDA and large numbers.
Both are challenging and in many ways independent (it might be surprising if there exists a book on both at the same time). You can start CUDA separately, and then maybe do simple steps, like check how tf_72bit.cu works (in the mfaktc package, the smallest tier); it might be tough at first, but if you like the "learn to swim by stepping off the boat" paradigm, you might enjoy that. ;) 
20140404, 19:04  #3 
I moo ablest echo power!
May 2013
11011010001_{2} Posts 
For better or worse, I definitely tend toward the boatjumping ;) Thanks for the mfaktc suggestion. I'll go cross my eyes at that for a while.
I also found a nice free online course from udacity. I'm only a little bit in, but it seems like they're going to start with a nice breakdown of how the GPU hardware is set up for parallelization and then (I hope) get into actual code as well. Udacity course is here: https://www.udacity.com/course/cs344 (Title is Intro to Parallel Programming with CUDA). 
20140404, 19:06  #4 
If I May
"Chris Halsall"
Sep 2002
Barbados
3^{3}·5·71 Posts 

20140405, 08:36  #5  
Banned
"Luigi"
Aug 2002
Team Italia
4814_{10} Posts 
Quote:
I'm stuck at the reduction lessons after the tonemapping, trying to understand how to perform a radixsort on multiblock data (the exercise is on redeye removal). Let me know if you have hints... Luigi 

20140405, 16:22  #6 
I moo ablest echo power!
May 2013
5·349 Posts 
I don't think I've gotten to the redeye removal yet, but I'll let you know if I can get it worked out.

20140407, 12:35  #7 
Nov 2003
1110100100100_{2} Posts 

20140407, 14:53  #8 
I moo ablest echo power!
May 2013
3321_{8} Posts 

20140410, 16:59  #9 
"Marv"
May 2009
near the TannhÃ¤user Gate
2^{7}×5 Posts 
Dr Dobbs ( www.drdobbs.com ) had a series a year or 2 ago by Rob Farber about learning Cuda. I don't know how it compares to the other udacity course. It was titled something like " Supercomputing for the Masses".

20140410, 21:25  #10 
I moo ablest echo power!
May 2013
5·349 Posts 
Another great find, thanks!
Speaking of Knuth and TAOCP, here's a section from an NVIDIAprovided CUDA header defining a double double precision type: Code:
/* Compute errorfree sum of two unordered doubles. See Knuth, TAOCP vol. 2 */ __device__ __forceinline__ dbldbl add_double_to_dbldbl (double a, double b) { double t1, t2; dbldbl z; z.y = __dadd_rn (a, b); t1 = __dadd_rn (z.y, a); t2 = __dadd_rn (z.y, t1); t1 = __dadd_rn (b, t1); t2 = __dadd_rn (a, t2); z.x = __dadd_rn (t1, t2); return z; } 
20140410, 23:29  #11 
Jan 2005
Caught in a sieve
395_{10} Posts 
A lot depends on "How large is 'large'?". And by that I mean the numbers actually being worked with. You can sieve or trialfactor extremely large numbers without using numbers larger than the factors you're trying.
If "large" is 64 bits or less, check out my multiKandN siever. If "large" is about 6596 bits, look at mfaktc. If "large" is really a lot larger than 96 bits...maybe look at CUDALucas? 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Discussion of Large Numbers  Merfighters  Miscellaneous Math  2  20101029 16:51 
Calculating large numbers  Historian  Information & Answers  4  20100326 19:39 
Squaring large Numbers  SQUARE  Information & Answers  7  20090510 09:13 
Maths Tutorials I  devarajkandadai  Miscellaneous Math  0  20041216 02:53 
How do I get LARGE numbers  Bundu  Software  5  20040826 01:56 