Download CuPit | A Parallel Language for Neural Algorithms: Language
Transcript
10.3 I/O assignment
45
Design rationale: This is because assignment to node objects is intended to be used for initialization
only. During the rest of the program run, nodes should only be changed by themselves by means of node
procedures.
10.3 I/O assignment
I/O Assignment[52] f
52
InputAssignment:
Object '<--' Object.
OutputAssignment:
Object '-->' Object.
g
This macro is invoked in denition 50.
The purpose of these special assignments is to provide a way of communication between a network and
the \outer world": Since the mapping of nodes onto processors is completely left to (and known only by)
the compiler, external procedures can not directly read data from nodes or write data into nodes. On
the other hand, the memory mapping of I/O areas is statically dened by any compiler (see sections 8
and 17), so that external procedures can easily access them for reading and writing.
The object on the left hand side must be a data element of a group of nodes (i.e., a parallel variable),
the object on the right hand side must be a global X IO, where X is the type of the data element eld of
the nodes mentioned on the left hand side.
A single input or output assignment statement provides one value for each node of the group in each of
the replicates of the respective network. For the input assignment each such value is copied from the I/O
area into the data element of the appropriate node according to the I/O area data layout dened for the
particular compiler. For the output assignment the value is copied from the data elements of the nodes
into the I/O area.
Input and output assignments are allowed in the central agent only. Design rationale: The central agent
is conceptually the only part of the program where knowledge about network replication is present. Since
input and output assignments work on all replicates at once and the program who lls or reads an I/O
area must know that; the central agent is the only program part where input and output assignments
make sense.
10.4 Procedure call
Procedure Call[53] f
ProcedureCall:
ProcedureId '(' ArgumentList ')'.
ProcedureId:
LowercaseIdent.
ArgumentList:
/* nothing*/ /
ExprList.
g
This macro is dened in denitions 53, 54, and 55.
This macro is invoked in denition 50.
The semantics of a procedure call are similar to that known in languages such as Modula-2 or C: First,
all formal parameters of the procedure are bound to the arguments of the procedure call. Then control
53