Skip to content
Snippets Groups Projects
Commit 27d3c643 authored by kotsifa2's avatar kotsifa2
Browse files

Updated atomics-sync operations in hpvm-c spec

parent 20a3c17f
No related branches found
No related tags found
No related merge requests found
......@@ -76,38 +76,32 @@ Returns the dynamic ID of the current instance of node ```N``` in the x, y, or z
```long __hpvm__getNumNodeInstances_{x,y,z}(void* N)```
Returns the number of dynamic instances of node ```N``` in the x, y, or z dimension respectively. The dimension must be one of the dimensions in which the node is replicated.
```void __hpvm__barrier()```
Local synchronization barrier across dynamic instances of current leaf node.
```void* __hpvm__malloc(long nBytes)```
Allocate a block of memory of size ```nBytes``` and returns a pointer to it. The allocated object can be shared by all nodes, although the pointer returned must somehow be communicated explicitly for use by other nodes.
Allocate a block of memory of size ```nBytes``` and returns a pointer to it. The allocated object can be shared by all nodes. *Note that the returned pointer must somehow be communicated explicitly for use by other nodes.*
```int __hpvm__atomic_add(int* m, int v)```
Atomically adds ```v``` to the value stored at memory location ```[m]```. Returns the value previously stored at ```[m]```.
Atomically adds ```v``` to the value stored at memory location ```[m]``` w.r.t. the dynamic instances of the current leaf node and stores the result back into ```[m]```. Returns the value previously stored at ```[m]```.
```int __hpvm__atomic_sub(int* m, int v)```
Atomically subtracts ```v``` from the value stored at memory location ```[m]```. Returns the value previously stored at ```[m]```.
```int __hpvm__atomic_xchg(int* m, int v)```
Atomically swaps ```v``` with the value stored at memory location ```[m]```. Returns the value previously stored at ```[m]```.
```int __hpvm__atomic_inc(int* m)```
Atomically increments the value stored at memory location ```[m]```. Returns the value previously stored at ```[m]```.
```int __hpvm__atomic_dec(int* m)```
Atomically decrements the value stored at memory location ```[m]```. Returns the value previously stored at ```[m]```.
Atomically subtracts ```v``` from the value stored at memory location ```[m]``` w.r.t. the dynamic instances of the current leaf node and stores the result back into ```[m]```. Returns the value previously stored at ```[m]```.
```int __hpvm__atomic_min(int* m, int v)```
Atomically computes the min of ```v``` and the value stored at memory location ```[m]```. Returns the value previously stored at ```[m]```.
Atomically computes the min of ```v``` and the value stored at memory location ```[m]``` w.r.t. the dynamic instances of the current leaf node and stores the result back into ```[m]```. Returns the value previously stored at ```[m]```.
```int __hpvm__atomic_max(int* m, int v)```
Atomically computes the max of ```v``` and the value stored at memory location ```[m]```. Returns the value previously stored at ```[m]```.
Atomically computes the max of ```v``` and the value stored at memory location ```[m]``` w.r.t. the dynamic instances of the current leaf node and stores the result back into ```[m]```. Returns the value previously stored at ```[m]```.
```int __hpvm__atomic_xchg(int* m, int v)```
Atomically swaps ```v``` with the value stored at memory location ```[m]``` w.r.t. the dynamic instances of the current leaf node and stores the result back into ```[m]```. Returns the value previously stored at ```[m]```.
```int __hpvm__atomic_and(int* m, int v)```
Atomically computes the bitwise AND of ```v``` and the value stored at memory location ```[m]```. Returns the value previously stored at ```[m]```.
Atomically computes the bitwise AND of ```v``` and the value stored at memory location ```[m]``` w.r.t. the dynamic instances of the current leaf node and stores the result back into ```[m]```. Returns the value previously stored at ```[m]```.
```int __hpvm__atomic_or(int* m, int v)```
Atomically computes the bitwise OR of ```v``` and the value stored at memory location ```[m]```. Returns the value previously stored at ```[m]```.
Atomically computes the bitwise OR of ```v``` and the value stored at memory location ```[m]``` w.r.t. the dynamic instances of the current leaf node and stores the result back into ```[m]```. Returns the value previously stored at ```[m]```.
```int __hpvm__atomic_xor(int* m, int v)```
Atomically computes the bitwise XOR of ```v``` and the value stored at memory location ```[m]```. Returns the value previously stored at ```[m]```.
Atomically computes the bitwise XOR of ```v``` and the value stored at memory location ```[m]``` w.r.t. the dynamic instances of the current leaf node and stores the result back into ```[m]```. Returns the value previously stored at ```[m]```.
```void __hpvm__barrier()```
Local synchronization barrier across dynamic instances of current leaf node.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment