Cray CX1000 Betriebsanweisung Seite 117

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 169
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 116
Compiler Directives and Assertions [C]
The output from canal shows that they are both placed into parallel
region 1:
| for (int i = 0; i < size_foobar; i++) {
3 P | bar[i] = size_foobar - i;
|}
|
| for (int i = 0; i < size_foobar; i++) {
5 P | foo[i] += bar[i+c]/2;
|}
...
Parallel region 1 in main
...
Loop 2 in main in region 1
...
Loop 3 in main at line 4 in loop 2
...
Loop 4 in main in region 1
...
Loop 5 in main at line 8 in loop 4
If you add a max streams pragma to one of the loops, they are no
longer placed in the same region:
| for (int i = 0; i < size_foobar; i++) {
3 P | bar[i] = size_foobar - i;
|}
|
| #pragma mta max 50 streams per processor
| for (int i = 0; i < size_foobar; i++) {
6 P | foo[i] += bar[i+c]/2;
|}
...
Parallel region 1 in main
...
Loop 2 in main in region 1
...
Loop 3 in main at line 4 in loop 2
...
Parallel region 4 in main
Using max 50 streams per processor
...
Loop 5 in main in region 4
...
Loop 6 in main at line 9 in loop 5
Notice that canal also tells us that the requested maximum was
applied to region 4, which is the region that contains the loop with
the max streams pragma.
S247920 117
Seitenansicht 116
1 2 ... 112 113 114 115 116 117 118 119 120 121 122 ... 168 169

Kommentare zu diesen Handbüchern

Keine Kommentare