Hi. Im quiet new in CUDA and i have simple question. Let say that i have ‘function.ptx’ file:
// function.ptx
.func function
{
…
exit;
}
OR
.entry function
{
…
exit;
}
//end function.ptx
Is it possible to compile function.ptx to some “object” function ( let say punction.o ), and how does .ptx file should look like ( way of passing parameters to functions etc. i can find reading nvcc -ptx … files ), and after call it form “prog.cu” ?
global void function(); // initialization of “function”
int mian()
{
function();
return 0;
}
// end prog.cu
and compile all together :
nvcc -o prog prog.cu function.o ???
Ofcurse the same thing is possible when you link assembler function inside C program.
Regards