How to call device function in host function.

hello.

the error message is

./test.hpp(558): error: calling a __device__ function("get_graphmeta") from a __host__ function("pinpage") is not allowed

./test.hpp(561): error: calling a __device__ function("get_curr_bits") from a __host__ function("pinpage") is not allowed

how to call device function in host function?

device function can call only in the kernel?

I want to know how to call __device__function in host function.

I think device function can call only in the kernel (i.e., global function)

If it is wrong, please reply! thanks guys!

If you want a function to be callable from both the host and the device, annotate it with both attributes: “host device”.