Thanks @ChrisRackauckas and @rdeits ! Will there be any slowdown in the computing time of the convolution routine when using forwarddiff? I tried something similar using the templatising approach with FADBAD++ in C++ with my own convolution function. As the convolutions involves a lot of (although simple) operations, this resulted in the convolution routine being significantly slower with the FADBAD double type, than with the standard double.
@rdeits the size of my two 1D vectors will probably be in the range of 500. According to this I will prob not get any advantage of the FFT routine. Also can you please share the example you worked on, so I can see how to go about this?
@Dan , it should indeed be done by convolution. I probably simplified the example too much and skipped some notation. But if interested you can have a look at the hybrid scheme here (pp 15-16)