Abstract

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

Synopsis

open import "futlib/soacs"
open import "futlib/array"
open import "futlib/math"
open import "futlib/functional"
val r32 : (x: i32) -> f32
val t32 : (x: f32) -> i32
val r64 : (x: i32) -> f64
val t64 : (x: f64) -> i32
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 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.

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

Semantically just identity, but when run in the interpreter, the argument value will be printed.

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

Semantically just identity, but acts as a break point in futhark repl.