clad icon indicating copy to clipboard operation
clad copied to clipboard

Do not relocate the tape elements

Open vgvassilev opened this issue 4 months ago • 1 comments

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.

vgvassilev avatar Mar 03 '24 17:03 vgvassilev

Hey @vgvassilev I have made some changes to resolve this. check that branch once

Deepanshu9376 avatar Mar 21 '24 15:03 Deepanshu9376