Macro offload_kernel
macro_rules! offload_kernel { ... }
The offload_kernel macro is applied to a function to generate two separate
definitions: a host-side wrapper for dispatch and a device-side kernel.
The macro does not perform the offload itself. It generates the necessary code required by the compiler's offloading infrastructure.
Usage example:
This expands to the host-side function:
And the device-side kernel:
unsafe extern "gpu-kernel"