-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
9 changed files
with
238 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.