CUDA function pointers

前端 未结 2 1969
误落风尘
误落风尘 2020-11-30 14:56

I was trying to make somtehing like this (actually I need to write some integration functions) in CUDA

#include 
using namespace std;

float         


        
2条回答
  •  攒了一身酷
    2020-11-30 15:47

    Even though you may be able to compile this code (see @Robert Crovella's answer) this code will not work. You cannot pass function pointers from host code as the host compiler has no way of figuring out the function address.

提交回复
热议问题