Type Alias

simd_int2

A vector of two 32-bit signed integer values.

Declaration

typedef int __attribute__((ext_vector_type(2))) simd_int2;

Topics

Vector Creation Functions

simd_make_int2

Returns a new vector by truncating the specified vector.

simd_make_int2

Returns a new vector by truncating the specified vector.

simd_make_int2

Returns a new vector with the first element set to a scalar value, and other elements set to zero.

simd_make_int2

Returns a new vector from a two-element vector.

simd_make_int2

Returns a new vector from the first and second elements of a three-element vector.

simd_make_int2

Returns a new vector from the first and second elements of a four-element vector.

simd_make_int2

Returns a new vector from 2 scalar values.

simd_make_int2_undef

Returns a new vector with the first element set to a scalar value, and other elements undefined.

Common Functions

simd_abs

Returns the absolute value of each element in a vector.

simd_clamp

Returns each element in a vector clamped to a specified range.

simd_equal

Returns true if all elements of a vector are equal; false otherwise.

Reduce Functions

simd_reduce_add

Returns the sum of all elements in a vector.

simd_reduce_max

Returns the maximum value in a vector.

simd_reduce_min

Returns the minimum value in a vector.

Extrema Functions

simd_max

Returns the maximum value of each element in a vector.

simd_min

Returns the minimum value of each element in a vector.

Logic Functions

simd_any

Returns true if the high-order bit of any element is set; false otherwise.

simd_all

Returns true if the high-order bit of every element is set; false otherwise.

simd_bitselect

Returns a vector containing elements from either the first or second parameter, depending on the corresponding element in the third parameter.

See Also

Vectors: 32-Bit Signed Integer Values

simd_int3

A vector of three 32-bit signed integer values.

simd_int4

A vector of four 32-bit signed integer values.