sharing code


is there a way to share code between the device and the host when using the driver API? Basically I have a function marked with device which I want to use on the host side as well. The fact that it is compiled into two functions doesnt matter its just a design issue.


Use both:
host device function()