Development Logs

Project Plan

Patches Submitted


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