Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions cmake/lapack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ set(SCLAUX
la_constants.f90
sbdsdc.f
sbdsqr.f sdisna.f slabad.f slacpy.f sladiv.f slae2.f slaebz.f
slaed0.f slaed1.f slaed2.f slaed4.f slaed5.f slaed6.f
slaed7.f slaed8.f slaed9.f slaeda.f slaev2.f slagtf.f
slaed0.f slaed0_br.f slaed1.f slaed2.f slaed4.f slaed4_br.f slaed5.f
slaed6.f slaed7.f slaed7_br.f slaed8.f slaed9.f slaed9_br.f
slaeda.f slaev2.f slagtf.f
slagts.f slamrg.f slanst.f
slapy2.f slapy3.f slarnv.f
slarra.f slarrb.f slarrc.f slarrd.f slarre.f slarrf.f slarrj.f
Expand All @@ -22,7 +23,7 @@ set(SCLAUX
slasd7.f slasd8.f slasda.f slasdq.f slasdt.f
slaset.f slasq1.f slasq2.f slasq3.f slasq4.f slasq5.f slasq6.f
slasr.f slasrt.f slassq.f90 slasv2.f spttrf.f sstebz.f sstedc.f
ssteqr.f ssterf.f slaisnan.f sisnan.f slarmm.f
sstebr.f ssteqr.f ssterf.f slaisnan.f sisnan.f slarmm.f
slartgp.f slartgs.f ../INSTALL/sroundup_lwork.f
../INSTALL/second_${TIMER}.f)

Expand All @@ -31,8 +32,9 @@ set(DZLAUX
dbdsdc.f
dbdsvdx.f dstevx.f dstein.f
dbdsqr.f ddisna.f dlabad.f dlacpy.f dladiv.f dlae2.f dlaebz.f
dlaed0.f dlaed1.f dlaed2.f dlaed4.f dlaed5.f dlaed6.f
dlaed7.f dlaed8.f dlaed9.f dlaeda.f dlaev2.f dlagtf.f
dlaed0.f dlaed0_br.f dlaed1.f dlaed2.f dlaed4.f dlaed4_br.f dlaed5.f
dlaed6.f dlaed7.f dlaed7_br.f dlaed8.f dlaed9.f dlaed9_br.f
dlaeda.f dlaev2.f dlagtf.f
dlagts.f dlamrg.f dlanst.f
dlapy2.f dlapy3.f dlarnv.f
dlarra.f dlarrb.f dlarrc.f dlarrd.f dlarre.f dlarrf.f dlarrj.f
Expand All @@ -42,7 +44,7 @@ set(DZLAUX
dlasd7.f dlasd8.f dlasda.f dlasdq.f dlasdt.f
dlasq1.f dlasq2.f dlasq3.f dlasq4.f dlasq5.f dlasq6.f
dlasr.f dlasrt.f dlassq.f90 dlasv2.f dpttrf.f dstebz.f dstedc.f
dsteqr.f dsterf.f dlaisnan.f disnan.f dlarmm.f
dstebr.f dsteqr.f dsterf.f dlaisnan.f disnan.f dlarmm.f
dlartgp.f dlartgs.f ../INSTALL/droundup_lwork.f
../INSTALL/dlamch.f ../INSTALL/dsecnd_${TIMER}.f)

Expand Down
12 changes: 8 additions & 4 deletions exports/gensymbol
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ lapackobjs2sc="
slasd0 slasd1 slasd2 slasd3 slasd4 slasd5 slasd6
slasd7 slasd8 slasda slasdq slasdt
slaset slasq1 slasq2 slasq3 slasq4 slasq5 slasq6
slasr slasrt slassq slasv2 spttrf sstebz sstedc
ssteqr ssterf slaisnan sisnan
slasr slasrt slassq slasv2 spttrf sstebz sstebr
sstedc ssteqr ssterf slaisnan sisnan
slartgp slartgs
"

Expand All @@ -300,8 +300,8 @@ lapackobjs2dz="
dlasd0 dlasd1 dlasd2 dlasd3 dlasd4 dlasd5 dlasd6
dlasd7 dlasd8 dlasda dlasdq dlasdt
dlaset dlasq1 dlasq2 dlasq3 dlasq4 dlasq5 dlasq6
dlasr dlasrt dlassq dlasv2 dpttrf dstebz dstedc
dsteqr dsterf dlaisnan disnan
dlasr dlasrt dlassq dlasv2 dpttrf dstebz dstebr
dstedc dsteqr dsterf dlaisnan disnan
dlartgp dlartgs
dlamch dlamc3
"
Expand Down Expand Up @@ -2117,6 +2117,8 @@ lapackeobjsd="
LAPACKE_dsptrs_work
LAPACKE_dstebz
LAPACKE_dstebz_work
LAPACKE_dstebr
LAPACKE_dstebr_work
LAPACKE_dstedc
LAPACKE_dstedc_work
LAPACKE_dstegr
Expand Down Expand Up @@ -2736,6 +2738,8 @@ lapackeobjss="
LAPACKE_ssptrs_work
LAPACKE_sstebz
LAPACKE_sstebz_work
LAPACKE_sstebr
LAPACKE_sstebr_work
LAPACKE_sstedc
LAPACKE_sstedc_work
LAPACKE_sstegr
Expand Down
18 changes: 18 additions & 0 deletions lapack-netlib/LAPACKE/include/lapack.h
Original file line number Diff line number Diff line change
Expand Up @@ -16368,6 +16368,24 @@ void LAPACK_sstebz_base(
#define LAPACK_sstebz(...) LAPACK_sstebz_base(__VA_ARGS__)
#endif

#define LAPACK_dstebr LAPACK_GLOBAL(dstebr,DSTEBR)
void LAPACK_dstebr(
lapack_int const* n,
double* D,
double* E,
double* work, lapack_int const* lwork,
lapack_int* iwork, lapack_int const* liwork,
lapack_int* info );

#define LAPACK_sstebr LAPACK_GLOBAL(sstebr,SSTEBR)
void LAPACK_sstebr(
lapack_int const* n,
float* D,
float* E,
float* work, lapack_int const* lwork,
lapack_int* iwork, lapack_int const* liwork,
lapack_int* info );

#define LAPACK_cstedc_base LAPACK_GLOBAL(cstedc,CSTEDC)
void LAPACK_cstedc_base(
char const* compz,
Expand Down
10 changes: 10 additions & 0 deletions lapack-netlib/LAPACKE/include/lapacke.h
Original file line number Diff line number Diff line change
Expand Up @@ -3574,6 +3574,9 @@ lapack_int LAPACKE_dstebz( char range, char order, lapack_int n, double vl,
lapack_int* m, lapack_int* nsplit, double* w,
lapack_int* iblock, lapack_int* isplit );

lapack_int LAPACKE_sstebr( lapack_int n, float* d, float* e );
lapack_int LAPACKE_dstebr( lapack_int n, double* d, double* e );

lapack_int LAPACKE_sstedc( int matrix_layout, char compz, lapack_int n, float* d,
float* e, float* z, lapack_int ldz );
lapack_int LAPACKE_dstedc( int matrix_layout, char compz, lapack_int n,
Expand Down Expand Up @@ -9197,6 +9200,13 @@ lapack_int LAPACKE_dstebz_work( char range, char order, lapack_int n, double vl,
lapack_int* iblock, lapack_int* isplit,
double* work, lapack_int* iwork );

lapack_int LAPACKE_sstebr_work( lapack_int n, float* d, float* e, float* work,
lapack_int lwork, lapack_int* iwork,
lapack_int liwork );
lapack_int LAPACKE_dstebr_work( lapack_int n, double* d, double* e,
double* work, lapack_int lwork,
lapack_int* iwork, lapack_int liwork );

lapack_int LAPACKE_sstedc_work( int matrix_layout, char compz, lapack_int n,
float* d, float* e, float* z, lapack_int ldz,
float* work, lapack_int lwork,
Expand Down
4 changes: 4 additions & 0 deletions lapack-netlib/LAPACKE/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,8 @@ lapacke_dsptrs.c
lapacke_dsptrs_work.c
lapacke_dstebz.c
lapacke_dstebz_work.c
lapacke_dstebr.c
lapacke_dstebr_work.c
lapacke_dstedc.c
lapacke_dstedc_work.c
lapacke_dstegr.c
Expand Down Expand Up @@ -1584,6 +1586,8 @@ lapacke_ssptrs.c
lapacke_ssptrs_work.c
lapacke_sstebz.c
lapacke_sstebz_work.c
lapacke_sstebr.c
lapacke_sstebr_work.c
lapacke_sstedc.c
lapacke_sstedc_work.c
lapacke_sstegr.c
Expand Down
4 changes: 4 additions & 0 deletions lapack-netlib/LAPACKE/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,8 @@ lapacke_dsptrs.o \
lapacke_dsptrs_work.o \
lapacke_dstebz.o \
lapacke_dstebz_work.o \
lapacke_dstebr.o \
lapacke_dstebr_work.o \
lapacke_dstedc.o \
lapacke_dstedc_work.o \
lapacke_dstegr.o \
Expand Down Expand Up @@ -1653,6 +1655,8 @@ lapacke_ssptrs.o \
lapacke_ssptrs_work.o \
lapacke_sstebz.o \
lapacke_sstebz_work.o \
lapacke_sstebr.o \
lapacke_sstebr_work.o \
lapacke_sstedc.o \
lapacke_sstedc_work.o \
lapacke_sstegr.o \
Expand Down
87 changes: 87 additions & 0 deletions lapack-netlib/LAPACKE/src/lapacke_dstebr.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/*****************************************************************************
Copyright (c) 2014, Intel Corp.
Copyright (c) 2026, Ruiyi Zhan and Shaoshuai Zhang.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Intel Corporation nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function dstebr
* Author: Ruiyi Zhan and Shaoshuai Zhang
*****************************************************************************/

#include "lapacke_utils.h"

lapack_int LAPACKE_dstebr( lapack_int n, double* d, double* e )
{
lapack_int info = 0;
lapack_int liwork = -1;
lapack_int lwork = -1;
lapack_int* iwork = NULL;
double* work = NULL;
lapack_int iwork_query;
double work_query;
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_d_nancheck( n, d, 1 ) ) {
return -2;
}
if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
return -3;
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_dstebr_work( n, d, e, &work_query, lwork,
&iwork_query, liwork );
if( info != 0 ) {
goto exit_level_0;
}
liwork = iwork_query;
lwork = (lapack_int)work_query;
/* Allocate memory for work arrays */
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );
if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_dstebr_work( n, d, e, work, lwork, iwork,
liwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_1:
LAPACKE_free( iwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_dstebr", info );
}
return info;
}
44 changes: 44 additions & 0 deletions lapack-netlib/LAPACKE/src/lapacke_dstebr_work.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*****************************************************************************
Copyright (c) 2014, Intel Corp.
Copyright (c) 2026, Ruiyi Zhan and Shaoshuai Zhang.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Intel Corporation nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dstebr
* Author: Ruiyi Zhan and Shaoshuai Zhang
*****************************************************************************/

#include "lapacke_utils.h"

lapack_int LAPACKE_dstebr_work( lapack_int n, double* d, double* e,
double* work, lapack_int lwork,
lapack_int* iwork, lapack_int liwork )
{
lapack_int info = 0;
/* Call LAPACK function and adjust info */
LAPACK_dstebr( &n, d, e, work, &lwork, iwork, &liwork, &info );
return info;
}
87 changes: 87 additions & 0 deletions lapack-netlib/LAPACKE/src/lapacke_sstebr.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/*****************************************************************************
Copyright (c) 2014, Intel Corp.
Copyright (c) 2026, Ruiyi Zhan and Shaoshuai Zhang.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Intel Corporation nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function sstebr
* Author: Ruiyi Zhan and Shaoshuai Zhang
*****************************************************************************/

#include "lapacke_utils.h"

lapack_int LAPACKE_sstebr( lapack_int n, float* d, float* e )
{
lapack_int info = 0;
lapack_int liwork = -1;
lapack_int lwork = -1;
lapack_int* iwork = NULL;
float* work = NULL;
lapack_int iwork_query;
float work_query;
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_s_nancheck( n, d, 1 ) ) {
return -2;
}
if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
return -3;
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_sstebr_work( n, d, e, &work_query, lwork,
&iwork_query, liwork );
if( info != 0 ) {
goto exit_level_0;
}
liwork = iwork_query;
lwork = (lapack_int)work_query;
/* Allocate memory for work arrays */
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );
if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_sstebr_work( n, d, e, work, lwork, iwork,
liwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_1:
LAPACKE_free( iwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_sstebr", info );
}
return info;
}
Loading
Loading