vinartrulz
Newcomer
Hello all..
Am currently porting an algorithm to GPU.
Algorithm is pretty simple but i cudn't find an alternate implementation which suits GPU because of which am not currently getting desired result out of GPU .
Algorithm.
For each voxel of a 512 X 256 X 256 i need to look around adjacent 12 voxel and if any of those ( voxel == level ) i need modify the value corresponding to tat voxel.
Current implementation wud look like
if( pixel1 == level ) flag = true;
else if( pixel2 == level ) flag = true;
...............
else if( pixel12== level ) flag = true;
As i understand GPU executes all these statement regardless of whether flag is set during the first statement itself. Is there some other tricky way to accomplish this. Looking forward to your suggestion.
Am currently porting an algorithm to GPU.
Algorithm is pretty simple but i cudn't find an alternate implementation which suits GPU because of which am not currently getting desired result out of GPU .
Algorithm.
For each voxel of a 512 X 256 X 256 i need to look around adjacent 12 voxel and if any of those ( voxel == level ) i need modify the value corresponding to tat voxel.
Current implementation wud look like
if( pixel1 == level ) flag = true;
else if( pixel2 == level ) flag = true;
...............
else if( pixel12== level ) flag = true;
As i understand GPU executes all these statement regardless of whether flag is set during the first statement itself. Is there some other tricky way to accomplish this. Looking forward to your suggestion.