| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Message-ID: | <3F09D357.1010901@cern.ch> |
| Date: | Mon, 07 Jul 2003 22:08:55 +0200 |
| From: | "Lassi A. Tuura" <lassi DOT tuura AT cern DOT ch> |
| Organization: | Northeastern University, Boston, USA |
| User-Agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4a) Gecko/20030401 |
| X-Accept-Language: | en-us, en |
| MIME-Version: | 1.0 |
| To: | Martin Gainty <mgainty AT hotmail DOT com> |
| CC: | cygwin AT cygwin DOT com |
| Subject: | Re: restrict |
| References: | <Law10-OE12jj0aImPiZ00001387 AT hotmail DOT com> |
| In-Reply-To: | <Law10-OE12jj0aImPiZ00001387@hotmail.com> |
> I have never seen restrict keyword..any ideas?
It was introduced in C99, and in a few compilers before that. Roughly
speaking it means the memory pointed to by the restrict pointer is not
aliased by anything else visible in that scope, so the compiler is free
to optimise the code assuming no other pointer write writes over memory.
Take for example:
int foo (int *restrict a, int *restrict b)
{ a[1] = b[1]; return b[0] + a[1]; }
The compiler can assume the assignment to a[1] will not have modified b[0].
Hope this helps,
//lat
--
The stone fell on the pitcher? Woe to the pitcher. The
pitcher fell on the stone? Woe to the pitcher.
--Rabbinic Sayning
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |