This is the mail archive of the
mailing list for the Cygwin project.
Re: Tiled memory
- To: Chin Chee-Kai <cheekai at gen dot co dot jp>
- Subject: Re: Tiled memory
- From: Shankar Unni <shankar at chromatic dot com>
- Date: Mon, 17 Mar 1997 09:49:43 -0800
- CC: root <root at jacob dot remcomp dot fr>, gnu-win32 at cygnus dot com
- Organization: Chromatic Research, Sunnyvale, CA
- References: <Pine.3.07.9703171515.A6186firstname.lastname@example.org>
root <email@example.com> wrote:
> > i.e. if you declare
> > _tiled int vector1,vector2,vector3;
and Chin Chee-Kai <firstname.lastname@example.org> replied:
> This sort of special treatment should be included into some
> sort of optimizing flags, or parallelization flags to tell
> compiler to automatically process, or group instructions to
> process, them in parallel.
I sort of agree with you here. But it's always possible to treat this on
One is to say that we consider this "multimedia data" (for lack of a
better term: "vectors"?) as a special data kind, made up of streams of
packed 8, 16 or 32-bit quantities, and have a special kind for them,
with restrictions (i.e. cannot declare single _tiled int's, and so on).
This makes it easier on the compiler writer to get off the ground, and
it is not terribly hard on the programmer, because it is usually clear
which variables are your media (or otherwise packed streams or vectors),
and where you are passing them around.
While you (as a programmer) won't get the most general and powerful
optimizations for all of your character data, you'll get a substantial
benefit for a small expenditure of effort.
> On the other hand, the "_saturated" declarative is perhaps
> necessary as a type modifier (like "unsigned", "long long" etc).
Here, on the other hand, I strongly disagree.
Saturatedness is not a feature of the data per se, but a feature of the
operation you perform on them. I.e. there will be occasions on which you
want to perform saturating adds on vectors, and other times when you
want to perform non-saturating operations.
What you need for this case is some sort of operator or builtin function
to perform your saturating operations for you. The most obvious way of
doing this is to add builtin functions for this:
vector3 = __saturated_add(vector1, vector2)
or, if you want to play games, you can invent either inline operators
(+|, -|, etc.?) or some sort of functional notation like
vector3 = __saturated(vector1 + vector2)
where __saturated(expression) is treated by the compiler as putting a
"__saturated" attribute on all the arithmetic operators contained
within, if applicable (and maybe error out if not applicable).
Shankar Unni email@example.com
Chromatic Research (408) 752-9488
For help on using this list, send a message to
"firstname.lastname@example.org" with one line of text: "help".