2012年(82)
分类: LINUX
2012-08-07 10:28:47
int foo (int* x, int* y)
{
*x = 0;
*y = 1;
eturn *x;
}
int f (int* x, int* y)
{
*x = 0;
*y = 1;
return 0;
}现在我们有了restrict这个关键字,就可以利用它来帮助编译器安全的进行代码优化了
int f (int *restrict x, int *restrict y)
{
*x = 0;
*y = 1;
return *x;
}
int f (int *restrict x, int *restrict y)
{
*x = 0;
*y = 1;
return 0;
}