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

# SIMD Implementations

## Topics

### Operators

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[`static func &-= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD4/&-=(_:_:)-534my)

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

[`static func &= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD4/&=(_:_:)-5858j)

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

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

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

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

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

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

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

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

[`static func &>>= (inout Self, Self.Scalar)`](/documentation/Swift/SIMD4/&__=(_:_:)-38btv)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[`static func + (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD4/+(_:_:)-842lq)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[`static func .== (Self, Self) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD4/.==(_:_:)-862bq)

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

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

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

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

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

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

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

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

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

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

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

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

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

[`static func .>= (Self.Scalar, Self) -> SIMDMask<Self.MaskStorage>`](/documentation/Swift/SIMD4/._=(_:_:)-136h6)

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

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

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/SIMD4/._=(_:_:)-3m2gb)

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

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

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/SIMD4/._=(_:_:)-5k06k)

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/SIMD4/._=(_:_:)-9pb8l)

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

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

Returns a Boolean value indicating whether two vectors are equal.

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

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

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

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

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

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

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

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

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

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

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

[`static func % (Self.Scalar, Self) -> Self`](/documentation/Swift/SIMD4/_(_:_:)-907nj)

[`static func / (Self, Self) -> Self`](/documentation/Swift/SIMD4/_(_:_:)-93465)

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

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

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

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

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

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

[`static func %= (inout Self, Self)`](/documentation/Swift/SIMD4/_=(_:_:)-72383)

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

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

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

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

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

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

### Initializers

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

Creates a vector from the given sequence.

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

Creates a vector from the specified elements.

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

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

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

A vector with the specified scalar in all lanes.

### Instance Properties

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

A textual description of the vector.

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

The valid indices for subscripting the vector.

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

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

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

### Instance Methods

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Hashes the elements of the vector using the given hasher.

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

The greatest element in the vector.

[`func max() -> Self.Scalar`](/documentation/Swift/SIMD4/max()-xww7)

The greatest scalar in the vector.

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

The least scalar in the vector.

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

The least element in the vector.

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

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/SIMD4/replace(with:where:)-7yqkl)

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/SIMD4/replacing(with:where:)-32h18)

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/SIMD4/replacing(with:where:)-3o8ie)

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

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

[`func rounded(FloatingPointRoundingRule) -> Self`](/documentation/Swift/SIMD4/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/SIMD4/squareRoot())

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

The sum of the scalars in the vector.

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

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

### Type Properties

[`static var one: Self`](/documentation/Swift/SIMD4/one-1ghcj)

A vector with one in all lanes.

[`static var one: Self`](/documentation/Swift/SIMD4/one-7ejbf)

A vector with one in all lanes.

[`static var zero: Self`](/documentation/Swift/SIMD4/zero-1xe4n)

A vector with zero in all lanes.

[`static var zero: Self`](/documentation/Swift/SIMD4/zero-6rkq8)

A vector with zero in all lanes.

### Type Methods

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

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

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

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/SIMD4/random(in:using:)-6da4k)

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/SIMD4/random(in:using:)-7x9mr)

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)