The programmer writes a template for a general type of communication algorithm. The template generally embodies a number of cases of the algorithm. A template is transformed into source code by
It is up to the programmer to determine how to write the template and table. However, we automate some of the processing of the template. The processing is three step
Input to parser:
Table of defines to be made for communication types. Rows indicate a communication type, and each column a variable. For example,
PF_INOUT PF_SWITCH PF_SUM PF_FUNC PF_MYOP
call myOp{in,out} Yes Yes No No Yes
in= myOp{in} No No No No Yes
The job of the parser is to
Input to generation script from parser:
itemplate: template to use
icase: communication case in template
n: number integers where bits corresponding to defines
i1,...,in: where bits correspond as follows
i1.b0 : define 1
i1.b1 : define 2
i1.b2 : define 3
...
i1.b16: define 16
i2.b0 : define 17
i3.b1 : define 18
etc.