Make some improvements on PathIntegrals

 * Create a function to return an array of Unsigned Int
 * Create a function to initialize/reset the paths
 * Just set the global work size variable once.

 Reviewed by: Alexandre Rocha
              André Loureiro
              Marcelo Morais