| 444 | // type T can be qcomp*[2] or qcomp*[4] |
| 445 | template <typename T> |
| 446 | void setDenseElemsTranspose(T elems, qindex dim) { |
| 447 | for (qindex i=0; i<dim; i++) { |
| 448 | for (qindex j=0; j<i; j++) { |
| 449 | qcomp temp = elems[i][j]; |
| 450 | elems[i][j] = elems[j][i]; |
| 451 | elems[j][i] = temp; |
| 452 | } |
| 453 | } |
| 454 | } |
| 455 | |
| 456 | CompMatr1 util_getTranspose(CompMatr1 matrix) { |
| 457 | CompMatr1 conj = matrix; |