Cypress CSC-1200T Guía de usuario Pagina 56

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 124
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 55
56 Cray T3E User’s Guide
6.5 C compiler directives (#pragma)
The #pragma directives are used within the source program to request
certain kinds of special processing. The #pragma directives are exten-
sions to the C and C++ standards. They are classified according to the
following types:
general
template instantiation (Cray C++ only)
scalar
tasking
inlining.
You can control the compiler analysis of your source code by using
#pragma directives. The #pragma directives have the following form:
#pragma [_CRI] identifier [arguments]
In the specification, the macro expansion is applied only to arguments.
The _CRI specification is optional and ensures that the compiler will
issue a message concerning any directives that it does not recognize.
Diagnostics are not generated for any directives that do not contain the
_CRI specification.
To ensure that your directives are seen only by Cray Research compilers,
you should use the following coding technique, where identifier repre-
sents the name of the directive:
#if _CRAYC
#pragma _CRI identifier
#endif
The following sections describe the most useful #pragma directives in
the Cray T3E environment. They are all classified as scalar directives
and used for code optimization.
cache_align
The cache_align directive aligns a variable on a cache-line boundary.
This is useful for frequently referenced variables.
The first-level cache (DCACHE) line consists of four 64-bit words which
are loaded from the memory to the cache whenever any of the words
is referenced. By using the directive you can be sure that a specified
memory location is loaded to the first word of a cache-line.
The effect of the cache_align directive is independent of its position
in the source code. It can appear in global or local scope. The format of
the directive is as follows:
#pragma _CRI cache_align var_list
Vista de pagina 55
1 2 ... 51 52 53 54 55 56 57 58 59 60 61 ... 123 124

Comentarios a estos manuales

Sin comentarios