Vax C90-EL SERIES Service Manual Page 82

  • Download
  • Add to my manuals
  • Print
  • Page
    / 216
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 81
Cray Standard C/C++ Reference Manual
The formats of these directives are as follows:
#pragma _CRI shortloop
#pragma _CRI shortloop128
The following examples illustrate the use of the shortloop and shortloop128
directives:
#pragma _CRI shortloop
for (i = 0; i < n; i++) { /* 1< = n < = 64 */
a[i] = b[i] + c[i];
}
#pragma _CRI shortloop128
for (i = 0; i < n; i++) { /* 1 < = n < = 128 */
a[i] = b[i] + c[i];
}
3.8 Tasking Directives
The Cray Standard C/C++ compilers support parallel processing using
multiple processors on UNICOS systems. Parallel processing is a technique
that breaks a computational task into a set of subtasks and then performs each
subtask simultaneously. This allows many jobs to run faster by spreading a
computational task across multiple processors. The increase in speed of execution
depends on the degree of parallelism that is inherent in the program. See
Optimizing Application Code on UNICOS Systems, for more information.
Tasking can be performed automatically by the compiler (Autotasking) or it can
be directed by the user (user-directed tasking). The methods that can be used to
accomplish tasking are defined as follows:
Autotasking is performed automatically by the compiler based on its analysis
of the code.
Autotasking automates loop-level tasking by detecting parallelism in a
program and exploiting the parallelism without user intervention. You can
add directives to your code that identify loops you know can be tasked and
depend upon Autotasking to analyze other loops.
Generally, Autotasking works best on programs in which most of the work is
in nested loops that do not contain function calls.
62 S217936
Page view 81
1 2 ... 77 78 79 80 81 82 83 84 85 86 87 ... 215 216

Comments to this Manuals

No comments