Changeset [5ea812358c091a21ff35f15f5f89adf9c0c956c8] by Jed Brown
Revision 5ea812358c091a21ff35f15f5f89adf9c0c956c8,
committed by Jed Brown
· November 16th, 2008 @ 11:32 PM
Replace explicit passing of work arrays with VLA.
Start with plumbing for element mappings. The first implementation will just use nodal coordinates.
Also, replace some hairy indexing with VLA pointer types. External tests show that GCC produces better inner-loop code for
double (A)[N]; / A[i][j] in inner loop */
than
double A; / A[i*N+j] in inner loop */
In fact, the assembly produced at -O3 with the VLA-pointer seems roughly equivalent to hoisting
double restrict a = &A[i*N]; / a[j] in inner loop */
out of the innermost loop. GCC -Wcast-qual produces a warning for
const double a; const double (b)[2] = (const double (*)[2])a;
claiming that cast discards qualifiers from pointer target
type' but it is not clear to me that this is actually the
case.
Signed-off-by: Jed Brown jed@59A2.org http://github.com/jedbrown/dohp/...
9 changed files
-
M
CMakeLists.txt -
M
include/dohpjacobi.h -
M
include/dohptype.h -
M
include/private/jacimpl.h -
M
src/jacobi/impls/tensor/efstopo.c -
M
src/jacobi/impls/tensor/tensor.c -
M
src/jacobi/impls/tensor/tensor.h -
M
src/jacobi/interface/jacobi.c -
M
src/jacobi/tests/ex1.c