Halide
Halide::Generator< T > Class Template Reference

#include <Generator.h>

Inherits Halide::Internal::GeneratorBase.

Public Member Functions

template<typename... Args>
void apply (const Args &...args)
 
- Public Member Functions inherited from Halide::Internal::GeneratorBase
virtual EXPORT ~GeneratorBase ()
 
EXPORT void set_generator_param (const std::string &name, const std::string &value)
 
EXPORT void set_generator_and_schedule_param_values (const std::map< std::string, std::string > &params)
 
template<typename T >
GeneratorBaseset_generator_param (const std::string &name, const T &value)
 
template<typename T >
GeneratorBaseset_schedule_param (const std::string &name, const T &value)
 
int natural_vector_size (Halide::Type t) const
 Given a data type, return an estimate of the "natural" vector size for that data type when compiling for the current target. More...
 
template<typename data_t >
int natural_vector_size () const
 Given a data type, return an estimate of the "natural" vector size for that data type when compiling for the current target. More...
 
EXPORT void emit_cpp_stub (const std::string &stub_file_path)
 
EXPORT Module build_module (const std::string &function_name="", const LoweredFunc::LinkageType linkage_type=LoweredFunc::ExternalPlusMetadata)
 
template<typename... Args>
void set_inputs (const Args &...args)
 set_inputs is a variadic wrapper around set_inputs_vector, which makes usage much simpler in many cases, as it constructs the relevant entries for the vector for you, which is often a bit unintuitive at present. More...
 
Realization realize (std::vector< int32_t > sizes)
 
template<typename... Args, typename std::enable_if< NoRealizations< Args... >::value >::type * = nullptr>
Realization realize (Args &&... args)
 
void realize (Realization r)
 
EXPORT Pipeline get_pipeline ()
 
- Public Member Functions inherited from Halide::GeneratorContext
 GeneratorContext (const Target &t, bool auto_schedule=false, const MachineParams &machine_params=MachineParams::generic())
 
virtual ~GeneratorContext ()
 
Target get_target () const
 
bool get_auto_schedule () const
 
MachineParams get_machine_params () const
 
std::shared_ptr< ExternsMapget_externs_map () const
 Generators can register ExternalCode objects onto themselves. More...
 
template<typename T >
std::unique_ptr< T > create () const
 
template<typename T , typename... Args>
std::unique_ptr< T > apply (const Args &...args) const
 

Static Public Member Functions

static std::unique_ptr< T > create (const Halide::GeneratorContext &context)
 
static std::unique_ptr< T > create (const Halide::GeneratorContext &context, const std::string &registered_name, const std::string &stub_name)
 

Protected Member Functions

 Generator ()
 
Pipeline build_pipeline () override
 
void call_generate () override
 
void call_schedule () override
 
- Protected Member Functions inherited from Halide::Internal::GeneratorBase
EXPORT GeneratorBase (size_t size, const void *introspection_helper)
 
EXPORT void set_generator_names (const std::string &registered_name, const std::string &stub_name)
 
EXPORT void track_parameter_values (bool include_outputs)
 
EXPORT void pre_build ()
 
EXPORT void post_build ()
 
EXPORT void pre_generate ()
 
EXPORT void post_generate ()
 
EXPORT void pre_schedule ()
 
EXPORT void post_schedule ()
 
void check_exact_phase (Phase expected_phase) const
 
void check_min_phase (Phase expected_phase) const
 
void advance_phase (Phase new_phase)
 
- Protected Member Functions inherited from Halide::GeneratorContext
 GeneratorContext ()
 
void init_from_context (const Halide::GeneratorContext &context)
 
std::shared_ptr< Internal::ValueTrackerget_value_tracker () const
 
 GeneratorContext (const GeneratorContext &)=delete
 
void operator= (const GeneratorContext &)=delete
 
 GeneratorContext (GeneratorContext &&)=delete
 
void operator= (GeneratorContext &&)=delete
 

Additional Inherited Members

- Public Types inherited from Halide::GeneratorContext
using ExternsMap = std::map< std::string, ExternalCode >
 
- Protected Types inherited from Halide::Internal::GeneratorBase
enum  Phase { Created, InputsSet, GenerateCalled, ScheduleCalled }
 
template<typename T >
using Input = GeneratorInput< T >
 
template<typename T >
using Output = GeneratorOutput< T >
 
template<typename T >
using ScheduleParam = ScheduleParam< T >
 
- Protected Types inherited from Halide::NamesInterface
using Expr = Halide::Expr
 
using ExternFuncArgument = Halide::ExternFuncArgument
 
using Func = Halide::Func
 
using GeneratorContext = Halide::GeneratorContext
 
using ImageParam = Halide::ImageParam
 
using LoopLevel = Halide::LoopLevel
 
using Pipeline = Halide::Pipeline
 
using RDom = Halide::RDom
 
using TailStrategy = Halide::TailStrategy
 
using Target = Halide::Target
 
using Tuple = Halide::Tuple
 
using Type = Halide::Type
 
using Var = Halide::Var
 
using NameMangling = Halide::NameMangling
 
template<typename T >
using GeneratorParam = Halide::GeneratorParam< T >
 
template<typename T >
using ScheduleParam = Halide::ScheduleParam< T >
 
template<typename T = void>
using Buffer = Halide::Buffer< T >
 
template<typename T >
using Param = Halide::Param< T >
 
- Static Protected Member Functions inherited from Halide::NamesInterface
template<typename T >
static Expr cast (Expr e)
 
static Expr cast (Halide::Type t, Expr e)
 
static Type Bool (int lanes=1)
 
static Type Float (int bits, int lanes=1)
 
static Type Int (int bits, int lanes=1)
 
static Type UInt (int bits, int lanes=1)
 
- Protected Attributes inherited from Halide::Internal::GeneratorBase
enum Halide::Internal::GeneratorBase::Phase Created
 
- Protected Attributes inherited from Halide::GeneratorContext
GeneratorParam< Targettarget
 
GeneratorParam< bool > auto_schedule
 
GeneratorParam< MachineParamsmachine_params
 
std::shared_ptr< ExternsMapexterns_map
 
std::shared_ptr< Internal::ValueTrackervalue_tracker
 

Detailed Description

template<class T>
class Halide::Generator< T >

Examples:
tutorial/lesson_15_generators.cpp.

Definition at line 2891 of file Generator.h.

Constructor & Destructor Documentation

◆ Generator()

template<class T >
Halide::Generator< T >::Generator ( )
inlineprotected

Definition at line 2922 of file Generator.h.

Member Function Documentation

◆ create() [1/2]

template<class T >
static std::unique_ptr<T> Halide::Generator< T >::create ( const Halide::GeneratorContext context)
inlinestatic

Definition at line 2927 of file Generator.h.

◆ create() [2/2]

template<class T >
static std::unique_ptr<T> Halide::Generator< T >::create ( const Halide::GeneratorContext context,
const std::string &  registered_name,
const std::string &  stub_name 
)
inlinestatic

◆ apply()

template<class T >
template<typename... Args>
void Halide::Generator< T >::apply ( const Args &...  args)
inline

Definition at line 2948 of file Generator.h.

References user_error.

◆ build_pipeline()

template<class T >
Pipeline Halide::Generator< T >::build_pipeline ( )
inlineoverrideprotectedvirtual

Implements Halide::Internal::GeneratorBase.

Definition at line 3047 of file Generator.h.

◆ call_generate()

template<class T >
void Halide::Generator< T >::call_generate ( )
inlineoverrideprotectedvirtual

Implements Halide::Internal::GeneratorBase.

Definition at line 3051 of file Generator.h.

◆ call_schedule()

template<class T >
void Halide::Generator< T >::call_schedule ( )
inlineoverrideprotectedvirtual

Implements Halide::Internal::GeneratorBase.

Definition at line 3055 of file Generator.h.

References Halide::Internal::generator_test().


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