Debugging Fast : Visualize data with libJacket Graphics Library

Dear All,

As I have always wondered what tools could assist debugging, especially when we work on huge data matrices and operating on them, we always think about having some visualization capabilities that would allow us to visualize data.

Browsing the web, I came across AccelereEyes recent initiative to aid programmers by building a general-purpose GPU library : libJacket that allows GPU programming in C/C++ ( most common math-routines accelerated on GPU, provided with a user-friendly API ), with a cool Graphics library that can assist you heavily and save development time.

Take a look at the following code snippet:

// If you have a 2-D matrix and you want to visualize, 

float A[rows][cols]; // on Host

gfloat A_gpu = gfloat( A, rows, cols); // Copy on A in device memory

image( A_gpu ); // Uses libJacket Graphics library to plot using OpenGL

You may also update the same figure by drawing again – hence can see a full simulation in action

I found this very useful working on some routines, this helped me see element-to-element difference between input stream and output stream after kernel execution and allowed me to locate regions that got corrupted. I could easily relate this to the algorithm logic and hence saved a lot of time debugging my application. I feel this is very powerful and can assist a developer in many ways.