Halide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Halide::Realization Class Reference

A Realization is a vector of references to existing Buffer objects. More...

#include <Tuple.h>

Public Member Functions

size_t size () const
 The number of images in the Realization. More...
 
const Bufferoperator[] (size_t x) const
 Get a const reference to one of the images. More...
 
Bufferoperator[] (size_t x)
 Get a reference to one of the images. More...
 
template<typename T >
 operator Buffer< T > () const
 Single-element realizations are implicitly castable to Buffers. More...
 
template<typename T , typename... Args, typename = typename std::enable_if<Internal::all_are_convertible<Buffer<>, Args...>::value>::type>
 Realization (Buffer< T > &a, Args &&...args)
 Construct a Realization that acts as a reference to some existing Buffers. More...
 
 Realization (std::vector< Buffer<>> &e)
 Construct a Realization that refers to the buffers in an existing vector of Buffer<> More...
 

Detailed Description

A Realization is a vector of references to existing Buffer objects.

Funcs with Tuple values return multiple images when you realize them, and they return them as a Realization. Tuples are to Exprs as Realizations are to Buffers.

Examples:
tutorial/lesson_13_tuples.cpp.

Definition at line 69 of file Tuple.h.

Constructor & Destructor Documentation

template<typename T , typename... Args, typename = typename std::enable_if<Internal::all_are_convertible<Buffer<>, Args...>::value>::type>
Halide::Realization::Realization ( Buffer< T > &  a,
Args &&...  args 
)
inline

Construct a Realization that acts as a reference to some existing Buffers.

The element type of the Buffers may not be const.

Definition at line 100 of file Tuple.h.

References Halide::Runtime::Internal::a.

Halide::Realization::Realization ( std::vector< Buffer<>> &  e)
inlineexplicit

Construct a Realization that refers to the buffers in an existing vector of Buffer<>

Definition at line 106 of file Tuple.h.

References user_assert.

Member Function Documentation

size_t Halide::Realization::size ( ) const
inline

The number of images in the Realization.

Examples:
tutorial/lesson_13_tuples.cpp.

Definition at line 74 of file Tuple.h.

const Buffer& Halide::Realization::operator[] ( size_t  x) const
inline

Get a const reference to one of the images.

Definition at line 77 of file Tuple.h.

References user_assert.

Buffer& Halide::Realization::operator[] ( size_t  x)
inline

Get a reference to one of the images.

Definition at line 83 of file Tuple.h.

References user_assert.

template<typename T >
Halide::Realization::operator Buffer< T > ( ) const
inline

Single-element realizations are implicitly castable to Buffers.

Definition at line 90 of file Tuple.h.


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