Skip to content

Commit 8ca6cfd

Browse files
committed
Fix #115
1 parent d8574a9 commit 8ca6cfd

File tree

11 files changed

+405
-0
lines changed

11 files changed

+405
-0
lines changed

LAPACKE/include/lapacke.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2533,6 +2533,11 @@ lapack_int LAPACKE_zlaset( int matrix_layout, char uplo, lapack_int m,
25332533
lapack_int LAPACKE_slasrt( char id, lapack_int n, float* d );
25342534
lapack_int LAPACKE_dlasrt( char id, lapack_int n, double* d );
25352535

2536+
lapack_int LAPACKE_slassq( lapack_int n, float* x, lapack_int incx, float* scale, float* sumsq );
2537+
lapack_int LAPACKE_dlassq( lapack_int n, double* x, lapack_int incx, double* scale, double* sumsq );
2538+
lapack_int LAPACKE_classq( lapack_int n, lapack_complex_float* x, lapack_int incx, float* scale, float* sumsq );
2539+
lapack_int LAPACKE_zlassq( lapack_int n, lapack_complex_double* x, lapack_int incx, double* scale, double* sumsq );
2540+
25362541
lapack_int LAPACKE_slaswp( int matrix_layout, lapack_int n, float* a,
25372542
lapack_int lda, lapack_int k1, lapack_int k2,
25382543
const lapack_int* ipiv, lapack_int incx );
@@ -7729,6 +7734,11 @@ lapack_int LAPACKE_zlaset_work( int matrix_layout, char uplo, lapack_int m,
77297734
lapack_int LAPACKE_slasrt_work( char id, lapack_int n, float* d );
77307735
lapack_int LAPACKE_dlasrt_work( char id, lapack_int n, double* d );
77317736

7737+
lapack_int LAPACKE_slassq_work( lapack_int n, float* x, lapack_int incx, float* scale, float* sumsq );
7738+
lapack_int LAPACKE_dlassq_work( lapack_int n, double* x, lapack_int incx, double* scale, double* sumsq );
7739+
lapack_int LAPACKE_classq_work( lapack_int n, lapack_complex_float* x, lapack_int incx, float* scale, float* sumsq );
7740+
lapack_int LAPACKE_zlassq_work( lapack_int n, lapack_complex_double* x, lapack_int incx, double* scale, double* sumsq );
7741+
77327742
lapack_int LAPACKE_slaswp_work( int matrix_layout, lapack_int n, float* a,
77337743
lapack_int lda, lapack_int k1, lapack_int k2,
77347744
const lapack_int* ipiv, lapack_int incx );
@@ -13359,6 +13369,10 @@ lapack_int LAPACKE_zhegv_2stage_work( int matrix_layout, lapack_int itype, char
1335913369
#define LAPACK_dlarfg LAPACK_GLOBAL(dlarfg,DLARFG)
1336013370
#define LAPACK_clarfg LAPACK_GLOBAL(clarfg,CLARFG)
1336113371
#define LAPACK_zlarfg LAPACK_GLOBAL(zlarfg,ZLARFG)
13372+
#define LAPACK_slassq LAPACK_GLOBAL(slassq,SLASSQ)
13373+
#define LAPACK_dlassq LAPACK_GLOBAL(dlassq,DLASSQ)
13374+
#define LAPACK_classq LAPACK_GLOBAL(classq,CLASSQ)
13375+
#define LAPACK_zlassq LAPACK_GLOBAL(zlassq,ZLASSQ)
1336213376
#define LAPACK_slarft LAPACK_GLOBAL(slarft,SLARFT)
1336313377
#define LAPACK_dlarft LAPACK_GLOBAL(dlarft,DLARFT)
1336413378
#define LAPACK_clarft LAPACK_GLOBAL(clarft,CLARFT)
@@ -17943,6 +17957,10 @@ void LAPACK_clarfg( lapack_int* n, lapack_complex_float* alpha,
1794317957
void LAPACK_zlarfg( lapack_int* n, lapack_complex_double* alpha,
1794417958
lapack_complex_double* x, lapack_int* incx,
1794517959
lapack_complex_double* tau );
17960+
void LAPACK_slassq( lapack_int *n, float* x, lapack_int *incx, float* scale, float* sumsq );
17961+
void LAPACK_dlassq( lapack_int *n, double* x, lapack_int *incx, double* scale, double* sumsq );
17962+
void LAPACK_classq( lapack_int *n, lapack_complex_float* x, lapack_int *incx, float* scale, float* sumsq );
17963+
void LAPACK_zlassq( lapack_int *n, lapack_complex_double* x, lapack_int *incx, double* scale, double* sumsq );
1794617964
void LAPACK_slarft( char* direct, char* storev, lapack_int* n, lapack_int* k,
1794717965
const float* v, lapack_int* ldv, const float* tau, float* t,
1794817966
lapack_int* ldt );

LAPACKE/src/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,8 @@ lapacke_clascl.c
323323
lapacke_clascl_work.c
324324
lapacke_claset.c
325325
lapacke_claset_work.c
326+
lapacke_classq.c
327+
lapacke_classq_work.c
326328
lapacke_claswp.c
327329
lapacke_claswp_work.c
328330
lapacke_clauum.c
@@ -793,6 +795,8 @@ lapacke_dlaset.c
793795
lapacke_dlaset_work.c
794796
lapacke_dlasrt.c
795797
lapacke_dlasrt_work.c
798+
lapacke_dlassq.c
799+
lapacke_dlassq_work.c
796800
lapacke_dlaswp.c
797801
lapacke_dlaswp_work.c
798802
lapacke_dlauum.c
@@ -1347,6 +1351,8 @@ lapacke_slaset.c
13471351
lapacke_slaset_work.c
13481352
lapacke_slasrt.c
13491353
lapacke_slasrt_work.c
1354+
lapacke_slassq.c
1355+
lapacke_slassq_work.c
13501356
lapacke_slaswp.c
13511357
lapacke_slaswp_work.c
13521358
lapacke_slauum.c
@@ -2009,6 +2015,8 @@ lapacke_zlascl.c
20092015
lapacke_zlascl_work.c
20102016
lapacke_zlaset.c
20112017
lapacke_zlaset_work.c
2018+
lapacke_zlassq.c
2019+
lapacke_zlassq_work.c
20122020
lapacke_zlaswp.c
20132021
lapacke_zlaswp_work.c
20142022
lapacke_zlauum.c

LAPACKE/src/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,8 @@ lapacke_clascl.o \
362362
lapacke_clascl_work.o \
363363
lapacke_claset.o \
364364
lapacke_claset_work.o \
365+
lapacke_classq.o \
366+
lapacke_classq_work.o \
365367
lapacke_claswp.o \
366368
lapacke_claswp_work.o \
367369
lapacke_clauum.o \
@@ -832,6 +834,8 @@ lapacke_dlaset.o \
832834
lapacke_dlaset_work.o \
833835
lapacke_dlasrt.o \
834836
lapacke_dlasrt_work.o \
837+
lapacke_dlassq.o \
838+
lapacke_dlassq_work.o \
835839
lapacke_dlaswp.o \
836840
lapacke_dlaswp_work.o \
837841
lapacke_dlauum.o \
@@ -1388,6 +1392,8 @@ lapacke_slaset.o \
13881392
lapacke_slaset_work.o \
13891393
lapacke_slasrt.o \
13901394
lapacke_slasrt_work.o \
1395+
lapacke_slassq.o \
1396+
lapacke_slassq_work.o \
13911397
lapacke_slaswp.o \
13921398
lapacke_slaswp_work.o \
13931399
lapacke_slauum.o \
@@ -2056,6 +2062,8 @@ lapacke_zlascl.o \
20562062
lapacke_zlascl_work.o \
20572063
lapacke_zlaset.o \
20582064
lapacke_zlaset_work.o \
2065+
lapacke_zlassq.o \
2066+
lapacke_zlassq_work.o \
20592067
lapacke_zlaswp.o \
20602068
lapacke_zlaswp_work.o \
20612069
lapacke_zlauum.o \

LAPACKE/src/lapacke_classq.c

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*****************************************************************************
2+
Copyright (c) 2017, Intel Corp.
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright notice,
9+
this list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
* Neither the name of Intel Corporation nor the names of its contributors
14+
may be used to endorse or promote products derived from this software
15+
without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27+
THE POSSIBILITY OF SUCH DAMAGE.
28+
*****************************************************************************
29+
* Contents: Native high-level C interface to LAPACK function classq
30+
* Author: Julien Langou
31+
* Generated February, 2017
32+
*****************************************************************************/
33+
34+
#include "lapacke_utils.h"
35+
36+
lapack_int LAPACKE_classq( lapack_int n, lapack_complex_float* x,
37+
lapack_int incx, float* scale, float* sumsq )
38+
{
39+
#ifndef LAPACK_DISABLE_NAN_CHECK
40+
/* Optionally check input vector `x` and in/out scalars `scale` and `sumsq` for NaNs */
41+
if( LAPACKE_c_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
42+
return -2;
43+
}
44+
if( LAPACKE_s_nancheck( 1, scale, 1 ) ) {
45+
return -4;
46+
}
47+
if( LAPACKE_s_nancheck( 1, sumsq, 1 ) ) {
48+
return -5;
49+
}
50+
#endif
51+
return LAPACKE_classq_work( n, x, incx, scale, sumsq );
52+
}

LAPACKE/src/lapacke_classq_work.c

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*****************************************************************************
2+
Copyright (c) 2017, Intel Corp.
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright notice,
9+
this list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
* Neither the name of Intel Corporation nor the names of its contributors
14+
may be used to endorse or promote products derived from this software
15+
without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27+
THE POSSIBILITY OF SUCH DAMAGE.
28+
*****************************************************************************
29+
* Contents: Native middle-level C interface to LAPACK function classq
30+
* Author: Julien Langou
31+
* Generated February, 2017
32+
*****************************************************************************/
33+
34+
#include "lapacke_utils.h"
35+
36+
lapack_int LAPACKE_classq_work( lapack_int n, lapack_complex_float* x, lapack_int incx, float* scale, float* sumsq )
37+
{
38+
lapack_int info = 0;
39+
LAPACK_classq( &n, x, &incx, scale, sumsq );
40+
return info;
41+
}

LAPACKE/src/lapacke_dlassq.c

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*****************************************************************************
2+
Copyright (c) 2017, Intel Corp.
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright notice,
9+
this list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
* Neither the name of Intel Corporation nor the names of its contributors
14+
may be used to endorse or promote products derived from this software
15+
without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27+
THE POSSIBILITY OF SUCH DAMAGE.
28+
*****************************************************************************
29+
* Contents: Native high-level C interface to LAPACK function dlassq
30+
* Author: Julien langou
31+
* Generated February 2017
32+
*****************************************************************************/
33+
34+
#include "lapacke_utils.h"
35+
36+
lapack_int LAPACKE_dlassq( lapack_int n, double* x, lapack_int incx, double* scale, double* sumsq )
37+
{
38+
#ifndef LAPACK_DISABLE_NAN_CHECK
39+
/* Optionally check input vector `x` and in/out scalars `scale` and `sumsq` for NaNs */
40+
if( LAPACKE_d_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
41+
return -2;
42+
}
43+
if( LAPACKE_d_nancheck( 1, scale, 1 ) ) {
44+
return -4;
45+
}
46+
if( LAPACKE_d_nancheck( 1, sumsq, 1 ) ) {
47+
return -5;
48+
}
49+
#endif
50+
return LAPACKE_dlassq_work( n, x, incx, scale, sumsq );
51+
}

LAPACKE/src/lapacke_dlassq_work.c

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*****************************************************************************
2+
Copyright (c) 2017, Intel Corp.
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright notice,
9+
this list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
* Neither the name of Intel Corporation nor the names of its contributors
14+
may be used to endorse or promote products derived from this software
15+
without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27+
THE POSSIBILITY OF SUCH DAMAGE.
28+
*****************************************************************************
29+
* Contents: Native middle-level C interface to LAPACK function dlassq
30+
* Author: Julien Langou
31+
* Generated February, 2017
32+
*****************************************************************************/
33+
34+
#include "lapacke_utils.h"
35+
36+
lapack_int LAPACKE_dlassq_work( lapack_int n, double* x, lapack_int incx, double* scale, double* sumsq )
37+
{
38+
lapack_int info = 0;
39+
LAPACK_dlassq( &n, x, &incx, scale, sumsq );
40+
return info;
41+
}

LAPACKE/src/lapacke_slassq.c

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*****************************************************************************
2+
Copyright (c) 2017, Intel Corp.
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright notice,
9+
this list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
* Neither the name of Intel Corporation nor the names of its contributors
14+
may be used to endorse or promote products derived from this software
15+
without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27+
THE POSSIBILITY OF SUCH DAMAGE.
28+
*****************************************************************************
29+
* Contents: Native high-level C interface to LAPACK function slassq
30+
* Author: Julien Langou
31+
* Generated February, 2017
32+
*****************************************************************************/
33+
34+
#include "lapacke_utils.h"
35+
36+
lapack_int LAPACKE_slassq( lapack_int n, float* x, lapack_int incx, float* scale, float* sumsq )
37+
{
38+
#ifndef LAPACK_DISABLE_NAN_CHECK
39+
/* Optionally check input vector `x` and in/out scalars `scale` and `sumsq` for NaNs */
40+
if( LAPACKE_s_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
41+
return -2;
42+
}
43+
if( LAPACKE_s_nancheck( 1, scale, 1 ) ) {
44+
return -4;
45+
}
46+
if( LAPACKE_s_nancheck( 1, sumsq, 1 ) ) {
47+
return -5;
48+
}
49+
#endif
50+
return LAPACKE_slassq_work( n, x, incx, scale, sumsq );
51+
}

0 commit comments

Comments
 (0)