Den 15.07.2010 05:47, skrev Robert Bradshaw: > Good point. How does Fortran handle this better? Does it just know > that the strides are not aliased? (Or, does it know dimensions/other > data at compile time.) > >
Fortran generally disallow aliasing, though the compilers don't enforce it, they just assume it never happens. However, if an array is declared "pointer" or "target" (i.e. target for a pointer), the Fortran compiler will know that arguments can be aliased and be more careful (e.g. it can make temporary copies). Fortran arrays and pointers are structs that have information about strides and shapes (aka "dope vectors"), just like NumPy arrays. Sturla _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
