I can get the gradient of a function with signature `(Float) -> Float`

:

```
import _Differentiation
@differentiable
func timesTwo(a: Float) -> Float {
return a * 2
}
let grad = gradient(at: 3, in: timesTwo)
```

But I haven't figured out how to get the gradient of a function with signature `(inout Float) -> Void`

, which does the same math:

```
@differentiable
func timesTwoInout(a: inout Float) {
a *= 2
}
let gradInout = gradient(at: 3, in: timesTwoInout) // compiler says "Cannot convert value of type '(inout Float) -> ()' to expected argument type '@differentiable (Float) -> ()'"
```

I realize I can wrap my inout version in a function with the `(Float) -> Float`

signature, but that defeats the purpose of the speed of an inout function in my use case:

```
func timesTwoInoutWrapper(a: Float) -> Float {
var a = a
timesTwoInout(a: &a)
return a
}
let gradientInoutWrapper = gradient(at: 3, in: timesTwoInoutWrapper)
```

Since this wrapper works, it must simply be a question of available API for `gradient(at:in:)`

. Does anyone know a way to call `gradient(at:in:)`

for a function of type `(inout Float) -> Void`

?

Thanks!