[Bug fortran/37131] inline matmul for small matrix sizes
tkoenig at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Jun 4 22:32:00 GMT 2010
------- Comment #9 from tkoenig at gcc dot gnu dot org 2010-06-04 22:31 -------
I have thought a little bit about this, and the problem is
a bit daunting ;-) Of course, this is at least partly because
my experience with the scalarizer is close to non-existant, but you
have to learn sometime.
It seems that the functions for scalarizing do not help a lot
here, because (for example) we need three nested loops for implementing
the case where a and b are of rank 2.
The preferred way would therefore be to state the rank 2 * rank 2 problem as
do i=1,m
do j=1,n
c(i,j) = sum(a(i,:) * b(:,j))
end do
end do
with the inner dot product borrowed using the scalarizer (borrowing
from dot_product), and the outer loops using either hand-crafted
TREE code or calling the DO translation.
Comments? Is this reasonable?
--
tkoenig at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pault at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37131
More information about the Gcc-bugs
mailing list