Open dabrahams opened 3 years ago
Maybe it has to do with:
extension AnyArrayBuffer: Differentiable where Dispatch: DifferentiableArrayDispatch {
public typealias TangentVector = AnyVectorArrayBuffer
...
}
that typealias
forces all tangent vectors of Differentiable
-conforming AnyArrayBuffer<D>
s to be exactly AnyArrayBuffer<VectorArrayDispatch>
.
Instead we want something like:
extension AnyArrayBuffer: Differentiable
where Dispatch: DifferentiableArrayDispatch,
TangentVector == AnyArrayBuffer<D> where D: VectorArrayDispatch
{
...
}
Of course, that's not expressible in the language today; you need to use the protocol AnyArrayBufferProtocol
hack to create the equivalent constraint.
There are constraints on many
AnyArrayBuffer where Dispatch == VectorArrayDispatch
that really should beAnyArrayBuffer where Dispatch: VectorArrayDispatch
. I couldn't get it to compile at the time but now that we have more parts working maybe we can figure out how to change these. Many are interrelated so one might need to change them all at once.