Tag broadcast and reduce
-
Jed Brown
(from [5ea812358c091a21ff35f15f5f89adf9c0c956c8]) 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/...
-
Jed Brown
(from [5ea812358c091a21ff35f15f5f89adf9c0c956c8]) 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/...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.