This page is optimized for mobile devices, if you would prefer the desktop version just click here

0.10 Parallel programming

The creation of this content was supported in some part by NSF grant 0538934.

In 1985, by design, G was developed to address and simplify parallel programming. If you have gone through the examples in this book, you have already developed various parallel programs.

In the following example, we will develop a simple program where interactivity and parallelism are part of the program.

Select Diagram for Parallel Programming

From the menu select Edit>>Copy .

Copy Selected Diagram

Create a copy of the while loop and its contents by selecting Edit>>Paste . Organize the diagram as shown in the figure below.

Paste Diagram

Go the Front Panel window and organize the input and output controls as shown in the figure below.

Parallel G Program

You have just completed your first parallel interactive program using G. Save the program, run it and interact with it.

Parallel Interactive G Program

To end this program click on the stop and stop 2 terminals.

<< Chapter < Page Page > Chapter >>

Read also:

OpenStax, Introduction to g programming. OpenStax CNX. Mar 15, 2010 Download for free at http://cnx.org/content/col11192/1.1
Google Play and the Google Play logo are trademarks of Google Inc.
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use and Privacy Policy.