package ocaml_intrinsics

  1. Overview
  2. Docs
include module type of struct include Ocaml_intrinsics_kernel.Int64 end
val count_leading_zeros : int64 -> int

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 64.

val count_leading_zeros_nonzero_arg : int64 -> int

Same as count_leading_zeros except if the argument is zero, then the result is undefined. Emits more efficient code.

This is no longer needed when using an flambda-backend compiler, which translates count_leading_zeros to LZCNT by default (amd64).

val count_trailing_zeros : int64 -> int

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 64.

val count_trailing_zeros_nonzero_arg : int64 -> int

Same as count_trailing_zeros except if the argument is zero, then the result is undefined. Emits more efficient code.

This is no longer needed when using an flambda-backend compiler, which translates count_trailing_zeros to TZCNT by default (amd64).

val count_set_bits : int64 -> int

count_set_bits n returns the number of bits that are 1 in n.

val deposit_bits : int64 -> int64 -> int64

deposit_bits a mask: Deposit contiguous low bits from unsigned 64-bit integer a to dst at the corresponding bit locations specified by mask; all other bits in dst are set to zero. See _pdep_u64.

val extract_bits : int64 -> int64 -> int64

extract_bits a mask: Extract bits from unsigned 64-bit integer a at the corresponding bit locations specified by mask to contiguous low bits in dst; the remaining upper bits in dst are set to zero. See _pext_u64.

OCaml

Innovation. Community. Security.