Module Ocaml_simd_sse.Float32x4

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

Equivalent to const1 #0.0s.

val one : unit -> t @@ portable

Equivalent to const1 #1.0s.

val set1 : float32 -> t @@ portable

_mm_set1_ps Compiles to shufps.

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

_mm_set_ps Compiles to 2x unpcklps,punpckl.

val const1 : float32 -> t @@ portable

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

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

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

module Float32_u_array = Load_store.Float32_u_array
val (>=) : t -> t -> mask @@ portable

_mm_cmpge_ps

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

_mm_cmple_ps

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

_mm_cmpeq_ps

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

_mm_cmpgt_ps

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

_mm_cmplt_ps

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

_mm_cmpneq_ps

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

_mm_cmpeq_ps

val is_nan : t -> mask @@ portable

_mm_cmpunord_ps

val is_not_nan : t -> mask @@ portable

_mm_cmpord_ps

val movemask : mask -> int64 @@ portable

_mm_movemask_ps

val bitmask : mask -> int32x4 @@ portable

Identity.

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 -> float32 -> t @@ portable

idx must be in 0,3. Compiles to shufps,branch,blendps.

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

idx must be in 0,3. Compiles to branch,shufps.

val extract0 : t -> float32 @@ portable

Projection. Has no runtime cost.

val splat : t -> #(float32 * float32 * float32 * float32) @@ 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_ps Equivalent to pointwise (x < y ? x : y). If either lane is NaN, the second lane is returned.

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

_mm_max_ps Equivalent to pointwise (x > y ? x : y). If either lane is NaN, the second lane is returned.

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

_mm_add_ps

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

_mm_sub_ps

val mul : t -> t -> t @@ portable

_mm_mul_ps

val div : t -> t -> t @@ portable

_mm_div_ps

val neg : t -> t @@ portable

Compiles to xor with a static constant.

val abs : t -> t @@ portable

Compiles to and with a static constant.

val rcp : t -> t @@ portable

_mm_rcp_ps WARNING: result has relative error up to 1.5*2^-12, and may differ between CPU vendors.

val rsqrt : t -> t @@ portable

_mm_rsqrt_ps WARNING: result has relative error up to 1.5*2^-12, and may differ between CPU vendors.

val sqrt : t -> t @@ portable

_mm_sqrt_ps

val add_sub : t -> t -> t @@ portable

_mm_addsub_ps

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

_mm_hadd_ps

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

_mm_hsub_ps

val dot : t -> t -> float32 @@ portable

_mm_dp_ps

val (+) : t -> t -> t @@ portable
val (-) : t -> t -> t @@ portable
val (/) : t -> t -> t @@ portable
val (*) : t -> t -> t @@ portable
val iround_current : t -> int32x4 @@ portable

_mm_cvtps_epi32

val round_nearest : t -> t @@ portable

_mm_round_ps

val round_current : t -> t @@ portable

_mm_round_ps

val round_down : t -> t @@ portable

_mm_round_ps

val round_up : t -> t @@ portable

_mm_round_ps

val round_toward_zero : t -> t @@ portable

_mm_round_ps

val unsafe_of_float32 : float32 -> t @@ portable

Identity; leaves upper 96 bits unspecified.

val of_float16x8_bits : float16x8 -> 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_int32x4_bits : int32x4 -> 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_int32x4 : int32x4 -> t @@ portable

_mm_cvtepi32_ps

val of_float64x2 : float64x2 -> t @@ portable

_mm_cvtpd_ps

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.