As described in internal node API. Additionally allows defining ``private`` pointers. ``np`` represents the number of private pointer arguments to the leaf nodes. The arguments following ``np`` are the private arguments and their corresponding sizes.
``void __hpvm__return(unsigned n, ...)`` |br|
Returns ``n`` values from a leaf node function. The remaining arguments are the values to be returned. All ``__hpvm__return`` statements within the same function must return the same number of values.
...
...
@@ -97,6 +97,9 @@ Returns the number of dynamic instances of node ``N`` in the x, y, or z dimensio
``void* __hpvm__malloc(long nBytes)`` |br|
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.*
``void __hpvm__isNonZeroLoop(long i, long tripCount)`` |br|
Mark a loop with variable trip count as always entered, and provide its runtime tripcount which is used for unrolling and for performance modeling in ``hpvm-dse``. ``i`` corresponds to the loop iterator for which this marker function is intended, or the replication dimension if the leaf node has dynamic replication (i.e. output of ``getNodeInstanceId``). ``tripCount`` corresponds to the trip count of the loop as determined by profiling.
``int __hpvm__atomic_add(int* m, int v)`` |br|
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]``.