X-Git-Url: https://scm.cri.mines-paristech.fr/git/Faustine.git/blobdiff_plain/06159b51a934937f647ec7119b47cb466d8e50b1..4d5f39ea1ae1eff1d8eadf7875851be467e40a47:/interpretor/interpreter.ml diff --git a/interpretor/interpreter.ml b/interpretor/interpreter.ml index 4f0e1ba..226fadf 100644 --- a/interpretor/interpreter.ml +++ b/interpretor/interpreter.ml @@ -26,7 +26,7 @@ type interpreter_macro = (** val interpreter_macro_to_value : returns the value associated with the macro.*) let interpreter_macro_to_value m = match m with - | Number_samples_int -> 0xFF + | Number_samples_int -> 0xFFFFF | Max_Eval_Time_int -> 0xFFFFFFFF;; @@ -55,7 +55,6 @@ let computing = fun f -> fun width -> fun length -> <- (Array.map convert_back_R (f (!index))); incr index; done; - let () = print_string ("Done.") in !container_float_array_array_array with x -> @@ -67,9 +66,9 @@ let computing = fun f -> fun width -> fun length -> |Beam_Matching_Error s -> "Beam_Matching_Error: " ^ s |Evaluation_Error s -> "Evaluation_Error: " ^ s |NotYetDone -> "NotYetDone" - |_ -> "Done." + |_ -> "Compute finished." in - let () = print_string error_message in + let () = print_endline error_message in Array.sub (!container_float_array_array_array) 0 !index;; @@ -112,8 +111,7 @@ let arrange = fun float_array_array_array -> fun width -> input: a list of signal functions output: channel number list, data list.*) let compute fun_list = - let () = print_string(" Faustine -> Signals computing... ") in - let tic = Sys.time () in + let () = print_endline("Computing output signals...") in (* arrange input information *) let length = interpreter_macro_to_value Number_samples_int in @@ -128,8 +126,6 @@ let compute fun_list = let channel_array = channels output_float_array_array_array width in let channel_list = Array.to_list channel_array in let output_float_array_list = arrange output_float_array_array_array width in - let toc = Sys.time () in - let () = print_endline(" (duration: " ^ (string_of_float (toc -. tic)) ^ "s)") in (channel_list, output_float_array_list);; @@ -218,18 +214,6 @@ let interpret_ident = fun s -> fun input_beam -> |Sin -> if n = 1 then [signal_sin (List.nth input_beam 0)] else raise (Evaluation_Error "Ident sin") - |Cos -> if n = 1 then [signal_cos (List.nth input_beam 0)] - else raise (Evaluation_Error "Ident cos") - - |Atan -> if n = 1 then [signal_atan (List.nth input_beam 0)] - else raise (Evaluation_Error "Ident atan") - - |Atantwo -> if n = 2 then [signal_atantwo (List.nth input_beam 0) (List.nth input_beam 1)] - else raise (Evaluation_Error "Ident atantwo") - - |Sqrt -> if n = 1 then [signal_sqrt (List.nth input_beam 0)] - else raise (Evaluation_Error "Ident sqrt") - |Rdtable -> if n = 3 then [signal_rdtable (List.nth input_beam 0) (List.nth input_beam 1) (List.nth input_beam 2)] else raise (Evaluation_Error "Ident rdtable") @@ -494,8 +478,7 @@ let extract_rate = fun beam -> input: faust expression, sample rate list * input data list output: channel list * sample rate list * output data list.*) let interpreter exp_faust input = - let () = print_string(" Faustine -> Interpretation...") in - let tic = Sys.time () in + let () = print_endline("Interpretation...") in (* make input beam *) let input_beam = make_beam input in @@ -505,8 +488,6 @@ let interpreter exp_faust input = (* interprete output beam *) let output_beam = eval exp_faust dimension_tree input_beam in - let toc = Sys.time () in - let () = print_endline(" Done. (duration: " ^ (string_of_float (toc -. tic)) ^ "s)") in (* get rate list from output beam *) let rate_list = extract_rate output_beam in