Halide 22.0.0 Halide compiler and libraries

Loading...
Searching...
No Matches
Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Halide::Internal::GeneratorInput_Scalar< T > Class Template Reference

`#include <Generator.h>`

Inheritance diagram for Halide::Internal::GeneratorInput_Scalar< T >:

## Public Member Functions
| GeneratorInput_Scalar (const std::string &name)
| GeneratorInput_Scalar (const std::string &name, const TBase &def)
| GeneratorInput_Scalar (size_t array_size, const std::string &name)
| GeneratorInput_Scalar (size_t array_size, const std::string &name, const TBase &def)
| operator Expr () const
| You can use this Input as an expression in a halide function definition.
| operator ExternFuncArgument () const
| Using an Input as the argument to an external stage treats it as an Expr.
template<typename T2 = T, std::enable_if_t< std::is_pointer_v< T2 > > * = nullptr>
void | set_estimate (const TBase &value)
template<typename T2 = T, std::enable_if_t<!std::is_array_v< T2 > &&!std::is_pointer_v< T2 > > * = nullptr>
void | set_estimate (const TBase &value)
template<typename T2 = T, std::enable_if_t< std::is_array_v< T2 > > * = nullptr>
void | set_estimate (size_t index, const TBase &value)
Type | type () const
Public Member Functions inherited from Halide::Internal::GeneratorInputImpl< T, Expr >
size_t | size () const
const Expr & | operator[] (size_t i) const
const Expr & | at (size_t i) const
std::vector< Expr >::const_iterator | begin () const
std::vector< Expr >::const_iterator | end () const
Public Member Functions inherited from Halide::Internal::GeneratorInputBase
| ~GeneratorInputBase () override
Public Member Functions inherited from Halide::Internal::GIOBase
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 Types
using | TBase = typename Super::TBase
Protected Types inherited from Halide::Internal::GeneratorInputImpl< T, Expr >
using | TBase = std::remove_all_extents_t< T >

## Protected Member Functions
void | set_def_min_max () override
std::string | get_c_type () const override
Protected Member Functions inherited from Halide::Internal::GeneratorInputImpl< T, Expr >
bool | is_array () const override
| GeneratorInputImpl (const std::string &name, ArgInfoKind kind, const std::vector< Type > &t, int d)
| GeneratorInputImpl (const std::string &name, ArgInfoKind kind, const std::vector< Type > &t, int d)
| GeneratorInputImpl (const std::string &name, ArgInfoKind kind, const std::vector< Type > &t, int d)
Protected Member Functions inherited from Halide::Internal::GeneratorInputBase
| GeneratorInputBase (size_t array_size, const std::string &name, ArgInfoKind kind, const std::vector< Type > &t, int d)
| GeneratorInputBase (const std::string &name, ArgInfoKind kind, const std::vector< Type > &t, int d)
Parameter | parameter () const
void | init_internals ()
void | set_inputs (const std::vector< StubInput > &inputs)
void | verify_internals () override
void | check_value_writable () const override
const char * | input_or_output () const override
void | set_estimate_impl (const Var &var, const Expr &min, const Expr &extent)
void | set_estimates_impl (const Region &estimates)
Protected Member Functions inherited from Halide::Internal::GIOBase
bool | array_size_defined () const
size_t | array_size () 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
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
template<>
const std::vector< Expr > & | get_values () const
template<>
const std::vector< Func > & | get_values () const

## Static Protected Member Functions
template<typename TBase2 = TBase, std::enable_if_t<!std::is_pointer_v< TBase2 > > * = nullptr>
static Expr | TBaseToExpr (const TBase2 &value)
template<typename TBase2 = TBase, std::enable_if_t< std::is_pointer_v< TBase2 > > * = nullptr>
static Expr | TBaseToExpr (const TBase2 &value)

## Protected Attributes
const TBase | def_ {TBase()}
const Expr | def_expr_
Protected Attributes inherited from Halide::Internal::GeneratorInputBase
std::vector< Parameter > | parameters_
bool | inputs_set = false
Protected Attributes inherited from Halide::Internal::GIOBase
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

template<typename T>
class Halide::Internal::GeneratorInput_Scalar< T >

Definition at line 1995 of file Generator.h.

## Member Typedef Documentation

## ◆ TBase

template<typename T >

using Halide::Internal::GeneratorInput_Scalar< T >::TBase = typename Super::TBase
| protected

Definition at line 2000 of file Generator.h.

## Constructor & Destructor Documentation

## ◆ GeneratorInput_Scalar() [1/4]

template<typename T >

Halide::Internal::GeneratorInput_Scalar< T >::GeneratorInput_Scalar | ( | const std::string & | name | ) |
| inline explicit

Definition at line 2031 of file Generator.h.

References Halide::cast().

## ◆ GeneratorInput_Scalar() [2/4]

template<typename T >

Halide::Internal::GeneratorInput_Scalar< T >::GeneratorInput_Scalar | ( | const std::string & | name,
|  | const TBase & | def
| ) |  |
| inline

Definition at line 2035 of file Generator.h.

References Halide::cast().

## ◆ GeneratorInput_Scalar() [3/4]

template<typename T >

Halide::Internal::GeneratorInput_Scalar< T >::GeneratorInput_Scalar | ( | size_t | array_size,
|  | const std::string & | name
| ) |  |
| inline

Definition at line 2039 of file Generator.h.

References Halide::cast().

## ◆ GeneratorInput_Scalar() [4/4]

template<typename T >

Halide::Internal::GeneratorInput_Scalar< T >::GeneratorInput_Scalar | ( | size_t | array_size,
|  | const std::string & | name,
|  | const TBase & | def
| ) |  |
| inline

Definition at line 2044 of file Generator.h.

References Halide::cast().

## Member Function Documentation

## ◆ set_def_min_max()

template<typename T >

void Halide::Internal::GeneratorInput_Scalar< T >::set_def_min_max | ( |  | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::GeneratorInputBase.

Definition at line 2005 of file Generator.h.

References Halide::cast(), Halide::Internal::GeneratorInput_Scalar< T >::def_expr_, Halide::Internal::GeneratorInputBase::parameters_, and Halide::Parameter::set_default_value().

Referenced by Halide::Internal::GeneratorInput_Arithmetic< T >::set_def_min_max().

## ◆ get_c_type()

template<typename T >

std::string Halide::Internal::GeneratorInput_Scalar< T >::get_c_type | ( |  | ) | const
| inline override protected virtual

Implements Halide::Internal::GeneratorInputBase.

Definition at line 2013 of file Generator.h.

## ◆ TBaseToExpr() [1/2]

template<typename T >
template<typename TBase2 = TBase, std::enable_if_t<!std::is_pointer_v< TBase2 > > * = nullptr>

static Expr Halide::Internal::GeneratorInput_Scalar< T >::TBaseToExpr | ( | const TBase2 & | value | ) |
| inline static protected

Definition at line 2020 of file Generator.h.

References Halide::cast().

## ◆ TBaseToExpr() [2/2]

template<typename T >
template<typename TBase2 = TBase, std::enable_if_t< std::is_pointer_v< TBase2 > > * = nullptr>

static Expr Halide::Internal::GeneratorInput_Scalar< T >::TBaseToExpr | ( | const TBase2 & | value | ) |
| inline static protected

Definition at line 2025 of file Generator.h.

References user_assert.

## ◆ operator Expr()

template<typename T >

Halide::Internal::GeneratorInput_Scalar< T >::operator Expr | ( |  | ) | const
| inline

You can use this Input as an expression in a halide function definition.

Definition at line 2052 of file Generator.h.

References Halide::Internal::GIOBase::check_gio_access(), and Halide::Internal::GIOBase::exprs().

## ◆ operator ExternFuncArgument()

template<typename T >

Halide::Internal::GeneratorInput_Scalar< T >::operator ExternFuncArgument | ( |  | ) | const
| inline

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

Definition at line 2059 of file Generator.h.

References Halide::Internal::GeneratorInputImpl< T, Expr >::at(), Halide::Internal::GIOBase::check_gio_access(), and Halide::Internal::GIOBase::exprs().

## ◆ set_estimate() [1/3]

template<typename T >
template<typename T2 = T, std::enable_if_t< std::is_pointer_v< T2 > > * = nullptr>

void Halide::Internal::GeneratorInput_Scalar< T >::set_estimate | ( | const TBase & | value | ) |
| inline

Definition at line 2065 of file Generator.h.

References Halide::cast(), Halide::Internal::GIOBase::check_gio_access(), Halide::Internal::GeneratorInputBase::parameters_, Halide::reinterpret(), Halide::Parameter::set_estimate(), and user_assert.

## ◆ set_estimate() [2/3]

template<typename T >
template<typename T2 = T, std::enable_if_t<!std::is_array_v< T2 > &&!std::is_pointer_v< T2 > > * = nullptr>

void Halide::Internal::GeneratorInput_Scalar< T >::set_estimate | ( | const TBase & | value | ) |
| inline

Definition at line 2075 of file Generator.h.

References Halide::cast(), Halide::Internal::GIOBase::check_gio_access(), Halide::Internal::GeneratorInputBase::parameters_, and Halide::Parameter::set_estimate().

## ◆ set_estimate() [3/3]

template<typename T >
template<typename T2 = T, std::enable_if_t< std::is_array_v< T2 > > * = nullptr>

void Halide::Internal::GeneratorInput_Scalar< T >::set_estimate | ( | size_t | index,
|  | const TBase & | value
| ) |  |
| inline

Definition at line 2087 of file Generator.h.

References Halide::cast(), Halide::Internal::GIOBase::check_gio_access(), and Halide::Internal::GeneratorInputBase::parameters_.

## ◆ type()

template<typename T >

Type Halide::Internal::GeneratorInput_Scalar< T >::type | ( |  | ) | const
| inline

Definition at line 2096 of file Generator.h.

References Halide::Expr::type().

## Member Data Documentation

## ◆ def_

template<typename T >

const TBase Halide::Internal::GeneratorInput_Scalar< T >::def_ {TBase()}
| protected

Definition at line 2002 of file Generator.h.

## ◆ def_expr_

template<typename T >

const Expr Halide::Internal::GeneratorInput_Scalar< T >::def_expr_
| protected

Definition at line 2003 of file Generator.h.

Referenced by Halide::Internal::GeneratorInput_Scalar< T >::set_def_min_max().

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

- src/Generator.h