summaryrefslogtreecommitdiff
path: root/lapacke/src/lapacke_zbbcsd.c
diff options
context:
space:
mode:
authorjulie <julielangou@users.noreply.github.com>2014-02-18 16:47:10 +0000
committerjulie <julielangou@users.noreply.github.com>2014-02-18 16:47:10 +0000
commita9ffa9a1812fa42e314401a9433331696701f8ed (patch)
tree04cacc80876396095584340d40db7cede485b578 /lapacke/src/lapacke_zbbcsd.c
parent149087fffddee6b45aa647a505d82137eaeca281 (diff)
downloadlapack-a9ffa9a1812fa42e314401a9433331696701f8ed.tar.gz
lapack-a9ffa9a1812fa42e314401a9433331696701f8ed.tar.bz2
lapack-a9ffa9a1812fa42e314401a9433331696701f8ed.zip
INTEGRATED CHANGES PROVIDED BY INTEL TEAM FOR LAPACKE -- SEE Eugene Chereshnev email on Feb 18th
--> THANK YO INTEL <-- We performed auto-replacement matrix_order -> matrix_layout in the LAPACKE C Interface. Also we applied several bug fixes which were presented on our side and added two LAPACKE interfaces for function LAPACK_stpqrt which weren't represented on your side (although interfaces for d/c/z/pqrt were). All changes are reflected in the archive in attachment (only modified files in the archive). All changes were performed for revision 1471. Summary of changes: 1. Files: lapacke_stprfb.c lapacke_dtprfb.c lapacke_ctprfb.c lapacke_ztprfb.c lapacke_stprfb_work.c lapacke_dtprfb_work.c lapacke_ctprfb_work.c lapacke_ztprfb_work.c lapacke.h Expression MAX(1,ldwork)*MAX(n,k) was replaced by 'work_size'. It's not a bug but apparently 'work_size' is right expression in this place. Also in functions lapacke_(c/z)tprfb type of 'work' array was changed from float/double to lapack_complex_float/lapack_complex_double. Array 'work' is passed to lapacke_(c/z)tprfb_work and it calls LAPACK_(c/z)tprfb (and passes array 'work') but LAPACK_(c/z)tprfb has argument 'work' of complex type: SRC/ctprfb.f: *> WORK is COMPLEX array, dimension *> (LDWORK,N) if SIDE = 'L', *> (LDWORK,K) if SIDE = 'R'. and SRC/ztprfb.f: *> WORK is COMPLEX*16 array, dimension *> (LDWORK,N) if SIDE = 'L', *> (LDWORK,K) if SIDE = 'R'. Types of 'work' array in lapacke.h for LAPACK_(c/z)tprfb are float/double so they aren't correct. The archive includes changes in lapacke.h and source files: types of 'work' array in LAPACK_(c/z)tprfb: float/double -> lapack_complex_float/lapack_complex_double types of 'work' array in LAPACKE_(c/z)tprfb_work: float/double -> lapack_complex_float/lapack_complex_double In a similar way types of allocated 'work' arrays in LAPACKE_(c/z)tprfb were replaced. Also you can see here why MAX(1,ldwork)*MAX(n,k) isn't fully correct expression for work_size. 2. Files: lapacke_cuncsd.c lapacke_dorcsd.c lapacke_sorcsd.c lapacke_zuncsd.c From documentation of LAPACK_cuncsd (for other three LAPACK functions IWORK must have same size): *> IWORK is INTEGER array, dimension (M-MIN(P,M-P,Q,M-Q)) So it's not correct here to allocate working array with MAX(1,m-q) size. Changes: lapack_int r; r=MIN(p,m-p); r=MIN(r,q); r=MIN(r,m-q); MAX(1,m-q) -> MAX(1,m-r) 3. Files: lapacke_cgbsvxx_work.c lapacke_cgesvxx_work.c lapacke_chesvxx_work.c lapacke_cposvxx_work.c lapacke_csysvxx_work.c lapacke_dgbsvxx_work.c lapacke_dgesvxx_work.c lapacke_dposvxx_work.c lapacke_dsysvxx_work.c lapacke_sgbsvxx_work.c lapacke_sgesvxx_work.c lapacke_sposvxx_work.c lapacke_ssysvxx_work.c lapacke_zgbsvxx_work.c lapacke_zgesvxx_work.c lapacke_zhesvxx_work.c lapacke_zposvxx_work.c lapacke_zsysvxx_work.c Functions doesn't perform right transposition for 'err_bnds_norm' and 'err_bnds_comp' matrices: From documentation of these functions: *> ERR_BNDS_NORM is (SINGLE/DOUBLE) PRECISION array, dimension (NRHS, N_ERR_BNDS) *> ERR_BNDS_COMP is (SINGLE/DOUBLE) PRECISION array, dimension (NRHS, N_ERR_BNDS) So for interface functions right 'lda' for 'err_bnds_norm' and 'err_bnds_comp' matrices is 'n_err_bnds' rather than 'nhrs' in the case of LAPACK_ROW_MAJOR. 4. Files: lapacke_stpqrt.c lapacke_stpqrt_work.c lapacke/src/Makefile lapacke/src/CMakeLists.txt Interfaces for LAPACK_spqrt were added: lapacke_stpqrt.c and lapacke_stpqrt_work.c and appropriate changes were performed in Makefile and CMakeLists.txt. Declaration of LAPACK_spqrt was added to lapacke.h.
Diffstat (limited to 'lapacke/src/lapacke_zbbcsd.c')
-rw-r--r--lapacke/src/lapacke_zbbcsd.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lapacke/src/lapacke_zbbcsd.c b/lapacke/src/lapacke_zbbcsd.c
index 6ac69e0c..161ec691 100644
--- a/lapacke/src/lapacke_zbbcsd.c
+++ b/lapacke/src/lapacke_zbbcsd.c
@@ -1,5 +1,5 @@
/*****************************************************************************
- Copyright (c) 2011, Intel Corp.
+ Copyright (c) 2014, Intel Corp.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -33,7 +33,7 @@
#include "lapacke_utils.h"
-lapack_int LAPACKE_zbbcsd( int matrix_order, char jobu1, char jobu2,
+lapack_int LAPACKE_zbbcsd( int matrix_layout, char jobu1, char jobu2,
char jobv1t, char jobv2t, char trans, lapack_int m,
lapack_int p, lapack_int q, double* theta,
double* phi, lapack_complex_double* u1,
@@ -49,7 +49,7 @@ lapack_int LAPACKE_zbbcsd( int matrix_order, char jobu1, char jobu2,
double* rwork = NULL;
double rwork_query;
lapack_int nrows_u1, nrows_u2, nrows_v1t, nrows_v2t;
- if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_zbbcsd", -1 );
return -1;
}
@@ -66,28 +66,28 @@ lapack_int LAPACKE_zbbcsd( int matrix_order, char jobu1, char jobu2,
return -10;
}
if( LAPACKE_lsame( jobu1, 'y' ) ) {
- if( LAPACKE_zge_nancheck( matrix_order, nrows_u1, p, u1, ldu1 ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_u1, p, u1, ldu1 ) ) {
return -12;
}
}
if( LAPACKE_lsame( jobu2, 'y' ) ) {
- if( LAPACKE_zge_nancheck( matrix_order, nrows_u2, m-p, u2, ldu2 ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_u2, m-p, u2, ldu2 ) ) {
return -14;
}
}
if( LAPACKE_lsame( jobv1t, 'y' ) ) {
- if( LAPACKE_zge_nancheck( matrix_order, nrows_v1t, q, v1t, ldv1t ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_v1t, q, v1t, ldv1t ) ) {
return -16;
}
}
if( LAPACKE_lsame( jobv2t, 'y' ) ) {
- if( LAPACKE_zge_nancheck( matrix_order, nrows_v2t, m-q, v2t, ldv2t ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_v2t, m-q, v2t, ldv2t ) ) {
return -18;
}
}
#endif
/* Query optimal working array(s) size */
- info = LAPACKE_zbbcsd_work( matrix_order, jobu1, jobu2, jobv1t, jobv2t,
+ info = LAPACKE_zbbcsd_work( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
trans, m, p, q, theta, phi, u1, ldu1, u2, ldu2,
v1t, ldv1t, v2t, ldv2t, b11d, b11e, b12d, b12e,
b21d, b21e, b22d, b22e, &rwork_query, lrwork );
@@ -102,7 +102,7 @@ lapack_int LAPACKE_zbbcsd( int matrix_order, char jobu1, char jobu2,
goto exit_level_0;
}
/* Call middle-level interface */
- info = LAPACKE_zbbcsd_work( matrix_order, jobu1, jobu2, jobv1t, jobv2t,
+ info = LAPACKE_zbbcsd_work( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
trans, m, p, q, theta, phi, u1, ldu1, u2, ldu2,
v1t, ldv1t, v2t, ldv2t, b11d, b11e, b12d, b12e,
b21d, b21e, b22d, b22e, rwork, lrwork );