Halide
Type.h File Reference
#include "Error.h"
#include "Float16.h"
#include "Util.h"
#include "runtime/HalideRuntime.h"
#include <stdint.h>

Go to the source code of this file.

Classes

struct  halide_cplusplus_type_name
 A set of types to represent a C++ function signature. More...
 
struct  halide_handle_cplusplus_type
 A structure to represent the fully scoped name of a C++ composite type for use in generating function signatures that use that type. More...
 
struct  halide_c_type_to_name< T >
 halide_c_type_to_name is a utility class used to provide a user-extensible way of naming Handle types. More...
 
struct  halide_handle_traits< T >
 A type traits template to provide a halide_handle_cplusplus_type value from a C++ type. More...
 
struct  Halide::Type
 Types in the halide type system. More...
 

Namespaces

 Halide
 This file defines the class FunctionDAG, which is our representation of a Halide pipeline, and contains methods to using Halide's bounds tools to query properties of it.
 

Macros

#define HALIDE_DECLARE_EXTERN_TYPE(TypeType, Type)
 
#define HALIDE_DECLARE_EXTERN_SIMPLE_TYPE(T)   HALIDE_DECLARE_EXTERN_TYPE(Simple, T)
 
#define HALIDE_DECLARE_EXTERN_STRUCT_TYPE(T)   HALIDE_DECLARE_EXTERN_TYPE(Struct, T)
 
#define HALIDE_DECLARE_EXTERN_CLASS_TYPE(T)   HALIDE_DECLARE_EXTERN_TYPE(Class, T)
 
#define HALIDE_DECLARE_EXTERN_UNION_TYPE(T)   HALIDE_DECLARE_EXTERN_TYPE(Union, T)
 

Functions

 HALIDE_DECLARE_EXTERN_SIMPLE_TYPE (char)
 
 HALIDE_DECLARE_EXTERN_SIMPLE_TYPE (bool)
 
 HALIDE_DECLARE_EXTERN_SIMPLE_TYPE (int8_t)
 
 HALIDE_DECLARE_EXTERN_SIMPLE_TYPE (uint8_t)
 
 HALIDE_DECLARE_EXTERN_SIMPLE_TYPE (int16_t)
 
 HALIDE_DECLARE_EXTERN_SIMPLE_TYPE (uint16_t)
 
 HALIDE_DECLARE_EXTERN_SIMPLE_TYPE (int32_t)
 
 HALIDE_DECLARE_EXTERN_SIMPLE_TYPE (uint32_t)
 
 HALIDE_DECLARE_EXTERN_SIMPLE_TYPE (int64_t)
 
 HALIDE_DECLARE_EXTERN_SIMPLE_TYPE (uint64_t)
 
 HALIDE_DECLARE_EXTERN_SIMPLE_TYPE (Halide::float16_t)
 
 HALIDE_DECLARE_EXTERN_SIMPLE_TYPE (Halide::bfloat16_t)
 
 HALIDE_DECLARE_EXTERN_SIMPLE_TYPE (float)
 
 HALIDE_DECLARE_EXTERN_SIMPLE_TYPE (double)
 
 HALIDE_DECLARE_EXTERN_STRUCT_TYPE (halide_buffer_t)
 
 HALIDE_DECLARE_EXTERN_STRUCT_TYPE (halide_dimension_t)
 
 HALIDE_DECLARE_EXTERN_STRUCT_TYPE (halide_device_interface_t)
 
 HALIDE_DECLARE_EXTERN_STRUCT_TYPE (halide_filter_metadata_t)
 
 HALIDE_DECLARE_EXTERN_STRUCT_TYPE (halide_semaphore_t)
 
 HALIDE_DECLARE_EXTERN_STRUCT_TYPE (halide_parallel_task_t)
 
Type Halide::Int (int bits, int lanes=1)
 Constructing a signed integer type. More...
 
Type Halide::UInt (int bits, int lanes=1)
 Constructing an unsigned integer type. More...
 
Type Halide::Float (int bits, int lanes=1)
 Construct a floating-point type. More...
 
Type Halide::BFloat (int bits, int lanes=1)
 Construct a floating-point type in the bfloat format. More...
 
Type Halide::Bool (int lanes=1)
 Construct a boolean type. More...
 
Type Halide::Handle (int lanes=1, const halide_handle_cplusplus_type *handle_type=nullptr)
 Construct a handle type. More...
 
template<typename T >
Type Halide::type_of ()
 Construct the halide equivalent of a C type. More...
 
std::string Halide::type_to_c_type (Type type, bool include_space, bool c_plus_plus=true)
 Halide type to a C++ type. More...
 

Detailed Description

Defines halide types

Definition in file Type.h.

Macro Definition Documentation

◆ HALIDE_DECLARE_EXTERN_TYPE

#define HALIDE_DECLARE_EXTERN_TYPE (   TypeType,
  Type 
)
Value:
template<> \
static constexpr bool known_type = true; \
static halide_cplusplus_type_name name() { \
return {halide_cplusplus_type_name::TypeType, #Type}; \
} \
}

Definition at line 144 of file Type.h.

◆ HALIDE_DECLARE_EXTERN_SIMPLE_TYPE

#define HALIDE_DECLARE_EXTERN_SIMPLE_TYPE (   T)    HALIDE_DECLARE_EXTERN_TYPE(Simple, T)

Definition at line 153 of file Type.h.

◆ HALIDE_DECLARE_EXTERN_STRUCT_TYPE

#define HALIDE_DECLARE_EXTERN_STRUCT_TYPE (   T)    HALIDE_DECLARE_EXTERN_TYPE(Struct, T)

Definition at line 154 of file Type.h.

◆ HALIDE_DECLARE_EXTERN_CLASS_TYPE

#define HALIDE_DECLARE_EXTERN_CLASS_TYPE (   T)    HALIDE_DECLARE_EXTERN_TYPE(Class, T)

Definition at line 155 of file Type.h.

◆ HALIDE_DECLARE_EXTERN_UNION_TYPE

#define HALIDE_DECLARE_EXTERN_UNION_TYPE (   T)    HALIDE_DECLARE_EXTERN_TYPE(Union, T)

Definition at line 156 of file Type.h.

Function Documentation

◆ HALIDE_DECLARE_EXTERN_SIMPLE_TYPE() [1/14]

HALIDE_DECLARE_EXTERN_SIMPLE_TYPE ( char  )

◆ HALIDE_DECLARE_EXTERN_SIMPLE_TYPE() [2/14]

HALIDE_DECLARE_EXTERN_SIMPLE_TYPE ( bool  )

◆ HALIDE_DECLARE_EXTERN_SIMPLE_TYPE() [3/14]

HALIDE_DECLARE_EXTERN_SIMPLE_TYPE ( int8_t  )

◆ HALIDE_DECLARE_EXTERN_SIMPLE_TYPE() [4/14]

HALIDE_DECLARE_EXTERN_SIMPLE_TYPE ( uint8_t  )

◆ HALIDE_DECLARE_EXTERN_SIMPLE_TYPE() [5/14]

HALIDE_DECLARE_EXTERN_SIMPLE_TYPE ( int16_t  )

◆ HALIDE_DECLARE_EXTERN_SIMPLE_TYPE() [6/14]

HALIDE_DECLARE_EXTERN_SIMPLE_TYPE ( uint16_t  )

◆ HALIDE_DECLARE_EXTERN_SIMPLE_TYPE() [7/14]

HALIDE_DECLARE_EXTERN_SIMPLE_TYPE ( int32_t  )

◆ HALIDE_DECLARE_EXTERN_SIMPLE_TYPE() [8/14]

HALIDE_DECLARE_EXTERN_SIMPLE_TYPE ( uint32_t  )

◆ HALIDE_DECLARE_EXTERN_SIMPLE_TYPE() [9/14]

HALIDE_DECLARE_EXTERN_SIMPLE_TYPE ( int64_t  )

◆ HALIDE_DECLARE_EXTERN_SIMPLE_TYPE() [10/14]

HALIDE_DECLARE_EXTERN_SIMPLE_TYPE ( uint64_t  )

◆ HALIDE_DECLARE_EXTERN_SIMPLE_TYPE() [11/14]

HALIDE_DECLARE_EXTERN_SIMPLE_TYPE ( Halide::float16_t  )

◆ HALIDE_DECLARE_EXTERN_SIMPLE_TYPE() [12/14]

HALIDE_DECLARE_EXTERN_SIMPLE_TYPE ( Halide::bfloat16_t  )

◆ HALIDE_DECLARE_EXTERN_SIMPLE_TYPE() [13/14]

HALIDE_DECLARE_EXTERN_SIMPLE_TYPE ( float  )

◆ HALIDE_DECLARE_EXTERN_SIMPLE_TYPE() [14/14]

HALIDE_DECLARE_EXTERN_SIMPLE_TYPE ( double  )

◆ HALIDE_DECLARE_EXTERN_STRUCT_TYPE() [1/6]

HALIDE_DECLARE_EXTERN_STRUCT_TYPE ( halide_buffer_t  )

◆ HALIDE_DECLARE_EXTERN_STRUCT_TYPE() [2/6]

HALIDE_DECLARE_EXTERN_STRUCT_TYPE ( halide_dimension_t  )

◆ HALIDE_DECLARE_EXTERN_STRUCT_TYPE() [3/6]

HALIDE_DECLARE_EXTERN_STRUCT_TYPE ( halide_device_interface_t  )

◆ HALIDE_DECLARE_EXTERN_STRUCT_TYPE() [4/6]

HALIDE_DECLARE_EXTERN_STRUCT_TYPE ( halide_filter_metadata_t  )

◆ HALIDE_DECLARE_EXTERN_STRUCT_TYPE() [5/6]

HALIDE_DECLARE_EXTERN_STRUCT_TYPE ( halide_semaphore_t  )

◆ HALIDE_DECLARE_EXTERN_STRUCT_TYPE() [6/6]

HALIDE_DECLARE_EXTERN_STRUCT_TYPE ( halide_parallel_task_t  )
halide_c_type_to_name
halide_c_type_to_name is a utility class used to provide a user-extensible way of naming Handle types...
Definition: Type.h:137
Halide::Internal::SyntheticParamType::Type
@ Type
halide_cplusplus_type_name
A set of types to represent a C++ function signature.
Definition: Type.h:41