Halide 22.0.0 Halide compiler and libraries

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
halide_handle_cplusplus_type Struct Reference

A structure to represent the fully scoped name of a C++ composite type for use in generating function signatures that use that type. More...

`#include <Type.h>`

## Public Types
enum | Modifier : uint8_t { Const = 1 << 0 , Volatile = 1 << 1 , Restrict = 1 << 2 , Pointer = 1 << 3 , FunctionTypedef = 1 << 4 }
| One set of modifiers on a type. More...
enum | ReferenceType : uint8_t { NotReference = 0 , LValueReference = 1 , RValueReference = 2 }
| References are separate because they only occur at the outermost level. More...

## Public Member Functions
| halide_handle_cplusplus_type (const halide_cplusplus_type_name &inner_name, const std::vector< std::string > &namespaces={}, const std::vector< halide_cplusplus_type_name > &enclosing_types={}, const std::vector< uint8_t > &modifiers={}, ReferenceType reference_type=NotReference)

## Static Public Member Functions
template<typename T >
static halide_handle_cplusplus_type | make ()

## Public Attributes
halide_cplusplus_type_name | inner_name
std::vector< std::string > | namespaces
std::vector< halide_cplusplus_type_name > | enclosing_types
std::vector< uint8_t > | cpp_type_modifiers
| Qualifiers and indirections on type. 0 is innermost. More...
ReferenceType | reference_type

## Detailed Description

A structure to represent the fully scoped name of a C++ composite type for use in generating function signatures that use that type.

This is intended to be a constexpr usable type.

Although this is in the global namespace, it should be considered "Halide Internal" and subject to change; code outside Halide should avoid referencing it.

Definition at line 79 of file Type.h.

## Member Enumeration Documentation

## ◆ Modifier

enum halide_handle_cplusplus_type::Modifier : uint8_t

One set of modifiers on a type.

The const/volatile/restrict properties are "inside" the pointer property.

Enumerator
Const | Bitmask flag for "const".
Volatile | Bitmask flag for "volatile".
Restrict | Bitmask flag for "restrict".
Pointer | Bitmask flag for a pointer "*".
FunctionTypedef | Bitmask flag for a function typedef; when this is set, Pointer should also always be set.

Definition at line 86 of file Type.h.

## ◆ ReferenceType

enum halide_handle_cplusplus_type::ReferenceType : uint8_t

References are separate because they only occur at the outermost level.

No modifiers are needed for references as they are not allowed to apply to the reference itself. (This isn't true for restrict, but that is a C++ extension anyway.) If modifiers are needed, the last entry in the above array would be the modifers for the reference.

Enumerator
NotReference |
LValueReference |
RValueReference |

Definition at line 102 of file Type.h.

## Constructor & Destructor Documentation

## ◆ halide_handle_cplusplus_type()

halide_handle_cplusplus_type::halide_handle_cplusplus_type | ( | const halide_cplusplus_type_name & | inner_name,
|  | const std::vector< std::string > & | namespaces = `{}`,
|  | const std::vector< halide_cplusplus_type_name > & | enclosing_types = `{}`,
|  | const std::vector< uint8_t > & | modifiers = `{}`,
|  | ReferenceType | reference_type = `NotReference`
| ) |  |
| inline

Definition at line 109 of file Type.h.

## Member Function Documentation

## ◆ make()

template<typename T >

halide_handle_cplusplus_type halide_handle_cplusplus_type::make
| static

Definition at line 200 of file Type.h.

References Const, Halide::Internal::extract_namespaces(), FunctionTypedef, inner_name, Halide::Internal::IRMatcher::is_const(), LValueReference, halide_cplusplus_type_name::name, halide_c_type_to_name< T >::name(), namespaces, NotReference, Pointer, RValueReference, and Volatile.

## Member Data Documentation

## ◆ inner_name

halide_cplusplus_type_name halide_handle_cplusplus_type::inner_name

Definition at line 80 of file Type.h.

Referenced by make().

## ◆ namespaces

std::vector<std::string> halide_handle_cplusplus_type::namespaces

Definition at line 81 of file Type.h.

Referenced by make().

## ◆ enclosing_types

std::vector<halide_cplusplus_type_name> halide_handle_cplusplus_type::enclosing_types

Definition at line 82 of file Type.h.

## ◆ cpp_type_modifiers

std::vector<uint8_t> halide_handle_cplusplus_type::cpp_type_modifiers

Qualifiers and indirections on type. 0 is innermost.

Definition at line 95 of file Type.h.

## ◆ reference_type

ReferenceType halide_handle_cplusplus_type::reference_type

Definition at line 107 of file Type.h.

The documentation for this struct was generated from the following file:

- src/Type.h