Missing concrete builtin's vector operations for `SIMDN<Float>`?

Hi, I found SIMDN<Float> doesn't have concrete builtin's vector operations (+, -, *, /) that integers have

Is there any reason for this?
I think we can easily add these operations since builtin functions for these operations already exist. (fadd, fsub, fmul, fdiv)

like:

@_alwaysEmitIntoClient
public static func +(a: Self, b: Self) -> Self {
  Self(Builtin.fadd_${Builtin}(a._storage._value, b._storage._value))
}

currently SIMDN<Float> rely on auto vectorization right? I think it is not desirable.

The operations are defined on the SIMD protocol, not on the concrete SIMDn types themselves.

1 Like

Yes, as you said, there is protocol extension that define "scalar" operation in the actual source code of protocol SIMD. However, this implementation don't affect SIMD operations (without autovectorization).

For Integers, there is concrete builtin's vector operation like Builtin.add_Vec2Int8 for on SIMDConcreteOperations.swift.gyb. this implementation affect SIMD operations.

then, I couldn't find concrete builtin's vector operation for Float.