Rank-1 correction: A := A + u*v' INPUT PARAMETERS: M - number of rows N - number of columns A - target matrix, MxN submatrix is updated IA - submatrix offset (row index) JA - submatrix offset (column index) U - vector #1 IU - subvector offset V - vector #2 IV - subvector offset ****************************************************
| 429 | IV - subvector offset |
| 430 | *************************************************************************/ |
| 431 | void cmatrixrank1(int m, |
| 432 | int n, |
| 433 | ap::complex_2d_array& a, |
| 434 | int ia, |
| 435 | int ja, |
| 436 | ap::complex_1d_array& u, |
| 437 | int iu, |
| 438 | ap::complex_1d_array& v, |
| 439 | int iv) |
| 440 | { |
| 441 | int i; |
| 442 | ap::complex s; |
| 443 | |
| 444 | if( m==0||n==0 ) |
| 445 | { |
| 446 | return; |
| 447 | } |
| 448 | if( cmatrixrank1f(m, n, a, ia, ja, u, iu, v, iv) ) |
| 449 | { |
| 450 | return; |
| 451 | } |
| 452 | for(i = 0; i <= m-1; i++) |
| 453 | { |
| 454 | s = u(iu+i); |
| 455 | ap::vadd(&a(ia+i, ja), 1, &v(iv), 1, "N", ap::vlen(ja,ja+n-1), s); |
| 456 | } |
| 457 | } |
| 458 | |
| 459 | |
| 460 | /************************************************************************* |
nothing calls this directly
no test coverage detected