clad
clad copied to clipboard
Add support for pointers in TBR analysis.
We have recently added pointer support in reverse mode (#686), but the tests are currently failing when trying to run with the enable-tbr
flag. The test file is test/Gadient/Pointers.C
.
One example which fails in current TBR analysis:
double pointerParam(const double* arr, size_t n) {
double sum = 0;
for (size_t i=0; i < n; ++i) {
size_t* j = &i;
sum += arr[0] * (*j);
arr = arr + 1;
}
return sum;
}