Vax C90-EL SERIES Service Manual Page 100

  • Download
  • Add to my manuals
  • Print
  • Page
    / 216
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 99
Cray Standard C/C++ Reference Manual
to determine their tasking context. The tasking context for these variables
cannot be changed.
Note: Variables default to extern and static default to shared. Function
parameters and variables declared taskcommon, auto, and register default
to value.
Unless the defaults argument is used, all variables referenced in but declared
outside the parallel region must be listed in one of the tasking context argument
lists. The tasking context arguments can be used only with the parallel
directive or the taskloop directive for stand-alone taskloops.
In this discussion of tasking context, global refers to variables declared at a global
level (outside of any function) and local refers to variables declared at a local
block level. Not all types of identifiers can be placed in the tasking context
argument lists. Tasking context lists must not contain tags, constants, function
names, labels, expressions of any kind, or members of a struct, union,or
enum.
3.8.13.1.1 private and value Context
Variables with private or value context have an independent instance for each
of the tasks. Generally, scalar variables that are modified inside the parallel
region are declared private or value. In general, loop control variables (LCVs)
should be declared private; the LCV for tasked loops (both nonordered and
semiordered) must be value or private.
All private variables enter the parallel region undefined. All value variables
enter the parallel region initialized with the value they had just prior to the
parallel region. All private variables and modified value variables are
undefined after exiting the parallel region. An exception to this rule occurs when
the savelast argument is specified with a stand-alone taskloop, and with all
iterate variables in semiordered tasked loops.
As a debugging aid, try using the -h msglevel_2 option when compiling your
tasked program. If a private variable is used before it is initialized, a message
will be generated to alert you to this problem.
3.8.13.1.2 shared Context
Variables with shared context have a single instance that is accessible from all
of the tasking processors. Generally, variables with values that are established
outside of the parallel region and that are not modified inside of the region
are declared shared.
80 S217936
Page view 99
1 2 ... 95 96 97 98 99 100 101 102 103 104 105 ... 215 216

Comments to this Manuals

No comments