Documentation errata for IBM XL C/C++ for Linux, V10.1

Preventive Service Planning


Abstract

This page contains corrections and additions to the product documentation shipped with IBM XL C/C++ for Linux, V10.1.

Content

Product README

The following corrections and additions apply to the product README for IBM XL C/C++ for Linux, V10.1:

In the "Known limitations for IBM XL C/C++ for Linux, V10.1" section, the following is added:

C99-compliant complex header file
There are two complex.h header files. One is a GCC complex.h header file under the /backward directory, the other is a C99-style complex.h header file. In C++, if you compile with the -qlanglvl=c99complex or -qlanglvl=c99complexheader compiler option to use the C99-compliant header file, the compiler will issue a warning message, pick up the complex.h header file under the /backward directory, and eventually include the <complex> header file. To get the C99-style complex.h header file, use its full path name when compiling with these two options.

Language Reference
The following corrections and additions apply to the IBM XL C/C++ for Linux, V10.1 Language Reference:

Chapter: Special member functions (C++ only)

Section: Constructors

Topic: Initialization of base classes and members

B1::B1(int)
B1::B1()
D1::D1(int, int)

should read:

B1::B1(int)
B2::B2()
D1::D1(int, int)

Chapter: The IBM XL C language extensions

In C99 features as extensions to C89:

One of the possible values for -qlanglvl is specified as "stcd99".

It should read "stdc99".

Compiler Reference
The following corrections and additions apply to the IBM XL C/C++ for Linux, V10.1 Compiler Reference:

Chapter: Configuring compiler defaults

Section: Setting environment variables

Topic: Environment variables for parallel processing

In "XLSMPOPTS", the description of stack=num should read:

stack=num

    Specifies the largest amount of space in bytes ( num) that a thread's stack needs. The default value for num is 4194304.

    Set num so it is within the acceptable upper limit. num can be up to the limit imposed by system resources or the stack size ulimit, whichever is smaller. An application that exceeds the upper limit may cause a segmentation fault.

-qfloat

-qfloat=fltint | nofltint option
The following new information is added:

If -qarch is set to a processor that has an instruction to convert from floating point to integer, that instruction will be used regardless of the [no]fltint setting. This conversion also applies to all PowerPC processors in 64-bit mode.

-qinfo=private suboption
In the syntax diagram the suboption -qinfo=private has no affect when specified and should be removed. Instead, use the -qreport option to report compiler-driven automatic parallelization cases; user parallelization cases are not reported.

-qlanglvl

-qlanglvl=[no]FileScopeConstExternLinkage option
The following -qlanglvl option is added:

[no]FileScopeConstExternLinkage
Controls whether the file scope of constant variables have internal or external linkage when the static or extern keyword is not specified.

When -qlanglvl=fileScopeConstExternLinkage is in effect, all file scope constant variables are marked as externally visible. Otherwise, all file scope constant variables are marked as static.

Default: nofileScopeConstExternLinkage

-qpath and -t options
References to the p suboption should be ignored. The compiler does not ship a separate preprocessor.

Chapter: Configuring compiler defaults

Section: Setting environment variables

Under The XLSMPOPTS environment variable, the following option has been added under Parallel execution options:

procs= cpu_id[,cpu_id,...]
Enables thread binding and specifies a list of cpu_i d to which the threads are bound. If the number of CPU IDs specified is less than the number of threads used by the program, the remaining threads are not bound.

Chapter: Compiler pragmas reference

Section: Individual pragma descriptions

Topic: #pragma reg_killed_by

fs
    Floating-point and status control register

Should read:

fsr
    Floating-point and status control register


Topic: #pragma stream_unroll

Examples

Should read:

The following example shows how #pragma stream_unroll can increase performance.

int i, m, n;
int a[1000];
int b[1000];
int c[1000];

....

#pragma stream_unroll(4)
for (i=0; i<n; i++) {
 a[i] = b[i] * c[i];
}


The unroll factor of 4 reduces the number of iterations from n to n/4, as follows:

m = n/4;

for (i=0; i<n/4; i++){
 a[i] = b[i] + c[i];
 a[i+m] = b[i+m] + c[i+m];
 a[i+2*m] = b[i+2*m] + c[i+2*m];
 a[i+3*m] = b[i+3*m] + c[i+3*m];
}


The increased number of read and store operations are distributed among a number of streams determined by the compiler, which reduces computation time and increase performance.

Chapter: Compiler predefined macros
Under Macros indicating the XL C/C++ compiler product

Table 35. Compiler product predefined macros

The following text:
In XL C/C++ V10.1, the value of the macro is 0x01010.

Should read:
In XL C/C++ V10.1, the value of the macro is 0x0a01.

Optimization and Programming Guide
The following corrections and additions apply to the IBM XL C/C++ for Linux, V10.1 Optimization and Programming Guide:

Under Parallelizing your programs, Shared and private variables in a parallel environment

The following text:

The compiler can privatize some shared variables if it is possible to do so without changing the semantics of the program. For example, if each loop iteration uses a unique value of a shared variable, that variable can be privatized. Privatized shared variables are reported by the -qinfo=private option. Use critical sections to synchronize access to all shared variables not listed in this report.

Should read:

The compiler can privatize some shared variables if it is possible to do so without changing the semantics of the program. For example, if each loop iteration uses a unique value of a shared variable, that variable can be privatized. Privatized shared variables are reported by the -qreport option. Use critical sections to synchronize access to all shared variables not listed in this report.

For information on how to list which shared variables are privatized by the compiler, see:
How to list privatized shared variables in an automatic parallel loop

Related information

README updates for XL C/C++ for Linux V10.1

Rate this page:

(0 users)Average rating

Document information


More support for:

XL C/C++ for Linux
Documentation

Software version:

10.1

Operating system(s):

Linux

Reference #:

1318097

Modified date:

2013-11-20

Translate my page

Machine Translation

Content navigation