[XviD-devel] "restrict" keyword

Jim Hauxwell james at dattrax.co.uk
Tue Feb 25 07:00:39 CET 2003


Hi,

MSVC doesnt, however Intel Compiler 7 does

This being the case I still think it would be of benefit for Windows builds

Jim

> -----Original Message-----
> From: xvid-devel-bounces at xvid.org [mailto:xvid-devel-bounces at xvid.org]On
> Behalf Of Christoph Lampert
> Sent: 24 February 2003 22:01
> To: xvid-devel at xvid.org
> Subject: [XviD-devel] "restrict" keyword
> 
> 
> 
> Hi,
> 
> does MSVC++ know about "restrict"? 
> 
> That's a new qualifier for pointer types in C99 which 
> tells the compiler that the data referenced by two pointers
> do not overlap. This can be interesting for optimization, 
> because you know e.g. that write to an address does not change 
> the value of where the other pointer points to, so you don't have to read
> that value again. It's also important for memcpy() stuff.
> 
> void
> fcpy(float *restrict a, float *restrict b,
>      float *restrict aa, float *restrict bb, int n)
> {
> int i;
> for(i = 0; i < n; i++) {
> aa[i]=a[i];
> bb[i]=b[i];
> }
> }
> 
> means these copy loops can be done "in parallel", because e.g. aa != b 
> 
> gcc accepts it when --std=c99 is active. 
> 
> gruel 
> 
> 
> _______________________________________________
> XviD-devel mailing list
> XviD-devel at xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel


More information about the XviD-devel mailing list