Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file nativeint.ml
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182moduleStubs=structletavailable=Common.available(** [count_leading_zeros n] returns the number of most-significant
zero bits before the most significant set bit in [n].
If [n] is 0, the result is the number of bits in [n],
that is 32 or 64, depending on the target. *)externalcount_leading_zeros:(nativeint[@unboxed])->(int[@untagged])="caml_nativeint_clz""caml_nativeint_clz_unboxed_to_untagged"[@@noalloc][@@builtin][@@no_effects][@@no_coeffects](** Same as [count_leading_zeros] except if the argument is zero,
then the result is undefined. Emits more efficient code. *)externalcount_leading_zeros_nonzero_arg:(nativeint[@unboxed])->(int[@untagged])="caml_nativeint_clz""caml_nativeint_clz_nonzero_unboxed_to_untagged"[@@noalloc][@@builtin][@@no_effects][@@no_coeffects](** [count_trailing_zeros n] returns the number of least-significant
zero bits before the least significant set bit in [n].
If [n] is 0, the result is the number of bits in [n],
that is 32 or 64, depending on the target. *)externalcount_trailing_zeros:(nativeint[@unboxed])->(int[@untagged])="caml_nativeint_ctz""caml_nativeint_ctz_unboxed_to_untagged"[@@noalloc][@@builtin][@@no_effects][@@no_coeffects](** Same as [count_trailing_zeros] except if the argument is zero,
then the result is undefined. Emits more efficient code. *)externalcount_trailing_zeros_nonzero_arg:(nativeint[@unboxed])->(int[@untagged])="caml_nativeint_ctz""caml_nativeint_ctz_nonzero_unboxed_to_untagged"[@@noalloc][@@builtin][@@no_effects][@@no_coeffects](** [count_set_bits n] returns the number of bits that are 1 in [n]. *)externalcount_set_bits:(nativeint[@unboxed])->(int[@untagged])="caml_nativeint_popcnt""caml_nativeint_popcnt_unboxed_to_untagged"[@@noalloc][@@builtin][@@no_effects][@@no_coeffects]endmoduleNaive=Naive_ints.Make(structincludeStdlib.Nativeintletbitwidth=Sys.word_sizeend)let[@inlinealways]count_leading_zerosn=matchStubs.availablewith|true->Stubs.count_leading_zerosn|false->Naive.count_leading_zerosn;;let[@inlinealways]count_leading_zeros_nonzero_argn=matchStubs.availablewith|true->Stubs.count_leading_zeros_nonzero_argn|false->Naive.count_leading_zerosn;;let[@inlinealways]count_trailing_zerosn=matchStubs.availablewith|true->Stubs.count_trailing_zerosn|false->Naive.count_trailing_zerosn;;let[@inlinealways]count_trailing_zeros_nonzero_argn=matchStubs.availablewith|true->Stubs.count_trailing_zeros_nonzero_argn|false->Naive.count_trailing_zerosn;;let[@inlinealways]count_set_bitsn=matchStubs.availablewith|true->Stubs.count_set_bitsn|false->Naive.count_set_bitsn;;