halide_cplusplus_type_name#
-
struct halide_cplusplus_type_name#
A set of types to represent a C++ function signature.
This allows two things. First, proper prototypes can be provided for Halide generated functions, giving better compile time type checking. Second, C++ name mangling can be done to provide link time type checking for both Halide generated functions and calls from Halide to external functions.
These are intended to be constexpr producible.
halide_handle_traits has to go outside the Halide namespace due to template resolution rules. TODO(zalman): Do all types need to be in global namespace? A structure to represent the (unscoped) name of a C++ composite type for use as a single argument (or return value) in a function signature.
Currently does not support the restrict qualifier, references, or r-value references. These features cannot be used in extern function calls from Halide or in the generated function from Halide, but their applicability seems limited anyway.
Although this is in the global namespace, it should be considered “Halide Internal” and subject to change; code outside Halide should avoid referencing it.