参数资料
型号: IPT-C2H-NIOS
厂商: Altera
文件页数: 74/138页
文件大小: 0K
描述: C2H COMPILER FOR NIOS II
标准包装: 1
系列: Nios®II
类型: Nios II
功能: C 到硬件编译器
许可证: 初始许可证
Scheduling
compile-time due to the possibility of aliasing. This dependency causes
the read operation from ptr_b to be scheduled at State 2, rather than at
State 0.
_ _ restrict _ _ Pointer Type Qualifier to Break Dependencies
If you know that a pointer never overlaps with another, you can inform
the compiler by declaring the pointer to be a restricted pointer. The
restrict type qualifier is introduced in the ISO C 99 specification. The
compiler ignores any or all aliasing implications of a pointer qualified by
_ _ restrict_ _ . The C99 specification states that if a pointer “p” is
declared with restrict, and another pointer “q” accesses any location also
accessed by “p,” the behavior is undefined. In other words, a restricted
pointer promises to never alias another pointer.
Example 3–28 demonstrates several pointers declared using the
_ _ restrict_ _ type qualifier.
1
The qualifier comes after the * ; __restrict__ qualifies the
pointer type, not the type that the pointer points to.
Example 3–28. Pointer Declarations with _ _ restrict _ _
int * _ _ restrict_ _ my_restricted_pointer_to_integer;
const int * _ _ restrict_ _ my_restricted_pointer_to_constant_integer;
int * const _ _ restrict_ _ my_constant_restricted_pointer_to_integer;
Figure 3–15 shows the dependency graph for Example 3–29 , which uses
the _ _ restrict_ _ type qualifier to inform the C2H Compiler that
ptr_a and ptr_b do not alias:
Example 3–29. Using _ _ restrict _ _
void foo(int * _ _ restrict_ _ ptr_a,
int * _ _ restrict_ _ ptr_b)
{
int a, b;
a = *ptr_a;
*ptr_a = a + 7;
b = *ptr_b;
*ptr_b = b + 8;
}
3–34
Nios II C2H Compiler User Guide
9.1
Altera Corporation
November 2009
相关PDF资料
PDF描述
IPTR-DSPBUILDER DSP BUILDER SOFTWARE
IR11662SPBF IC CNTROL SMART RECTIFIER 8-SOIC
IR1166STRPBF IC MOSFET DRIVER N-CH 200V 8SOIC
IR11672ASPBF IC MOSFET DRIVER 200V 8-SOIC
IR1167ASTRPBF IC SMART SECONDARY DRIVER 8-SOIC
相关代理商/技术参数
参数描述
IPT-DSPBUILDER 功能描述:开发软件 DSP Builder MATLAB SIMULINK RoHS:否 制造商:Atollic Inc. 产品:Compilers/Debuggers 用于:ARM7, ARM9, Cortex-A, Cortex-M, Cortex-R Processors
IPTE-75GF-1000-70D 制造商: 功能描述: 制造商:undefined 功能描述:
IPTG06A18-11SZC 制造商:GLENAIR 制造商全称:Glenair, Inc. 功能描述:Straight Plug Connector with Backshell to Accommodate
IPTG06A18-11SZCPH16 制造商:GLENAIR 制造商全称:Glenair, Inc. 功能描述:Straight Plug Connector
IPTG06A18-11SZCPHM18 制造商:GLENAIR 制造商全称:Glenair, Inc. 功能描述:Straight Plug Connector