Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / test / src / arrays_arnaud / MatrixAddition.lus @ 7291cb80

History | View | Annotate | Download (1.2 KB)

1
#open "dummy_lib"
2

    
3
const MatrixAddition_Constant_Value = [ [ 2, 3, 4 ], [ 5, 6, 7 ] ] ;
4
const MatrixAddition_Constant1_Value = [ [ 8, 9, 10 ], [ 11, 12, 13 ] ] ;
5
const MatrixAddition_Constant2_Value = [ [ 2, 3, 4 ] ] ;
6
const MatrixAddition_Constant4_Value = [ [ 5 ], [ 6 ], [ 7 ] ] ;
7
const MatrixAddition_Constant5_Value = [ [ 11 ], [ 12 ], [ 13 ] ] ;
8

    
9
node MatrixAddition (
10
	In1_Out1_11 : int)
11
returns (
12
	Out1_In1_93 : int^2^3 ;
13
	Out3_In1_105 : int^3^1 ;
14
	Out2_In1_117 : int^1^3) ;
15
var
16
	Sum_Out1_61 : int^2^3 ;
17
	Sum1_Out1_71 : int^1^3 ;
18
	Sum2_Out1_81 : int^3^1 ;
19
	Sum_In1_59 : int^2^3 ;
20
	Sum_In2_60 : int^2^3 ;
21
	Sum1_In1_69 : int^1^3 ;
22
	Sum1_In2_70 : int^1^3 ;
23
	Sum2_In1_79 : int^3^1 ;
24
	Sum2_In2_80 : int^3^1 ;
25
let
26
	Sum_Out1_61 = Sum_In1_59 + Sum_In2_60 ;
27
	Sum1_Out1_71 = Sum1_In1_69 + Sum1_In2_70 ;
28
	Sum2_Out1_81 = Sum2_In1_79 + Sum2_In2_80 ;
29
	Sum1_In1_69 = MatrixAddition_Constant2_Value ;
30
	Sum2_In1_79 = MatrixAddition_Constant4_Value ;
31
	Sum2_In2_80 = MatrixAddition_Constant5_Value ;
32
	Out1_In1_93 = Sum_Out1_61 ;
33
	Sum_In1_59 = MatrixAddition_Constant_Value ;
34
	Sum_In2_60 = MatrixAddition_Constant1_Value ;
35
	Out2_In1_117 = Sum1_Out1_71 ;
36
	Out3_In1_105 = Sum2_Out1_81 ;
37
	Sum1_In2_70 = In1_Out1_11 ;
38
	--! MAIN : true ;
39
tel