Abstract

The default prelude that is implicitly available in all Futhark files.

Synopsis

open import "/prelude/soacs"
open import "/prelude/array"
open import "/prelude/math"
open import "/prelude/functional"
open import "/prelude/ad"
val r32 : (x: i32) -> f32
val t32 : (x: f32) -> i32
val r64 : (x: i32) -> f64
val t64 : (x: f64) -> i32
val not : (x: bool) -> bool
val opaque 't : (x: t) -> t
val trace 't : (x: t) -> t
val break 't : (x: t) -> t

Description

val r32: (x: i32) -> f32

Create single-precision float from integer.

val t32: (x: f32) -> i32

Create integer from single-precision float.

val r64: (x: i32) -> f64

Create double-precision float from integer.

val t64: (x: f64) -> i32

Create integer from double-precision float.

val not: (x: bool) -> bool

Negate a boolean. not x is the same as !x. This function is mostly useful for passing to map.

val opaque 't: (x: t) -> t

Semantically just identity, but serves as an optimisation inhibitor. The compiler will treat this function as a black box. You can use this to work around optimisation deficiencies (or bugs), although it should hopefully rarely be necessary. Deprecated: use #[opaque] attribute instead.

val trace 't: (x: t) -> t

Semantically just identity, but at runtime, the argument value will be printed. Deprecated: use #[trace] attribute instead.

val break 't: (x: t) -> t

Semantically just identity, but acts as a break point in futhark repl. Deprecated: use #[break] attribute instead.