Viewing Array Data
TotalView provides another way to look at the data in a multi-dimensional array. The Variable Window’s
Tools > Array Viewer command opens a window that presents a slice of array data in a table format,
Figure 161. You can think of this as viewing a “plane” of two-dimensional data in your array.
When the Array Viewer opens, the initial slice of displayed data depends on the values you entered in the Variable Window. You can change the displayed data by modifying the Expression, Type, or slice controls in the Array Viewer and then pressing the Update View button.
Expression Field
The Expression field contains an array expression based on the value you entered in the Variable Window. You can control the display by changing the value of this field; for example, you can cast the array to another array expression.
Type Field
The Type field also reflects the data you initially entered in the Variable Window. You can modify the type to cast the array to a different array type.
Slice Definition
Initially, TotalView selects the array slice by placing the appropriate array dimension as the row and the column, setting the indices for the lower and upper bounds of the dimensions with a stride of one. Any additional dimensions are held at 0. This is the slice or plane of data that is displayed in the table.
You have full control over all settings, including the ability to change which dimensions appear as rows and columns, as well as their indices and strides. As you change the row and column dimensions, the controls for the other dimensions are enabled/disabled accordingly. You can change the indices of the other dimensions to further refine the slice of data. The section
Using Slices and Strides provides more information on slicing arrays.
Update View Button
When you have finished making changes to the expression, type, and/or slice settings, press the Update View button to update the data in the table display.
Data Format Selection Box
The selection box at the top left corner of the data table allows you to select the format for displaying the data. The table automatically refreshes in the selected format.
The Slice field at the top right corner of the data table reflects the displayed slice of data.