Inspecting the Zygote code, I can see that aside from @adjoint there is also @adjoint! that is used to declare the adjoints of some mutating functions (like push! etc). I can’t find any doc strings or documentation when and how this can be used. I suspect, there are some limitations as Zygote generally forbids mutating. Can somebody explain @adjoint! to me or send me a link where it is explained?
More directly, I was wondering if I can define adjoints for some functions where I pre-allocate memory for the result, like a pre-allocated FFT or matrix multiplication.