typedef struct CUfunc_st *CUfunction, CUfunc_st missing ?!? Translating headers to other languag


I am trying to understand how to execute a kernel in Delphi.

So far it seems the kernel first has to be written in cuda c and then compiled to a cubin or ptx.

The cuda runtime api has no functionality to load it.

The cuda driver api has module loading functionality which requires a function handle to be retrieved based on a function name in ascii/ansi (?) probably.

I am now trying to figure out how to translate these c *.h header files to Delphi and I have run into a little problem:

typedef struct CUfunc_st *CUfunction

This declaration looks weird to me because CUfunc_st is undefined ?!?
(I think these might be some kind of “hooks” into the cuda c language ?!?)

So my question is how to translate this to other languages ?

I am guessing a void pointer ?

Yeah a void pointer will probably do, since a pointer to a structure is still a pointer, what matters is that it’s a pointer.

So delphi can probably define this as:

CUfunction = pointer;