代码拉取完成,页面将自动刷新
(* ========================================================================== *)
(* FPTaylor: A Tool for Rigorous Estimation of Round-off Errors *)
(* *)
(* Author: Alexey Solovyev, University of Utah *)
(* *)
(* This file is distributed under the terms of the MIT license *)
(* ========================================================================== *)
(* -------------------------------------------------------------------------- *)
(* FPTaylor's Export Tool *)
(* -------------------------------------------------------------------------- *)
let export_file fmt fname =
Log.report `Main "Exporting: %s" fname;
let tasks = Parser.parse_file fname in
let var_type = Config.get_string_option "var-type" in
let vt =
if String.length var_type = 0 then None
else Some (Rounding.string_to_value_type var_type) in
List.iter (Out_fpcore.generate_fpcore ?var_type:vt fmt) tasks;
Format.pp_print_flush fmt ()
let export output input_files =
let oc = if String.length output = 0 then stdout else open_out output in
let fmt = Format.formatter_of_out_channel oc in
List.iter (export_file fmt) input_files;
close_out oc
let main () =
Log.report `Main "FPTaylor's Export Tool, version %s" Version.version;
let usage =
Printf.sprintf "\nUsage: %s [--opt_name opt_value ...] [-c config1 ...] \
[-o output_file] input_file1 [input_file2 ...] \n\n\
See export.cfg for a complete list of available \
options and their values.\n"
Sys.argv.(0) in
Config.init ~main_cfg_fname:"export.cfg" ~usage [];
let files = Config.input_files () in
if files = [] then begin
print_string usage;
exit 1
end;
export (Config.get_string_option "output") files
let () = main ()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。