I want to add the nvapi SDK to the Slicer environment so that users can choose which GPU to use, similar to how we select a GPU in the NVIDIA Control Panel for a specific application.
I don’t know of any work in that area, but you could build Slicer from source and link in the library. Or you could write a command line wrapper for the functions you want and then invoke that as a subprocess from Slicer.
Hi @pieper, I tried this approach, and it worked perfectly with the wrapper. However, I would like to use the library without the wrapper by linking it directly to the slicer, so I can become familiar with adding other libraries to the slicer in the future.
I’ve reviewed both links, and my requirement is in C++. I am already familiar with using basic NVAPI functions, and the example link you provided will be additional help.
I am trying to link the library in Slicer, and for that, I’ve created a CMakeLists.txt file with the necessary code. I am able to build it without any errors and can include the NVAPI header files in Slicer. However, after writing some basic GPU information retrieval code, I encounter the following error after building Slicer.sln: