<!--
{
  "documentType" : "article",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/SIMD2/SIMD-Implementations",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "SIMD Implementations"
}
-->

# SIMD Implementations

## Topics

### Operators

[`static func & (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/&(_:_:)-5sluq)

[`static func & (Self, Self) -> Self`](/documentation/Swift/SIMD2/&(_:_:)-6dank)

[`static func & (Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/&(_:_:)-9cv9t)

[`static func &* (Self, Self) -> Self`](/documentation/Swift/SIMD2/&*(_:_:)-1tpsv)

[`static func &* (Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/&*(_:_:)-2uia9)

[`static func &* (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/&*(_:_:)-9lr3o)

[`static func &*= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD2/&*=(_:_:)-4n268)

[`static func &*= (inout Self, Self)`](/documentation/Swift/SIMD2/&*=(_:_:)-4ua1o)

[`static func &+ (Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/&+(_:_:)-5jg3m)

[`static func &+ (Self, Self) -> Self`](/documentation/Swift/SIMD2/&+(_:_:)-6qrmu)

[`static func &+ (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/&+(_:_:)-s654)

[`static func &+= (inout Self, Self)`](/documentation/Swift/SIMD2/&+=(_:_:)-15hks)

[`static func &+= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD2/&+=(_:_:)-xnu7)

[`static func &- (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/&-(_:_:)-4tntq)

[`static func &- (Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/&-(_:_:)-6usy6)

[`static func &- (Self, Self) -> Self`](/documentation/Swift/SIMD2/&-(_:_:)-8tchg)

[`static func &-= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD2/&-=(_:_:)-5340e)

[`static func &-= (inout Self, Self)`](/documentation/Swift/SIMD2/&-=(_:_:)-8d2hj)

[`static func &= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD2/&=(_:_:)-583dj)

[`static func &= (inout Self, Self)`](/documentation/Swift/SIMD2/&=(_:_:)-5a7qw)

[`static func &<< (Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/&__(_:_:)-1cf7o)

[`static func &>> (Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/&__(_:_:)-8w3q6)

[`static func &<< (Self, Self) -> Self`](/documentation/Swift/SIMD2/&__(_:_:)-92xzu)

[`static func &<< (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/&__(_:_:)-9j2fk)

[`static func &>> (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/&__(_:_:)-inkq)

[`static func &>> (Self, Self) -> Self`](/documentation/Swift/SIMD2/&__(_:_:)-onf6)

[`static func &>>= (inout Self, Self)`](/documentation/Swift/SIMD2/&__=(_:_:)-2n0zi)

[`static func &>>= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD2/&__=(_:_:)-389yv)

[`static func &<<= (inout Self, Self)`](/documentation/Swift/SIMD2/&__=(_:_:)-7dkm4)

[`static func &<<= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD2/&__=(_:_:)-83fbl)

[`static func * (Self, Self) -> Self`](/documentation/Swift/SIMD2/*(_:_:)-2hwhr)

[`static func * (Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/*(_:_:)-4cbci)

[`static func * (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/*(_:_:)-4lojf)

[`static func * (Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/*(_:_:)-50ffc)

[`static func * (Self, Self) -> Self`](/documentation/Swift/SIMD2/*(_:_:)-6ktum)

[`static func * (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/*(_:_:)-9wp8w)

[`static func *= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD2/*=(_:_:)-27nt8)

[`static func *= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD2/*=(_:_:)-3zjz6)

[`static func *= (inout Self, Self)`](/documentation/Swift/SIMD2/*=(_:_:)-4j02f)

[`static func *= (inout Self, Self)`](/documentation/Swift/SIMD2/*=(_:_:)-5qufm)

[`static func + (Self, Self) -> Self`](/documentation/Swift/SIMD2/+(_:_:)-1h79f)

[`static func + (Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/+(_:_:)-1s6ev)

[`static func + (Self, Self) -> Self`](/documentation/Swift/SIMD2/+(_:_:)-2begd)

[`static func + (Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/+(_:_:)-62pyv)

[`static func + (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/+(_:_:)-844oq)

[`static func + (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/+(_:_:)-9w9bt)

[`static func += (inout Self, Self)`](/documentation/Swift/SIMD2/+=(_:_:)-13ati)

[`static func += (inout Self, Self.Scalar)`](/documentation/Swift/SIMD2/+=(_:_:)-33g1r)

[`static func += (inout Self, Self.Scalar)`](/documentation/Swift/SIMD2/+=(_:_:)-3it33)

[`static func += (inout Self, Self)`](/documentation/Swift/SIMD2/+=(_:_:)-4kf28)

[`static func - (Self) -> Self`](/documentation/Swift/SIMD2/-(_:))

[`static func - (Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/-(_:_:)-1eq67)

[`static func - (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/-(_:_:)-59t7d)

[`static func - (Self, Self) -> Self`](/documentation/Swift/SIMD2/-(_:_:)-5hv3b)

[`static func - (Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/-(_:_:)-5rbq2)

[`static func - (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/-(_:_:)-8pa31)

[`static func - (Self, Self) -> Self`](/documentation/Swift/SIMD2/-(_:_:)-8vsnc)

[`static func -= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD2/-=(_:_:)-5eiqo)

[`static func -= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD2/-=(_:_:)-6au1l)

[`static func -= (inout Self, Self)`](/documentation/Swift/SIMD2/-=(_:_:)-8oyin)

[`static func -= (inout Self, Self)`](/documentation/Swift/SIMD2/-=(_:_:)-90e80)

[`static func .!= (Self.Scalar, Self) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/.!=(_:_:)-1o5rd)

Returns a vector mask with the result of a pointwise inequality comparison.

[`static func .!= (Self, Self.Scalar) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/.!=(_:_:)-5ko8d)

Returns a vector mask with the result of a pointwise inequality comparison.

[`static func .!= (Self, Self) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/.!=(_:_:)-70n1x)

A vector mask with the result of a pointwise inequality comparison.

[`static func .== (Self.Scalar, Self) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/.==(_:_:)-1q06g)

Returns a vector mask with the result of a pointwise equality comparison.

[`static func .== (Self, Self.Scalar) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/.==(_:_:)-4dd4z)

Returns a vector mask with the result of a pointwise equality comparison.

[`static func .== (Self, Self) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/.==(_:_:)-860hm)

A vector mask with the result of a pointwise equality comparison.

[`static func .< (Self.Scalar, Self) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/._(_:_:)-2n2w2)

Returns a vector mask with the result of a pointwise less than comparison.

[`static func .> (Self.Scalar, Self) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/._(_:_:)-3inug)

Returns a vector mask with the result of a pointwise greater than
comparison.

[`static func .< (Self, Self.Scalar) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/._(_:_:)-49wsu)

Returns a vector mask with the result of a pointwise less than comparison.

[`static func .< (Self, Self) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/._(_:_:)-5ldki)

Returns a vector mask with the result of a pointwise less than
comparison.

[`static func .> (Self, Self) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/._(_:_:)-5wj3h)

Returns a vector mask with the result of a pointwise greater than
comparison.

[`static func .> (Self, Self.Scalar) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/._(_:_:)-6yov0)

Returns a vector mask with the result of a pointwise greater than
comparison.

[`static func .>= (Self.Scalar, Self) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/._=(_:_:)-134li)

Returns a vector mask with the result of a pointwise greater than or
equal comparison.

[`static func .<= (Self, Self) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/._=(_:_:)-1wtvs)

Returns a vector mask with the result of a pointwise less than or equal
comparison.

[`static func .<= (Self, Self.Scalar) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/._=(_:_:)-3m1tr)

Returns a vector mask with the result of a pointwise less than or equal
comparison.

[`static func .>= (Self, Self) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/._=(_:_:)-41ri2)

Returns a vector mask with the result of a pointwise greater than or
equal comparison.

[`static func .<= (Self.Scalar, Self) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/._=(_:_:)-5jyc4)

Returns a vector mask with the result of a pointwise less than or equal
comparison.

[`static func .>= (Self, Self.Scalar) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD2/._=(_:_:)-9pao5)

Returns a vector mask with the result of a pointwise greater than or
equal comparison.

[`static func == (Self, Self) -> Bool`](/documentation/Swift/SIMD2/==(_:_:))

Returns a Boolean value indicating whether two vectors are equal.

[`static func | (Self, Self) -> Self`](/documentation/Swift/SIMD2/_(_:_:)-1t3qy)

[`static func / (Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/_(_:_:)-2nvzq)

[`static func / (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/_(_:_:)-2o8h3)

[`static func % (Self, Self) -> Self`](/documentation/Swift/SIMD2/_(_:_:)-2sk6v)

[`static func / (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/_(_:_:)-2zahy)

[`static func | (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/_(_:_:)-3pc04)

[`static func / (Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/_(_:_:)-3vp33)

[`static func ^ (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/_(_:_:)-6f29q)

[`static func ^ (Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/_(_:_:)-6ftk7)

[`static func ^ (Self, Self) -> Self`](/documentation/Swift/SIMD2/_(_:_:)-7veum)

[`static func | (Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/_(_:_:)-7vid)

[`static func % (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/_(_:_:)-905lf)

[`static func / (Self, Self) -> Self`](/documentation/Swift/SIMD2/_(_:_:)-935ut)

[`static func % (Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/_(_:_:)-9i1cd)

[`static func / (Self, Self) -> Self`](/documentation/Swift/SIMD2/_(_:_:)-9ino5)

[`static func /= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD2/_=(_:_:)-18kdt)

[`static func |= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD2/_=(_:_:)-1tfgs)

[`static func /= (inout Self, Self)`](/documentation/Swift/SIMD2/_=(_:_:)-5c1gt)

[`static func |= (inout Self, Self)`](/documentation/Swift/SIMD2/_=(_:_:)-6kfnu)

[`static func %= (inout Self, Self)`](/documentation/Swift/SIMD2/_=(_:_:)-723sn)

[`static func /= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD2/_=(_:_:)-7u42r)

[`static func ^= (inout Self, Self)`](/documentation/Swift/SIMD2/_=(_:_:)-8jvd9)

[`static func %= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD2/_=(_:_:)-9a0hy)

[`static func /= (inout Self, Self)`](/documentation/Swift/SIMD2/_=(_:_:)-9iwfe)

[`static func ^= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD2/_=(_:_:)-sxsf)

[`static func ~ (Self) -> Self`](/documentation/Swift/SIMD2/~(_:))

### Initializers

[`init<S>(S)`](/documentation/Swift/SIMD2/init(_:)-3f03w)

Creates a vector from the given sequence.

[`init(arrayLiteral: Self.Scalar...)`](/documentation/Swift/SIMD2/init(arrayLiteral:))

Creates a vector from the specified elements.

[`init(from: any Decoder) throws`](/documentation/Swift/SIMD2/init(from:))

Creates a new vector by decoding scalars from the given decoder.

[`init(repeating: Self.Scalar)`](/documentation/Swift/SIMD2/init(repeating:)-97uo4)

A vector with the specified scalar in all lanes.

### Instance Properties

[`var description: String`](/documentation/Swift/SIMD2/description)

A textual description of the vector.

[`var indices: Range<Int>`](/documentation/Swift/SIMD2/indices)

The valid indices for subscripting the vector.

[`var leadingZeroBitCount: Self`](/documentation/Swift/SIMD2/leadingZeroBitCount)

[`var nonzeroBitCount: Self`](/documentation/Swift/SIMD2/nonzeroBitCount)

[`var trailingZeroBitCount: Self`](/documentation/Swift/SIMD2/trailingZeroBitCount)

### Instance Methods

[`func addProduct(Self, Self)`](/documentation/Swift/SIMD2/addProduct(_:_:)-24o9x)

[`func addProduct(Self.Scalar, Self)`](/documentation/Swift/SIMD2/addProduct(_:_:)-48dp5)

[`func addProduct(Self, Self.Scalar)`](/documentation/Swift/SIMD2/addProduct(_:_:)-8hqkc)

[`func addingProduct(Self, Self.Scalar) -> Self`](/documentation/Swift/SIMD2/addingProduct(_:_:)-1nafl)

[`func addingProduct(Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD2/addingProduct(_:_:)-76tvc)

[`func addingProduct(Self, Self) -> Self`](/documentation/Swift/SIMD2/addingProduct(_:_:)-94rva)

[`func clamp(lowerBound: Self, upperBound: Self)`](/documentation/Swift/SIMD2/clamp(lowerBound:upperBound:)-77fvf)

[`func clamp(lowerBound: Self, upperBound: Self)`](/documentation/Swift/SIMD2/clamp(lowerBound:upperBound:)-9havh)

[`func clamped(lowerBound: Self, upperBound: Self) -> Self`](/documentation/Swift/SIMD2/clamped(lowerBound:upperBound:)-4qr0j)

[`func clamped(lowerBound: Self, upperBound: Self) -> Self`](/documentation/Swift/SIMD2/clamped(lowerBound:upperBound:)-8tjus)

[`func encode(to: any Encoder) throws`](/documentation/Swift/SIMD2/encode(to:))

Encodes the scalars of this vector into the given encoder in an unkeyed
container.

[`func formSquareRoot()`](/documentation/Swift/SIMD2/formSquareRoot())

[`func hash(into: inout Hasher)`](/documentation/Swift/SIMD2/hash(into:))

Hashes the elements of the vector using the given hasher.

[`func max() -> Self.Scalar`](/documentation/Swift/SIMD2/max()-71lal)

The greatest element in the vector.

[`func max() -> Self.Scalar`](/documentation/Swift/SIMD2/max()-xykz)

The greatest scalar in the vector.

[`func min() -> Self.Scalar`](/documentation/Swift/SIMD2/min()-7qoe7)

The least scalar in the vector.

[`func min() -> Self.Scalar`](/documentation/Swift/SIMD2/min()-8s2vo)

The least element in the vector.

[`func replace(with: Self, where: SIMDMask<Self.MaskStorage>)`](/documentation/Swift/SIMD2/replace(with:where:)-7e48m)

Replaces elements of this vector with elements of `other` in the lanes
where `mask` is `true`.

[`func replace(with: Self.Scalar, where: SIMDMask<Self.MaskStorage>)`](/documentation/Swift/SIMD2/replace(with:where:)-7yq25)

Replaces elements of this vector with `other` in the lanes where `mask`
is `true`.

[`func replacing(with: Self, where: SIMDMask<Self.MaskStorage>) -> Self`](/documentation/Swift/SIMD2/replacing(with:where:)-32hlo)

Returns a copy of this vector, with elements replaced by elements of
`other` in the lanes where `mask` is `true`.

[`func replacing(with: Self.Scalar, where: SIMDMask<Self.MaskStorage>) -> Self`](/documentation/Swift/SIMD2/replacing(with:where:)-3o6pm)

Returns a copy of this vector, with elements `other` in the lanes where
`mask` is `true`.

[`func round(FloatingPointRoundingRule)`](/documentation/Swift/SIMD2/round(_:))

[`func rounded(FloatingPointRoundingRule) -> Self`](/documentation/Swift/SIMD2/rounded(_:))

A vector formed by rounding each lane of the source vector to an integral
value according to the specified rounding `rule`.

[`func squareRoot() -> Self`](/documentation/Swift/SIMD2/squareRoot())

[`func sum() -> Self.Scalar`](/documentation/Swift/SIMD2/sum())

The sum of the scalars in the vector.

[`func wrappedSum() -> Self.Scalar`](/documentation/Swift/SIMD2/wrappedSum())

Returns the sum of the scalars in the vector, computed with wrapping
addition.

### Type Properties

[`static var one: Self`](/documentation/Swift/SIMD2/one-1gj1r)

A vector with one in all lanes.

[`static var one: Self`](/documentation/Swift/SIMD2/one-7ehgf)

A vector with one in all lanes.

[`static var zero: Self`](/documentation/Swift/SIMD2/zero-1xeqr)

A vector with zero in all lanes.

[`static var zero: Self`](/documentation/Swift/SIMD2/zero-6rme0)

A vector with zero in all lanes.

### Type Methods

[`static func random(in: ClosedRange<Self.Scalar>) -> Self`](/documentation/Swift/SIMD2/random(in:)-3wbi8)

Returns a vector with random values from within the specified range in
all lanes.

[`static func random(in: Range<Self.Scalar>) -> Self`](/documentation/Swift/SIMD2/random(in:)-6jji8)

Returns a vector with random values from within the specified range in
all lanes.

[`static func random<T>(in: ClosedRange<Self.Scalar>, using: inout T) -> Self`](/documentation/Swift/SIMD2/random(in:using:)-6dc38)

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<Self.Scalar>, using: inout T) -> Self`](/documentation/Swift/SIMD2/random(in:using:)-7xbgv)

Returns a vector with random values from within the specified range in
all lanes, using the given generator as a source for randomness.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)