Changes

Jump to: navigation, search

GPU610/DPS915 CUDA PI

266 bytes added, 00:12, 4 November 2013
Progress
==== '''Source File(s)''' ====
Link: https://drive.google.com/file/d/0B8GUuIUqdEJES3VEOGRnYmRNaEk
 
==== '''Code Snippet''' ====
// loops through user amount of rounds of sets of points
 
for(i = 0; i < points; i++)
{
x = randNum();
y = randNum();
 
// check if point resides within the circle
if (((x*x) + (y*y)) <= 1.0)
{
score++;
}
}
 
// calculate pi
pi = 4.0 * (float)score/(float)points;
 
 
==== '''Compilation and Running''' ====
==== '''Serial Results''' ====
[[File:Pi_serial_results.jpg|border]]
 
==== '''Conclusion''' ====
 
=== '''Assignment 2''' ===

Navigation menu