Displaying an Array of Structure’s Elements
The
View > Dive In All command, which is also available when you right-click on a field, lets you display an element in an array of structures as if it were a simple array. For example, suppose you have the following Fortran definition:
type i_c
integer r
complex c
end type i_C
type(i_c), target :: rc2(3,4)
After selecting an r element, select the View > Dive In All command. TotalView displays all of the r elements of the rc2 array as if they were a single array.
The
View > Dive in All command can also display the elements of a C array of structures as arrays.
Figure 112 shows a unified array of structures and a multidimensional array in a structure.
As the array manipulation commands generally work on what’s displayed and not what is stored in memory, TotalView commands that refine and display array information work on this virtual array. For example, you can visualize the array, obtain statistics about it, filter elements in it, and so on.
Figure 113 is a high-level look at what a dive in all operation does.
In this figure, the rounded rectangle represents a Variable Window. On the left is an array of five structures. After you select the Dive in All command with element a selected, TotalView replaces the contents of your Variable Window with an array that contains all of these a elements.