How can I call a ptx function from CUDA C?
问题 I am trying to find a way to call a ptx function (.func) from CUDA C. Say I had a ptx function like this: .func (.reg .s32 %res) inc_ptr ( .reg .s32 %ptr, .reg .s32 %inc ) { add.s32 %res, %ptr, %inc; ret; } I know I can call it from ptx like so: call (%d), inc_ptr, (%s, %d); But I have no idea how to call it from CUDA C. I know I can inline ptx assembly with asm(), but I haven't found a way to inline a function. Hope someone can help! Thanks! 回答1: This can be done using the separate