Here m_Center, getPosition(), and getSize() are vector objects, each
containing 3 floats. There are operators defining addition of two
vectors and multiplication of a scalar and a vector.
Terminology check: You don't mean vectors as in wide types used for
altivec. Do you? You mean a C++ class which holds a mathematical vector
of 3 floating point values x, y & z. All single precision floats.
Operators defined using operator overloading.
Vector is a very overloaded term at the best of times. On a PPC
performance mailing list it gets another definition.
For what it's worth, the assembly lines identified as corresponding to
that source line are...
// We've missed a load of f0 from 4(r28) (Origin.X) and loads of f2-4
stfs f5,28(r28) // store f5 (m_Center.X)
stfs f1,32(r28) // store f1 (m_Center.Y)
stfs f0,36(r28) // store f0 (m_Center.Z)
Forgive my annotations and reordering. I find I have to d0 that to work
out what's going on. It looks like you're result from getSize() is
being stored in your class before being returned. I don't know why it
should, but I wonder if that's getting the compiler confused and it
thinks it has to round it to ensure single precision after that.
It's the only thing that looks odd to me.
Paul
Attachment:
PGP.sig Description: This is a digitally signed message part
_______________________________________________
Do not post admin requests to the list. They will be ignored.
PerfOptimization-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/perfoptimization-dev/email@hidden
This email sent to email@hidden