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"
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.