indices
The valid indices for subscripting the vector.
var indices: Range<Int> { get }
The valid indices for subscripting the vector.
var indices: Range<Int> { get }
import Swift
protocol SIMD<Scalar> : CustomStringConvertible, Decodable, Encodable, ExpressibleByArrayLiteral, Hashable, SIMDStorage
A SIMD vector of a fixed number of elements.
@frozen struct Range<Bound> where Bound : Comparable
A half-open interval from a lower bound up to, but not including, an upper bound.
@frozen struct Int
A signed integer value type.
init<S>(_ scalars: S) where S : Sequence, Self.Scalar == S.Element
Creates a vector from the given sequence.
init(arrayLiteral scalars: Self.Scalar...)
Creates a vector from the specified elements.
init(from decoder: any Decoder) throws
Creates a new vector by decoding scalars from the given decoder.
init(repeating value: Self.Scalar)
A vector with the specified value in all lanes.
var description: String { get }
A textual description of the vector.
subscript<Index>(index: SIMD2<Index>) -> SIMD2<Self.Scalar> where Index : FixedWidthInteger, Index : SIMDScalar, Self.Scalar : SIMDScalar { get }
Extracts the scalars at specified indices to form a SIMD2.
subscript<Index>(index: SIMD3<Index>) -> SIMD3<Self.Scalar> where Index : FixedWidthInteger, Index : SIMDScalar, Self.Scalar : SIMDScalar { get }
Extracts the scalars at specified indices to form a SIMD3.
subscript<Index>(index: SIMD4<Index>) -> SIMD4<Self.Scalar> where Index : FixedWidthInteger, Index : SIMDScalar, Self.Scalar : SIMDScalar { get }
Extracts the scalars at specified indices to form a SIMD4.
subscript<Index>(index: SIMD8<Index>) -> SIMD8<Self.Scalar> where Index : FixedWidthInteger, Index : SIMDScalar, Self.Scalar : SIMDScalar { get }
Extracts the scalars at specified indices to form a SIMD8.
subscript<Index>(index: SIMD16<Index>) -> SIMD16<Self.Scalar> where Index : FixedWidthInteger, Index : SIMDScalar, Self.Scalar : SIMDScalar { get }
Extracts the scalars at specified indices to form a SIMD16.
subscript<Index>(index: SIMD32<Index>) -> SIMD32<Self.Scalar> where Index : FixedWidthInteger, Index : SIMDScalar, Self.Scalar : SIMDScalar { get }
Extracts the scalars at specified indices to form a SIMD32.
subscript<Index>(index: SIMD64<Index>) -> SIMD64<Self.Scalar> where Index : FixedWidthInteger, Index : SIMDScalar, Self.Scalar : SIMDScalar { get }
Extracts the scalars at specified indices to form a SIMD64.
static func .!= (a: Self.Scalar, b: Self) -> SIMDMask<Self.MaskStorage>
Returns a vector mask with the result of a pointwise inequality comparison.
static func .!= (a: Self, b: Self.Scalar) -> SIMDMask<Self.MaskStorage>
Returns a vector mask with the result of a pointwise inequality comparison.
static func .!= (a: Self, b: Self) -> SIMDMask<Self.MaskStorage>
A vector mask with the result of a pointwise inequality comparison.
static func .== (a: Self.Scalar, b: Self) -> SIMDMask<Self.MaskStorage>
Returns a vector mask with the result of a pointwise equality comparison.
static func .== (a: Self, b: Self.Scalar) -> SIMDMask<Self.MaskStorage>
Returns a vector mask with the result of a pointwise equality comparison.
static func .== (a: Self, b: Self) -> SIMDMask<Self.MaskStorage>
A vector mask with the result of a pointwise equality comparison.
static func == (a: Self, b: Self) -> Bool
Returns a Boolean value indicating whether two vectors are equal.
func encode(to encoder: any Encoder) throws
Encodes the scalars of this vector into the given encoder in an unkeyed container.
func hash(into hasher: inout Hasher)
Hashes the elements of the vector using the given hasher.
mutating func replace(with other: Self.Scalar, where mask: SIMDMask<Self.MaskStorage>)
Replaces elements of this vector with other
in the lanes where mask
is true
.
mutating func replace(with other: Self, where mask: SIMDMask<Self.MaskStorage>)
Replaces elements of this vector with elements of other
in the lanes where mask
is true
.
func replacing(with other: Self.Scalar, where mask: SIMDMask<Self.MaskStorage>) -> Self
Returns a copy of this vector, with elements other
in the lanes where mask
is true
.
func replacing(with other: Self, where mask: SIMDMask<Self.MaskStorage>) -> Self
Returns a copy of this vector, with elements replaced by elements of other
in the lanes where mask
is true
.