From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41937 invoked by alias); 5 Apr 2015 14:33:23 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 41920 invoked by uid 89); 5 Apr 2015 14:33:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_05,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: cc-smtpout3.netcologne.de Received: from cc-smtpout3.netcologne.de (HELO cc-smtpout3.netcologne.de) (89.1.8.213) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 05 Apr 2015 14:33:15 +0000 Received: from cc-smtpin3.netcologne.de (cc-smtpin3.netcologne.de [89.1.8.203]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id B7D3986DEF; Sun, 5 Apr 2015 16:33:11 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cc-smtpin3.netcologne.de (Postfix) with ESMTP id B315111DBB; Sun, 5 Apr 2015 16:33:11 +0200 (CEST) Received: from [78.35.151.51] (helo=cc-smtpin3.netcologne.de) by localhost with ESMTP (eXpurgate 4.0.6) (envelope-from ) id 552147a7-0b4b-7f0000012729-7f000001c220-1 for ; Sun, 05 Apr 2015 16:33:11 +0200 Received: from [192.168.178.20] (xdsl-78-35-151-51.netcologne.de [78.35.151.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by cc-smtpin3.netcologne.de (Postfix) with ESMTPSA; Sun, 5 Apr 2015 16:33:08 +0200 (CEST) Message-ID: <552147A3.7000603@netcologne.de> Date: Sun, 05 Apr 2015 14:33:00 -0000 From: Thomas Koenig User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Dominique Dhumieres CC: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org, jvdelisle@charter.com Subject: Re: [patch, fortran, RFC] First steps towards inlining matmul References: <20150405135519.AF21A105@mailhost.lps.ens.fr> In-Reply-To: <20150405135519.AF21A105@mailhost.lps.ens.fr> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-04/txt/msg00168.txt.bz2 Hi Dominique, > IMO the inlining of MATMUL should be restricted to small matrices (less than 4x4, 9x9 > or 16x16 depending of your field!-) The problem with the library function we have is that it is quite general; it can deal with all the complexity of assumed-shape array arguments. Inlining allows the compiler to take advantage of contiguous memory, compile-time knowledge of array sizes, etc. to allow for vectorization or even complete unrolling. Of course, if you use c=matmul(a,b) where all three are assumed-shape arrays, your advantage over the library function will be minimal at best. It will be interesting to see at what size calling BLAS directly will be better. Thomas