How to investigate if opencl is possible for an algorithm
- by Marnix
I have a heavy-duty algorithm in C# that takes two large Bitmaps of about 10000x5000 and performs photo and ray collision operations on a 3D model to map photos on the 3D model.
I would like to know if it is possible to convert such an algorithm to OpenCL to optimize parallel operations during the algorithm. But before asking you to go into the details of the algorithm, I would like to know how I can investigate if my algorithm is convertible to OpenCL.
I am not experienced in OpenCL and I would like to know if it is worth it to get into it and learn how it works. Are there things I have to look for that will definitely not work on the graphics card? (for-loops, recursion)
Update:
My algorithm goes something like:
foreach photo
split the photo in 64x64 blocks
foreach block
cast a ray from the camera to the 3D model
foreach triangle in 3D model
perform raycheck