Text archives Help
- From: Solomon Boulos <boulos@cs.utah.edu>
- To: James Bigler <bigler@cs.utah.edu>
- Cc: Roni Choudhury <roni@cs.utah.edu>, "'manta@sci.utah.edu'" <manta@sci.utah.edu>
- Subject: Re: [Manta] public data members in RayPacket
- Date: Wed, 6 Feb 2008 14:53:33 -0800
Actually, I think Roni was asking why we have the following code:
public:
RayPacketData* data;
PacketShape shape;
int rayBegin;
int rayEnd;
int depth;
int flags;
There's no good reason (I could think of) for any of these to be
public other than to avoid compiler stupidity when checking depth,
rayBegin/rayEnd, flags, or getting the data pointer. Most of the Manta
code has been updated to use rays.begin() and rays.end() already. The
SSE answer is only for the RayPacketData itself.
On Feb 6, 2008, at 2:51 PM, James Bigler wrote:
The reason is to allow SSE code to get access to the data members.
The accessors are there for backward compatibility for vertical
code. It also allows you to write code in C style for something in
between the accessors and SSE.
If you are nervous, use only the accessors.
James
On Feb 6, 2008, at 3:42 PM, Roni Choudhury wrote:
Is there a reason why the data members in RayPacket are public?
Some of them have accessor functions but not others. It doesn't
really matter but it makes me nervous...
roni
Archive powered by MHonArc 2.6.16.