I have a very large old code base I am slowly updating.
Throughout large parts of the code there are for loops
preforming basic math routines that I would like to call back to a function ie to change
for(int i=0;i< NUM_EL; i++)
{
x[i] = a[i] * b[i];
}
to
vector_multiply(a,b,x,NUM_EL);
where the prototype for vector_multiply would be
void vector_multiply(const double *a, const double * b, double *x, int num_el);
Is there anything out there that scans your source code and converts standard math operations to callback routines?
more specifically would make change your code to make blass callbacks in your code automatically?
Im guessing I could use libclang to do this.