Halide 19.0.0
Halide compiler and libraries
|
A set of types to represent a C++ function signature. More...
#include <Type.h>
Public Types | |
enum | CPPTypeType { Simple , Struct , Class , Union , Enum } |
An enum to indicate whether a C++ type is non-composite, a struct, class, or union. More... | |
Public Member Functions | |
halide_cplusplus_type_name (CPPTypeType cpp_type_type, const std::string &name) | |
bool | operator== (const halide_cplusplus_type_name &rhs) const |
bool | operator!= (const halide_cplusplus_type_name &rhs) const |
bool | operator< (const halide_cplusplus_type_name &rhs) const |
Public Attributes | |
enum halide_cplusplus_type_name::CPPTypeType | cpp_type_type |
std::string | 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 producable.
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.
|
inline |
|
inline |
Definition at line 55 of file Type.h.
References cpp_type_type, and name.
|
inline |
|
inline |
Definition at line 64 of file Type.h.
References cpp_type_type, and name.
enum halide_cplusplus_type_name::CPPTypeType halide_cplusplus_type_name::cpp_type_type |
Referenced by operator<(), and operator==().
std::string halide_cplusplus_type_name::name |
Definition at line 49 of file Type.h.
Referenced by halide_handle_cplusplus_type::make(), operator<(), and operator==().