We provide a similar interface for adding a local matrix to a global object. place HR here
place HR here Let us consider PLA_API_axpy_matrix_to_global. On the calling node, the local matrix is given by its row and column dimension, in size_row and size_col, the address where it starts in memory, in local_matrix, and the local leading dimension, local_ldim. The local matrix is assumed to use column-major storage, like FORTRAN. Thus the local leading dimension can be viewed as the stride between elements in a row of the matrix. The target object is given by obj, which can be of any object type. This time, both row and column displacement (alignments) into the object must be given, in displ_row and displ_col. The scaling parameter, in alpha, allows a multiple of the local data to be added. The operation performed is
where C represents the target (global) object and A the local matrix. The notation
is used to indicate the sub-matrix of C with upper-left entry and lower-right entry . The data type of the data at the address alpha is assumed to be the same as the data type of the local matrix and the target object. Notice that the call is only performed on the node that owns the local matrix. All nodes can simultaneously perform such calls to enter local matrices in global objects.
The operation performed by PLA_API_axpy_global_to_matrix reverses the above. Now C equals the local vector and A the global, so that the operation performed becomes
Again, only the node that owns the local matrix makes the call and all nodes can make similar calls simultaneously.
Often, a locally computed matrix contributes to a given object, but not as a contiguous sub-matrix. For this PLAPACK provides a call that contributes multiple sub-matrices. PLAPACK also provides the mirror operation, gathering a number of sub-matrices from a global object into a local matrix. place HR here
place HR here As for the equivalent vector routines, it is important to realize that the above calls only initiate the operation. The data cannot be assumed to have arrived in the target until the object is closed, or a call to PLA_Obj_API_sync is performed for the given global object.