30.01.2013 Views

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 216: Array Data<br />

Filtering by Range of<br />

Values<br />

Examining and Analyzing Arrays<br />

Filtering a Range of Values<br />

You can also filter array values by specifying a range, as follows:<br />

[>] low-value : [ before low-value, the low value is exclusive. Similarly, a <<br />

before high-value makes it exclusive.<br />

The values of low-value and high-value must be constants of type integer,<br />

unsigned integer, or floating point. The data type of low-value must be the<br />

same as the type of high-value, and low-value must be less than high-value. If<br />

low-value and high-value are integer constants, you can append the letter u<br />

or U to the value to force an unsigned comparison. The following figure<br />

shows a filter that tells <strong>TotalView</strong> that to only display values greater than<br />

63, but less than 512. (See Figure 216.)<br />

Creating Array Filter Expressions<br />

The filtering capabilities described in the previous sections are those that<br />

you use most often. In some circumstances, you may need to create a<br />

more general expression. When you create a filter expression, you’re creating<br />

a Fortran or C Boolean expression that <strong>TotalView</strong> evaluates for every<br />

element in the array or the array slice. For example, the following expression<br />

displays all array elements whose contents are greater than 0 and less<br />

than 50, or greater than 100 and less than 150:<br />

($value > 0 && $value < 50) ||<br />

($value > 100 && $value < 150)<br />

Here’s the Fortran equivalent:<br />

($value .gt. 0 && $value .lt. 50) .or.<br />

($value .gt. 100 .and. $value .lt.150)<br />

The $value variable is a special <strong>TotalView</strong> variable that represents the current<br />

array element. You can use this value when creating expressions.<br />

<strong>TotalView</strong> <strong>Users</strong> <strong>Guide</strong>: version 8.7 341

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

Saved successfully!

Ooh no, something went wrong!