Skip to content
Snippets Groups Projects
Commit 6326feca authored by gaurip2's avatar gaurip2
Browse files

Changed Hetero-C references to Hetero-C++

parent 91a60b70
No related branches found
No related tags found
No related merge requests found
Writing a Hetero-C Program
Writing a Hetero-C++ Program
==========================
The following document describes various programming patterns supported
by the ``Hetero-C`` api. Please refer to the `Hetero-C Language
by the ``Hetero-C++`` api. Please refer to the `Hetero-C++ Language
Specification </developerdocs/specifications/hetero-c.rst>`__ for a detailed description of the
invidiual api calls.
A Hetero-C program can be divided into 2 categories. **Dataflow Code**
A Hetero-C++ program can be divided into 2 categories. **Dataflow Code**
which describes the structure of the hierarchical dataflow graph, and
the **Host Code** which describes the actual inputs passed to the
Dataflow Graph (DFG) and the outputs requested after its execution
......@@ -93,7 +93,7 @@ appropriate arguments.
Parallel Section, Tasks and Loops
---------------------------------
Hetero-C enables specifying course-grained Task level parallelism, as
Hetero-C++ enables specifying course-grained Task level parallelism, as
well as fine-grained data-parallel parallelism via corresponding api
calls.
......@@ -114,7 +114,7 @@ at the source level.
}
If we want to consider this entire loop execution as a single
computational task we can describe it in ``Hetero-C`` as:
computational task we can describe it in ``Hetero-C++`` as:
.. code:: cpp
......@@ -259,7 +259,7 @@ below:
__hetero_section_end(Section);
}
Hetero-C infers tasks dependencies by looking at the input and output
Hetero-C++ infers tasks dependencies by looking at the input and output
pointers for each task. For ``T1`` and ``T2``, their input pointers are
different, hence will be infered to be parallel to each other. Both
tasks respectively mutate the array content and then specify they wrote
......@@ -361,7 +361,7 @@ different ways. Users can choose to break a Parallel Task into multiple
subtasks in the same source level function , which can contain complex
and nested interdependencies as described above.
As an alternative mode of expression, users can use the ``Hetero-C`` api
As an alternative mode of expression, users can use the ``Hetero-C++`` api
to describe Parallel Sections across numerous functions and invoke calls
to those functions, essentially connecting the end-point nodes of their
respective DFG’s and creating hierarchichy.
......@@ -499,7 +499,7 @@ Across Functions
For larger programs, it’s often not feasible to nest the computation
inside a single function as it becomes difficult to read. For such
cases, ``Hetero-C`` allows appending the HPVM Dataflow graph across
cases, ``Hetero-C++`` allows appending the HPVM Dataflow graph across
functions. Consider the ``MAC`` program we created in the previous
code-snippet:
......@@ -615,7 +615,7 @@ arguments as folllows:
/* Number of Output Buffer Pairs */ 2, P1, P1Sz, P2, P2Sz);
// Calling the HPVM Dataflow function Prod
// with the appropriate arguments. Hetero-C
// with the appropriate arguments. Hetero-C++
// will connect the end-points of both
// Dataflow Graphs and create heirarchy.
Prod(P1, P1Sz, P2, P2Sz,
......@@ -640,7 +640,7 @@ arguments as folllows:
__hetero_section_end(Section);
}
Note the call to ``Prod`` inside Task ``T1``. ``Hetero-C`` will
Note the call to ``Prod`` inside Task ``T1``. ``Hetero-C++`` will
recognize that ``Prod`` is also a Dataflow graph and will connect the
nodes of ``MAC`` and ``Prod``. If a non HPVM Dataflow graph function is
called inside a Task, it will be considered part of the same 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