Changes

Jump to: navigation, search

GPU621/Chapel

1,351 bytes added, 10:59, 30 November 2022
Presenttion
*The begin statement spawns a thread of execution that is independent of the current (main) thread of execution.
writeln("1: ### The begin statement ###");
begin writeln("1: output from spawned task");
 
*The cobegin statement can be used to spawn a block of tasks, one for each statement.
writeln("2: ### The cobegin statement ###");
return X;
}
=== List ===
The Chapel List module provides the implementation of the list type. Lists are useful for building up and iterating over a collection of values in a structured manner.
private use List;
config const quiet: bool = false;
*The append() method appends the following element into the array.
*The sort() method sorts the list in ascending order.
*The pop() method pops the element at the specified index.
*The clear() clears all elements from the list.
*The indexOf() retrieves the index of the value specified, returns -1 if not found.
*The insert() method inserts the value at the specified index.
=== Timer ===
The Chapel allows user to use Timer from the timer module.
use Time;
/* Create a Timer t */
var t: Timer;
t.start();
writeln(“Operation start”);
sleep(5);
writeln(“Operation end”);
t.stop();
/* return time in milliseconds that was recorded by the timer */
writeln(t.elapsed(TimeUnits.milliseconds));
t.clear();
 
= Presentation =
*video: https://seneca-my.sharepoint.com/:v:/g/personal/lhuangtang_myseneca_ca/EWl4yNsl02ZGo-b2btiJO8kBNQ_yR2WF124CGAvtbQB0dQ?e=2CD3TR
*PowerPoint: https://docs.google.com/presentation/d/1ZIANDNRD1rRb_WYuBxX2kxDzAqaIm_kI/edit?usp=sharing&ouid=117424265169520381830&rtpof=true&sd=true
= Reference =
73
edits

Navigation menu