You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Differentiation should include special support for property wrappers.
Synthesized TangentVector structs should include wrapped values' TangentVectors as stored properties.
todo: fill in details, update differentiable programming manifesto
Example:
import _Differentiation
@propertyWrapperstructWrapper<Value>{varwrappedValue:Value}// No `Differentiable` conformance should be necessary necessary:// extension Wrapper: Differentiable where Value: Differentiable {}structStruct{@Wrappervarx:Float=0// Compiler generates:// var _x: Wrapper<Float>// var x: Float {// get { _x.wrappedValue }// set { _x.wrappedValue = newValue }// }@Wrappervary:Float=1varz:Float=2}extensionStruct:Differentiable{// Compiler currently synthesizes:// struct TangentVector: Differentiable & AdditiveArithmetic {// var x: Wrapper<Float>.TangentVector// var y: Wrapper<Float>.TangentVector// var z: Float// ...// }// Compiler should synthesize:// struct TangentVector: Differentiable & AdditiveArithmetic {// var x: Float// var y: Float// var z: Float// ...// }}
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 002347d6b9b2f32ef740d86432529a06
Sub-Tasks:
Differentiable
derived conformances: handle wrapped propertiesrelates to:
Issue Description:
Differentiation should include special support for property wrappers.
Synthesized
TangentVector
structs should include wrapped values'TangentVectors
as stored properties.todo: fill in details, update differentiable programming manifesto
Example:
The text was updated successfully, but these errors were encountered: