File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,6 @@ public struct SIMD${n}<Scalar>: SIMD where Scalar: SIMDScalar {
45
45
}
46
46
47
47
/// Accesses the scalar at the specified position.
48
- @differentiable ( vjp: _vjpSubscript
49
- where Scalar : EuclideanDifferentiable & BinaryFloatingPoint,
50
- Scalar . TangentVector : BinaryFloatingPoint)
51
48
public subscript( index: Int) - > Scalar {
52
49
@_transparent get {
53
50
_precondition ( indices. contains ( index) )
@@ -206,8 +203,9 @@ extension SIMD${n}
206
203
where Scalar : EuclideanDifferentiable & BinaryFloatingPoint,
207
204
Scalar . TangentVector : BinaryFloatingPoint {
208
205
@usableFromInline
206
+ @derivative ( of: subscript ( index: ) )
209
207
internal func _vjpSubscript( index: Int )
210
- -> ( Scalar , ( Scalar . TangentVector ) -> TangentVector ) {
208
+ -> ( value : Scalar , pullback : ( Scalar . TangentVector ) -> TangentVector ) {
211
209
return ( self [ index] , { v in
212
210
var zeros = Self . zero
213
211
zeros [ index] = Scalar ( v)
You can’t perform that action at this time.
0 commit comments