[ADOL-C] Multidimensional array

Rishi Amrit amrit at wisc.edu
Fri Aug 6 11:24:11 EDT 2010


Hi,

   I have a question about adouble class. Are dynamic multidimensional
array's valid as adouble ? I did something like:


  adouble** u = (adouble**)malloc(nfe*sizeof(adouble**));
  for(i = 0; i<nfe; i++)
    u[i] = (adouble*)malloc(m*sizeof(adouble*));

And when I try to access u[0][0], I get a segmentation fault. Is this not
allowed ?

Thanks,

Rishi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/adol-c/attachments/20100806/3fafdffa/attachment.html 


More information about the ADOL-C mailing list