[osg-users] Using SSE within OSG

James Killian James_Killian at hotmail.com
Tue Jul 29 14:36:01 PDT 2008


Thanks for the reply.  We could resolve this argument if any one of the "low
level masters" cares to email me offline James_Killian at hotmail.com, but I'd
be open to believe an argument could be made for the context of moving
around large amounts of data.

In regards to moving data, SSE/SSE2 is really better suited for code which
requires a lot of math like 3d computations.  Perhaps the heart of SSE would
be the packed multiply and add, where it can do 4 multiplies and 4 adds in
one clock cycle (or a half cycle if paired properly).  Thus, code which
requires heavy math like many of the OSG matrix computations could really
benefit from it.  I would profile cases like this against hand written
assembly since this is what OSG would care about.

I looked at the assembly code produced by VS 9 for the optimized matrixf
multiply, and I could not have scheduled it better myself by hand.

----- Original Message ----- 
From: "Gordon Tomlinson" <gordon.tomlinson at sensor.com>
To: "'OpenSceneGraph Users'" <osg-users at lists.openscenegraph.org>
Sent: Tuesday, July 29, 2008 2:58 PM
Subject: Re: [osg-users] Using SSE within OSG


> HI
>
> I can only go buy our low level masters and their profiling shows that the
> hand road asm'ed  SSE code is significantly fasted than MS VS compiled
code
>
> Obviously this our experience in our environments and we computationally
> heavily and moving and editing terra-bytes of data around in real-time
>
> -----Original Message-----
> From: osg-users-bounces at lists.openscenegraph.org
> [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of James
> Killian
> Sent: Tuesday, July 29, 2008 11:38 AM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] Using SSE within OSG
>
>
> Sorry...
>
> I interpreted Gordon's response as follows:
> MS does a poor job (insert here with compiling SSE intrinsics), as a
result
> most of his SSE is asm'ed.
> The asm'ed approach is where you don't trust the compiler to do the right
> thing with intrinsics, where it has the flexibility of scheduling and
> assigning registers etc.
>
> I disagree with "MS does a poor job compiling intrinsic code", and that
you
> should not *ever need to resort to __asm anymore.
> *this is not absolute, there was once a rare case where we found a strange
> anomaly, but later solved by doing an un-intuitive c code change
>
> >Do you find that MS compilers will produce SSE vectorised code
> >_without_
> use of intrinsics or raw __asm?
> Ah this is a tricky question.  There is in fact an option in VS 8 and VS 9
> project settings to generate SSE or SSE2 code.  What this does is that it
> will evaluate c code and try to use SSE for it.  I was surprised to find
> that this actually lowered the performance of c code, especially c code
for
> matrixf.  I'm so glad that the project settings for osg do not turn this
on,
> and I'd recommend not using that, but instead write intrisics ourselves
for
> places that need it.
>
> I hope this clears things up.
>
>
> ----- Original Message -----
> From: "David Spilling" <david.spilling at gmail.com>
> To: "OpenSceneGraph Users" <osg-users at lists.openscenegraph.org>
> Sent: Tuesday, July 29, 2008 10:17 AM
> Subject: Re: [osg-users] Using SSE within OSG
>
>
> > James,
> >
> >
> > > I have to disagree, using VS 7 and up to VS 9.
> >
> >
> > Just to clarify - what are you disagreeing with? Do you find that MS
> > compilers will produce SSE vectorised code _without_ use of intrinsics
or
> > raw __asm?
> >
> > David
> >
>
>
> --------------------------------------------------------------------------
--
> ----
>
>
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> >
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>




More information about the osg-users mailing list