OpenCL fastest path algorithm

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
Post Reply
Elefant
Hardened
Posts: 217
Joined: Sat May 28, 2022 3:55 am

OpenCL fastest path algorithm

Post by Elefant »

Operating under the idea that finding the fastest route for a unit is what takes the most time between turns, I had idea. The algorithm is probably composed mostly of math done over and over again, making it an ideal use case for GPU compute. By handing the math over to the GPU, the GPU's massive parallel compute advantage could be utilized for a large speedup. Even an integrated GPU has more mathematical power than a single cpu core. And OpenCL can be run on the cpu if there is no GPU present. I don't know exactly how much faster OpenCL would be, but worst case scenario it would at least automatically multi thread the code. Maybe this could speed up the AI, especially on large maps with lots of units?
Civ 3 tileset: viewtopic.php?t=92953
3d Irrlicht desktop client development: viewtopic.php?t=92289&start=20
Post Reply