• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1((function matrixCompMult
2   (signature mat2
3     (parameters
4       (declare (in) mat2 x)
5       (declare (in) mat2 y))
6     ((declare () mat2 z)
7      (assign (xy) (array_ref (var_ref z) (constant int (0)))  (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
8      (assign (xy) (array_ref (var_ref z) (constant int (1)))  (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
9(return (var_ref z))))
10
11   (signature mat3
12     (parameters
13       (declare (in) mat3 x)
14       (declare (in) mat3 y))
15     ((declare () mat3 z)
16      (assign (xyz) (array_ref (var_ref z) (constant int (0)))  (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
17      (assign (xyz) (array_ref (var_ref z) (constant int (1)))  (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
18      (assign (xyz) (array_ref (var_ref z) (constant int (2)))  (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
19(return (var_ref z))))
20
21   (signature mat4
22     (parameters
23       (declare (in) mat4 x)
24       (declare (in) mat4 y))
25     ((declare () mat4 z)
26      (assign (xyzw) (array_ref (var_ref z) (constant int (0)))  (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
27      (assign (xyzw) (array_ref (var_ref z) (constant int (1)))  (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
28      (assign (xyzw) (array_ref (var_ref z) (constant int (2)))  (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
29      (assign (xyzw) (array_ref (var_ref z) (constant int (3)))  (expression vec4 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
30(return (var_ref z))))
31
32   (signature mat2x3
33     (parameters
34       (declare (in) mat2x3 x)
35       (declare (in) mat2x3 y))
36     ((declare () mat2x3 z)
37      (assign (xyz) (array_ref (var_ref z) (constant int (0)))  (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
38      (assign (xyz) (array_ref (var_ref z) (constant int (1)))  (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
39(return (var_ref z))))
40
41   (signature mat3x2
42     (parameters
43       (declare (in) mat3x2 x)
44       (declare (in) mat3x2 y))
45     ((declare () mat3x2 z)
46      (assign (xy) (array_ref (var_ref z) (constant int (0)))  (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
47      (assign (xy) (array_ref (var_ref z) (constant int (1)))  (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
48      (assign (xy) (array_ref (var_ref z) (constant int (2)))  (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
49(return (var_ref z))))
50
51   (signature mat2x4
52     (parameters
53       (declare (in) mat2x4 x)
54       (declare (in) mat2x4 y))
55     ((declare () mat2x4 z)
56      (assign (xyzw) (array_ref (var_ref z) (constant int (0)))  (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
57      (assign (xyzw) (array_ref (var_ref z) (constant int (1)))  (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
58(return (var_ref z))))
59
60   (signature mat4x2
61     (parameters
62       (declare (in) mat4x2 x)
63       (declare (in) mat4x2 y))
64     ((declare () mat4x2 z)
65      (assign (xy) (array_ref (var_ref z) (constant int (0)))  (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
66      (assign (xy) (array_ref (var_ref z) (constant int (1)))  (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
67      (assign (xy) (array_ref (var_ref z) (constant int (2)))  (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
68      (assign (xy) (array_ref (var_ref z) (constant int (3)))  (expression vec2 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
69(return (var_ref z))))
70
71   (signature mat3x4
72     (parameters
73       (declare (in) mat3x4 x)
74       (declare (in) mat3x4 y))
75     ((declare () mat3x4 z)
76      (assign (xyzw) (array_ref (var_ref z) (constant int (0)))  (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
77      (assign (xyzw) (array_ref (var_ref z) (constant int (1)))  (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
78      (assign (xyzw) (array_ref (var_ref z) (constant int (2)))  (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
79(return (var_ref z))))
80
81   (signature mat4x3
82     (parameters
83       (declare (in) mat4x3 x)
84       (declare (in) mat4x3 y))
85     ((declare () mat4x3 z)
86      (assign (xyz) (array_ref (var_ref z) (constant int (0)))  (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
87      (assign (xyz) (array_ref (var_ref z) (constant int (1)))  (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
88      (assign (xyz) (array_ref (var_ref z) (constant int (2)))  (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
89      (assign (xyz) (array_ref (var_ref z) (constant int (3)))  (expression vec3 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
90(return (var_ref z))))
91))
92