Loading...
Searching...
No Matches
Random.h
Go to the documentation of this file.
#ifndef HALIDE_RANDOM_H
#define HALIDE_RANDOM_H
/** \file
*
* Defines deterministic random functions, and methods to redirect
* front-end calls to random_float and random_int to use them. */
#include <vector>
#include "Expr.h"
#include "Func.h"
namespace Halide {
namespace Internal {
/** Return a random floating-point number between zero and one that
* varies deterministically based on the input expressions. */
Expr random_float(const std::vector<Expr> &);
/** Return a random unsigned integer between zero and 2^32-1 that
* varies deterministically based on the input expressions (which must
* be integers or unsigned integers). */
Expr random_int(const std::vector<Expr> &);
/** Convert calls to random() to IR generated by random_float and
* random_int. Tags all calls with the variables in free_vars, and the
* integer given as the last argument. */
Expr lower_random(const Expr &e, const std::vector<VarOrRVar> &free_vars, int tag);
} // namespace Internal
} // namespace Halide
#endif
Expr.h
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt).
Func.h
Defines Func - the front-end handle on a halide function, and related classes.
Halide::Internal
Definition AbstractGenerator.h:24
Halide::Internal::random_float
Expr random_float(const std::vector< Expr > &)
Return a random floating-point number between zero and one that varies deterministically based on the...
Halide::Internal::random_int
Expr random_int(const std::vector< Expr > &)
Return a random unsigned integer between zero and 2^32-1 that varies deterministically based on the i...
Halide::Internal::lower_random
Expr lower_random(const Expr &e, const std::vector< VarOrRVar > &free_vars, int tag)
Convert calls to random() to IR generated by random_float and random_int.
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition AbstractGenerator.h:19
Halide::Expr
A fragment of Halide syntax.
Definition Expr.h:258