The $visualize function supports data visualization from within eval points and the
Tools > Evaluate Window. Because you can enter more than one
$visualize function within an eval point or Evaluate Window, you can simultaneously visualize multiple variables.
If you enter the $visualize function in an eval point, TotalView interprets rather than compiles the expression, which can greatly decrease performance. See
“Defining Eval Points and Conditional Breakpoints” for information about compiled and interpreted expressions.
Using the $visualize function in an eval point lets you animate the changes that occur in your data, because the Visualizer updates the array’s display every time TotalView reaches the eval point. Here is this function’s syntax:
The array argument names the
dataset being visualized. The optional
slice_string argument is a quoted string that defines a constant slice expression that modifies the
array parameter’s dataset. In Fortran, you can use either a single (’) or double (") quotation mark. You must use a double quotation mark in C or C++.
The first example in each programming language group visualizes the entire array. The second example selects every second element in the array’s major dimension; it also clips the minor dimension to all elements in the range. The third example reduces the dataset to a single dimension by selecting one subarray.
You may need to cast your data so that TotalView knows what the array’s dimensions are. For example, here is a C function that passes a two-dimensional array parameter that does not specify the major dimension’s extent.
Sometimes, it’s hard to know what to specify. You can quickly refine array and slice arguments, for example, by entering the
$visualize function into the
Tools > Evaluate Dialog Box. When you select the
Evaluate button, you quickly see the result. You can even use this technique to display several arrays simultaneously.