public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/43996] ICE in simplification of spread intrinsic
Date: Thu, 06 May 2010 10:01:00 -0000	[thread overview]
Message-ID: <20100506100041.1591.qmail@sourceware.org> (raw)
In-Reply-To: <bug-43996-12313@http.gcc.gnu.org/bugzilla/>



------- Comment #10 from dfranke at gcc dot gnu dot org  2010-05-06 10:00 -------
(In reply to comment #9)
> It looks like cubic time in N. 

http://en.wikipedia.org/wiki/Matrix_multiplication#Algorithms_for_efficient_matrix_multiplication:

"The running time of square matrix multiplication, if carried out naively, is
O(n^3). The running time for multiplying rectangular matrices (one m x p-matrix
with one p x n-matrix) is O(mnp)"

Better algorithms than the one implemented exist.


> > unconditionally returning NULL in MATMUL: ...
> 
> I cannot reproduce that, am I correct to understand that you used some patched
> gfortran?

Index: simplify.c
===================================================================
--- simplify.c  (revision 159089)
+++ simplify.c  (working copy)
@@ -3294,6 +3294,8 @@ gfc_simplify_matmul (gfc_expr *matrix_a,
   int row, result_rows, col, result_columns;
   int stride_a, offset_a, stride_b, offset_b;

+  return NULL;
+
   if (!is_constant_array_expr (matrix_a)
       || !is_constant_array_expr (matrix_b))
     return NULL;


> Apparently, all the intrinsics should be audited for this kind of problem.

Transformational intrinsics that return an arrays, to begin with.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43996


  parent reply	other threads:[~2010-05-06 10:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-05 21:04 [Bug fortran/43996] New: " dominiq at lps dot ens dot fr
2010-05-05 21:22 ` [Bug fortran/43996] " dfranke at gcc dot gnu dot org
2010-05-05 21:30 ` dominiq at lps dot ens dot fr
2010-05-05 21:48 ` dominiq at lps dot ens dot fr
2010-05-05 21:59 ` dfranke at gcc dot gnu dot org
2010-05-05 22:03 ` dominiq at lps dot ens dot fr
2010-05-05 22:18 ` dfranke at gcc dot gnu dot org
2010-05-05 22:28 ` dominiq at lps dot ens dot fr
2010-05-05 23:09 ` dfranke at gcc dot gnu dot org
2010-05-06  8:52 ` dominiq at lps dot ens dot fr
2010-05-06 10:01 ` dfranke at gcc dot gnu dot org [this message]
2010-05-06 10:27 ` dominiq at lps dot ens dot fr
2010-05-06 10:32 ` dfranke at gcc dot gnu dot org
2010-05-15 16:43 ` dominiq at lps dot ens dot fr
2010-05-15 21:21 ` dominiq at lps dot ens dot fr
2010-05-23 15:37 ` [Bug fortran/43996] ICE in gfc_conv_array_initializer due to incomplete simplification of init expressions dfranke at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100506100041.1591.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).