Loading...
Searching...
No Matches
Halide::Internal::GIOBase Class Referenceabstract

GIOBase is the base class for all GeneratorInput<> and GeneratorOutput<> instantiations; it is not part of the public API and should never be used directly by user code. More...

`#include <Generator.h>`

Inheritance diagram for Halide::Internal::GIOBase:

## Public Member Functions

virtual | ~GIOBase ()=default
void | set_type (const Type &type)
void | set_dimensions (int dims)
void | set_array_size (int size)
| GIOBase (const GIOBase &)=delete
GIOBase & | operator= (const GIOBase &)=delete
| GIOBase (GIOBase &&)=delete
GIOBase & | operator= (GIOBase &&)=delete

## Protected Member Functions

bool | array_size_defined () const
size_t | array_size () const
virtual bool | is_array () const
const std::string & | name () const
ArgInfoKind | kind () const
bool | gio_types_defined () const
const std::vector< Type > & | gio_types () const
Type | gio_type () const
bool | dims_defined () const
int | dims () const
const std::vector< Func > & | funcs () const
const std::vector< Expr > & | exprs () const
| GIOBase (size_t array_size, const std::string &name, ArgInfoKind kind, const std::vector< Type > &types, int dims)
std::string | array_name (size_t i) const
virtual void | verify_internals ()
void | check_matching_array_size (size_t size) const
void | check_matching_types (const std::vector< Type > &t) const
void | check_matching_dims (int d) const
template<typename ElemType>
const std::vector< ElemType > & | get_values () const
void | check_gio_access () const
virtual void | check_value_writable () const =0
virtual const char * | input_or_output () const =0
template<>
const std::vector< Expr > & | get_values () const
template<>
const std::vector< Func > & | get_values () const

## Protected Attributes

int | array_size_
const std::string | name_
const ArgInfoKind | kind_
std::vector< Type > | types_
int | dims_
std::vector< Func > | funcs_
std::vector< Expr > | exprs_
GeneratorBase * | generator {nullptr}

## Detailed Description

GIOBase is the base class for all GeneratorInput<> and GeneratorOutput<> instantiations; it is not part of the public API and should never be used directly by user code.

Every GIOBase instance can be either a single value or an array-of-values; each of these values can be an Expr or a Func. (Note that for an array-of-values, the types/dimensions of all values in the array must match.)

A GIOBase can have multiple Types, in which case it represents a Tuple. (Note that Tuples are currently only supported for GeneratorOutput, but it is likely that GeneratorInput will be extended to support Tuple as well.)

The array-size, type(s), and dimensions can all be left "unspecified" at creation time, in which case they may assume values provided by a Stub. (It is important to note that attempting to use a GIOBase with unspecified values will assert-fail; you must ensure that all unspecified values are filled in prior to use.)

Definition at line 1443 of file Generator.h.

## Constructor & Destructor Documentation

## ~GIOBase()

virtual Halide::Internal::GIOBase::~GIOBase | ( |  | ) |

virtual default

## GIOBase() [1/3]

Halide::Internal::GIOBase::GIOBase | ( | size_t | array_size,
|  | const std::string & | name,
|  | ArgInfoKind | kind,
|  | const std::vector< Type > & | types,
|  | int | dims )

protected

References array_size(), dims(), kind(), and name().

Referenced by GIOBase(), GIOBase(), operator=(), and operator=().

## GIOBase() [2/3]

Halide::Internal::GIOBase::GIOBase | ( | const GIOBase & |  | ) |

delete

References GIOBase().

## GIOBase() [3/3]

Halide::Internal::GIOBase::GIOBase | ( | GIOBase && |  | ) |

delete

References GIOBase().

## Member Function Documentation

## set_type()

void Halide::Internal::GIOBase::set_type | ( | const Type & | type | ) |

## set_dimensions()

void Halide::Internal::GIOBase::set_dimensions | ( | int | dims | ) |

References dims().

## set_array_size()

void Halide::Internal::GIOBase::set_array_size | ( | int | size | ) |

## array_size_defined()

bool Halide::Internal::GIOBase::array_size_defined | ( |  | ) | const

protected

## array_size()

size_t Halide::Internal::GIOBase::array_size | ( |  | ) | const

protected

Referenced by Halide::Internal::GeneratorInput_Arithmetic< T >::GeneratorInput_Arithmetic(), Halide::Internal::GeneratorInput_Arithmetic< T >::GeneratorInput_Arithmetic(), Halide::Internal::GeneratorInput_Arithmetic< T >::GeneratorInput_Arithmetic(), Halide::Internal::GeneratorInput_Func< T >::GeneratorInput_Func(), Halide::Internal::GeneratorInput_Func< T >::GeneratorInput_Func(), Halide::Internal::GeneratorInput_Func< T >::GeneratorInput_Func(), Halide::Internal::GeneratorInput_Func< T >::GeneratorInput_Func(), Halide::Internal::GeneratorInput_Scalar< T >::GeneratorInput_Scalar(), Halide::Internal::GeneratorInput_Scalar< T >::GeneratorInput_Scalar(), Halide::Internal::GeneratorInputBase::GeneratorInputBase(), Halide::Internal::GeneratorOutput_Arithmetic< T >::GeneratorOutput_Arithmetic(), Halide::Internal::GeneratorOutput_Buffer< T >::GeneratorOutput_Buffer(), Halide::Internal::GeneratorOutput_Buffer< T >::GeneratorOutput_Buffer(), Halide::Internal::GeneratorOutput_Buffer< T >::GeneratorOutput_Buffer(), Halide::Internal::GeneratorOutput_Buffer< T >::GeneratorOutput_Buffer(), Halide::Internal::GeneratorOutput_Func< T >::GeneratorOutput_Func(), Halide::Internal::GeneratorOutputBase::GeneratorOutputBase(), and GIOBase().

## is_array()

virtual bool Halide::Internal::GIOBase::is_array | ( |  | ) | const

protected virtual

Reimplemented in Halide::Internal::GeneratorInputImpl< T, ValueType >, Halide::Internal::GeneratorInputImpl< T, Expr >, Halide::Internal::GeneratorInputImpl< T, Func >, and Halide::Internal::GeneratorOutputImpl< T >.

## name()

const std::string & Halide::Internal::GIOBase::name | ( |  | ) | const

protected

Referenced by Halide::Internal::GeneratorInput_Arithmetic< T >::GeneratorInput_Arithmetic(), Halide::Internal::GeneratorInput_Arithmetic< T >::GeneratorInput_Arithmetic(), Halide::Internal::GeneratorInput_Arithmetic< T >::GeneratorInput_Arithmetic(), Halide::Internal::GeneratorInput_Arithmetic< T >::GeneratorInput_Arithmetic(), Halide::Internal::GeneratorInput_Arithmetic< T >::GeneratorInput_Arithmetic(), Halide::Internal::GeneratorInput_Arithmetic< T >::GeneratorInput_Arithmetic(), Halide::Internal::GeneratorInput_Buffer< T >::GeneratorInput_Buffer(), Halide::Internal::GeneratorInput_Buffer< T >::GeneratorInput_Buffer(), Halide::Internal::GeneratorInput_Buffer< T >::GeneratorInput_Buffer(), Halide::Internal::GeneratorInput_Buffer< T >::GeneratorInput_Buffer(), Halide::Internal::GeneratorInput_DynamicScalar< T >::GeneratorInput_DynamicScalar(), Halide::Internal::GeneratorInput_Func< T >::GeneratorInput_Func(), Halide::Internal::GeneratorInput_Func< T >::GeneratorInput_Func(), Halide::Internal::GeneratorInput_Func< T >::GeneratorInput_Func(), Halide::Internal::GeneratorInput_Func< T >::GeneratorInput_Func(), Halide::Internal::GeneratorInput_Func< T >::GeneratorInput_Func(), Halide::Internal::GeneratorInput_Func< T >::GeneratorInput_Func(), Halide::Internal::GeneratorInput_Func< T >::GeneratorInput_Func(), Halide::Internal::GeneratorInput_Func< T >::GeneratorInput_Func(), Halide::Internal::GeneratorInput_Scalar< T >::GeneratorInput_Scalar(), Halide::Internal::GeneratorInput_Scalar< T >::GeneratorInput_Scalar(), Halide::Internal::GeneratorInput_Scalar< T >::GeneratorInput_Scalar(), Halide::Internal::GeneratorInput_Scalar< T >::GeneratorInput_Scalar(), Halide::Internal::GeneratorInputBase::GeneratorInputBase(), Halide::Internal::GeneratorInputBase::GeneratorInputBase(), Halide::Internal::GeneratorInputImpl< T, Func >::GeneratorInputImpl(), Halide::Internal::GeneratorOutput_Arithmetic< T >::GeneratorOutput_Arithmetic(), Halide::Internal::GeneratorOutput_Arithmetic< T >::GeneratorOutput_Arithmetic(), Halide::Internal::GeneratorOutput_Buffer< T >::GeneratorOutput_Buffer(), Halide::Internal::GeneratorOutput_Buffer< T >::GeneratorOutput_Buffer(), Halide::Internal::GeneratorOutput_Buffer< T >::GeneratorOutput_Buffer(), Halide::Internal::GeneratorOutput_Buffer< T >::GeneratorOutput_Buffer(), Halide::Internal::GeneratorOutput_Buffer< T >::GeneratorOutput_Buffer(), Halide::Internal::GeneratorOutput_Buffer< T >::GeneratorOutput_Buffer(), Halide::Internal::GeneratorOutput_Buffer< T >::GeneratorOutput_Buffer(), Halide::Internal::GeneratorOutput_Buffer< T >::GeneratorOutput_Buffer(), Halide::Internal::GeneratorOutput_Func< T >::GeneratorOutput_Func(), Halide::Internal::GeneratorOutput_Func< T >::GeneratorOutput_Func(), Halide::Internal::GeneratorOutput_Func< T >::GeneratorOutput_Func(), Halide::Internal::GeneratorOutput_Func< T >::GeneratorOutput_Func(), Halide::Internal::GeneratorOutput_Func< T >::GeneratorOutput_Func(), Halide::Internal::GeneratorOutputBase::GeneratorOutputBase(), Halide::Internal::GeneratorOutputBase::GeneratorOutputBase(), Halide::Internal::GeneratorOutputImpl< T >::GeneratorOutputImpl(), GIOBase(), Halide::Internal::GeneratorInput_Buffer< T >::operator ImageParam(), Halide::Internal::GeneratorOutput_Buffer< T >::operator OutputImageParam(), Halide::Internal::GeneratorInput_Buffer< T >::operator StubInputBuffer< T2 >(), Halide::Internal::GeneratorOutput_Buffer< T >::operator=(), and Halide::Internal::GeneratorOutput_Buffer< T >::set_estimates().

## kind()

ArgInfoKind Halide::Internal::GIOBase::kind | ( |  | ) | const

protected

Referenced by Halide::Internal::GeneratorOutputBase::as(), Halide::Internal::GeneratorInputBase::GeneratorInputBase(), Halide::Internal::GeneratorInputBase::GeneratorInputBase(), Halide::Internal::GeneratorInputImpl< T, Func >::GeneratorInputImpl(), Halide::Internal::GeneratorOutputBase::GeneratorOutputBase(), Halide::Internal::GeneratorOutputBase::GeneratorOutputBase(), Halide::Internal::GeneratorOutputImpl< T >::GeneratorOutputImpl(), and GIOBase().

## gio_types_defined()

bool Halide::Internal::GIOBase::gio_types_defined | ( |  | ) | const

protected

Referenced by Halide::Internal::GeneratorOutput_Buffer< T >::operator=().

## gio_types()

const std::vector< Type > & Halide::Internal::GIOBase::gio_types | ( |  | ) | const

protected

## gio_type()

Type Halide::Internal::GIOBase::gio_type | ( |  | ) | const

protected

Referenced by Halide::Internal::GeneratorOutput_Buffer< T >::operator=().

## dims_defined()

bool Halide::Internal::GIOBase::dims_defined | ( |  | ) | const

protected

Referenced by Halide::Internal::GeneratorOutput_Buffer< T >::operator=().

## dims()

int Halide::Internal::GIOBase::dims | ( |  | ) | const

protected

Referenced by GIOBase(), Halide::Internal::GeneratorOutput_Buffer< T >::operator=(), and set_dimensions().

## funcs()

const std::vector< Func > & Halide::Internal::GIOBase::funcs | ( |  | ) | const

protected

Referenced by get_values(), Halide::Internal::GeneratorInput_Buffer< T >::operator Func(), Halide::Internal::GeneratorInput_Func< T >::operator Func(), Halide::Internal::GeneratorInput_Func< T >::operator()(), and Halide::Internal::GeneratorInput_Func< T >::operator()().

## exprs()

const std::vector< Expr > & Halide::Internal::GIOBase::exprs | ( |  | ) | const

protected

Referenced by get_values(), Halide::Internal::GeneratorInput_DynamicScalar< T >::operator Expr(), Halide::Internal::GeneratorInput_Scalar< T >::operator Expr(), Halide::Internal::GeneratorInput_DynamicScalar< T >::operator ExternFuncArgument(), and Halide::Internal::GeneratorInput_Scalar< T >::operator ExternFuncArgument().

## array_name()

std::string Halide::Internal::GIOBase::array_name | ( | size_t | i | ) | const

protected

## verify_internals()

virtual void Halide::Internal::GIOBase::verify_internals | ( |  | ) |

protected virtual

Reimplemented in Halide::Internal::GeneratorInputBase.

## check_matching_array_size()

void Halide::Internal::GIOBase::check_matching_array_size | ( | size_t | size | ) | const

protected

## check_matching_types()

void Halide::Internal::GIOBase::check_matching_types | ( | const std::vector< Type > & | t | ) | const

protected

## check_matching_dims()

void Halide::Internal::GIOBase::check_matching_dims | ( | int | d | ) | const

protected

## get_values() [1/3]

template<typename ElemType>

const std::vector< ElemType > & Halide::Internal::GIOBase::get_values | ( |  | ) | const

protected

Referenced by Halide::Internal::GeneratorInputImpl< T, Func >::at(), Halide::Internal::GeneratorOutputImpl< T >::at(), Halide::Internal::GeneratorInputImpl< T, Func >::begin(), Halide::Internal::GeneratorOutputImpl< T >::begin(), Halide::Internal::GeneratorInputImpl< T, Func >::end(), Halide::Internal::GeneratorOutputImpl< T >::end(), Halide::Internal::GeneratorOutputImpl< T >::operator Func(), Halide::Internal::GeneratorOutputImpl< T >::operator Stage(), Halide::Internal::GeneratorOutputImpl< T >::operator()(), Halide::Internal::GeneratorOutputImpl< T >::operator()(), Halide::Internal::GeneratorInputImpl< T, Func >::operator[](), Halide::Internal::GeneratorOutput_Buffer< T >::operator[](), Halide::Internal::GeneratorOutput_Buffer< T >::operator[](), Halide::Internal::GeneratorOutputImpl< T >::operator[](), Halide::Internal::GeneratorInputImpl< T, Func >::size(), and Halide::Internal::GeneratorOutputImpl< T >::size().

## check_gio_access()

void Halide::Internal::GIOBase::check_gio_access | ( |  | ) | const

protected

Referenced by Halide::Internal::GeneratorInput_Buffer< T >::at(), Halide::Internal::GeneratorInputImpl< T, Func >::at(), Halide::Internal::GeneratorOutputImpl< T >::at(), Halide::Internal::GeneratorInputImpl< T, Func >::begin(), Halide::Internal::GeneratorOutputImpl< T >::begin(), Halide::Internal::GeneratorInputImpl< T, Func >::end(), Halide::Internal::GeneratorOutputImpl< T >::end(), Halide::Internal::GeneratorInput_Buffer< T >::in(), Halide::Internal::GeneratorInput_Buffer< T >::in(), Halide::Internal::GeneratorInput_Buffer< T >::in(), Halide::Internal::GeneratorInput_Func< T >::in(), Halide::Internal::GeneratorInput_Func< T >::in(), Halide::Internal::GeneratorInput_Func< T >::in(), Halide::Internal::GeneratorInput_DynamicScalar< T >::operator Expr(), Halide::Internal::GeneratorInput_Scalar< T >::operator Expr(), Halide::Internal::GeneratorInput_Buffer< T >::operator ExternFuncArgument(), Halide::Internal::GeneratorInput_DynamicScalar< T >::operator ExternFuncArgument(), Halide::Internal::GeneratorInput_Func< T >::operator ExternFuncArgument(), Halide::Internal::GeneratorInput_Scalar< T >::operator ExternFuncArgument(), Halide::Internal::GeneratorInput_Buffer< T >::operator Func(), Halide::Internal::GeneratorInput_Func< T >::operator Func(), Halide::Internal::GeneratorOutputImpl< T >::operator Func(), Halide::Internal::GeneratorInput_Buffer< T >::operator ImageParam(), Halide::Internal::GeneratorOutput_Buffer< T >::operator OutputImageParam(), Halide::Internal::GeneratorOutputImpl< T >::operator Stage(), Halide::Internal::GeneratorInput_Buffer< T >::operator()(), Halide::Internal::GeneratorInput_Buffer< T >::operator()(), Halide::Internal::GeneratorInput_Func< T >::operator()(), Halide::Internal::GeneratorInput_Func< T >::operator()(), Halide::Internal::GeneratorOutputImpl< T >::operator()(), Halide::Internal::GeneratorOutputImpl< T >::operator()(), Halide::Internal::GeneratorOutput_Buffer< T >::operator=(), Halide::Internal::GeneratorOutput_Buffer< T >::operator=(), Halide::Internal::GeneratorOutput_Buffer< T >::operator=(), Halide::Internal::GeneratorOutput_Func< T >::operator=(), Halide::Internal::GeneratorInput_Buffer< T >::operator[](), Halide::Internal::GeneratorInputImpl< T, Func >::operator[](), Halide::Internal::GeneratorOutput_Buffer< T >::operator[](), Halide::Internal::GeneratorOutput_Buffer< T >::operator[](), Halide::Internal::GeneratorOutput_Func< T >::operator[](), Halide::Internal::GeneratorOutput_Func< T >::operator[](), Halide::Internal::GeneratorOutputImpl< T >::operator[](), Halide::Internal::GeneratorOutputImpl< T >::resize(), Halide::Internal::GeneratorInput_Buffer< T >::set_estimate(), Halide::Internal::GeneratorInput_DynamicScalar< T >::set_estimate(), Halide::Internal::GeneratorInput_Func< T >::set_estimate(), Halide::Internal::GeneratorInput_Scalar< T >::set_estimate(), Halide::Internal::GeneratorInput_Scalar< T >::set_estimate(), Halide::Internal::GeneratorOutput_Func< T >::set_estimate(), Halide::Internal::GeneratorInput_Buffer< T >::set_estimates(), Halide::Internal::GeneratorInput_Func< T >::set_estimates(), Halide::Internal::GeneratorOutput_Func< T >::set_estimates(), Halide::Internal::GeneratorInput_Buffer< T >::size(), Halide::Internal::GeneratorInputImpl< T, Func >::size(), and Halide::Internal::GeneratorOutputImpl< T >::size().

## check_value_writable()

virtual void Halide::Internal::GIOBase::check_value_writable | ( |  | ) | const

protected pure virtual

Implemented in Halide::Internal::GeneratorInputBase, and Halide::Internal::GeneratorOutputBase.

## input_or_output()

virtual const char * Halide::Internal::GIOBase::input_or_output | ( |  | ) | const

protected pure virtual

Implemented in Halide::Internal::GeneratorInputBase, and Halide::Internal::GeneratorOutputBase.

## operator=() [1/2]

GIOBase & Halide::Internal::GIOBase::operator= | ( | const GIOBase & |  | ) |

delete

References GIOBase().

## operator=() [2/2]

GIOBase & Halide::Internal::GIOBase::operator= | ( | GIOBase && |  | ) |

delete

References GIOBase().

## get_values() [2/3]

template<>

const std::vector< Expr > & Halide::Internal::GIOBase::get_values | ( |  | ) | const

inline protected

Definition at line 1529 of file Generator.h.

References exprs().

## get_values() [3/3]

template<>

const std::vector< Func > & Halide::Internal::GIOBase::get_values | ( |  | ) | const

inline protected

Definition at line 1534 of file Generator.h.

References funcs().

## Member Data Documentation

## array_size_

int Halide::Internal::GIOBase::array_size_

mutable protected

Definition at line 1480 of file Generator.h.

## name_

const std::string Halide::Internal::GIOBase::name_

protected

Definition at line 1483 of file Generator.h.

## kind_

const ArgInfoKind Halide::Internal::GIOBase::kind_

protected

Definition at line 1484 of file Generator.h.

## types_

std::vector<Type> Halide::Internal::GIOBase::types_

mutable protected

Definition at line 1485 of file Generator.h.

## dims_

int Halide::Internal::GIOBase::dims_

mutable protected

Definition at line 1486 of file Generator.h.

## funcs_

std::vector<Func> Halide::Internal::GIOBase::funcs_

protected

Definition at line 1489 of file Generator.h.

Referenced by Halide::Internal::GeneratorOutputBase::as(), Halide::Internal::GeneratorOutput_Buffer< T >::operator OutputImageParam(), Halide::Internal::GeneratorOutput_Buffer< T >::operator=(), Halide::Internal::GeneratorOutput_Func< T >::set_estimate(), Halide::Internal::GeneratorOutput_Buffer< T >::set_estimates(), and Halide::Internal::GeneratorOutput_Func< T >::set_estimates().

## exprs_

std::vector<Expr> Halide::Internal::GIOBase::exprs_

protected

Definition at line 1490 of file Generator.h.

Referenced by Halide::Internal::GeneratorOutputBase::as(), Halide::Internal::GeneratorOutput_Buffer< T >::operator OutputImageParam(), Halide::Internal::GeneratorOutput_Buffer< T >::operator=(), Halide::Internal::GeneratorOutput_Func< T >::set_estimate(), Halide::Internal::GeneratorOutput_Buffer< T >::set_estimates(), and Halide::Internal::GeneratorOutput_Func< T >::set_estimates().

## generator

GeneratorBase* Halide::Internal::GIOBase::generator {nullptr}

protected

Definition at line 1497 of file Generator.h.

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

- src/Generator.h