I am not very used to C and what I am trying to do seems a bit complicated.
I would like to create two or more double-precision arrays that are 4096 bytes aligned. Here is what I tried and the various responses I get:
double *pp[2];
// Here gcc warns about "cast to pointer from integer of different size"
pp[0]=(double *)aligned_alloc(4096, 10*4096*sizeof(double) );
*(pp[0]+1) = 55.55; // This compiles but segfaults
// or
*pp[0][1] = 55.55; // This gives compilation error.
Has anyone any suggestions about doing this right?
Thank you.
PS: is there a way of doing the same in fortran?