How to investigate if opencl is possible for an algorithm
Posted
by
Marnix
on Stack Overflow
See other posts from Stack Overflow
or by Marnix
Published on 2012-09-04T09:13:52Z
Indexed on
2012/09/04
9:38 UTC
Read the original article
Hit count: 467
I have a heavy-duty algorithm in C# that takes two large Bitmap
s 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
© Stack Overflow or respective owner