clad
clad copied to clipboard
Do not relocate the tape elements
In the current implementation of clad::tape
we ensure the elements are contiguous. The grow
operation relocates the elements when the size exceeds the tape capacity:
https://github.com/vgvassilev/clad/blob/f242077c9b386a9711cdb257b1126a07b52c5006/include/clad/Differentiator/Tape.h#L119
Instead we should allocate slabs of 32 or 64 elements and the last element should point to the next slab.
Hey @vgvassilev I have made some changes to resolve this. check that branch once