Changes

Jump to: navigation, search

Studyapplocator

1,367 bytes added, 14:33, 22 April 2018
Presentation
for (unsigned x = 0; x < IMG_RES; ++x) {
int k = x + y * IMG_RES;
float xx xxPoints = (2 * ((x + 0.5) * iwidth) - 1) * viewangle * aspectratio; float yy yyPoints = (1 - 2 * ((y + 0.5) * iheight)) * viewangle; Vec3f raydirrayDirection, rayorigrayOrigin; raydirrayDirection.init(xxxxPoints, yyyyPoints, -1); raydirrayDirection.normalize(); rayorigrayOrigin.init(0);  // Begin tracing // trace(rayorigrayOrigin, raydirrayDirection, 0, pixel, sphere, k);
}
}
</code>
This function traces the rays for each pixel of the image , traces it and returns a color.
= Assignment 2 =
[[File:excelgraph2.jpg]]
 
From this chart we can see the significant drop in run time when we switch from serial to parallel processing in ray tracing using CUDA as we double the resolution from 512. There is still room for improvement which will be implemented, and analyzed in assignment 3.
= Assignment 3 =
Under ProgressIn this assignment we decided to enhance memory access to a vital data point which decreased the run time of the render kernel by almost half. This effect is shown in the graph below: [[File:optimizedExcel.jpg]] We can see the difference of run times in the kernel from the Nvidia Visual Profiler===Optimized Image Resolution Results at 512===[[File:512Optimized.jpg]] ===Optimized Image Resolution Results at 1024===[[File:1024Optimized.jpg]] ===Optimized Image Resolution Results at 2048===[[File:2048Optimized.jpg]] ===Optimized Image Resolution Results at 4096===[[File:4096Optimized.jpg]] Although there are more ways to optimize the code by better using available GPU resources, like using more available bandwidth, using more cores depending on compute capability, having better memcpy efficiency. For simplicity we decided to reduce memory access times as it was the main area where the kernel was spending most of its time as indicated by the nvvp profiles we collected. = Presentation =[[File:Presentation.pdf]]
53
edits

Navigation menu