Main Header: X.h

The final header-file, X.h (where X still denotes the class-name), contains only some typedef's, and may look something like this:
\begin{lstlisting}
/* hycudaalgorithm.h */
\par
...
The very last definition is defining the class that the end-user will actually instantiate (HyCudaAlgorithm). For each subroutine, the device that will execute it is defined in the first definition. In this example, the subroutines were named fun1, fun2 and fun3 respectively. HyCuda has generated corresponding template classes Fun1Device, Fun2Device and Fun3Device, from which the template argument (either CPU or GPU) tells the mechanism which function to call.



Joren Heit 2013-12-17