Halide
Halide::Internal::GeneratorOutputImpl< T > Class Template Reference

#include <Generator.h>

Inherits Halide::Internal::GeneratorOutputBase.

Inherited by Halide::Internal::GeneratorOutput_Arithmetic< T >, Halide::Internal::GeneratorOutput_Buffer< T >, and Halide::Internal::GeneratorOutput_Func< T >.

Public Member Functions

template<typename... Args, typename T2 = T, typename std::enable_if<!std::is_array< T2 >::value >::type * = nullptr>
FuncRef operator() (Args &&... args) const
 
template<typename ExprOrVar , typename T2 = T, typename std::enable_if<!std::is_array< T2 >::value >::type * = nullptr>
FuncRef operator() (std::vector< ExprOrVar > args) const
 
template<typename T2 = T, typename std::enable_if<!std::is_array< T2 >::value >::type * = nullptr>
 operator Func () const
 
template<typename T2 = T, typename std::enable_if<!std::is_array< T2 >::value >::type * = nullptr>
 operator Stage () const
 
template<typename T2 = T, typename std::enable_if< std::is_array< T2 >::value >::type * = nullptr>
size_t size () const
 
template<typename T2 = T, typename std::enable_if< std::is_array< T2 >::value >::type * = nullptr>
const ValueTypeoperator[] (size_t i) const
 
template<typename T2 = T, typename std::enable_if< std::is_array< T2 >::value >::type * = nullptr>
const ValueTypeat (size_t i) const
 
template<typename T2 = T, typename std::enable_if< std::is_array< T2 >::value >::type * = nullptr>
std::vector< ValueType >::const_iterator begin () const
 
template<typename T2 = T, typename std::enable_if< std::is_array< T2 >::value >::type * = nullptr>
std::vector< ValueType >::const_iterator end () const
 
template<typename T2 = T, typename std::enable_if< std::is_array< T2 >::value &&std::rank< T2 >::value==1 &&std::extent< T2, 0 >::value==0 >::type * = nullptr>
void resize (size_t size)
 
- Public Member Functions inherited from Halide::Internal::GeneratorOutputBase
GeneratorOutputBaseestimate (const Var &var, const Expr &min, const Expr &extent)
 
 ~GeneratorOutputBase () override
 
- Public Member Functions inherited from Halide::Internal::GIOBase
bool array_size_defined () const
 
size_t array_size () const
 
const std::string & name () const
 
IOKind kind () const
 
bool types_defined () const
 
const std::vector< Type > & types () const
 
Type type () const
 
bool dims_defined () const
 
int dims () const
 
const std::vector< Func > & funcs () const
 
const std::vector< Expr > & exprs () const
 
virtual ~GIOBase ()
 

Protected Types

using TBase = typename std::remove_all_extents< T >::type
 
using ValueType = Func
 

Protected Member Functions

bool is_array () const override
 
template<typename T2 = T, typename std::enable_if< !std::is_array< T2 >::value >::type * = nullptr>
 GeneratorOutputImpl (const std::string &name, IOKind kind, const std::vector< Type > &t, int d)
 
template<typename T2 = T, typename std::enable_if< std::is_array< T2 >::value &&std::rank< T2 >::value==1 &&(std::extent< T2, 0 >::value > 0)>::type * = nullptr>
 GeneratorOutputImpl (const std::string &name, IOKind kind, const std::vector< Type > &t, int d)
 
template<typename T2 = T, typename std::enable_if< std::is_array< T2 >::value &&std::rank< T2 >::value==1 &&std::extent< T2, 0 >::value==0 >::type * = nullptr>
 GeneratorOutputImpl (const std::string &name, IOKind kind, const std::vector< Type > &t, int d)
 
- Protected Member Functions inherited from Halide::Internal::GeneratorOutputBase
template<typename T2 , typename std::enable_if< std::is_same< T2, Func >::value >::type * = nullptr>
HALIDE_NO_USER_CODE_INLINE T2 as () const
 
 GeneratorOutputBase (size_t array_size, const std::string &name, IOKind kind, const std::vector< Type > &t, int d)
 Forward schedule-related methods to the underlying Func. More...
 
 GeneratorOutputBase (const std::string &name, IOKind kind, const std::vector< Type > &t, int d)
 
void init_internals ()
 
void resize (size_t size)
 
virtual std::string get_c_type () const
 
void check_value_writable () const override
 
const char * input_or_output () const override
 
- Protected Member Functions inherited from Halide::Internal::GIOBase
 GIOBase (size_t array_size, const std::string &name, IOKind 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
 
template<>
const std::vector< Expr > & get_values () const
 
template<>
const std::vector< Func > & get_values () const
 

Additional Inherited Members

- Protected Attributes inherited from Halide::Internal::GIOBase
int array_size_
 
const std::string name_
 
const IOKind kind_
 
std::vector< Typetypes_
 
int dims_
 
std::vector< Funcfuncs_
 
std::vector< Exprexprs_
 
GeneratorBasegenerator {nullptr}
 

Detailed Description

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

Definition at line 2298 of file Generator.h.

Member Typedef Documentation

◆ TBase

template<typename T >
using Halide::Internal::GeneratorOutputImpl< T >::TBase = typename std::remove_all_extents<T>::type
protected

Definition at line 2300 of file Generator.h.

◆ ValueType

template<typename T >
using Halide::Internal::GeneratorOutputImpl< T >::ValueType = Func
protected

Definition at line 2301 of file Generator.h.

Constructor & Destructor Documentation

◆ GeneratorOutputImpl() [1/3]

template<typename T >
template<typename T2 = T, typename std::enable_if< !std::is_array< T2 >::value >::type * = nullptr>
Halide::Internal::GeneratorOutputImpl< T >::GeneratorOutputImpl ( const std::string &  name,
IOKind  kind,
const std::vector< Type > &  t,
int  d 
)
inlineprotected

Definition at line 2310 of file Generator.h.

◆ GeneratorOutputImpl() [2/3]

template<typename T >
template<typename T2 = T, typename std::enable_if< std::is_array< T2 >::value &&std::rank< T2 >::value==1 &&(std::extent< T2, 0 >::value > 0)>::type * = nullptr>
Halide::Internal::GeneratorOutputImpl< T >::GeneratorOutputImpl ( const std::string &  name,
IOKind  kind,
const std::vector< Type > &  t,
int  d 
)
inlineprotected

Definition at line 2317 of file Generator.h.

◆ GeneratorOutputImpl() [3/3]

template<typename T >
template<typename T2 = T, typename std::enable_if< std::is_array< T2 >::value &&std::rank< T2 >::value==1 &&std::extent< T2, 0 >::value==0 >::type * = nullptr>
Halide::Internal::GeneratorOutputImpl< T >::GeneratorOutputImpl ( const std::string &  name,
IOKind  kind,
const std::vector< Type > &  t,
int  d 
)
inlineprotected

Definition at line 2324 of file Generator.h.

Member Function Documentation

◆ is_array()

template<typename T >
bool Halide::Internal::GeneratorOutputImpl< T >::is_array ( ) const
inlineoverrideprotectedvirtual

◆ operator()() [1/2]

template<typename T >
template<typename... Args, typename T2 = T, typename std::enable_if<!std::is_array< T2 >::value >::type * = nullptr>
FuncRef Halide::Internal::GeneratorOutputImpl< T >::operator() ( Args &&...  args) const
inline

Definition at line 2330 of file Generator.h.

References Halide::Internal::GIOBase::check_gio_access().

◆ operator()() [2/2]

template<typename T >
template<typename ExprOrVar , typename T2 = T, typename std::enable_if<!std::is_array< T2 >::value >::type * = nullptr>
FuncRef Halide::Internal::GeneratorOutputImpl< T >::operator() ( std::vector< ExprOrVar >  args) const
inline

Definition at line 2336 of file Generator.h.

References Halide::Internal::GIOBase::check_gio_access().

◆ operator Func()

template<typename T >
template<typename T2 = T, typename std::enable_if<!std::is_array< T2 >::value >::type * = nullptr>
Halide::Internal::GeneratorOutputImpl< T >::operator Func ( ) const
inline

Definition at line 2342 of file Generator.h.

References Halide::Internal::GIOBase::check_gio_access().

◆ operator Stage()

template<typename T >
template<typename T2 = T, typename std::enable_if<!std::is_array< T2 >::value >::type * = nullptr>
Halide::Internal::GeneratorOutputImpl< T >::operator Stage ( ) const
inline

Definition at line 2348 of file Generator.h.

References Halide::Internal::GIOBase::check_gio_access().

◆ size()

template<typename T >
template<typename T2 = T, typename std::enable_if< std::is_array< T2 >::value >::type * = nullptr>
size_t Halide::Internal::GeneratorOutputImpl< T >::size ( ) const
inline

Definition at line 2354 of file Generator.h.

References Halide::Internal::GIOBase::check_gio_access().

◆ operator[]()

template<typename T >
template<typename T2 = T, typename std::enable_if< std::is_array< T2 >::value >::type * = nullptr>
const ValueType& Halide::Internal::GeneratorOutputImpl< T >::operator[] ( size_t  i) const
inline

◆ at()

template<typename T >
template<typename T2 = T, typename std::enable_if< std::is_array< T2 >::value >::type * = nullptr>
const ValueType& Halide::Internal::GeneratorOutputImpl< T >::at ( size_t  i) const
inline

Definition at line 2366 of file Generator.h.

References Halide::Internal::GIOBase::check_gio_access().

◆ begin()

template<typename T >
template<typename T2 = T, typename std::enable_if< std::is_array< T2 >::value >::type * = nullptr>
std::vector<ValueType>::const_iterator Halide::Internal::GeneratorOutputImpl< T >::begin ( ) const
inline

Definition at line 2372 of file Generator.h.

References Halide::Internal::GIOBase::check_gio_access().

◆ end()

template<typename T >
template<typename T2 = T, typename std::enable_if< std::is_array< T2 >::value >::type * = nullptr>
std::vector<ValueType>::const_iterator Halide::Internal::GeneratorOutputImpl< T >::end ( ) const
inline

Definition at line 2378 of file Generator.h.

References Halide::Internal::GIOBase::check_gio_access().

◆ resize()

template<typename T >
template<typename T2 = T, typename std::enable_if< std::is_array< T2 >::value &&std::rank< T2 >::value==1 &&std::extent< T2, 0 >::value==0 >::type * = nullptr>
void Halide::Internal::GeneratorOutputImpl< T >::resize ( size_t  size)
inline

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