Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Some examples are provided in the standard distribution. Each example is followed by a Makefile which provides the commands to translate (i.e. generate stub code) the CnC graph, compile the generated and user code, and finally run the program. Running make all should run each of these steps in the examples.

Once successfully installed, please refer to the examples on how to write CnC-Scala programs. The two simplest examples to get started are:

  •  Find Primes: finds all odd numbers which are primes up to the given input
  •  Partition String: finds the odd length repeating fragments from the input string

These are steps required to write a CnC-Scala program from scratch:

  1. Provide a definition of the CnC computation graph
  2. Generate the stub code for the CnC Graph, Steps and Tag Collections using cnc_scala_translate command
  3. Provide implementations for the Steps
  4. Write a main method to initialize the CnC graph and start the computation
  5. Compile the generated and custom code using cnc_scala_compile command
  6. Run the compiled program using cnc_scala_run command