From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,42147f5b2d81aa51 X-Google-Attributes: gid111c93,public From: Alex Rhomberg Subject: Re: ccc code wierdness Date: 1999/10/05 Message-ID: <37FA1E01.A5394B38@ife.ee.ethz.ch>#1/1 X-Deja-AN: 533114938 Content-Transfer-Encoding: 7bit References: <37F8AC50.13AA8F7D@ife.ee.ethz.ch> <37FA0D1B.BF58B3D4@ife.ee.ethz.ch> Content-Type: text/plain; charset=us-ascii X-Trace: 5 Oct 1999 17:49:20 +0100, beethoven.ee.ethz.ch Organization: Electronics Lab, ETH Zurich, Switzerland MIME-Version: 1.0 Newsgroups: comp.os.linux.alpha Alex Rhomberg wrote: > void scatter( double * __restrict dforce, > double * __restrict df_el, int * __restrictnodeI) > { > int thisnode; > int jE_node; > for (jE_node = 0; jE_node < 8; jE_node++) /* scatter internal force*/ > { > thisnode = nodeI[jE_node]*3;/*will be replaced by pointers*/ > dforce[thisnode+0] -= df_el[jE_node*3+0]; > dforce[thisnode+1] -= df_el[jE_node*3+1]; > dforce[thisnode+2] -= df_el[jE_node*3+2]; > } > } > > =cut part of output, annotated > 9c: 00 00 88 8e ldt $f20,0(t7) > a0: d0 ff b1 8e ldt $f21,-48(a1) > a4: 34 14 95 5a subt $f20,$f21,$f20 #first wait for $f21 > a8: 00 00 88 9e stt $f20,0(t7) #wait for fadd latency > ac: 08 00 c8 8e ldt $f22,8(t7) > b0: d8 ff f1 8e ldt $f23,-40(a1) > b4: 36 14 d7 5a subt $f22,$f23,$f22 #sleep(2) > b8: 08 00 c8 9e stt $f22,8(t7) #drink_coffee > =cut more comments if I compile the top code snippet in its own file, I get better code. If I include it in a second file, I get the same kind of code I posted(unoptimized) strange... Any hints? - Alex