问题
This question might just show that I haven't understand something important in C:
The Intel Math Kernel library provides a way to set the memory alignment when allocating memory. On the other hand I pass arrays to mkl lapack routines just by reference. So how does the lapack routine know about the alignment of the array? It has to, since the memory alignment determines at which memory address is a particular array value, correct?
回答1:
The routine does not need to know about alignment. Alignment only determines the starting address of the array (which coincides with the address of the first element), the address of the rest of the elements is determined by the starting address and element size.
来源:https://stackoverflow.com/questions/6705307/memory-alignment-with-mkl-malloc