Cray C and C++ Reference Manual
S-2179-70 - Dec 2008
Describes the Standard C and C++ languages as implemented by the Cray C and Cray C++ compilers.
Links
- Available formats
- Table of contents
- Software releases this book supports
- Other versions of this book
Available formats
|
S-2179-70.pdf |
|
|
html-S-2179-70 |
Table of contents
Preface1 Introduction
1.1 General Compiler Description
1.1.1 Cray C Compiler
1.1.2 Cray C++ Compiler (Deferred implementation)
1.2 Related Publications
2 Compiler Commands
2.1 CC Command (Deferred implementation)
2.2 cc Command
2.3 Command Line Options
2.4 Standard Language Conformance Options
2.4.1 -h [ no ]c99
2.4.2 -h [ no ]conform ( CC , cc ), -h [ no ]stdc ( cc )
2.4.3 -h cfront ( CC )
2.4.4 -h [ no ]parse_templates ( CC )
2.4.5 -h [ no ]dep_name ( CC )
2.4.6 -h [ no ]exceptions ( CC )
2.4.7 -h [ no ]anachronisms ( CC )
2.4.8 -h new_for_init ( CC )
2.4.9 -h [ no ]tolerant ( cc )
2.4.10 -h [ no ]const_string_literals (CC)
2.4.11 -h [ no ]gnu ( CC , cc )
2.5 Template Language Options (Deferred implementation)
2.5.1 -h simple_templates ( CC )
2.5.2 -h [ no ]autoinstantiate ( CC )
2.5.3 -h one_instantiation_per_object ( CC )
2.5.4 -h instantiation_dir= dirname ( CC )
2.5.5 -h instantiate= mode ( CC )
2.5.6 -h [ no ]implicitinclude ( CC )
2.5.7 -h remove_instantiation_flags ( CC )
2.5.8 -h prelink_local_copy ( CC )
2.5.9 -h prelink_copy_if_nonlocal ( CC )
2.6 Virtual Function Options (Deferred implementation)
2.6.1 -h forcevtbl (CC)
2.6.2 -h suppressvtbl (CC)
2.7 General Language Options
2.7.1 -h keep= file ( CC )
2.7.2 -h restrict= args ( CC , cc )
2.7.3 -h [ no ]calchars ( CC , cc )
2.7.4 -h [ no ]signedshifts ( CC , cc )
2.8 General Optimization Options
2.8.1 -h [ no ]aggress ( CC , cc )
2.8.2 -h display_opt
2.8.3 -h fusion n ( CC , cc )
2.8.4 -h [ no ]intrinsics ( CC , cc )
2.8.5 -h list= opt ( CC , cc )
2.8.6 -h [ no ]msgs ( CC , cc )
2.8.7 -h [ no ]negmsgs ( CC , cc )
2.8.8 -h [ no ]omp_trace ( CC , cc )
2.8.9 -h [ no ]overindex ( CC , cc )
2.8.10 -h [ no ]pattern ( CC , cc )
2.8.11 -h profile_generate ( CC , cc )
2.8.12 -h unroll n ( CC , cc )
2.8.13 -O level ( CC , cc )
2.9 Automatic Cache Management Options
2.9.1 -h cache n ( CC , cc )
2.10 Vector Optimization Options
2.10.1 -h vector n ( CC , cc )
2.11 Inlining Optimization Options
2.11.1 -h ipa n ( CC , cc )
2.11.2 -h ipafrom= source [ : source ] ( CC , cc )
2.11.3 Combined Inlining
2.12 Scalar Optimization Options
2.12.1 -h [ no ]interchange ( CC , cc )
2.12.2 -h scalar n ( CC , cc )
2.12.3 -h [ no ]zeroinc ( CC , cc )
2.13 Math Options
2.13.1 -h fp n ( CC , cc )
2.13.2 -h matherror= method ( CC , cc )
2.14 Debugging Options
2.14.1 -G level ( CC , cc ) and -g ( CC , cc )
2.14.2 -h [ no ]bounds ( cc )
2.14.3 -h dir_check ( CC , cc )
2.14.4 -h zero ( CC , cc ) (Deferred implementation)
2.15 Compiler Message Options
2.15.1 -h msglevel_ n ( CC , cc )
2.15.2 -h [ no ]message= n [ : n ... ] ( CC , cc )
2.15.3 -h report= args ( CC , cc )
2.15.4 -h [ no ]abort ( CC , cc )
2.15.5 -h errorlimit[ = n ] ( CC , cc )
2.16 Compilation Phase Options
2.16.1 -E ( CC , cc )
2.16.2 -P ( CC , cc )
2.16.3 -h feonly ( CC , cc )
2.16.4 -S ( CC , cc )
2.16.5 -c ( CC , cc )
2.16.6 -# , -## , and -### ( CC , cc )
2.16.7 -W phase ," opt ..." ( CC , cc)
2.16.8 -Y phase , dirname ( CC , cc )
2.17 Preprocessing Options
2.17.1 -C ( CC , cc )
2.17.2 -D macro [ = def ] ( CC , cc )
2.17.3 -h [ no ]pragma= name [ : name ... ] ( CC , cc )
2.17.4 -I incldir ( CC , cc )
2.17.5 -M ( CC , cc )
2.17.6 -nostdinc ( CC , cc )
2.17.7 -U macro ( CC , cc )
2.18 Loader Options
2.18.1 -l libfile ( CC , cc )
2.18.2 -L libdir ( CC , cc )
2.18.3 -o outfile ( CC , cc )
2.19 Miscellaneous Options
2.19.1 -h cpu= target_system ( CC , cc )
2.19.2 -h ident= name ( CC , cc )
2.19.3 -h keepfiles ( CC , cc )
2.19.4 -h network= nic
2.19.5 -h [ no ]omp
2.19.6 -h prototype_intrinsics ( CC , cc )
2.19.7 -h smp n ( cc )
2.19.8 -h upc ( cc )
2.19.9 -V ( CC , cc )
2.19.10 -X npes ( CC , cc )
2.20 Command Line Examples
2.21 Compile Time Environment Variables
2.22 Run Time Environment Variables
2.23 OpenMP Environment Variables
2.23.1 OMP_SCHEDULE
2.23.2 OMP_NUM_THREADS
2.23.3 OMP_DYNAMIC
2.23.4 OMP_NESTED
3 #pragma Directives
3.1 Protecting Directives
3.2 Directives in Cray C++ (Deferred implementation)
3.3 Loop Directives
3.4 Alternative Directive form: _Pragma
3.5 General Directives
3.5.1 [ no ]bounds Directive (Cray C compiler)
3.5.2 duplicate Directive (Cray C Compiler)
3.5.3 message Directive
3.5.4 cache Directive
3.5.5 cache_nt Directive
3.5.6 [ no ]opt Directive
3.5.7 Probability Directives
3.5.8 weak Directive
3.5.9 ident Directive
3.6 Instantiation Directives (Deferred implementation)
3.7 Vectorization Directives
3.7.1 hand_tuned Directive
3.7.2 loop_info Directive
3.7.3 nopattern Directive
3.7.4 novector Directive
3.7.5 permutation Directive
3.7.6 [ no ]pipeline Directive
3.7.7 prefervector Directive
3.7.8 pgo loop_info Directive
3.7.9 safe_address Directive
3.7.10 safe_conditional Directive
3.7.11 shortloop and shortloop128 Directives
3.8 Scalar Directives
3.8.1 collapse and nocollapse Directives
3.8.2 concurrent Directive
3.8.3 interchange and nointerchange Directives
3.8.4 noreduction Directive
3.8.5 suppress Directive
3.8.6 [ no ]unroll Directive
3.8.7 [ no ]fusion Directive
3.9 Inlining Directives
3.9.1 clone_enable , clone_disable Directives
3.9.2 inline_enable , inline_disable , and inline_reset Directives
3.9.3 inline_always and inline_never Directives
4 OpenMP C and C++ API Directives
4.1 Deferred OpenMP Features
4.2 Cray Implementation Differences
4.3 Compiler Options Affecting OpenMP
4.4 OpenMP Program Execution
5 Cray Unified Parallel C (UPC)
5.1 Cray Implementation Differences
5.2 Compiling and Executing UPC Code
6 Cray C++ Libraries (Deferred implementation)
6.1 Unsupported Standard C++ Library Features
7 Cray C++ Template Instantiation (Deferred implementation)
7.1 Simple Instantiation
7.2 Prelinker Instantiation
7.3 Instantiation Modes
7.4 One Instantiation Per Object File
7.5 Instantiation #pragma Directives
7.6 Implicit Inclusion
8 Cray C Extensions
8.1 Complex Data Extensions
8.2 fortran Keyword
8.3 Hexadecimal Floating-point Constants
9 Predefined Macros
9.1 Macros Required by the C and C++ Standards
9.2 Macros Based on the Host Machine
9.3 Macros Based on the Target Machine
9.4 Macros Based on the Compiler
9.5 UPC Predefined Macros
10 Running C and C++ Applications
11 Debugging Cray C and C++ Code
11.1 TotalView Debugger
11.2 Compiler Debugging Options
12 Interlanguage Communication
12.1 Calls between C and C++ Functions
12.2 Calling Fortran Functions and Subroutines from C or C++
12.2.1 Requirements
12.2.2 Argument Passing
12.2.3 Array Storage
12.2.4 Logical and Character Data
12.2.5 Accessing Named Common from C and C++
12.2.6 Accessing Blank Common from C or C++
12.2.7 Cray C and Fortran Example
12.2.8 Calling a Fortran Program from Cray C++
12.3 Calling a C or C++ Function from Fortran
13 Implementation-defined Behavior
13.1 Messages
13.2 Environment
13.2.1 Identifiers
13.2.2 Types
13.2.3 Characters
13.2.4 Wide Characters
13.2.5 Integers
13.2.6 Arrays and Pointers
13.2.7 Registers
13.2.8 Classes, Structures, Unions, Enumerations, and Bit Fields
13.2.9 Qualifiers
13.2.10 Declarators
13.2.11 Statements
13.2.12 Exceptions
13.2.13 System Function Calls
13.3 Preprocessing
A Libraries and Loader
B Cray C and C++ Dialects
C Compiler Messages
D Intrinsic Functions
Glossary
Index
List of Tables
List of Examples
Software Releases this book supports
| Product | Version | Sub Product | Release Date |
|---|---|---|---|
| Cray Compiling Environment (CCE) | 7.0 | C Compiler | Dec 2008 |
Other versions of this book
| Publication Number | Release Date | Supported Software Releases |
|---|---|---|
| S-2179-71 | Jun 2009 | Cray Compiling Environment (CCE) 7.1: C/C++/Fortran Compiler |
| S-2179-60 | Sep 2007 | PE 6.0: C/C++ Compiler |
| S-2179-56 | Mar 2007 | PE 5.6: C/C++ Compiler |
| S-2179-55 | Dec 2005 | PE 5.5: C/C++ Compiler |
| S-2179-54 | Mar 2005 | PE 5.4: C/C++ Compiler |
| S-2179-52 | Apr 2004 | PE 5.2: C/C++ Compiler |
| S-2179-51 | Oct 2003 | PE 5.1: C/C++ Compiler |
| S-2179-50 | Jun 2003 | PE 5.0: C/C++ Compiler |
| 004-2179-005 | Oct 2000 | |
| 004-2179-003 | Jul 1999 | PE 3.3: General |
| 004-2179-001 | Aug 1998 | unsupported |
| S-2179-36 | Jan 1998 |
