Loading...
Searching...
No Matches
StrictifyFloat.h
Go to the documentation of this file.
#ifndef HALIDE_STRICTIFY_FLOAT_H
#define HALIDE_STRICTIFY_FLOAT_H
/** \file
* Defines a lowering pass to make all floating-point strict for all top-level Exprs.
*/
#include <map>
#include <string>
namespace Halide {
struct Target;
struct Expr;
namespace Internal {
class Function;
struct Call;
/** Replace all rounding floating point ops and floating point ops that need to
* handle nan and inf differently with strict float intrinsics. */
Expr strictify_float(const Expr &e);
/** Replace a strict float intrinsic with its non-strict equivalent. Non-recursive. */
Expr unstrictify_float(const Call *op);
/** If the StrictFloat target feature is set, replace add, sub, mul, div, etc
* operations with strict float intrinsics for all Funcs in the environment. If
* StrictFloat is not set does nothing. Returns whether or not there's any usage
* of strict float intrinsics or if the target flag is set (i.e. returns whether
* or not the rest of lowering and codegen needs to worry about floating point
* strictness). */
bool strictify_float(std::map<std::string, Function> &env, const Target &t);
} // namespace Internal
} // namespace Halide
#endif
Halide::Internal::Function
A reference-counted handle to Halide's internal representation of a function.
Definition Function.h:39
Halide::Internal
Definition AbstractGenerator.h:24
Halide::Internal::unstrictify_float
Expr unstrictify_float(const Call *op)
Replace a strict float intrinsic with its non-strict equivalent.
Halide::Internal::strictify_float
Expr strictify_float(const Expr &e)
Replace all rounding floating point ops and floating point ops that need to handle nan and inf differ...
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
Halide::Internal::Call
A function call.
Definition IR.h:490
Halide::Target
A struct representing a target machine and os to generate code for.
Definition Target.h:19