April 01, 2004
CxC Parallel Programming
April 04:
Listing 1: A parallel version of Kernighan and Ritchie's classic The C Parallel Programming Language.
//// My first CxC program hello.cxc controller and unit declaration
controller ArrayController // create processor controller
{ // create parallel processors
unit ParallelProcessor[30];
}
//// don't need a topology since there is no communication
//// between processors taking place
//// program implementations
main hello(10) // execute 10 times
{
program ArrayController // program for all processors
{ // of declared controller
println("hello parallel world!");
}
}
Previous Page |
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
12
|
13
|
14
|
15
|
16
Next Page