Author: Anthony Cozzie
Date: 11:25:02 12/17/03
Go up one level in this thread
On December 17, 2003 at 14:22:22, Uri Blass wrote: >I find that a lot of functions in Craftyget as a parameter TREE* RESTRICT > >What is the meaning of the RESTRICT word? > >I looked for that word in Crafty and except cases when Crafty get that parameter >in functions >I could only find in chess.h the following lines that I also do not understand. > >#if defined (_MSC_VER) && (_MSC_VER >= 1300) && (!defined(_M_IX86) || (_MSC_VER >>= 1400)) ># define RESTRICT __restrict >#else ># define RESTRICT >#endif > > >Uri restrict means an unaliased pointer. e.g. void vectoradd(double *a, double *b, double *c, int len) { for(int i = 0; i < len; i++) c[i] = b[i] + a[i]; } the compiler doesn't know that a != b != c unless you use __restrict or specify it as a command line option. anthony
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.