Halide
Halide::GeneratorParam< T > Class Template Reference

GeneratorParam is a templated class that can be used to modify the behavior of the Generator at code-generation time. More...

#include <Generator.h>

Inherits GeneratorParamImplBase< T >.

Public Member Functions

 GeneratorParam (const std::string &name, const T &value)
 
 GeneratorParam (const std::string &name, const T &value, const T &min, const T &max)
 
 GeneratorParam (const std::string &name, const T &value, const std::map< std::string, T > &enum_map)
 
 GeneratorParam (const std::string &name, const std::string &value)
 

Detailed Description

template<typename T>
class Halide::GeneratorParam< T >

GeneratorParam is a templated class that can be used to modify the behavior of the Generator at code-generation time.

GeneratorParams are commonly specified in build files (e.g. Makefile) to customize the behavior of a given Generator, thus they have a very constrained set of types to allow for efficient specification via command-line flags. A GeneratorParam can be:

  • any float or int type.
  • bool
  • enum
  • Halide::Target
  • Halide::Type All GeneratorParams have a default value. Arithmetic types can also optionally specify min and max. Enum types must specify a string-to-value map.

Halide::Type is treated as though it were an enum, with the mappings:

"int8" Halide::Int(8) "int16" Halide::Int(16) "int32" Halide::Int(32) "uint8" Halide::UInt(8) "uint16" Halide::UInt(16) "uint32" Halide::UInt(32) "float32" Halide::Float(32) "float64" Halide::Float(64)

No vector Types are currently supported by this mapping.

Examples:
tutorial/lesson_15_generators.cpp.

Definition at line 798 of file Generator.h.

Constructor & Destructor Documentation

◆ GeneratorParam() [1/4]

template<typename T>
Halide::GeneratorParam< T >::GeneratorParam ( const std::string &  name,
const T &  value 
)
inline

Definition at line 800 of file Generator.h.

◆ GeneratorParam() [2/4]

template<typename T>
Halide::GeneratorParam< T >::GeneratorParam ( const std::string &  name,
const T &  value,
const T &  min,
const T &  max 
)
inline

Definition at line 803 of file Generator.h.

◆ GeneratorParam() [3/4]

template<typename T>
Halide::GeneratorParam< T >::GeneratorParam ( const std::string &  name,
const T &  value,
const std::map< std::string, T > &  enum_map 
)
inline

Definition at line 806 of file Generator.h.

◆ GeneratorParam() [4/4]

template<typename T>
Halide::GeneratorParam< T >::GeneratorParam ( const std::string &  name,
const std::string &  value 
)
inline

Definition at line 809 of file Generator.h.


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