A view of a linear algebra object is created by a call to the following routine
PLA_DIM_ALL, the global length and/or width of the view equals that of the original object. Also, by setting align_row or align_col equal to
PLA_ALIGN_FIRST, one indicates alignment with the first row or column index of the original object, avoiding having to check if zero_or_one in the template is zero or one. The input object type is inherited by the output object.
PLACE BEGIN HR HERE
PLACE END HR HERE
A frequent use of views is to create a new reference into the entire original object, much like creating a second pointer into a buffer, so that this new pointer can be used to step through the buffer without loosing the reference to the beginning of the buffer. For this we have a special routine
Swapping two views can be accomplished by calling
However, since in our implementation views are just pointers to data structures, a swap can also be accomplished by the sequence of statementsPLA_Obj_view_all( obj2, &temp ); PLA_Obj_view_all( obj1, &obj2 ); PLA_Obj_view_all( temp, &obj1 ); PLA_Obj_free( &temp );
By calling the swap routine, a user can be guaranteed to be independent of the underlying implementation of PLAPACK.temp = obj2; obj2 = obj1; obj1 = temp;