From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: ccc code wierdness
Date: 1999/10/05 [thread overview]
Message-ID: <37FA1E01.A5394B38@ife.ee.ethz.ch> (raw)
In-Reply-To: 37FA0D1B.BF58B3D4@ife.ee.ethz.ch
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
prev parent reply other threads:[~1999-10-05 4:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-04 4:00 optimized (or optimizable) C programming? Alex Rhomberg
1999-10-04 4:00 ` Greg Lindahl
1999-10-05 4:00 ` Robert Harley
1999-10-05 4:00 ` Alex Rhomberg
1999-10-05 4:00 ` Alex Rhomberg [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox