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 not: (x: bool) -> bool
- Negate a boolean. - not xis 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.