Skip to content
Snippets Groups Projects
Commit ae4e3ea4 authored by Adel Ejjeh's avatar Adel Ejjeh
Browse files

[docs] updating hpvm-c-spec to include isNonZeroLoop and private attribute

parent 0a240747
No related branches found
No related tags found
No related merge requests found
......@@ -76,8 +76,8 @@ Leaf Node API
``void __hpvm__hint(hpvm::Target target)`` (C++) |br|
As described in internal node API.
``void __hpvm__attributes(unsigned ni, ..., unsigned no, ...)`` |br|
As described in internal node API.
``void __hpvm__attributes(unsigned ni, ..., unsigned no, ..., unsigned np, ...)`` |br|
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]``.
......
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