Skip to contents

This produces a wrapper function that will call either {name}_host or {name}_device. The wrapper has a system named argument that is used to choose the implementation. All other arguments are forwarded to the underlying function.

Usage

create_wrapper(name)

Details

The wrapper function is generated using metaprogramming, allowing it to have an explicit list of formal parameter names. If we just used ... to forward argument the argument names wouldn't show up in the documentation.