summaryrefslogtreecommitdiff
path: root/LAPACKE
diff options
context:
space:
mode:
authoreugene.chereshnev <eugenechereshnev@gmail.com>2017-02-01 12:07:06 -0800
committereugene.chereshnev <eugenechereshnev@gmail.com>2017-02-03 18:47:03 -0800
commit91dafb23ef8f0fe7379784b0d470169b0af06ef5 (patch)
treeadf1ec6e1f1e7ec11e753d998e25f98c2c97f1eb /LAPACKE
parent301204bb169d9a207ff7818077a1ee1b4853bb50 (diff)
downloadlapack-91dafb23ef8f0fe7379784b0d470169b0af06ef5.tar.gz
lapack-91dafb23ef8f0fe7379784b0d470169b0af06ef5.tar.bz2
lapack-91dafb23ef8f0fe7379784b0d470169b0af06ef5.zip
lapacke_*tp_trans: condition should be inverted
The function converts <in> from <matrix_layout> to opposite layout. E.g. for upper case (all indices are 0-based): col-major, upper: a(i,j) is stored in ap[(1 + j)*j/2 + i] row-major, upper: a(i,j) is stored in ap[(n + n-i+1)*i/2 + j-i]
Diffstat (limited to 'LAPACKE')
-rw-r--r--LAPACKE/utils/lapacke_ctp_trans.c2
-rw-r--r--LAPACKE/utils/lapacke_dtp_trans.c2
-rw-r--r--LAPACKE/utils/lapacke_stp_trans.c2
-rw-r--r--LAPACKE/utils/lapacke_ztp_trans.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/LAPACKE/utils/lapacke_ctp_trans.c b/LAPACKE/utils/lapacke_ctp_trans.c
index 2c51ddd6..6678e1a5 100644
--- a/LAPACKE/utils/lapacke_ctp_trans.c
+++ b/LAPACKE/utils/lapacke_ctp_trans.c
@@ -69,7 +69,7 @@ void LAPACKE_ctp_trans( int matrix_layout, char uplo, char diag,
* and col_major lower and row_major upper are equals too -
* using one code for equal cases. XOR( colmaj, upper )
*/
- if( ( colmaj || upper ) && !( colmaj && upper ) ) {
+ if( !( colmaj || upper ) || ( colmaj && upper ) ) {
for( j = st; j < n; j++ ) {
for( i = 0; i < j+1-st; i++ ) {
out[ j-i + (i*(2*n-i+1))/2 ] = in[ ((j+1)*j)/2 + i ];
diff --git a/LAPACKE/utils/lapacke_dtp_trans.c b/LAPACKE/utils/lapacke_dtp_trans.c
index 483af39e..7d7455de 100644
--- a/LAPACKE/utils/lapacke_dtp_trans.c
+++ b/LAPACKE/utils/lapacke_dtp_trans.c
@@ -69,7 +69,7 @@ void LAPACKE_dtp_trans( int matrix_layout, char uplo, char diag,
* and col_major lower and row_major upper are equals too -
* using one code for equal cases. XOR( colmaj, upper )
*/
- if( ( colmaj || upper ) && !( colmaj && upper ) ) {
+ if( !( colmaj || upper ) || ( colmaj && upper ) ) {
for( j = st; j < n; j++ ) {
for( i = 0; i < j+1-st; i++ ) {
out[ j-i + (i*(2*n-i+1))/2 ] = in[ ((j+1)*j)/2 + i ];
diff --git a/LAPACKE/utils/lapacke_stp_trans.c b/LAPACKE/utils/lapacke_stp_trans.c
index 23708422..7e676004 100644
--- a/LAPACKE/utils/lapacke_stp_trans.c
+++ b/LAPACKE/utils/lapacke_stp_trans.c
@@ -69,7 +69,7 @@ void LAPACKE_stp_trans( int matrix_layout, char uplo, char diag,
* and col_major lower and row_major upper are equals too -
* using one code for equal cases. XOR( colmaj, upper )
*/
- if( ( colmaj || upper ) && !( colmaj && upper ) ) {
+ if( !( colmaj || upper ) || ( colmaj && upper ) ) {
for( j = st; j < n; j++ ) {
for( i = 0; i < j+1-st; i++ ) {
out[ j-i + (i*(2*n-i+1))/2 ] = in[ ((j+1)*j)/2 + i ];
diff --git a/LAPACKE/utils/lapacke_ztp_trans.c b/LAPACKE/utils/lapacke_ztp_trans.c
index b3654e5f..e7369baa 100644
--- a/LAPACKE/utils/lapacke_ztp_trans.c
+++ b/LAPACKE/utils/lapacke_ztp_trans.c
@@ -69,7 +69,7 @@ void LAPACKE_ztp_trans( int matrix_layout, char uplo, char diag,
* and col_major lower and row_major upper are equals too -
* using one code for equal cases. XOR( colmaj, upper )
*/
- if( ( colmaj || upper ) && !( colmaj && upper ) ) {
+ if( !( colmaj || upper ) || ( colmaj && upper ) ) {
for( j = st; j < n; j++ ) {
for( i = 0; i < j+1-st; i++ ) {
out[ j-i + (i*(2*n-i+1))/2 ] = in[ ((j+1)*j)/2 + i ];