I am in the process of starting to write parts of a physics engine as a possible thesis work. I am thinking of picking programming language.
The problem is I want to implement parts (Not decided which parts, but candidates are narrowphase, boradphase collision detection or constraint solver) of the physics engine in CUDA to speedup the calculations.
It seems CUDA uses a C++ like language with NVIDIA extensions.
My question is:
Is it possible to write parts of the engine in c++ (because of the object oriented support) and implement the parallell computation part(s) in CUDA’s programming language?
Or is the solution to write my whole engine in CUDA’s programming language (and use structures as a classes)?
It seems that object oriented programming is not supported in CUDA’s language. How to solve this? Because writing a physics engine is complex and OOP features are good I think.
Seems CUDA also support OpenCL. Actually is there any reason not to use it since OpenCL also support other graphics cards. Is there any performance differences?