Skip to content

Commit 90bf5fc

Browse files
committed
Also rename Ops.map_prec -> apply_prec
(see recent commit on renaming Ndarray.map)
1 parent 166b2f6 commit 90bf5fc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

arrayjit/lib/ndarray.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ let%track7_sexp create_array ~debug:(_debug : string) (prec : Ops.prec) ~(dims :
410410
[%log3 "Deleting", _debug, ptr_to_string_hum _result]
411411
in
412412
let f prec = as_array prec @@ create_bigarray prec ~dims ~padding in
413-
let result = Ops.map_prec { f } prec in
413+
let result = Ops.apply_prec { f } prec in
414414
Stdlib.Gc.finalise finalizer result;
415415
let _ : int = Atomic.fetch_and_add used_memory size_in_bytes in
416416
[%debug3_sexp

arrayjit/lib/ops.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@ let pack_prec (type ocaml elt_t) (prec : (ocaml, elt_t) precision) =
205205
| Single -> single
206206
| Double -> double
207207

208-
type 'r map_prec = { f : 'ocaml 'elt_t. ('ocaml, 'elt_t) precision -> 'r }
208+
type 'r apply_prec = { f : 'ocaml 'elt_t. ('ocaml, 'elt_t) precision -> 'r }
209209

210-
let map_prec ?default { f } = function
210+
let apply_prec ?default { f } = function
211211
| Void_prec ->
212-
Option.value_or_thunk default ~default:(fun () -> invalid_arg "map_prec: Void_prec")
212+
Option.value_or_thunk default ~default:(fun () -> invalid_arg "apply_prec: Void_prec")
213213
| Byte_prec Byte -> f Byte
214214
| Uint16_prec Uint16 -> f Uint16
215215
| Int32_prec Int32 -> f Int32
@@ -219,7 +219,7 @@ let map_prec ?default { f } = function
219219
| Single_prec Single -> f Single
220220
| Double_prec Double -> f Double
221221
(* FIXME: this is a hack to get the code to compile. *)
222-
| _ -> invalid_arg "map_prec: unknown precision"
222+
| _ -> invalid_arg "apply_prec: unknown precision"
223223

224224
let c_typ_of_prec = function
225225
| Byte_prec _ -> "unsigned char"

0 commit comments

Comments
 (0)