Changes

Jump to: navigation, search

GPU621/Chapel

1,198 bytes added, 23:52, 29 November 2022
Sync/Singles
var sy$: sync int=1; // state = full, value = 1
var si$: single bool; // state = empty, value = false
The methods defined on sync / single variables:
**The reset() method, defined for sync variables, sets the value of the variable to the default value for the type and the state to empty.
**The isFull method returns true if the sync or single variable is in the full state, false otherwise.
**The writeEF() method, defined for sync and single variables, blocks until the state is empty and then assigns the value argument to the variable and then sets the state to full.
**The readFE() method, defined for sync variables, blocks until the state is full and then reads the value of the variable, sets the state to empty, and then returns the value.
**The readFF() method, defined for sync and single variables, blocks until the state is full and then reads the value of the variable and returns the value.
**The writeXF() method, defined for sync variables, assigns the value argument to the variable and then sets the state to full
**The readXX() method, defined for sync and single variables, returns the value of the variable regardless of the state.
**The writeFF() method, defined for sync variables, blocks until the state is full and then and then assigns the value argument to the variable.
= Reference =
73
edits

Navigation menu