Merge pull request #114 from stephentyrone/remove-broken-derivative

The derivative of Complex.init(_:_:) is broken with the current Xcode
This commit is contained in:
Stephen Canon authored and GitHub committed 2020-05-01 08:53:16 -04:00
commit 52fa265ac9
1 file changed
-10
@@ -19,16 +19,6 @@ where RealType: Differentiable, RealType.TangentVector == RealType {
extension Complex
where RealType: Differentiable, RealType.TangentVector == RealType {
@derivative(of: init(_:_:))
@usableFromInline
static func _derivativeInit(
_ real: RealType,
_ imaginary: RealType
) -> (value: Complex, pullback: (Complex) -> (RealType, RealType)) {
(value: .init(real, imaginary), pullback: { v in
(v.real, v.imaginary)
})
}
@derivative(of: real)
@usableFromInline