Changes

Jump to: navigation, search

GPU621/Chapel

565 bytes added, 23:49, 29 November 2022
Task Parallelism
=== Sync/Singles ===
Sync and single are type qualifiers that can be applied to all Chapel primitive types except strings and complex.
Sync and single variables have an associated state that is either full or empty. Single variables are sync variables that can only be written once. If a sync or single variable is declared with an initializing expression, its state is set to full and its value is that of the expression. Without an initializing expression, a sync or single variable’s state is set to empty and its value is the default value for the base type.
config const n = 7;
var sy$: sync int=1; // state = full, value = 1
var si$: single bool; // state = empty, value = false
= Reference =
73
edits

Navigation menu