Forcing Optimus programmatically to use dedicated nvidia graphic card on Linux

Hi,
is there a way to force my application programmatically to use dedicated nvidia graphic card on Linux?
I know that I can do that on Window by exporting a global variable NvOptimusEnablement in this way:

extern “C” {
_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
}

Is there something equivalent for Linux?

Thanks,
Gianluca

https://us.download.nvidia.com/XFree86/Linux-x86_64/525.78.01/README/primerenderoffload.html