Module Ocaml_simd_avx.Int64x4

type t = int64x4
type mask = int64x4
val box : t -> int64x4 @@ portable
val unbox : int64x4 @ local -> t @@ portable
val zero : unit -> t @@ portable

Equivalent to const1 #0L.

val one : unit -> t @@ portable

Equivalent to const1 #1L.

val set1 : int64 -> t @@ portable

_mm256_set1_epi64x

val set : int64 -> int64 -> int64 -> int64 -> t @@ portable

_mm256_set_epi64x

val set_lanes : int64x2 -> int64x2 -> t @@ portable

_mm256_set_m128 Operates on two int64x2 lanes.

val const1 : int64 -> t @@ portable

Argument must be a literal or an unboxing function applied to a literal. Compiles to a static vector literal. Exposed as an external so user code can compile without cross-library inlining.

val const : int64 -> int64 -> int64 -> int64 -> t @@ portable

Arguments must be literals or unboxing functions applied to literals. Compiles to a static vector literal. Exposed as an external so user code can compile without cross-library inlining.

module Raw : sig ... end
module String : sig ... end
module Bytes : sig ... end
module Bigstring : sig ... end
module Unsafe_immediate_array : sig ... end
module Unsafe_immediate_iarray : sig ... end
module Int64_u_array : sig ... end
module Nativeint_u_array : sig ... end
module Test : sig ... end
val (>=) : t -> t -> mask @@ portable

Compiles to cmpgt,cmpeq,orpd.

val (<=) : t -> t -> mask @@ portable

Compiles to cmpgt,cmpeq,orpd.

val (=) : t -> t -> mask @@ portable

_mm256_cmpeq_epi64

val (>) : t -> t -> mask @@ portable

_mm256_cmpgt_epi64

val (<) : t -> t -> mask @@ portable

_mm256_cmpgt_epi64 with flipped arguments.

val (<>) : t -> t -> mask @@ portable

Compiles to cmpeq,xorpd.

val equal : t -> t -> mask @@ portable

_mm256_cmpeq_epi64

val movemask : mask -> int64 @@ portable

_mm256_movemask_pd

val select : mask -> fail:t -> pass:t -> t @@ portable

_mm256_blendv_pd Only reads the sign bit of each mask lane. Selects the element from pass if the sign bit is 1, otherwise fail.

val insert : idx:int64 -> t -> int64 -> t @@ portable

idx must be in 0,3.

val extract : idx:int64 -> t -> int64 @@ portable

idx must be in 0,3.

val extract0 : t -> int64 @@ portable

Projection. More efficient than extract ~idx:#0L.

val insert_lane : idx:int64 -> t -> int64x2 -> t @@ portable

idx must be a literal in 0,1. Operates on two int64x2 lanes. Exposed as an external so user code can compile without cross-library inlining.

val extract_lane : idx:int64 -> t -> int64x2 @@ portable

idx must be a literal in 0,1. Operates on two int64x2 lanes. Exposed as an external so user code can compile without cross-library inlining.

val extract_lane0 : t -> int64x2 @@ portable

Projection. Has no runtime cost. Operates on two int64x2 lanes.

val splat : t -> #(int64 * int64 * int64 * int64) @@ portable

Slow, intended for debugging / printing / etc.

val interleave_upper_lanes : even:t -> odd:t -> t @@ portable

_mm256_unpackhi_epi64 Operates on two int64x2 lanes.

  interleave_upper_lanes ~even ~odd = (even.(1), odd.(1), even.(3), odd.(3))
val interleave_lower_lanes : even:t -> odd:t -> t @@ portable

_mm256_unpacklo_epi64 Operates on two int64x2 lanes.

  interleave_lower_lanes ~even ~odd = (even.(0), odd.(0), even.(2), odd.(2))
val duplicate_even : t -> t @@ portable

_mm256_movedup_pd

  duplicate_even x = (x.(0), x.(0), x.(2), x.(2))
val blend : Ocaml_simd.Blend4.t -> t -> t -> t @@ portable

_mm256_blend_pd Specify blend with ppx_simd: %blend N, N, N, N, where each N is in 0,1. Exposed as an external so user code can compile without cross-library inlining.

  blend [%blend 1, 0, 1, 0] x y = (y.(0), x.(1), y.(2), x.(3))
val shuffle_lanes : Ocaml_simd.Shuffle2x2.t -> t -> t -> t @@ portable

_mm256_shuffle_pd Specify shuffle with ppx_simd: %shuffle (N, N), (N, N), where each N is in 0,1. Operates on two int64x2 lanes. Exposed as an external so user code can compile without cross-library inlining.

  shuffle_lanes [%shuffle (1, 0), (0, 1)] x y = (x.(1), y.(0), x.(2), y.(3))
val permute : Ocaml_simd.Permute4.t -> t -> t @@ portable

_mm256_permute4x64_pd Specify permute with ppx_simd: %permute N, N, N, N, where each N is in 0,3. Exposed as an external so user code can compile without cross-library inlining.

  permute [%permute 3, 1, 0, 2] x = (x.(3), x.(1), x.(0), x.(2))
val permute_lanes : Ocaml_simd.Permute2x2.t -> t -> t @@ portable

_mm256_permute_pd Specify permute with ppx_simd: %permute (N, N), (N, N), where each N is in 0,1. Exposed as an external so user code can compile without cross-library inlining.

  permute_lanes [%permute (1, 0), (0, 1)] x = (x.(1), x.(0), x.(2), x.(3))
val permute_lanes_by : t -> idx:t -> t @@ portable

_mm256_permutevar_pd Operates on two int64x2 lanes. Each lane of idx is interpreted as an integer in 0,1 by taking its *second* lowest bit.

  permute_lanes_by x ~idx:(2, 0, 0, 2) = (x.(1), x.(0), x.(2), x.(3))
val add : t -> t -> t @@ portable

_mm256_add_epi64

val sub : t -> t -> t @@ portable

_mm256_sub_epi64

val neg : t -> t @@ portable

Compiles to xorpd,padd.

val abs : t -> t @@ portable

Compiles to andpd,xorpd,padd,blend. Equivalent to (x < 0 ? -x : x).

val shift_left_logical : t -> int64 -> t @@ portable

_mm256_sll_epi64

val shift_right_logical : t -> int64 -> t @@ portable

_mm256_srl_epi64

val shift_left_logical_by : t -> shift:t -> t @@ portable

_mm256_sllv_epi64

val shift_right_logical_by : t -> shift:t -> t @@ portable

_mm256_srlv_epi64

val shifti_left_bytes_lanes : int64 -> t -> t @@ portable

_mm256_bslli_epi128 First argument must be an unsigned integer literal in 0,15. Operates on two int64x2 lanes. Exposed as an external so user code can compile without cross-library inlining.

val shifti_right_bytes_lanes : int64 -> t -> t @@ portable

_mm256_bsrli_epi128 First argument must be an unsigned integer literal in 0,15. Operates on two int64x2 lanes. Exposed as an external so user code can compile without cross-library inlining.

val shifti_left_logical : int64 -> t -> t @@ portable

_mm256_slli_epi64 First argument must be an unsigned integer literal in 0,63. Exposed as an external so user code can compile without cross-library inlining.

val shifti_right_logical : int64 -> t -> t @@ portable

_mm256_srli_epi64 First argument must be an unsigned integer literal in 0,63. Exposed as an external so user code can compile without cross-library inlining.

val (+) : t -> t -> t @@ portable
val (-) : t -> t -> t @@ portable
val lnot : t -> t @@ portable

Compiles to xor with a static constant.

val (lor) : t -> t -> t @@ portable

_mm256_or_si256

val (land) : t -> t -> t @@ portable

_mm256_and_si256

val landnot : not:t -> t -> t @@ portable

_mm256_andnot_si256

val (lxor) : t -> t -> t @@ portable

_mm256_xor_si256

val unsafe_of_int64x2 : int64x2 -> t @@ portable

Identity; leaves upper 128 bits unspecified.

val of_float16x16_bits : float16x16 -> t @@ portable

Identity in the bit representation. Different numeric interpretation.

val of_float32x8_bits : float32x8 -> t @@ portable

Identity in the bit representation. Different numeric interpretation.

val of_float64x4_bits : float64x4 -> t @@ portable

Identity in the bit representation. Different numeric interpretation.

val of_int8x32_bits : int8x32 -> t @@ portable

Identity in the bit representation. Different numeric interpretation.

val of_int16x16_bits : int16x16 -> t @@ portable

Identity in the bit representation. Different numeric interpretation.

val of_int32x8_bits : int32x8 -> t @@ portable

Identity in the bit representation. Different numeric interpretation.

val of_int8x16 : int8x16 -> t @@ portable

_mm256_cvtepi8_epi64

val of_int8x16_unsigned : int8x16 -> t @@ portable

_mm256_cvtepu8_epi64

val of_int16x8 : int16x8 -> t @@ portable

_mm256_cvtepi16_epi64

val of_int16x8_unsigned : int16x8 -> t @@ portable

_mm256_cvtepu16_epi64

val of_int32x4 : int32x4 -> t @@ portable

_mm256_cvtepi32_epi64

val of_int32x4_unsigned : int32x4 -> t @@ portable

_mm256_cvtepu32_epi64

val to_string : t -> string @@ portable

Compiles to splat, sprintf.

val of_string : string -> t @@ portable

Compiles to sscanf, set. Expects a string in the output format of to_string.