-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
Labels
Description
Previous ID | SR-13167 |
Radar | rdar://problem/69987999 |
Original Reporter | @dan-zheng |
Type | Sub-task |
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Sub-task |
Assignee | None |
Priority | Medium |
md5: dc508f6543b2cdff61b1f36c59bd25d9
Parent-Task:
- SR-13166 Default derivative implementations for protocol requirements
Issue Description:
See relevant section from the differentiable programming manifesto: https://github.com/apple/swift/blob/master/docs/DifferentiableProgramming.md#default-derivatives-and-transposes.
The optional "default" component should appear after the optional "linear" component and before the optional "wrt:" clause.
The following ~fully elaborated @differentiable
attribute should parse and pass syntax testing (but doesn't type-check).
@differentiable(linear, default, wrt: (x, y) where T: FloatingPoint)
func foo<T>(_ x: T, _ y: T) -> T {}