Halide 19.0.0
Halide compiler and libraries
Loading...
Searching...
No Matches
Halide::Internal::FuncSchedule Class Reference

A schedule for a Function of a Halide pipeline. More...

#include <Schedule.h>

Public Member Functions

 FuncSchedule (IntrusivePtr< FuncScheduleContents > c)
 
 FuncSchedule (const FuncSchedule &other)=default
 
 FuncSchedule ()
 
FuncSchedule deep_copy (std::map< FunctionPtr, FunctionPtr > &copied_map) const
 Return a deep copy of this FuncSchedule.
 
bool & memoized ()
 This flag is set to true if the schedule is memoized.
 
bool memoized () const
 
Exprmemoize_eviction_key ()
 This flag is set to true if the schedule is memoized and has an attached eviction key.
 
Expr memoize_eviction_key () const
 
bool & async ()
 Is the production of this Function done asynchronously.
 
bool async () const
 
Exprring_buffer ()
 
Exprring_buffer () const
 
const std::vector< StorageDim > & storage_dims () const
 The list and order of dimensions used to store this function.
 
std::vector< StorageDim > & storage_dims ()
 
MemoryType memory_type () const
 The memory type (heap/stack/shared/etc) used to back this Func.
 
MemoryTypememory_type ()
 
const std::vector< Bound > & bounds () const
 You may explicitly bound some of the dimensions of a function, or constrain them to lie on multiples of a given factor.
 
std::vector< Bound > & bounds ()
 
const std::vector< Bound > & estimates () const
 You may explicitly specify an estimate of some of the function dimensions.
 
std::vector< Bound > & estimates ()
 
const std::map< std::string, Internal::FunctionPtr > & wrappers () const
 Mark calls of a function by 'f' to be replaced with its identity wrapper or clone during the lowering stage.
 
std::map< std::string, Internal::FunctionPtr > & wrappers ()
 
void add_wrapper (const std::string &f, const Internal::FunctionPtr &wrapper)
 
const LoopLevelstore_level () const
 At what sites should we inject the allocation and the computation of this function? The store_level must be outside of or equal to the compute_level.
 
const LoopLevelcompute_level () const
 
const LoopLevelhoist_storage_level () const
 
LoopLevelstore_level ()
 
LoopLevelcompute_level ()
 
LoopLevelhoist_storage_level ()
 
void accept (IRVisitor *) const
 Pass an IRVisitor through to all Exprs referenced in the Schedule.
 
void mutate (IRMutator *)
 Pass an IRMutator through to all Exprs referenced in the Schedule.
 

Detailed Description

A schedule for a Function of a Halide pipeline.

This schedule is applied to all stages of the Function. Right now this interface is basically a struct, offering mutable access to its innards. In the future it may become more encapsulated.

Definition at line 590 of file Schedule.h.

Constructor & Destructor Documentation

◆ FuncSchedule() [1/3]

Halide::Internal::FuncSchedule::FuncSchedule ( IntrusivePtr< FuncScheduleContents > c)
inline

Definition at line 594 of file Schedule.h.

◆ FuncSchedule() [2/3]

Halide::Internal::FuncSchedule::FuncSchedule ( const FuncSchedule & other)
default

◆ FuncSchedule() [3/3]

Halide::Internal::FuncSchedule::FuncSchedule ( )

Member Function Documentation

◆ deep_copy()

FuncSchedule Halide::Internal::FuncSchedule::deep_copy ( std::map< FunctionPtr, FunctionPtr > & copied_map) const

Return a deep copy of this FuncSchedule.

It recursively deep copies all called functions, schedules, specializations, and reduction domains. This method takes a map of <old FunctionContents, deep-copied version> as input and would use the deep-copied FunctionContents from the map if exists instead of creating a new deep-copy to avoid creating deep-copies of the same FunctionContents multiple times.

◆ memoized() [1/2]

bool & Halide::Internal::FuncSchedule::memoized ( )

This flag is set to true if the schedule is memoized.

◆ memoized() [2/2]

bool Halide::Internal::FuncSchedule::memoized ( ) const

◆ memoize_eviction_key() [1/2]

Expr & Halide::Internal::FuncSchedule::memoize_eviction_key ( )

This flag is set to true if the schedule is memoized and has an attached eviction key.

◆ memoize_eviction_key() [2/2]

Expr Halide::Internal::FuncSchedule::memoize_eviction_key ( ) const

◆ async() [1/2]

bool & Halide::Internal::FuncSchedule::async ( )

Is the production of this Function done asynchronously.

◆ async() [2/2]

bool Halide::Internal::FuncSchedule::async ( ) const

◆ ring_buffer() [1/2]

Expr & Halide::Internal::FuncSchedule::ring_buffer ( )

◆ ring_buffer() [2/2]

Expr & Halide::Internal::FuncSchedule::ring_buffer ( ) const

◆ storage_dims() [1/2]

const std::vector< StorageDim > & Halide::Internal::FuncSchedule::storage_dims ( ) const

The list and order of dimensions used to store this function.

The first dimension in the vector corresponds to the innermost dimension for storage (i.e. which dimension is tightly packed in memory)

◆ storage_dims() [2/2]

std::vector< StorageDim > & Halide::Internal::FuncSchedule::storage_dims ( )

◆ memory_type() [1/2]

MemoryType Halide::Internal::FuncSchedule::memory_type ( ) const

The memory type (heap/stack/shared/etc) used to back this Func.

◆ memory_type() [2/2]

MemoryType & Halide::Internal::FuncSchedule::memory_type ( )

◆ bounds() [1/2]

const std::vector< Bound > & Halide::Internal::FuncSchedule::bounds ( ) const

You may explicitly bound some of the dimensions of a function, or constrain them to lie on multiples of a given factor.

See Func::bound and Func::align_bounds and Func::align_extent.

◆ bounds() [2/2]

std::vector< Bound > & Halide::Internal::FuncSchedule::bounds ( )

◆ estimates() [1/2]

const std::vector< Bound > & Halide::Internal::FuncSchedule::estimates ( ) const

You may explicitly specify an estimate of some of the function dimensions.

See Func::set_estimate

◆ estimates() [2/2]

std::vector< Bound > & Halide::Internal::FuncSchedule::estimates ( )

◆ wrappers() [1/2]

const std::map< std::string, Internal::FunctionPtr > & Halide::Internal::FuncSchedule::wrappers ( ) const

Mark calls of a function by 'f' to be replaced with its identity wrapper or clone during the lowering stage.

If the string 'f' is empty, it means replace all calls to the function by all other functions (excluding itself) in the pipeline with the global identity wrapper. See Func::in and Func::clone_in for more details.

◆ wrappers() [2/2]

std::map< std::string, Internal::FunctionPtr > & Halide::Internal::FuncSchedule::wrappers ( )

◆ add_wrapper()

void Halide::Internal::FuncSchedule::add_wrapper ( const std::string & f,
const Internal::FunctionPtr & wrapper )

◆ store_level() [1/2]

const LoopLevel & Halide::Internal::FuncSchedule::store_level ( ) const

At what sites should we inject the allocation and the computation of this function? The store_level must be outside of or equal to the compute_level.

If the compute_level is inline, the store_level is meaningless. See Func::store_at and Func::compute_at

◆ compute_level() [1/2]

const LoopLevel & Halide::Internal::FuncSchedule::compute_level ( ) const

◆ hoist_storage_level() [1/2]

const LoopLevel & Halide::Internal::FuncSchedule::hoist_storage_level ( ) const

◆ store_level() [2/2]

LoopLevel & Halide::Internal::FuncSchedule::store_level ( )

◆ compute_level() [2/2]

LoopLevel & Halide::Internal::FuncSchedule::compute_level ( )

◆ hoist_storage_level() [2/2]

LoopLevel & Halide::Internal::FuncSchedule::hoist_storage_level ( )

◆ accept()

void Halide::Internal::FuncSchedule::accept ( IRVisitor * ) const

Pass an IRVisitor through to all Exprs referenced in the Schedule.

◆ mutate()

void Halide::Internal::FuncSchedule::mutate ( IRMutator * )

Pass an IRMutator through to all Exprs referenced in the Schedule.


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