Skip to content
Merged
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
12 changes: 8 additions & 4 deletions cmake/lapack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ set(SLASRC
slaorhr_col_getrfnp2.f sorgtsqr.f sorgtsqr_row.f sorhr_col.f
slatrs3.f strsyl3.f sgelst.f sgedmd.f90 sgedmdq.f90 sgecxx.f
sbdsvdmr3.f sbdsvdmr3_work.f sgesvdmr3.f sbdtgk.f slar1v_tgk.f
slarrf_tgk.f slarrb_tgk.f slarrv_tgk.f)
slarrf_tgk.f slarrb_tgk.f slarrv_tgk.f slaed0_br.f slaed0_merge_pair.f
slaed4_br.f slaed7_br.f slaed8_br.f slaed9_br.f sstebr.f ssteqr_boundary_br.f)

set(SXLASRC sgesvxx.f sgerfsx.f sla_gerfsx_extended.f sla_geamv.f
sla_gercond.f sla_gerpvgrw.f ssysvxx.f ssyrfsx.f
Expand Down Expand Up @@ -332,7 +333,8 @@ set(DLASRC
dlaorhr_col_getrfnp2.f dorgtsqr.f dorgtsqr_row.f dorhr_col.f
dlatrs3.f dtrsyl3.f dgelst.f dgedmd.f90 dgedmdq.f90 dgecxx.f
dbdsvdmr3.f dbdsvdmr3_work.f dgesvdmr3.f dbdtgk.f dlar1v_tgk.f
dlarrf_tgk.f dlarrb_tgk.f dlarrv_tgk.f)
dlarrf_tgk.f dlarrb_tgk.f dlarrv_tgk.f dlaed0_br.f dlaed0_merge_pair.f
dlaed4_br.f dlaed7_br.f dlaed8_br.f dlaed9_br.f dstebr.f dsteqr_boundary_br.f)

set(DXLASRC dgesvxx.f dgerfsx.f dla_gerfsx_extended.f dla_geamv.f
dla_gercond.f dla_gerpvgrw.f dsysvxx.f dsyrfsx.f
Expand Down Expand Up @@ -647,7 +649,8 @@ set(SLASRC
slaorhr_col_getrfnp2.c sorgtsqr.c sorgtsqr_row.c sorhr_col.c
slatrs3.c strsyl3.c sgelst.c sgedmd.c sgedmdq.c sgecxx.c
sbdsvdmr3.c sbdsvdmr3_work.c sgesvdmr3.c sbdtgk.c slar1v_tgk.c
slarrf_tgk.c slarrb_tgk.c slarrv_tgk.c)
slarrf_tgk.c slarrb_tgk.c slarrv_tgk.c slaed0_br.c slaed0_merge_pair.c
slaed4_br.c slaed7_br.c slaed8_br.c slaed9_br.c sstebr.c ssteqr_boundary_br.c)

set(SXLASRC sgesvxx.c sgerfsx.c sla_gerfsx_extended.c sla_geamv.c
sla_gercond.c sla_gerpvgrw.c ssysvxx.c ssyrfsx.c
Expand Down Expand Up @@ -840,7 +843,8 @@ set(DLASRC
dlaorhr_col_getrfnp2.c dorgtsqr.c dorgtsqr_row.c dorhr_col.c
dlatrs3.c dtrsyl3.c dgelst.c dgedmd.c dgedmdq.c dgecxx.c
dbdsvdmr3.c dbdsvdmr3_work.c dgesvdmr3.c dbdtgk.c dlar1v_tgk.c
dlarrf_tgk.c dlarrb_tgk.c dlarrv_tgk.c)
dlarrf_tgk.c dlarrb_tgk.c dlarrv_tgk.c dlaed0_br.c dlaed0_merge_pair.c
dlaed4_br.c dlaed7_br.c dlaed8_br.c dlaed9_br.c dstebr.c dsteqr_boundary_br.c)

set(DXLASRC dgesvxx.c dgerfsx.c dla_gerfsx_extended.c dla_geamv.c
dla_gercond.c dla_gerpvgrw.c dsysvxx.c dsyrfsx.c
Expand Down
4 changes: 4 additions & 0 deletions cmake/lapacke.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,8 @@ set(DSRC
lapacke_dsptri_work.c
lapacke_dsptrs.c
lapacke_dsptrs_work.c
lapacke_dstebr.c
lapacke_dstebr_work.c
lapacke_dstebz.c
lapacke_dstebz_work.c
lapacke_dstedc.c
Expand Down Expand Up @@ -1619,6 +1621,8 @@ set(SSRC
lapacke_ssptri_work.c
lapacke_ssptrs.c
lapacke_ssptrs_work.c
lapacke_sstebr.c
lapacke_sstebr_work.c
lapacke_sstebz.c
lapacke_sstebz_work.c
lapacke_sstedc.c
Expand Down
20 changes: 20 additions & 0 deletions exports/gensymbol
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,14 @@ lapackobjs2d="$lapackobjs2d
dlarrb_tgk
dlarrf_tgk
dlarrv_tgk
dlaed0_br
dlaed0_merge_pair
dlaed4_br
dlaed7_br
dlaed8_br
dlaed9_br
dstebr
dsteqr_boundary_br
"
# dlaqz0
# dlaqz1
Expand All @@ -973,6 +981,14 @@ lapackobjs2s="$lapackobjs2s
slarrb_tgk
slarrf_tgk
slarrv_tgk
dlaed0_br
dlaed0_merge_pair
dlaed4_br
dlaed7_br
dlaed8_br
dlaed9_br
dstebr
dsteqr_boundary_br
"

lapackobjs2z="$lapackobjs2z
Expand Down Expand Up @@ -2401,6 +2417,8 @@ lapackeobjsd="
LAPACKE_dbdsvdmr3_work
LAPACKE_dgesvdmr3
LAPACKE_dgesvdmr3_work
LAPACKE_dstebr
LAPACKE_dstebr_work
"

lapackeobjss="
Expand Down Expand Up @@ -3024,6 +3042,8 @@ lapackeobjss="
LAPACKE_sbdsvdmr3_work
LAPACKE_sgesvdmr3
LAPACKE_sgesvdmr3_work
LAPACKE_sstebr
LAPACKE_sstebr_work
"

lapackeobjsz="
Expand Down
28 changes: 24 additions & 4 deletions exports/gensymbol.pl
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,15 @@
dlar1v_tgk,
dlarrb_tgk,
dlarrf_tgk,
dlarrv_tgk
dlarrv_tgk,
dlaed0_br,
dlaed0_merge_pair,
dlaed4_br,
dlaed7_br,
dlaed8_br,
dlaed9_br,
dstebr,
dsteqr_boundary_br
);

@lapackobjs2s = (@lapackobjs2s,
Expand All @@ -941,7 +949,15 @@
slar1v_tgk,
slarrb_tgk,
slarrf_tgk,
slarrv_tgk
slarrv_tgk,
slaed0_br,
slaed0_merge_pair,
slaed4_br,
slaed7_br,
slaed8_br,
slaed9_br,
sstebr,
ssteqr_boundary_br
);

@lapackobjs2z = (@lapackobjs2z,
Expand Down Expand Up @@ -2364,7 +2380,9 @@
LAPACKE_dbdsvdmr3,
LAPACKE_dbdsvdmr3_work,
LAPACKE_dgesvdmr3,
LAPACKE_dgesvdmr3_work
LAPACKE_dgesvdmr3_work,
LAPACKE_dstebr,
LAPACKE_dstebr_work
);
@lapackeobjss = (
LAPACKE_sgb_nancheck,
Expand Down Expand Up @@ -2986,7 +3004,9 @@
LAPACKE_sbdsvdmr3,
LAPACKE_sbdsvdmr3_work,
LAPACKE_sgesvdmr3,
LAPACKE_sgesvdmr3_work
LAPACKE_sgesvdmr3_work,
LAPACKE_sstebr,
LAPACKE_sstebr_work
);
@lapackeobjsz = (
LAPACKE_zgb_nancheck,
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 @@ -16650,6 +16650,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 @@ -3653,6 +3653,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 @@ -9367,6 +9370,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/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,8 @@ lapacke_dsptri.o \
lapacke_dsptri_work.o \
lapacke_dsptrs.o \
lapacke_dsptrs_work.o \
lapacke_dstebr.o \
lapacke_dstebr_work.o \
lapacke_dstebz.o \
lapacke_dstebz_work.o \
lapacke_dstedc.o \
Expand Down Expand Up @@ -1667,6 +1669,8 @@ lapacke_ssptri.o \
lapacke_ssptri_work.o \
lapacke_ssptrs.o \
lapacke_ssptrs_work.o \
lapacke_sstebr.o \
lapacke_sstebr_work.o \
lapacke_sstebz.o \
lapacke_sstebz_work.o \
lapacke_sstedc.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 API_SUFFIX(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( API_SUFFIX(LAPACKE_d_nancheck)( n, d, 1 ) ) {
return -2;
}
if( API_SUFFIX(LAPACKE_d_nancheck)( n-1, e, 1 ) ) {
return -3;
}
}
#endif
/* Query optimal working array(s) size */
info = API_SUFFIX(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 = API_SUFFIX(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 ) {
API_SUFFIX(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 API_SUFFIX(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;
}
Loading
Loading