Arrays
Array type names can include a lower and upper bound separated by a colon (:).
By default, the lower bound for a C or C++ array is 0, and the lower bound for Fortran is 1. In the following example, an array of ten integers is declared in C and then in Fortran:
int a[10];
integer a(10)
The elements of the array range from a[0] to a[9] in C, while the elements of the equivalent Fortran array range from a(1) to a(10).
When the lower bound for an array dimension is the default for the language, TotalView displays only the extent (that is, the number of elements) of the dimension. Consider the following array declaration in Fortran:
integer a(1:7,1:8)
Since both dimensions of the array use the default lower bound for Fortran (1), TotalView displays the data type of the array by using only the extent of each dimension, as follows:
integer(7,8)
If an array declaration does not use the default lower bound, TotalView displays both the lower bound and upper bound for each dimension of the array. For example, in Fortran, you would declare an array of integers with the first dimension ranging from -1 to 5 and the second dimension ranging from 2 to 10, as follows:
integer a(-1:5,2:10)
TotalView displays this in exactly the same way.
When editing a dimension of an array, you can enter just the extent (if using the default lower bound) or both the lower and upper bounds separated by a colon.
TotalView also lets you display a subsection of an array, or filter a scalar array for values matching a filter expression. Refer to Displaying Array Slices and Array Data Filtering for further information.