package arrayjit
Module Arrayjit.UtilsSource
val map_merge :
('a, 'b, 'c) Base.Map.t ->
('a, 'b, 'c) Base.Map.t ->
f:('b -> 'b -> 'b) ->
('a, 'b, 'c) Base.Map.tval mref_add :
('a, 'b, 'c) Base.Map.t Base.ref ->
key:'a ->
data:'b ->
or_:('b -> Base.unit) ->
Base.unittype settings = {mutable log_level : Base.int;mutable debug_log_from_routines : Base.bool;mutable debug_memory_locations : Base.bool;mutable output_debug_files_in_build_directory : Base.bool;(*Writes compilation related files in the
*)build_filessubdirectory of the run directory (additional files, or files that would otherwise be in temp directory). When bothoutput_debug_files_in_build_directory = trueandlog_level > 1, compilation should also preserve debug and line information for runtime debugging.mutable fixed_state_for_init : Base.int Base.option;mutable print_decimals_precision : Base.int;(*When rendering arrays etc., outputs this many decimal digits.
*)
}Retrieves arg_name argument from the command line or from an environment variable, returns default if none found.
val union_find :
equal:('a -> 'a -> bool) ->
('a, 'a, 'b) Base.Map.t ->
key:'a ->
rank:int ->
'a * intval union_add :
equal:('a -> 'a -> bool) ->
('a, 'a, 'b) Base.Map.t ->
'a ->
'a ->
('a, 'a, 'b) Base.Map.tFilters the list keeping the first occurrence of each element.
parallel_merge merge num_devices progressively invokes the pairwise merge callback, converging on the 0th position, with from ranging from 1 to num_devices - 1, and to_ < from.
val equal_mutable_list :
'a. ('a -> 'a -> Base.bool) ->
'a mutable_list ->
'a mutable_list ->
Base.booltype pp_file = {f_name : Base.string;ppf : Format.formatter;finalize : Base.unit -> Base.unit;
}type captured_log_processor = {log_processor_prefix : Base.string;process_logs : Base.string Base.list -> Base.unit;
}val add_log_processor :
prefix:Base.string ->
(Base.string Base.list -> Base.unit) ->
Base.unittype waiter = {await : keep_waiting:(Base.unit -> Base.bool) -> Base.unit -> Base.bool;(*Returns
*)trueif the waiter was not already waiting (in another thread) and waiting was needed (keep_waitingalways returned true).release_if_waiting : Base.unit -> Base.bool;(*Returns
*)trueif the waiter both was waiting and was not already released.is_waiting : Base.unit -> Base.bool;finalize : Base.unit -> Base.unit;
}Note: this waiter is meant for sequential waiting.