Class X86.Sse4_1 | Burst | 1.3.9
docs.unity3d.com
    Show / Hide Table of Contents

    Class X86.Sse4_1

    SSE 4.1 intrinsics

    Inheritance
    Object
    X86.Sse4_1
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Unity.Burst.Intrinsics
    Syntax
    public static class Sse4_1

    Properties

    IsSse41Supported

    Evaluates to true at compile time if SSE 4.1 intrinsics are supported.

    Declaration
    public static bool IsSse41Supported { get; }
    Property Value
    Type Description
    Boolean

    Methods

    blend_epi16(v128, v128, Int32)

    Blend packed 16-bit integers from "a" and "b" using control mask "imm8", and store the results in "dst".

    Declaration
    public static v128 blend_epi16(v128 a, v128 b, int imm8)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Int32 imm8
    Returns
    Type Description
    v128

    blend_pd(v128, v128, Int32)

    Blend packed double-precision (64-bit) floating-point elements from "a" and "b" using control mask "imm8", and store the results in "dst".

    Declaration
    public static v128 blend_pd(v128 a, v128 b, int imm8)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Int32 imm8
    Returns
    Type Description
    v128

    blend_ps(v128, v128, Int32)

    Blend packed single-precision (32-bit) floating-point elements from "a" and "b" using control mask "imm8", and store the results in "dst".

    Declaration
    public static v128 blend_ps(v128 a, v128 b, int imm8)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Int32 imm8
    Returns
    Type Description
    v128

    blendv_epi8(v128, v128, v128)

    Blend packed 8-bit integers from "a" and "b" using "mask", and store the results in "dst".

    Declaration
    public static v128 blendv_epi8(v128 a, v128 b, v128 mask)
    Parameters
    Type Name Description
    v128 a
    v128 b
    v128 mask
    Returns
    Type Description
    v128

    blendv_pd(v128, v128, v128)

    Blend packed double-precision (64-bit) floating-point elements from "a" and "b" using "mask", and store the results in "dst".

    Declaration
    public static v128 blendv_pd(v128 a, v128 b, v128 mask)
    Parameters
    Type Name Description
    v128 a
    v128 b
    v128 mask
    Returns
    Type Description
    v128

    blendv_ps(v128, v128, v128)

    Blend packed single-precision (32-bit) floating-point elements from "a" and "b" using "mask", and store the results in "dst".

    Declaration
    public static v128 blendv_ps(v128 a, v128 b, v128 mask)
    Parameters
    Type Name Description
    v128 a
    v128 b
    v128 mask
    Returns
    Type Description
    v128

    ceil_pd(v128)

    Round the packed double-precision (64-bit) floating-point elements in "a" up to an integer value, and store the results as packed double-precision floating-point elements in "dst".

    Declaration
    public static v128 ceil_pd(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    v128

    ceil_ps(v128)

    Round the packed single-precision (32-bit) floating-point elements in "a" up to an integer value, and store the results as packed single-precision floating-point elements in "dst".

    Declaration
    public static v128 ceil_ps(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    v128

    ceil_sd(v128, v128)

    Round the lower double-precision (64-bit) floating-point element in "b" up to an integer value, store the result as a double-precision floating-point element in the lower element of "dst", and copy the upper element from "a" to the upper element of "dst".

    Declaration
    public static v128 ceil_sd(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    v128

    ceil_ss(v128, v128)

    Round the lower single-precision (32-bit) floating-point element in "b" up to an integer value, store the result as a single-precision floating-point element in the lower element of "dst", and copy the upper 3 packed elements from "a" to the upper elements of "dst".

    Declaration
    public static v128 ceil_ss(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    v128

    cmpeq_epi64(v128, v128)

    Compare packed 64-bit integers in "a" and "b" for equality, and store the results in "dst".

    Declaration
    public static v128 cmpeq_epi64(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    v128

    cvtepi16_epi32(v128)

    Sign extend packed 16-bit integers in "a" to packed 32-bit integers, and store the results in "dst".

    Declaration
    public static v128 cvtepi16_epi32(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    v128

    cvtepi16_epi64(v128)

    Sign extend packed 16-bit integers in "a" to packed 64-bit integers, and store the results in "dst".

    Declaration
    public static v128 cvtepi16_epi64(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    v128

    cvtepi32_epi64(v128)

    Sign extend packed 32-bit integers in "a" to packed 64-bit integers, and store the results in "dst".

    Declaration
    public static v128 cvtepi32_epi64(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    v128

    cvtepi8_epi16(v128)

    Sign extend packed 8-bit integers in "a" to packed 16-bit integers, and store the results in "dst".

    Declaration
    public static v128 cvtepi8_epi16(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    v128

    cvtepi8_epi32(v128)

    Sign extend packed 8-bit integers in "a" to packed 32-bit integers, and store the results in "dst".

    Declaration
    public static v128 cvtepi8_epi32(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    v128

    cvtepi8_epi64(v128)

    Sign extend packed 8-bit integers in the low 8 bytes of "a" to packed 64-bit integers, and store the results in "dst".

    Declaration
    public static v128 cvtepi8_epi64(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    v128

    cvtepu16_epi32(v128)

    Zero extend packed unsigned 16-bit integers in "a" to packed 32-bit integers, and store the results in "dst".

    Declaration
    public static v128 cvtepu16_epi32(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    v128

    cvtepu16_epi64(v128)

    Zero extend packed unsigned 16-bit integers in "a" to packed 64-bit integers, and store the results in "dst".

    Declaration
    public static v128 cvtepu16_epi64(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    v128

    cvtepu32_epi64(v128)

    Zero extend packed unsigned 32-bit integers in "a" to packed 64-bit integers, and store the results in "dst".

    Declaration
    public static v128 cvtepu32_epi64(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    v128

    cvtepu8_epi16(v128)

    Zero extend packed unsigned 8-bit integers in "a" to packed 16-bit integers, and store the results in "dst".

    Declaration
    public static v128 cvtepu8_epi16(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    v128

    cvtepu8_epi32(v128)

    Zero extend packed unsigned 8-bit integers in "a" to packed 32-bit integers, and store the results in "dst".

    Declaration
    public static v128 cvtepu8_epi32(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    v128

    cvtepu8_epi64(v128)

    Zero extend packed unsigned 8-bit integers in the low 8 byte sof "a" to packed 64-bit integers, and store the results in "dst".

    Declaration
    public static v128 cvtepu8_epi64(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    v128

    dp_pd(v128, v128, Int32)

    Conditionally multiply the packed double-precision (64-bit) floating-point elements in "a" and "b" using the high 4 bits in "imm8", sum the four products, and conditionally store the sum in "dst" using the low 4 bits of "imm8".

    Declaration
    public static v128 dp_pd(v128 a, v128 b, int imm8)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Int32 imm8
    Returns
    Type Description
    v128

    dp_ps(v128, v128, Int32)

    Conditionally multiply the packed single-precision (32-bit) floating-point elements in "a" and "b" using the high 4 bits in "imm8", sum the four products, and conditionally store the sum in "dst" using the low 4 bits of "imm8".

    Declaration
    public static v128 dp_ps(v128 a, v128 b, int imm8)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Int32 imm8
    Returns
    Type Description
    v128

    extract_epi32(v128, Int32)

    Extract a 32-bit integer from "a", selected with "imm8", and store the result in "dst".

    Declaration
    public static int extract_epi32(v128 a, int imm8)
    Parameters
    Type Name Description
    v128 a
    Int32 imm8
    Returns
    Type Description
    Int32

    extract_epi64(v128, Int32)

    Extract a 64-bit integer from "a", selected with "imm8", and store the result in "dst".

    Declaration
    public static long extract_epi64(v128 a, int imm8)
    Parameters
    Type Name Description
    v128 a
    Int32 imm8
    Returns
    Type Description
    Int64

    extract_epi8(v128, Int32)

    Extract an 8-bit integer from "a", selected with "imm8", and store the result in the lower element of "dst".

    Declaration
    public static byte extract_epi8(v128 a, int imm8)
    Parameters
    Type Name Description
    v128 a
    Int32 imm8
    Returns
    Type Description
    Byte

    extract_ps(v128, Int32)

    Extract a single-precision (32-bit) floating-point element from "a", selected with "imm8", and store the result in "dst".

    Declaration
    public static int extract_ps(v128 a, int imm8)
    Parameters
    Type Name Description
    v128 a
    Int32 imm8
    Returns
    Type Description
    Int32

    extractf_ps(v128, Int32)

    Extract a single-precision (32-bit) floating-point element from "a", selected with "imm8", and store the result in "dst" (as a float).

    Declaration
    public static float extractf_ps(v128 a, int imm8)
    Parameters
    Type Name Description
    v128 a
    Int32 imm8
    Returns
    Type Description
    Single

    floor_pd(v128)

    Round the packed double-precision (64-bit) floating-point elements in "a" down to an integer value, and store the results as packed double-precision floating-point elements in "dst".

    Declaration
    public static v128 floor_pd(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    v128

    floor_ps(v128)

    Round the packed single-precision (32-bit) floating-point elements in "a" down to an integer value, and store the results as packed single-precision floating-point elements in "dst".

    Declaration
    public static v128 floor_ps(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    v128

    floor_sd(v128, v128)

    Round the lower double-precision (64-bit) floating-point element in "b" down to an integer value, store the result as a double-precision floating-point element in the lower element of "dst", and copy the upper element from "a" to the upper element of "dst".

    Declaration
    public static v128 floor_sd(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    v128

    floor_ss(v128, v128)

    Round the lower single-precision (32-bit) floating-point element in "b" down to an integer value, store the result as a single-precision floating-point element in the lower element of "dst", and copy the upper 3 packed elements from "a" to the upper elements of "dst".

    Declaration
    public static v128 floor_ss(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    v128

    insert_epi32(v128, Int32, Int32)

    Copy "a" to "dst", and insert the 32-bit integer "i" into "dst" at the location specified by "imm8".

    Declaration
    public static v128 insert_epi32(v128 a, int i, int imm8)
    Parameters
    Type Name Description
    v128 a
    Int32 i
    Int32 imm8
    Returns
    Type Description
    v128

    insert_epi64(v128, Int64, Int32)

    Copy "a" to "dst", and insert the 64-bit integer "i" into "dst" at the location specified by "imm8".

    Declaration
    public static v128 insert_epi64(v128 a, long i, int imm8)
    Parameters
    Type Name Description
    v128 a
    Int64 i
    Int32 imm8
    Returns
    Type Description
    v128

    insert_epi8(v128, Byte, Int32)

    Copy "a" to "dst", and insert the lower 8-bit integer from "i" into "dst" at the location specified by "imm8".

    Declaration
    public static v128 insert_epi8(v128 a, byte i, int imm8)
    Parameters
    Type Name Description
    v128 a
    Byte i
    Int32 imm8
    Returns
    Type Description
    v128

    insert_ps(v128, v128, Int32)

    Copy "a" to "tmp", then insert a single-precision (32-bit) floating-point element from "b" into "tmp" using the control in "imm8". Store "tmp" to "dst" using the mask in "imm8" (elements are zeroed out when the corresponding bit is set).

    Declaration
    public static v128 insert_ps(v128 a, v128 b, int imm8)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Int32 imm8
    Returns
    Type Description
    v128

    max_epi32(v128, v128)

    Compare packed 32-bit integers in "a" and "b", and store packed maximum values in "dst".

    Declaration
    public static v128 max_epi32(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    v128

    max_epi8(v128, v128)

    Compare packed 8-bit integers in "a" and "b", and store packed maximum values in "dst".

    Declaration
    public static v128 max_epi8(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    v128

    max_epu16(v128, v128)

    Compare packed unsigned 16-bit integers in "a" and "b", and store packed maximum values in "dst".

    Declaration
    public static v128 max_epu16(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    v128

    max_epu32(v128, v128)

    Compare packed unsigned 32-bit integers in "a" and "b", and store packed maximum values in "dst".

    Declaration
    public static v128 max_epu32(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    v128

    min_epi32(v128, v128)

    Compare packed 32-bit integers in "a" and "b", and store packed minimum values in "dst".

    Declaration
    public static v128 min_epi32(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    v128

    min_epi8(v128, v128)

    Compare packed 8-bit integers in "a" and "b", and store packed minimum values in "dst".

    Declaration
    public static v128 min_epi8(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    v128

    min_epu16(v128, v128)

    Compare packed unsigned 16-bit integers in "a" and "b", and store packed minimum values in "dst".

    Declaration
    public static v128 min_epu16(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    v128

    min_epu32(v128, v128)

    Compare packed unsigned 32-bit integers in "a" and "b", and store packed minimum values in "dst".

    Declaration
    public static v128 min_epu32(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    v128

    minpos_epu16(v128)

    Horizontally compute the minimum amongst the packed unsigned 16-bit integers in "a", store the minimum and index in "dst", and zero the remaining bits in "dst".

    Declaration
    public static v128 minpos_epu16(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    v128

    MK_INSERTPS_NDX(Int32, Int32, Int32)

    Helper macro to create index-parameter value for insert_ps

    Declaration
    public static int MK_INSERTPS_NDX(int srcField, int dstField, int zeroMask)
    Parameters
    Type Name Description
    Int32 srcField
    Int32 dstField
    Int32 zeroMask
    Returns
    Type Description
    Int32

    mpsadbw_epu8(v128, v128, Int32)

    Compute the sum of absolute differences (SADs) of quadruplets of unsigned 8-bit integers in "a" compared to those in "b", and store the 16-bit results in "dst".

    Declaration
    public static v128 mpsadbw_epu8(v128 a, v128 b, int imm8)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Int32 imm8
    Returns
    Type Description
    v128
    Remarks

    Eight SADs are performed using one quadruplet from "b" and eight quadruplets from "a". One quadruplet is selected from "b" starting at on the offset specified in "imm8". Eight quadruplets are formed from sequential 8-bit integers selected from "a" starting at the offset specified in "imm8".

    mul_epi32(v128, v128)

    Multiply the low 32-bit integers from each packed 64-bit element in "a" and "b", and store the signed 64-bit results in "dst".

    Declaration
    public static v128 mul_epi32(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    v128

    mullo_epi32(v128, v128)

    Multiply the packed 32-bit integers in "a" and "b", producing intermediate 64-bit integers, and store the low 32 bits of the intermediate integers in "dst".

    Declaration
    public static v128 mullo_epi32(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    v128

    packus_epi32(v128, v128)

    Convert packed 32-bit integers from "a" and "b" to packed 16-bit integers using unsigned saturation, and store the results in "dst".

    Declaration
    public static v128 packus_epi32(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    v128

    round_pd(v128, Int32)

    Round the packed double-precision (64-bit) floating-point elements in "a" using the "rounding" parameter, and store the results as packed double-precision floating-point elements in "dst".

    Declaration
    public static v128 round_pd(v128 a, int rounding)
    Parameters
    Type Name Description
    v128 a
    Int32 rounding
    Returns
    Type Description
    v128

    round_ps(v128, Int32)

    Round the packed single-precision (32-bit) floating-point elements in "a" using the "rounding" parameter, and store the results as packed single-precision floating-point elements in "dst".

    Declaration
    public static v128 round_ps(v128 a, int rounding)
    Parameters
    Type Name Description
    v128 a
    Int32 rounding
    Returns
    Type Description
    v128

    round_sd(v128, v128, Int32)

    Round the lower double-precision (64-bit) floating-point element in "b" using the "rounding" parameter, store the result as a double-precision floating-point element in the lower element of "dst", and copy the upper element from "a" to the upper element of "dst".

    Declaration
    public static v128 round_sd(v128 a, v128 b, int rounding)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Int32 rounding
    Returns
    Type Description
    v128

    round_ss(v128, v128, Int32)

    Round the lower single-precision (32-bit) floating-point element in "b" using the "rounding" parameter, store the result as a single-precision floating-point element in the lower element of "dst", and copy the upper 3 packed elements from "a" to the upper elements of "dst".

    Declaration
    public static v128 round_ss(v128 a, v128 b, int rounding)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Int32 rounding
    Returns
    Type Description
    v128

    stream_load_si128(Void*)

    Load 128-bits of integer data from memory into dst using a non-temporal memory hint. mem_addr must be aligned on a 16-byte boundary or a general-protection exception may be generated.

    Declaration
    public static v128 stream_load_si128(void *mem_addr)
    Parameters
    Type Name Description
    Void* mem_addr
    Returns
    Type Description
    v128

    test_all_ones(v128)

    Compute the bitwise NOT of "a" and then AND with a 128-bit vector containing all 1's, and return 1 if the result is zero, otherwise return 0.>

    Declaration
    public static int test_all_ones(v128 a)
    Parameters
    Type Name Description
    v128 a
    Returns
    Type Description
    Int32

    test_all_zeros(v128, v128)

    Compute the bitwise AND of 128 bits (representing integer data) in "a" and "mask", and return 1 if the result is zero, otherwise return 0.

    Declaration
    public static int test_all_zeros(v128 a, v128 mask)
    Parameters
    Type Name Description
    v128 a
    v128 mask
    Returns
    Type Description
    Int32

    test_mix_ones_zeroes(v128, v128)

    Compute the bitwise AND of 128 bits (representing integer data) in "a" and "mask", and set "ZF" to 1 if the result is zero, otherwise set "ZF" to 0. Compute the bitwise NOT of "a" and then AND with "mask", and set "CF" to 1 if the result is zero, otherwise set "CF" to 0. Return 1 if both the "ZF" and "CF" values are zero, otherwise return 0.

    Declaration
    public static int test_mix_ones_zeroes(v128 a, v128 mask)
    Parameters
    Type Name Description
    v128 a
    v128 mask
    Returns
    Type Description
    Int32

    testc_si128(v128, v128)

    Compute the bitwise AND of 128 bits (representing integer data) in "a" and "b", and set "ZF" to 1 if the result is zero, otherwise set "ZF" to 0. Compute the bitwise NOT of "a" and then AND with "b", and set "CF" to 1 if the result is zero, otherwise set "CF" to 0. Return the "CF" value.

    Declaration
    public static int testc_si128(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    Int32

    testnzc_si128(v128, v128)

    Compute the bitwise AND of 128 bits (representing integer data) in "a" and "b", and set "ZF" to 1 if the result is zero, otherwise set "ZF" to 0. Compute the bitwise NOT of "a" and then AND with "b", and set "CF" to 1 if the result is zero, otherwise set "CF" to 0. Return 1 if both the "ZF" and "CF" values are zero, otherwise return 0.

    Declaration
    public static int testnzc_si128(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    Int32

    testz_si128(v128, v128)

    Compute the bitwise AND of 128 bits (representing integer data) in "a" and "b", and set "ZF" to 1 if the result is zero, otherwise set "ZF" to 0. Compute the bitwise NOT of "a" and then AND with "b", and set "CF" to 1 if the result is zero, otherwise set "CF" to 0. Return the "ZF" value.

    Declaration
    public static int testz_si128(v128 a, v128 b)
    Parameters
    Type Name Description
    v128 a
    v128 b
    Returns
    Type Description
    Int32
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023