Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Itanium-based Systems: HP aC++/HP C Programmer's Guide > Chapter 2 Command-Line Options

Floating-Point Processing Options

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

The following command-line options are used for floating-point processing.

+O[no]cxlimitedrange

+O[no]cxlimitedrange

The +O[no]cxlimitedrange option enables [disables] the specific block of codes with the usual mathematical formulas. This option is equivalent to adding the pragma:

#pragma STDC CX_LIMITED_RANGE

The default is +Onocxlimitedrange.

+O[no]fenvaccess

+O[no]fenvaccess

The +O[no]fenvaccess option provides a means to inform the compiler when a program might access the floating-point environment to test flags or run under non-default modes.

Use of the +Onofenvaccess option allows certain optimizations that could subvert flag tests and mode changes such as global common subexpression elimination, code motion, and constant folding. This option is equivalent to adding #pragma STDC FENV_ACCESS ON at the beginning of each source file submitted for compilation.

The default is +Onofenvaccess .

-fpeval

-fpeval=precision

The -fpeval option specifies the minimum precision to use for floating-point expression evaluation. This option does not affect the precision of parameters, return types, or assignments.

The defined values for precision are:

float

Evaluates floating-point expressions and constants in their semantic type.

double

Evaluates float operations and constants using the range and precision of double, and evaluates all other floating-point expressions and constants in their semantic type.

extended

Utilizes hardware support of these floating-point registers for optimum speed in floating-point computations. Evaluates float and double constants and expressions using the range and precision of the extended type, and evaluates all other floating-point expressions in their semantic type. Though this option provides greater precision than double, it does not provide greater speed than double or float.

The default is -fpeval=float.

-[no]fpwidetypes

-[no]fpwidetypes

The -[no]fpwidetypes option enables [disables] extended and quad floating-point data types. quad is equivalent to long double. This option also enables __float80 prototypes. The compiler defines _FPWIDETYPES when -fpwidetypes is in effect.

The default is -nofpwidetypes.

+FP

+FP[flags]

The +FP option specifies how the runtime environment for floating-point operations should be initialized at program startup and used at link time. The default is that all trapping behaviors are disabled.

The following flags are supported. Uppercase enables the flag, lowercase disables the flag.

Table 2-3 Options for +FP[flags]

FlagDescription
V (v)Trap on invalid floating-point operations.
Z (z)Trap on divide by zero.
O (o)Trap on floating-point overflow.
U (u)Trap on floating-point underflow.
I (i)Trap on floating-point operations that produce inexact results.
D (d)Enable sudden underflow (flush to zero) of denormalized values.

 

To dynamically change these settings at runtime, see fesetenv(3M).

+FPmode

+FPmode specifies how the run-time environment for floating-point operations should be initialized at program start up. By default, modes are aas specified in the IEEE floating-point standard: all traps disabled, gradual underflow, and rounding to nearest. See ld(1) for specific values of mode. To dynamically change these settings at run time, refer to fenv(5), fesettrapenable (3M), and fesetround(3M).

+O[no]libmerrno

+O[no]libmerrno

Description:

The +O[no]libmerrno option enables [disables] support for errno in libm functions. The default is +Onolibmerrno.

In C-mode, the default is +Olibmerrno with -Aa option.

+Oprefetch_latency

+Oprefetch_latency=cycles

The +Oprefetch_latency option applies to loops for which the compiler generates data prefetch instructions. cycles represents the number of cycles for a data cache miss. For a given loop, the compiler divides cycles by the estimated loop length to arrive at the number of loop iterations for which to generate advanced prefetches.

cycles must be in the range of 0 to 10000. A value of 0 instructs the compiler to use the default value, which is 480 cycles for loops containing floating-point accesses and 150 cycles for loops that do not contain any floating-point accesses.

For tuning purposes, it is recommended that users measure their application’s performance using a few different prefetch latency settings to determine the optimal value. Some floating-point codes may benefit by increasing the distance to 960. Parallel applications frequently benefit from a shorter prefetch distance of 150.

+O[no]preserved_fpregs

+O[no]preserved_fpregs

The +O[no]preserved_fprefs option specifies whether the compiler is allowed [not allowed] to make use of the preserved subset of the floating-point register file as defined by the Itanium runtime architecture.

The default is +Opreserved_fpregs.

+O[no]rotating_fpregs

+O[no]rotating_fpregs

The +O[no]rotating_fpregs option specifies whether the compiler is allowed [not allowed] to make use of the rotating subset of the floating-point register file.

The default is +Orotating_fpregs.

+O[no]sumreduction

+O[no]sumreduction

This option enables [disables] sum reduction optimization. It allows the compiler to compute partial sums to allow faster computations. It is not technically legal to do this in C or C++ because of floating-point accuracy issues. This option is useful if an application cannot use the +Onofltacc option but wants sum reduction to be performed.

When sum reduction optimization is enabled, the compiler may evaluate intermediate partial sums of float or double precision terms using (wider) extended precision, which reduces variation in the result caused by different optimization strategies and generally produces a more accurate result.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.