Question

The serial and parallel version of the MKL are implemented in two different libraries. The functions of the libraries have the same name. So you can not directly load both libraries and call each of the function respectively, without having conflict in compile time.

I would like to develop a wrapper of the functions (such as OpenGL Extension Wrangler Library (GLEW)), which will have a corresponding extension for each same function and the extended function will load the parallel or sequential function from the appropriate library. Is this a good idea? Can you suggest something else?

Thanks a lot.

Was it helpful?

Solution

I suggest you always use the parallel version of MKL, and control #thread used by MKL functions.

MKL provides void mkl_set_num_threads( int nt ) to change #thread MKL functions can use at any time.

When you set it to one, it is equal to the serial version.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top