I have developed a C++ DLL in windows which has many CUDA accelerated functions. Currently i haven't created the DllMain function as it is not mandatory.
I know that there are many limitations on the functions that can be called in the DllMain.
I just want to know that is it safe to call a CUDA Runtime function in DllMain just to initialize the default context, so that the subsequent CUDA calls are faster?
I'm using Visual Studio 2008, CUDA 5.0 and Windows 8 for development.