Altera Nios II C2H Compiler Uživatelský manuál Strana 75

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 138
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 74
Altera Corporation 9.1 3–35
November 2009 Nios II C2H Compiler User Guide
C-to-Hardware Mapping Reference
Figure 3–15. __restrict__ Pointer Type Breaks Dependencies
Although a pointer qualified with __restrict__ creates no
dependencies with other pointers, it can create dependencies with itself.
Figure 3–16 shows the dependency graph for Example 3–30.
Example 3–30. Pointers Always Depend on Themselves
void foo(int * __restrict__ my_ptr,
int offset_a,
int offset_b)
{
int a, b;
a = my_ptr[offset_a];
my_ptr[offset_a] = a + 7;
b = my_ptr[offset_b];
my_ptrb[offset_b] = b + 8;
}
Zobrazit stránku 74
1 2 ... 70 71 72 73 74 75 76 77 78 79 80 ... 137 138

Komentáře k této Příručce

Žádné komentáře