Difference between revisions of "User:Rishabhsuthar32/GSoC20/Report"

From BRL-CAD
(update1)
 
m (update2)
Line 17: Line 17:
  
 
== Performance ==  
 
== Performance ==  
 +
We shall take the example of HYP primitive here for comparing the performance of C and OpenCL versions of rendering.
 +
[[File:Hyp2_c.png|200px|thumb|left|C rendering of HYP]][[File:Hyp2_cl.png|200px|thumb|right|OpenCL rendering of HYP]]
 +
'''First Test''': Both the C and OpenCL renderings should look same
  
 +
On the left is the C rendering of the HYP primitive and on the right is its counterpart rendered after enabling OpenCL. Well, on first look, they do look same. First test passed!
  
 +
 +
'''Second Test''': The performance of the OpenCL version should be much better than the C version
 +
 +
So, let's compare the time displayed in their rendering logs now.
 +
While the time taken by the C version to render was 0.31 seconds,
 +
the time taken by the OpenCL version to render was 0.02 seconds. 
 +
That is more than '''15x improvement''' in the performance! Hurray!
 +
 +
 +
[[File:Hyp_pixdiff.png|200px|thumb|right|pixdiff image of both versions]]
 +
 +
'''Third Test''': Checking the difference between images at a pixel level
 +
 +
Using the pixdiff and pix-png command of BRL-CAD, a pixdiff image shown on the right was created.
 +
The image shows where the colour values differ by more than 1 value in one or more of the RGB channels. Most of the pixels are offset in intensity by just a little bit, which implies some calculation is just slightly off. However, the hits and misses appears to be correct.
 +
 +
 +
'''Fourth Test''': To confirm the hits are identical
 +
 +
On comparing the nirt shotline in both the renderings, the hits were found to be identical, which implies the mismatch in intensity found in above test is a normal issue.
  
  
 
== To Do List ==
 
== To Do List ==

Revision as of 14:18, 28 August 2020

Development Logs

Project Plan

Patches Submitted


Performance

We shall take the example of HYP primitive here for comparing the performance of C and OpenCL versions of rendering.

C rendering of HYP
OpenCL rendering of HYP

First Test: Both the C and OpenCL renderings should look same

On the left is the C rendering of the HYP primitive and on the right is its counterpart rendered after enabling OpenCL. Well, on first look, they do look same. First test passed!


Second Test: The performance of the OpenCL version should be much better than the C version

So, let's compare the time displayed in their rendering logs now. While the time taken by the C version to render was 0.31 seconds, the time taken by the OpenCL version to render was 0.02 seconds. That is more than 15x improvement in the performance! Hurray!


pixdiff image of both versions

Third Test: Checking the difference between images at a pixel level

Using the pixdiff and pix-png command of BRL-CAD, a pixdiff image shown on the right was created. The image shows where the colour values differ by more than 1 value in one or more of the RGB channels. Most of the pixels are offset in intensity by just a little bit, which implies some calculation is just slightly off. However, the hits and misses appears to be correct.


Fourth Test: To confirm the hits are identical

On comparing the nirt shotline in both the renderings, the hits were found to be identical, which implies the mismatch in intensity found in above test is a normal issue.


To Do List