Module Ocaml_simd_avx.Int32x4

include module type of struct include Ocaml_simd_sse.Int32x4 end
type t = int32x4
type mask = int32x4
val box : t -> int32x4 @@ portable
val unbox : int32x4 @ local -> t @@ portable
val zero : unit -> t @@ portable

Equivalent to const1 #0l.

val one : unit -> t @@ portable

Equivalent to const1 #1l.

val set1 : int32 -> t @@ portable

_mm_set1_epi32 Compiles to mov,shufps.

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

_mm_set_epi32 Compiles to 4x movd,2x unpcklps,punpckl.

val const1 : int32 -> 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 : int32 -> int32 -> int32 -> int32 -> 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.

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

_mm_cmpeq_epi32

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

_mm_cmpgt_epi32

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

_mm_cmplt_epi32

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

Compiles to cmpeq,xorpd

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

_mm_cmpeq_epi32

val movemask : mask -> int64 @@ portable

_mm_movemask_ps

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

_mm_blendv_ps 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 -> int32 -> t @@ portable

idx must be in 0,3.

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

idx must be in 0,3.

val extract0 : t -> int32 @@ portable

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

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

Slow, intended for debugging / printing / etc.

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

_mm_unpackhi_ps

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

_mm_unpacklo_ps

val duplicate_even : t -> t @@ portable

_mm_moveldup_ps

val duplicate_odd : t -> t @@ portable

_mm_movehdup_ps

val blend : Ocaml_simd.Blend4.t -> t -> t -> t @@ portable

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

val shuffle : Ocaml_simd.Shuffle4.t -> t -> t -> t @@ portable

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

val min : t -> t -> t @@ portable

_mm_min_epi32

val max : t -> t -> t @@ portable

_mm_max_epi32

val min_unsigned : t -> t -> t @@ portable

_mm_min_epu32

val max_unsigned : t -> t -> t @@ portable

_mm_max_epu32

val add : t -> t -> t @@ portable

_mm_add_epi32

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

_mm_sub_epi32

val neg : t -> t @@ portable

_mm_sign_epi32 with -1.

val abs : t -> t @@ portable

_mm_abs_epi32 Equivalent to (x < 0 ? -x : x).

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

_mm_sll_epi32

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

_mm_srl_epi32

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

_mm_sra_epi32

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

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

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

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

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

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

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

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

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

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

val horizontal_add : t -> t -> t @@ portable

_mm_hadd_epi32

val horizontal_sub : t -> t -> t @@ portable

_mm_hsub_epi32

val mul_sign : t -> t -> t @@ portable

_mm_sign_epi32

val mul_low_bits : t -> t -> t @@ portable

_mm_mullo_epi32

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

_mm_mul_epi32

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

_mm_mul_epu32

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

_mm_or_si128

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

_mm_and_si128

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

_mm_andnot_si128

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

_mm_xor_si128

val of_float16x8_bits : float16x8 -> t @@ portable

Identity in the bit representation. Different numeric interpretation.

val of_float32x4_bits : float32x4 -> t @@ portable

Identity in the bit representation. Different numeric interpretation.

val of_float64x2_bits : float64x2 -> t @@ portable

Identity in the bit representation. Different numeric interpretation.

val of_int8x16_bits : int8x16 -> t @@ portable

Identity in the bit representation. Different numeric interpretation.

val of_int16x8_bits : int16x8 -> t @@ portable

Identity in the bit representation. Different numeric interpretation.

val of_int64x2_bits : int64x2 -> t @@ portable

Identity in the bit representation. Different numeric interpretation.

val of_float32x4 : float32x4 -> t @@ portable

_mm_cvtps_epi32

val of_float32x4_trunc : float32x4 -> t @@ portable

_mm_cvttps_epi32

val of_int8x16 : int8x16 -> t @@ portable

_mm_cvtepi8_epi32

val of_int8x16_unsigned : int8x16 -> t @@ portable

_mm_cvtepu8_epi32

val of_int16x8 : int16x8 -> t @@ portable

_mm_cvtepi16_epi32

val of_int16x8_unsigned : int16x8 -> t @@ portable

_mm_cvtepu16_epi32

val of_float64x2 : float64x2 -> t @@ portable

_mm_cvtpd_epi32

val of_float64x2_trunc : float64x2 -> t @@ portable

_mm_cvttpd_epi32

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.

module Raw : sig ... end
val permute : Ocaml_simd.Permute4.t -> t -> t @@ portable

_mm_permute_ps 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, 2, 1, 0] x = (x.(3), x.(2), x.(1), x.(0))
val permute_by : t -> idx:t -> t @@ portable

_mm_permutevar_ps Each entry of idx is interpreted as an integer in 0,3 by taking its bottom two bits.

  permute_by x ~idx:(1, 0, 3, 2) = (x.(1), x.(0), x.(3), x.(2))
val shift_left_logical_by : t -> shift:t -> t @@ portable

_mm_sllv_epi32

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

_mm_srlv_epi32

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

_mm_srav_epi32

val of_float64x4 : float64x4 -> t @@ portable

_mm256_cvtpd_epi32

val of_float64x4_trunc : float64x4 -> t @@ portable

_mm256_cvttpd_epi32

val of_int32x8 : int32x8 -> t @@ portable

Projection. Truncates to lower 128 bits.