I have a program which i want to rewrite in cuda. But it uses another library. Most of the code that i want to implement in my own version of program depend on this library. The program would call the various macros which in turn call other macros in the dependency library. Is it possible for me to just change only the necessary functions in the program (with the device functions still calling the Macros declared for the host) or do I have to manually expand them at each level all into the same device function (the function which I want to make or alter as a kernel)?
Since macros are ‘expanded’, instead of being ‘called’, this is a bit confusing.
Thanks.