Halide
Halide::OutputImageParam Class Reference

A handle on the output buffer of a pipeline. More...

#include <OutputImageParam.h>

Inherited by Halide::ImageParam.

Public Member Functions

 OutputImageParam ()=default
 Construct a null image parameter handle. More...
 
const std::string & name () const
 Get the name of this Param. More...
 
Type type () const
 Get the type of the image data this Param refers to. More...
 
bool defined () const
 Is this parameter handle non-nullptr. More...
 
Internal::Dimension dim (int i)
 Get a handle on one of the dimensions for the purposes of inspecting or constraining its min, extent, or stride. More...
 
Internal::Dimension dim (int i) const
 Get a handle on one of the dimensions for the purposes of inspecting its min, extent, or stride. More...
 
int host_alignment () const
 Get the alignment of the host pointer in bytes. More...
 
OutputImageParamset_host_alignment (int)
 Set the expected alignment of the host pointer in bytes. More...
 
int dimensions () const
 Get the dimensionality of this image parameter. More...
 
Expr left () const
 Get an expression giving the minimum coordinate in dimension 0, which by convention is the coordinate of the left edge of the image. More...
 
Expr right () const
 Get an expression giving the maximum coordinate in dimension 0, which by convention is the coordinate of the right edge of the image. More...
 
Expr top () const
 Get an expression giving the minimum coordinate in dimension 1, which by convention is the top of the image. More...
 
Expr bottom () const
 Get an expression giving the maximum coordinate in dimension 1, which by convention is the bottom of the image. More...
 
Expr width () const
 Get an expression giving the extent in dimension 0, which by convention is the width of the image. More...
 
Expr height () const
 Get an expression giving the extent in dimension 1, which by convention is the height of the image. More...
 
Expr channels () const
 Get an expression giving the extent in dimension 2, which by convention is the channel-count of the image. More...
 
Internal::Parameter parameter () const
 Get at the internal parameter object representing this ImageParam. More...
 
 operator Argument () const
 Construct the appropriate argument matching this parameter, for the purpose of generating the right type signature when statically compiling halide pipelines. More...
 
 operator ExternFuncArgument () const
 Using a param as the argument to an external stage treats it as an Expr. More...
 
OutputImageParamset_estimates (const Region &estimates)
 Set (min, extent) estimates for all dimensions in the ImageParam at once; this is equivalent to calling dim(n).set_estimate(min, extent) repeatedly, but slightly terser. More...
 
OutputImageParamstore_in (MemoryType type)
 Set the desired storage type for this parameter. More...
 

Protected Member Functions

void add_implicit_args_if_placeholder (std::vector< Expr > &args, Expr last_arg, int total_args, bool *placeholder_seen) const
 
 OutputImageParam (const Internal::Parameter &p, Argument::Kind k, Func f)
 Construct an OutputImageParam that wraps an Internal Parameter object. More...
 

Protected Attributes

Internal::Parameter param
 A reference-counted handle on the internal parameter object. More...
 
Argument::Kind kind = Argument::InputScalar
 Is this an input or an output? OutputImageParam is the base class for both. More...
 
Func func
 If Input: Func representation of the ImageParam. More...
 

Detailed Description

A handle on the output buffer of a pipeline.

Used to make static promises about the output size and stride.

Definition at line 19 of file OutputImageParam.h.

Constructor & Destructor Documentation

◆ OutputImageParam() [1/2]

Halide::OutputImageParam::OutputImageParam ( const Internal::Parameter p,
Argument::Kind  k,
Func  f 
)
protected

Construct an OutputImageParam that wraps an Internal Parameter object.

◆ OutputImageParam() [2/2]

Halide::OutputImageParam::OutputImageParam ( )
default

Construct a null image parameter handle.

Member Function Documentation

◆ add_implicit_args_if_placeholder()

void Halide::OutputImageParam::add_implicit_args_if_placeholder ( std::vector< Expr > &  args,
Expr  last_arg,
int  total_args,
bool *  placeholder_seen 
) const
protected

◆ name()

const std::string& Halide::OutputImageParam::name ( ) const

Get the name of this Param.

◆ type()

Type Halide::OutputImageParam::type ( ) const

Get the type of the image data this Param refers to.

◆ defined()

bool Halide::OutputImageParam::defined ( ) const

Is this parameter handle non-nullptr.

◆ dim() [1/2]

Internal::Dimension Halide::OutputImageParam::dim ( int  i)

Get a handle on one of the dimensions for the purposes of inspecting or constraining its min, extent, or stride.

◆ dim() [2/2]

Internal::Dimension Halide::OutputImageParam::dim ( int  i) const

Get a handle on one of the dimensions for the purposes of inspecting its min, extent, or stride.

◆ host_alignment()

int Halide::OutputImageParam::host_alignment ( ) const

Get the alignment of the host pointer in bytes.

Defaults to the size of type.

◆ set_host_alignment()

OutputImageParam& Halide::OutputImageParam::set_host_alignment ( int  )

Set the expected alignment of the host pointer in bytes.

◆ dimensions()

int Halide::OutputImageParam::dimensions ( ) const

Get the dimensionality of this image parameter.

◆ left()

Expr Halide::OutputImageParam::left ( ) const

Get an expression giving the minimum coordinate in dimension 0, which by convention is the coordinate of the left edge of the image.

◆ right()

Expr Halide::OutputImageParam::right ( ) const

Get an expression giving the maximum coordinate in dimension 0, which by convention is the coordinate of the right edge of the image.

◆ top()

Expr Halide::OutputImageParam::top ( ) const

Get an expression giving the minimum coordinate in dimension 1, which by convention is the top of the image.

◆ bottom()

Expr Halide::OutputImageParam::bottom ( ) const

Get an expression giving the maximum coordinate in dimension 1, which by convention is the bottom of the image.

◆ width()

Expr Halide::OutputImageParam::width ( ) const

Get an expression giving the extent in dimension 0, which by convention is the width of the image.

◆ height()

Expr Halide::OutputImageParam::height ( ) const

Get an expression giving the extent in dimension 1, which by convention is the height of the image.

◆ channels()

Expr Halide::OutputImageParam::channels ( ) const

Get an expression giving the extent in dimension 2, which by convention is the channel-count of the image.

◆ parameter()

Internal::Parameter Halide::OutputImageParam::parameter ( ) const

Get at the internal parameter object representing this ImageParam.

◆ operator Argument()

Halide::OutputImageParam::operator Argument ( ) const

Construct the appropriate argument matching this parameter, for the purpose of generating the right type signature when statically compiling halide pipelines.

◆ operator ExternFuncArgument()

Halide::OutputImageParam::operator ExternFuncArgument ( ) const

Using a param as the argument to an external stage treats it as an Expr.

◆ set_estimates()

OutputImageParam& Halide::OutputImageParam::set_estimates ( const Region estimates)

Set (min, extent) estimates for all dimensions in the ImageParam at once; this is equivalent to calling dim(n).set_estimate(min, extent) repeatedly, but slightly terser.

The size of the estimates vector must match the dimensionality of the ImageParam.

◆ store_in()

OutputImageParam& Halide::OutputImageParam::store_in ( MemoryType  type)

Set the desired storage type for this parameter.

Only useful for MemoryType::GPUTexture at present

Member Data Documentation

◆ param

Internal::Parameter Halide::OutputImageParam::param
protected

A reference-counted handle on the internal parameter object.

Definition at line 24 of file OutputImageParam.h.

◆ kind

Argument::Kind Halide::OutputImageParam::kind = Argument::InputScalar
protected

Is this an input or an output? OutputImageParam is the base class for both.

Definition at line 27 of file OutputImageParam.h.

◆ func

Func Halide::OutputImageParam::func
protected

If Input: Func representation of the ImageParam.

If Output: Func that creates this OutputImageParam.

Definition at line 32 of file OutputImageParam.h.

Referenced by Halide::ImageParam::operator()().


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