Skip to content

Commit b95a187

Browse files
committed
Temp remove subscript.
1 parent a94843c commit b95a187

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

stdlib/public/core/SIMDVectorTypes.swift.gyb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ public struct SIMD${n}<Scalar>: SIMD where Scalar: SIMDScalar {
4545
}
4646

4747
/// Accesses the scalar at the specified position.
48+
@differentiable(vjp: _vjpSubscript
49+
where Scalar : EuclideanDifferentiable & BinaryFloatingPoint,
50+
Scalar.TangentVector : BinaryFloatingPoint)
4851
public subscript(index: Int) -> Scalar {
4952
@_transparent get {
5053
_precondition(indices.contains(index))
@@ -203,9 +206,8 @@ extension SIMD${n}
203206
where Scalar : EuclideanDifferentiable & BinaryFloatingPoint,
204207
Scalar.TangentVector : BinaryFloatingPoint {
205208
@usableFromInline
206-
@derivative(of: subscript(index:))
207209
internal func _vjpSubscript(index: Int)
208-
-> (value: Scalar, pullback: (Scalar.TangentVector) -> TangentVector) {
210+
-> (Scalar, (Scalar.TangentVector) -> TangentVector) {
209211
return (self[index], { v in
210212
var zeros = Self.zero
211213
zeros[index] = Scalar(v)

0 commit comments

Comments
 (0)