A vector of three scalar values.
SDK
- Xcode 10.2+
Framework
- Swift Standard Library
Declaration
@frozen struct SIMD3<Scalar> where Scalar : SIMDScalar
A vector of three scalar values.
SDK
Framework
@frozen struct SIMD3<Scalar> where Scalar : SIMDScalar
typealias SIMD3.ArrayLiteralElement The type of the elements of an array literal.
typealias SIMD3.MaskStorage The mask type resulting from pointwise comparisons of this vector type.
init()Creates a vector with zero in all lanes.
init<S>(S)Creates a vector from the given sequence.
init<Other>(SIMD3<Other>)Creates a new vector from the given vector of floating-point values.
init<Other>(SIMD3<Other>)Creates a new vector from the given vector of integers.
init(SIMD2<Scalar>, Scalar)A three-element vector created by appending a scalar to a two-element vector.
init(Scalar, Scalar, Scalar)Creates a new vector from the given elements.
init<Other>(SIMD3<Other>, rounding: FloatingPointRoundingRule) Creates a new vector from the given vector, rounding the given vector’s of elements using the specified rounding rule.
init(arrayLiteral : Scalar...)Creates a vector from the specified elements.
init<Other>(clamping: SIMD3<Other>)Creates a new vector from the given vector, clamping the values of the given vector’s elements if necessary.
init(from: Decoder)Creates a new vector by decoding scalars from the given decoder.
init(repeating: Scalar)A vector with the specified value in all lanes.
init<Other>(truncatingIfNeeded : SIMD3<Other>)Creates a new vector from the given vector, truncating the bit patterns of the given vector’s elements if necessary.
init(x: Scalar, y: Scalar, z: Scalar)Creates a new vector from the given elements.
var debugDescription : StringA textual representation of this instance, suitable for debugging.
var description: StringA textual description of the vector.
var hashValue : IntThe hash value.
var indices: Range<Int>The valid indices for subscripting the vector.
var scalarCount : IntThe number of scalars in the vector.
var x: ScalarThe first element of the vector.
var y: ScalarThe second element of the vector.
var z: ScalarThe third element of the vector.
static var one: SIMD3<Scalar>A vector with one in all lanes.
static var one: SIMD3<Scalar>A vector with one in all lanes.
static var scalarCount : IntThe number of scalars, or elements, in a vector of this type.
static var zero: SIMD3<Scalar>A vector with zero in all lanes.
static var zero: SIMD3<Scalar>A vector with zero in all lanes.
func encode(to: Encoder)Encodes the scalars of this vector into the given encoder in an unkeyed container.
func hash(into: inout Hasher)Hashes the elements of the vector using the given hasher.
func max() -> ScalarReturns the greatest scalar in the vector.
func max() -> ScalarThe greatest element in the vector.
func min() -> ScalarReturns the least scalar in the vector.
func min() -> ScalarThe least element in the vector.
func replace(with: Scalar, where: SIMDMask<SIMD3<Scalar.SIMDMaskScalar>>) Replaces elements of this vector with other in the lanes where mask is true.
func replace(with: SIMD3<Scalar>, where: SIMDMask<SIMD3<Scalar.SIMDMaskScalar>>) Replaces elements of this vector with elements of other in the lanes where mask is true.
func replacing(with: Scalar, where: SIMDMask<SIMD3<Scalar.SIMDMaskScalar>>) -> SIMD3<Scalar> Returns a copy of this vector, with elements other in the lanes where mask is true.
func replacing(with: SIMD3<Scalar>, where: SIMDMask<SIMD3<Scalar.SIMDMaskScalar>>) -> SIMD3<Scalar> Returns a copy of this vector, with elements replaced by elements of other in the lanes where mask is true.
func sum() -> ScalarReturns the sum of the scalars in the vector.
func wrappedSum () -> ScalarReturns the sum of the scalars in the vector, computed with wrapping addition.
static func random(in: ClosedRange<Scalar>) -> SIMD3<Scalar> Returns a vector with random values from within the specified range in all lanes.
static func random(in: Range<Scalar>) -> SIMD3<Scalar>Returns a vector with random values from within the specified range in all lanes.
static func random(in: ClosedRange<Scalar>) -> SIMD3<Scalar> Returns a vector with random values from within the specified range in all lanes.
static func random(in: Range<Scalar>) -> SIMD3<Scalar>Returns a vector with random values from within the specified range in all lanes.
static func random<T>(in: ClosedRange<Scalar>, using: inout T) -> SIMD3<Scalar>Returns a vector with random values from within the specified range in all lanes, using the given generator as a source for randomness.
static func random<T>(in: Range<Scalar>, using: inout T) -> SIMD3<Scalar>Returns a vector with random values from within the specified range in all lanes, using the given generator as a source for randomness.
static func random<T>(in: ClosedRange<Scalar>, using: inout T) -> SIMD3<Scalar>Returns a vector with random values from within the specified range in all lanes, using the given generator as a source for randomness.
static func random<T>(in: Range<Scalar>, using: inout T) -> SIMD3<Scalar>Returns a vector with random values from within the specified range in all lanes, using the given generator as a source for randomness.
subscript(Int) -> ScalarAccesses the scalar at the specified position.
subscript<Index>(SIMD2<Index>) -> SIMD2<Scalar>Extracts the scalars at specified indices to form a SIMD2.
subscript<Index>(SIMD3<Index>) -> SIMD3<Scalar>Extracts the scalars at specified indices to form a SIMD3.
subscript<Index>(SIMD4<Index>) -> SIMD4<Scalar>Extracts the scalars at specified indices to form a SIMD4.
subscript<Index>(SIMD8<Index>) -> SIMD8<Scalar>Extracts the scalars at specified indices to form a SIMD8.
subscript<Index>(SIMD16<Index>) -> SIMD16<Scalar>Extracts the scalars at specified indices to form a SIMD16.
subscript<Index>(SIMD32<Index>) -> SIMD32<Scalar>Extracts the scalars at specified indices to form a SIMD32.
subscript<Index>(SIMD64<Index>) -> SIMD64<Scalar>Extracts the scalars at specified indices to form a SIMD64.
static func .!= (Scalar, SIMD3<Scalar>) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise inequality comparison.
static func .!= (SIMD3<Scalar>, Scalar) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise inequality comparison.
static func .!= (SIMD3<Scalar>, SIMD3<Scalar>) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise inequality comparison.
static func .< (Scalar, SIMD3<Scalar>) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise less than comparison.
static func .< (SIMD3<Scalar>, Scalar) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise less than comparison.
static func .< (SIMD3<Scalar>, SIMD3<Scalar>) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise less than comparison.
static func .<= (Scalar, SIMD3<Scalar>) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise less than or equal comparison.
static func .<= (SIMD3<Scalar>, Scalar) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise less than or equal comparison.
static func .<= (SIMD3<Scalar>, SIMD3<Scalar>) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise less than or equal comparison.
static func .== (Scalar, SIMD3<Scalar>) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise equality comparison.
static func .== (SIMD3<Scalar>, Scalar) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise equality comparison.
static func .== (SIMD3<Scalar>, SIMD3<Scalar>) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise equality comparison.
static func .> (Scalar, SIMD3<Scalar>) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise greater than comparison.
static func .> (SIMD3<Scalar>, Scalar) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise greater than comparison.
static func .> (SIMD3<Scalar>, SIMD3<Scalar>) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise greater than comparison.
static func .>= (Scalar, SIMD3<Scalar>) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise greater than or equal comparison.
static func .>= (SIMD3<Scalar>, Scalar) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise greater than or equal comparison.
static func .>= (SIMD3<Scalar>, SIMD3<Scalar>) -> SIMDMask<SIMD3<Scalar.SIMDMaskScalar>> Returns a vector mask with the result of a pointwise greater than or equal comparison.
static func == (SIMD3<Scalar>, SIMD3<Scalar>) -> BoolReturns a Boolean value indicating whether two vectors are equal.
struct SIMD2A vector of two scalar values.
struct SIMD4A vector of four scalar values.
struct SIMD8A vector of eight scalar values.
struct SIMD16A vector of 16 scalar values.
struct SIMD32A vector of 32 scalar values.
struct SIMD64A vector of 64 scalar values.