summaryrefslogtreecommitdiff
path: root/builtins/110/matrixCompMult
blob: cb5a2cb1f7b37ef8a43d97708f6c2c185bbeaa51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
((function matrixCompMult
   (signature mat2
     (parameters
       (declare (in) mat2 x)
       (declare (in) mat2 y))
     ((declare () mat2 z)
      (assign (constant bool (1)) (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))))) 
      (assign (constant bool (1)) (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))))) 
(return (var_ref z))))

   (signature mat3
     (parameters
       (declare (in) mat3 x)
       (declare (in) mat3 y))
     ((declare () mat3 z)
      (assign (constant bool (1)) (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))))) 
      (assign (constant bool (1)) (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))))) 
      (assign (constant bool (1)) (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))))) 
(return (var_ref z))))

   (signature mat4
     (parameters
       (declare (in) mat4 x)
       (declare (in) mat4 y))
     ((declare () mat4 z)
      (assign (constant bool (1)) (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))))) 
      (assign (constant bool (1)) (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))))) 
      (assign (constant bool (1)) (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))))) 
      (assign (constant bool (1)) (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))))) 
(return (var_ref z))))
))