@Gary,
Look in 1st time the source 'Gainplugin' which is in the directory 'Developer' delivered with Davinci Resolve.
You have to understand the functional in 'GainPlugin.cpp'. How are the directions structured between CUDA, OPENCL and METAL.
Then: see cuda file (CudaKernel.cu), OPENCL (OpenCLKernel.cpp) and METAL (MetalKernel.mm)
As Paul said (Hi Paul), you will find in his collection of OFX source all sorts of settings and how to implement them.
Download the sources (
https://github.com/baldavenger/BaldavengerOFX)
Download the OFX (
https://github.com/baldavenger/BaldavengerPlugins). You install them and you inspect them. When a parameter offers one of those you are looking for ... opens the source project via Visual Studio. You will find the source code.
Start with GainPlugin and check with you that it works. No need to go further as this OFX will not work:
Make sure you have the right CUDA.SDK libraries, etc ...
(just a feedback)
Heu for METAL: if you're not with MAC. You forget.
Hope this helps you. I can not anymore..