### MX_DSASET – Set A into subarray of B

Block SymbolLicensing group: STANDARD

Function Description
Generally, the function block MX_DSASET copies the matrix referenced by uA into the subarray (submatrix) of the matrix referenced by uB.

The output references yA and yB are always set to the corresponding input references uA and uB. If HLD = on then nothing is copied otherwise the matrix referenced by uA is copied (with respect to the value of the input uplo) to the submatrix of the matrix referenced by uB to the row with zero based index I and the column with zero based index J containing M rows and N columns. The mentioned variables have the following meanings:

• If the input $\mathtt{\text{i}}\le 0$ then I is set to $0$ else if $\mathtt{\text{i}}\ge \mathtt{\text{MB}}$ then I is set to $\mathtt{\text{MB}}-1$ else I is set to i, where MB is the number of rows of the matrix referenced by uB.
• If the input $\mathtt{\text{j}}\le 0$ then J is set to $0$ else if $\mathtt{\text{j}}\ge \mathtt{\text{NB}}$ then J is set to $\mathtt{\text{NB}}-1$ else J is set to j, where NB is the number of columns of the matrix referenced by uB.
• Number of copied rows M is set in two stages. First, M is set to minimum of $\mathtt{\text{MB}}-\mathtt{\text{I}}$ and number of rows of the matrix referenced by uA. Second, if $\mathtt{\text{m}}>0$ then M is set to the minimum of m and M.
• Number of copied columns N is set in two stages. First, N is set to minimum of $\mathtt{\text{NB}}-\mathtt{\text{J}}$ and number of columns of the matrix referenced by uA. Second, if $\mathtt{\text{n}}>0$ then N is set to the minimum of n and N.

The error flag E is set to on if:

• the reference uA or uB is not defined (i.e. input uA or uB is not connected),
• uplo is less than 0 or greater than 3,
• the number of elements of the matrix referenced by uB is less than $\mathtt{\text{M}}\ast \mathtt{\text{N}}$.

Inputs

 uA Input reference to matrix A Reference uB Input reference to matrix B Reference uplo Part of the matrix to be copied  $\odot$0.00E+00 Long(I32) 0 .... All 1 .... All 2 .... Upper 3 .... Lower i Index of the subarray first row  $\odot$0.00E+00 Long(I32) j Index of the subarray first column  $\odot$0.00E+00 Long(I32) m Number of matrix rows  $\odot$0.00E+00 Long(I32) n Number of matrix columns  $\odot$0.00E+00 Long(I32) HLD Hold Bool

Outputs

 yA Output reference to matrix A Reference yB Output reference to matrix B Reference E Error indicator Bool

2020 © REX Controls s.r.o., www.rexygen.com