Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / test / src / arrays_arnaud / generic1.lus @ b3381ae8

History | View | Annotate | Download (554 Bytes)

1
#open "dummy_lib"
2

    
3
type choice = enum { one, two };
4
type entier = int;
5

    
6
const PI = 3;
7

    
8
const tab = [1.,2.,3.,4.];
9

    
10
const M1 = [ [ 2.1 ], [ 1.0 ], [ 3.0 ], [ 4.2 ] ] ;
11
const M2 = [ [ 1.1, 2.2, 1.0, 1.0 ] ] ;
12

    
13

    
14
node mult(
15
     in1 : real^4^1)
16
returns (
17
     out : real^1^1)
18
var l,p;
19
let
20
  l = [ tab, [3.,4.,5.,6.] ];
21
  p = l + [tab,tab+[3.,4.,5.,6.]];
22
  out = _MatMul_real (1,4,1,[ [ 2.1 ], [ 1.0 ], [ 3.0 ], [ 4.2 ] ], in1);
23
tel
24
    
25
node base(const p:int; x:int^(PI*p)) returns (y:int^p)
26
var z:int^(PI*p);
27
let
28
  z = imp2(PI*p, x);
29
  y = imp1(p, z);
30
tel
31