(* %use "Matrix/mat_vec_mult_float.fsh";; *) let mat_vec_mult_float_sh xsh ysh = check (lendim (preddim xsh) = (lendim ysh)) (succdim (lendim xsh) (preddim ysh)) ;; let mat_vec_mult_float_pr (z:var [a]) (x:var [a]) (y:var [a]) = for i< lendim #x do z[i] := inner_product_float y (sub(x,i)) done ;; let mat_vec_mult_float = proc2fun2 mat_vec_mult_float_pr mat_vec_mult_float_sh ;; (* test let mat = fill {2,3:float_shape} with [1.0,2.0,3.0,4.0,5.0,6.0] ;; let vec = fill {3:float_shape} with [1.0,2.0,3.0] in mat_vec_mult_float mat vec ;; *)