This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
schedule_code_generator_for_code_with_subsystem [2014/07/07 14:46] yun [TargetMapping for the Matrix Multiplication Example] |
schedule_code_generator_for_code_with_subsystem [2014/07/07 14:58] yun [TargetMapping for the Matrix Multiplication Example] |
||
---|---|---|---|
Line 41: | Line 41: | ||
The following command set the SpaceTimeMap for the (n)th input/ | The following command set the SpaceTimeMap for the (n)th input/ | ||
- | < | + | < |
setSpaceTimeMapForUseEquationOptimization(program, | setSpaceTimeMapForUseEquationOptimization(program, | ||
- | <\sxh> | + | </sxh> |
The parameter isInput sepcifies whether the SpaceTimeMap is specified for input or not, and the last three prarameter specifies the space time map for the three special statement attached to the current input/ | The parameter isInput sepcifies whether the SpaceTimeMap is specified for input or not, and the last three prarameter specifies the space time map for the three special statement attached to the current input/ | ||
- | < | + | < |
setSpaceTimeMapForMemoryAllocation(program, | setSpaceTimeMapForMemoryAllocation(program, | ||
setSpaceTimeMapForValueCopy(program, | setSpaceTimeMapForValueCopy(program, | ||
setSpaceTimeMapForMemoryFree(program, | setSpaceTimeMapForMemoryFree(program, | ||
- | <\sxh> | + | </sxh> |
+ | |||
+ | The following script consists all the commands that specifies the TargetMapping for the matrix multiplication example and generates the code. | ||
+ | <sxh cs; gutter: | ||
+ | prog = ReadAlphabets(" | ||
+ | rootSystem = " | ||
+ | subSystem = " | ||
+ | outDir = " | ||
+ | CheckProgram(prog); | ||
+ | |||
+ | #set the spacetimeMap for the subSystem first | ||
+ | setSpaceTimeMap(prog, | ||
+ | setSpaceTimeMap(prog, | ||
+ | |||
+ | #the identification lable for the useEquation | ||
+ | label = " | ||
+ | |||
+ | #set the spacetimeMap for the rootSystem | ||
+ | #set the spacetimeMap for the main subsystem call | ||
+ | setSpaceTimeMap(prog, | ||
+ | |||
+ | #set the SpaceTimeMap for the first input of the useEquation | ||
+ | setSpaceTimeMapForMemoryAllocation(prog, | ||
+ | setSpaceTimeMapForValueCopy(prog, | ||
+ | setSpaceTimeMapForMemoryFree(prog, | ||
+ | |||
+ | #set the SpaceTimeMap for the second input of the useEquation | ||
+ | setSpaceTimeMapForUseEquationOptimization(prog, | ||
+ | |||
+ | #set the spaceTimeMap for the first output of the useEquation | ||
+ | setSpaceTimeMapForUseEquationOptimization(prog, | ||
+ | |||
+ | generateScheduledCode(prog, | ||
+ | generateWrapper(prog, | ||
+ | generateMakefile(prog, | ||
+ | </ | ||
+ | |||
+ | ====TargetMapping for Optimization==== | ||