
Development methodologies for GPU and cluster of GPUs 145
the macro ORWL LOCATION, indicating the task (orwl mytid is the ID of the
current task) and the specific resource of that task, here GPU and curBlock.
Likewise, a second block of insertions concerns the handles remRead and
nextWrite (lines 8 and 9). nextWrite reclaims an exclusive access and
remRead a shared one. remRead corresponds to a resource of another task;
the call to previous(orwl mytid) is supposed to return the ID of the pre-
vious task in the cycle. Both accesses can be performed concurrently with the
previous operation, so we insert them with the same priority 0 as previously.
Then, ...