c++-amp

Does C++11 add the C99 restrict specifier? If not, why not?

回眸只為那壹抹淺笑 提交于 2019-11-30 07:04:31
问题 restrict is a C99 feature which is getting a lot of attention lately by allowing the compiler to perform "previously-fortran-only" optimizations to pointers. It's also the same keyword announced by Microsoft recently to be the underpinnings of the C++AMP specification. Is that keyword actually in the FCD? If not, is there a specific reason it was omitted? 回答1: One argument is that C needs restrict more than C++, because many operations are done with pointers to primitive types and therefore C

Does C++11 add the C99 restrict specifier? If not, why not?

不打扰是莪最后的温柔 提交于 2019-11-29 01:02:48
restrict is a C99 feature which is getting a lot of attention lately by allowing the compiler to perform "previously-fortran-only" optimizations to pointers. It's also the same keyword announced by Microsoft recently to be the underpinnings of the C++AMP specification. Is that keyword actually in the FCD? If not, is there a specific reason it was omitted? One argument is that C needs restrict more than C++, because many operations are done with pointers to primitive types and therefore C code has more aliasing problems than C++. The aliasing rules say that pointers to different types cannot