This project is read-only.

Helpful hint - strongly-typed gpu.Launch

Oct 30, 2012 at 1:44 AM

For those anal strong-typing enthusiasts, like me, I discovered that this construnct

  gpu.Launch(BlocksPerGrid, ThreadsPerBlock, 
    ( (Action<GThread,int,int,float[],float[],float[,]>) GpuFindPathDistance ).Method.Name,
    _permutations, _cities, gpuLatitudes, gpuLongitudes, gpuAnswer);

runs just as fast as the weakly-typed alternative:

  gpu.Launch(BlocksPerGrid, ThreadsPerBlock, 
    "GpuFindPathDistance",
    _permutations, _cities, gpuLatitudes, gpuLongitudes, gpuAnswer);

I performed my tests with this example:
http://w8isms.blogspot.ca/2012/09/cudafy-me-part-4-of-4.html?showComment=1351551519103#!/2012/09/cudafy-me-part-4-of-4.html

Pieter

Oct 30, 2012 at 9:45 AM

Neat!