Halide
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)
 
 FuncSchedule ()
 
FuncSchedule deep_copy (std::map< FunctionPtr, FunctionPtr > &copied_map) const
 Return a deep copy of this FuncSchedule. More...
 
bool & memoized ()
 This flag is set to true if the schedule is memoized. More...
 
bool memoized () const
 
bool & async ()
 Is the production of this Function done asynchronously. More...
 
bool async () const
 
const std::vector< StorageDim > & storage_dims () const
 The list and order of dimensions used to store this function. More...
 
std::vector< StorageDim > & storage_dims ()
 
MemoryType memory_type () const
 The memory type (heap/stack/shared/etc) used to back this Func. More...
 
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. More...
 
std::vector< Bound > & bounds ()
 
const std::vector< Bound > & estimates () const
 You may explicitly specify an estimate of some of the function dimensions. More...
 
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. More...
 
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. More...
 
const LoopLevelcompute_level () const
 
LoopLevelstore_level ()
 
LoopLevelcompute_level ()
 
void accept (IRVisitor *) const
 Pass an IRVisitor through to all Exprs referenced in the Schedule. More...
 
void mutate (IRMutator *)
 Pass an IRMutator through to all Exprs referenced in the Schedule. More...
 

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 506 of file Schedule.h.

Constructor & Destructor Documentation

◆ FuncSchedule() [1/3]

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

Definition at line 510 of file Schedule.h.

◆ FuncSchedule() [2/3]

Halide::Internal::FuncSchedule::FuncSchedule ( const FuncSchedule other)
inline

Definition at line 513 of file Schedule.h.

◆ 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

◆ 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

◆ 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

◆ 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::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

◆ store_level() [2/2]

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

◆ compute_level() [2/2]

LoopLevel& Halide::Internal::FuncSchedule::compute_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: