30.01.2013 Views

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Examining and Analyzing Arrays<br />

Filtering Array Data: The procedure for filtering an array is simple:<br />

select the Filter field, enter the array filter expression, and then press Enter.<br />

<strong>TotalView</strong> updates the Variable Window to exclude elements that do not<br />

match the filter expression. <strong>TotalView</strong> only displays an element if its value<br />

matches the filter expression and the slice operation.<br />

If necessary, <strong>TotalView</strong> converts the array element before evaluating the filter<br />

expression. The following conversion rules apply:<br />

� If the filter operand or array element type is floating point, <strong>TotalView</strong> converts<br />

the operand to a double-precision floating-point value. <strong>TotalView</strong><br />

truncates extended-precision values to double precision. Converting integer<br />

or unsigned integer values to double-precision values might result in a<br />

loss of precision. <strong>TotalView</strong> converts unsigned integer values to nonnegative<br />

double-precision values.<br />

� If the filter operand or the array element is an unsigned integer, <strong>TotalView</strong><br />

converts the operand to an unsigned 64-bit integer.<br />

� If both the filter operand and array element are of type integer, <strong>TotalView</strong><br />

converts the values to type 64-bit integer.<br />

<strong>TotalView</strong> conversion operations modify a copy of the array’s elements—<br />

conversions never alter the actual array elements.<br />

To stop filtering an array, delete the contents of the Filter field in the Variable<br />

Window and press Enter. <strong>TotalView</strong> then updates the Variable Window<br />

so that it includes all elements.<br />

Filtering by Comparison<br />

The simplest filters are ones whose formats are as follows:<br />

operator value<br />

where operator is either a C/C++ or Fortran-style comparison operator, and<br />

value is a signed or unsigned integer constant or a floating-point number.<br />

For example, the filter for displaying all values greater than 100 is:<br />

> 100<br />

The following table lists the comparison operators:<br />

Comparison C/C++ Operator Fortran Operator<br />

Equal == .eq.<br />

Not equal != .ne.<br />

Less than < .lt.<br />

Less than or equal .gt.<br />

Greater than or equal >= .ge.<br />

The following figure shows an array whose filter is < 0. This tells <strong>TotalView</strong><br />

to only display array elements whose value is less than 0 (zero). See<br />

Figure 214 on page 339.<br />

338 Chapter 15: Examining Arrays

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!