@@ -1765,19 +1765,19 @@ class DifferentiableAttr final
1765
1765
}
1766
1766
};
1767
1767
1768
- // / The `@derivative` attribute registers a function as a derivative of another
1769
- // / function-like declaration: a 'func', 'init', 'subscript', or 'var' computed
1770
- // / property declaration.
1768
+ // / The `@derivative(of:) ` attribute registers a function as a derivative of
1769
+ // / another function-like declaration: a 'func', 'init', 'subscript', or 'var'
1770
+ // / computed property declaration.
1771
1771
// /
1772
- // / The `@derivative` attribute also has an optional `wrt:` clause specifying
1773
- // / the parameters that are differentiated "with respect to", i.e. the
1774
- // / differentiation parameters. The differentiation parameters must conform to
1775
- // / the `Differentiable` protocol.
1772
+ // / The `@derivative(of:) ` attribute also has an optional `wrt:` clause
1773
+ // / specifying the parameters that are differentiated "with respect to", i.e.
1774
+ // / the differentiation parameters. The differentiation parameters must conform
1775
+ // / to the `Differentiable` protocol.
1776
1776
// /
1777
1777
// / If the `wrt:` clause is unspecified, the differentiation parameters are
1778
1778
// / inferred to be all parameters that conform to `Differentiable`.
1779
1779
// /
1780
- // / `@derivative` attribute type-checking verifies that the type of the
1780
+ // / `@derivative(of:) ` attribute type-checking verifies that the type of the
1781
1781
// / derivative function declaration is consistent with the type of the
1782
1782
// / referenced original declaration and the differentiation parameters.
1783
1783
// /
@@ -1858,17 +1858,17 @@ class DerivativeAttr final
1858
1858
}
1859
1859
};
1860
1860
1861
- // / The `@transpose` attribute registers a function as a transpose of another
1862
- // / function-like declaration: a 'func', 'init', 'subscript', or 'var' computed
1863
- // / property declaration.
1861
+ // / The `@transpose(of:) ` attribute registers a function as a transpose of
1862
+ // / another function-like declaration: a 'func', 'init', 'subscript', or 'var'
1863
+ // / computed property declaration.
1864
1864
// /
1865
- // / The `@transpose` attribute also has a `wrt:` clause specifying the
1865
+ // / The `@transpose(of:) ` attribute also has a `wrt:` clause specifying the
1866
1866
// / parameters that are transposed "with respect to", i.e. the transposed
1867
1867
// / parameters.
1868
1868
// /
1869
1869
// / Examples:
1870
1870
// / @transpose(of: foo)
1871
- // / @transpose(of: +, wrt: (lhs, rhs ))
1871
+ // / @transpose(of: +, wrt: (0, 1 ))
1872
1872
class TransposeAttr final
1873
1873
: public DeclAttribute,
1874
1874
private llvm::TrailingObjects<TransposeAttr, ParsedAutoDiffParameter> {
0 commit comments