aboutsummaryrefslogtreecommitdiff
path: root/LAPACKE/src
diff options
context:
space:
mode:
Diffstat (limited to 'LAPACKE/src')
-rw-r--r--LAPACKE/src/CMakeLists.txt2032
-rw-r--r--LAPACKE/src/Makefile2085
-rw-r--r--LAPACKE/src/lapacke_cbbcsd.c115
-rw-r--r--LAPACKE/src/lapacke_cbbcsd_work.c205
-rw-r--r--LAPACKE/src/lapacke_cbdsqr.c89
-rw-r--r--LAPACKE/src/lapacke_cbdsqr_work.c150
-rw-r--r--LAPACKE/src/lapacke_cgbbrd.c86
-rw-r--r--LAPACKE/src/lapacke_cgbbrd_work.c163
-rw-r--r--LAPACKE/src/lapacke_cgbcon.c81
-rw-r--r--LAPACKE/src/lapacke_cgbcon_work.c87
-rw-r--r--LAPACKE/src/lapacke_cgbequ.c54
-rw-r--r--LAPACKE/src/lapacke_cgbequ_work.c85
-rw-r--r--LAPACKE/src/lapacke_cgbequb.c54
-rw-r--r--LAPACKE/src/lapacke_cgbequb_work.c85
-rw-r--r--LAPACKE/src/lapacke_cgbrfs.c92
-rw-r--r--LAPACKE/src/lapacke_cgbrfs_work.c143
-rw-r--r--LAPACKE/src/lapacke_cgbrfsx.c111
-rw-r--r--LAPACKE/src/lapacke_cgbrfsx_work.c174
-rw-r--r--LAPACKE/src/lapacke_cgbsv.c57
-rw-r--r--LAPACKE/src/lapacke_cgbsv_work.c106
-rw-r--r--LAPACKE/src/lapacke_cgbsvx.c107
-rw-r--r--LAPACKE/src/lapacke_cgbsvx_work.c159
-rw-r--r--LAPACKE/src/lapacke_cgbsvxx.c114
-rw-r--r--LAPACKE/src/lapacke_cgbsvxx_work.c187
-rw-r--r--LAPACKE/src/lapacke_cgbtrf.c52
-rw-r--r--LAPACKE/src/lapacke_cgbtrf_work.c86
-rw-r--r--LAPACKE/src/lapacke_cgbtrs.c57
-rw-r--r--LAPACKE/src/lapacke_cgbtrs_work.c105
-rw-r--r--LAPACKE/src/lapacke_cgebak.c56
-rw-r--r--LAPACKE/src/lapacke_cgebak_work.c85
-rw-r--r--LAPACKE/src/lapacke_cgebal.c54
-rw-r--r--LAPACKE/src/lapacke_cgebal_work.c96
-rw-r--r--LAPACKE/src/lapacke_cgebrd.c79
-rw-r--r--LAPACKE/src/lapacke_cgebrd_work.c92
-rw-r--r--LAPACKE/src/lapacke_cgecon.c80
-rw-r--r--LAPACKE/src/lapacke_cgecon_work.c83
-rw-r--r--LAPACKE/src/lapacke_cgeequ.c53
-rw-r--r--LAPACKE/src/lapacke_cgeequ_work.c82
-rw-r--r--LAPACKE/src/lapacke_cgeequb.c53
-rw-r--r--LAPACKE/src/lapacke_cgeequb_work.c83
-rw-r--r--LAPACKE/src/lapacke_cgees.c103
-rw-r--r--LAPACKE/src/lapacke_cgees_work.c118
-rw-r--r--LAPACKE/src/lapacke_cgeesx.c105
-rw-r--r--LAPACKE/src/lapacke_cgeesx_work.c123
-rw-r--r--LAPACKE/src/lapacke_cgeev.c89
-rw-r--r--LAPACKE/src/lapacke_cgeev_work.c141
-rw-r--r--LAPACKE/src/lapacke_cgeevx.c95
-rw-r--r--LAPACKE/src/lapacke_cgeevx_work.c147
-rw-r--r--LAPACKE/src/lapacke_cgehrd.c78
-rw-r--r--LAPACKE/src/lapacke_cgehrd_work.c90
-rw-r--r--LAPACKE/src/lapacke_cgelq2.c68
-rw-r--r--LAPACKE/src/lapacke_cgelq2_work.c84
-rw-r--r--LAPACKE/src/lapacke_cgelqf.c77
-rw-r--r--LAPACKE/src/lapacke_cgelqf_work.c89
-rw-r--r--LAPACKE/src/lapacke_cgels.c82
-rw-r--r--LAPACKE/src/lapacke_cgels_work.c112
-rw-r--r--LAPACKE/src/lapacke_cgelsd.c110
-rw-r--r--LAPACKE/src/lapacke_cgelsd_work.c114
-rw-r--r--LAPACKE/src/lapacke_cgelss.c95
-rw-r--r--LAPACKE/src/lapacke_cgelss_work.c113
-rw-r--r--LAPACKE/src/lapacke_cgelsy.c95
-rw-r--r--LAPACKE/src/lapacke_cgelsy_work.c113
-rw-r--r--LAPACKE/src/lapacke_cgemqrt.c78
-rw-r--r--LAPACKE/src/lapacke_cgemqrt_work.c120
-rw-r--r--LAPACKE/src/lapacke_cgeqlf.c77
-rw-r--r--LAPACKE/src/lapacke_cgeqlf_work.c89
-rw-r--r--LAPACKE/src/lapacke_cgeqp3.c87
-rw-r--r--LAPACKE/src/lapacke_cgeqp3_work.c92
-rw-r--r--LAPACKE/src/lapacke_cgeqpf.c77
-rw-r--r--LAPACKE/src/lapacke_cgeqpf_work.c84
-rw-r--r--LAPACKE/src/lapacke_cgeqr2.c68
-rw-r--r--LAPACKE/src/lapacke_cgeqr2_work.c84
-rw-r--r--LAPACKE/src/lapacke_cgeqrf.c77
-rw-r--r--LAPACKE/src/lapacke_cgeqrf_work.c89
-rw-r--r--LAPACKE/src/lapacke_cgeqrfp.c77
-rw-r--r--LAPACKE/src/lapacke_cgeqrfp_work.c89
-rw-r--r--LAPACKE/src/lapacke_cgeqrt.c69
-rw-r--r--LAPACKE/src/lapacke_cgeqrt2.c51
-rw-r--r--LAPACKE/src/lapacke_cgeqrt2_work.c99
-rw-r--r--LAPACKE/src/lapacke_cgeqrt3.c51
-rw-r--r--LAPACKE/src/lapacke_cgeqrt3_work.c99
-rw-r--r--LAPACKE/src/lapacke_cgeqrt_work.c102
-rw-r--r--LAPACKE/src/lapacke_cgerfs.c90
-rw-r--r--LAPACKE/src/lapacke_cgerfs_work.c140
-rw-r--r--LAPACKE/src/lapacke_cgerfsx.c111
-rw-r--r--LAPACKE/src/lapacke_cgerfsx_work.c171
-rw-r--r--LAPACKE/src/lapacke_cgerqf.c77
-rw-r--r--LAPACKE/src/lapacke_cgerqf_work.c89
-rw-r--r--LAPACKE/src/lapacke_cgesdd.c106
-rw-r--r--LAPACKE/src/lapacke_cgesdd_work.c158
-rw-r--r--LAPACKE/src/lapacke_cgesv.c55
-rw-r--r--LAPACKE/src/lapacke_cgesv_work.c102
-rw-r--r--LAPACKE/src/lapacke_cgesvd.c94
-rw-r--r--LAPACKE/src/lapacke_cgesvd_work.c149
-rw-r--r--LAPACKE/src/lapacke_cgesvx.c106
-rw-r--r--LAPACKE/src/lapacke_cgesvx_work.c156
-rw-r--r--LAPACKE/src/lapacke_cgesvxx.c112
-rw-r--r--LAPACKE/src/lapacke_cgesvxx_work.c182
-rw-r--r--LAPACKE/src/lapacke_cgetf2.c51
-rw-r--r--LAPACKE/src/lapacke_cgetf2_work.c83
-rw-r--r--LAPACKE/src/lapacke_cgetrf.c51
-rw-r--r--LAPACKE/src/lapacke_cgetrf_work.c83
-rw-r--r--LAPACKE/src/lapacke_cgetri.c77
-rw-r--r--LAPACKE/src/lapacke_cgetri_work.c89
-rw-r--r--LAPACKE/src/lapacke_cgetrs.c56
-rw-r--r--LAPACKE/src/lapacke_cgetrs_work.c102
-rw-r--r--LAPACKE/src/lapacke_cggbak.c59
-rw-r--r--LAPACKE/src/lapacke_cggbak_work.c87
-rw-r--r--LAPACKE/src/lapacke_cggbal.c87
-rw-r--r--LAPACKE/src/lapacke_cggbal_work.c130
-rw-r--r--LAPACKE/src/lapacke_cgges.c110
-rw-r--r--LAPACKE/src/lapacke_cgges_work.c166
-rw-r--r--LAPACKE/src/lapacke_cggesx.c126
-rw-r--r--LAPACKE/src/lapacke_cggesx_work.c172
-rw-r--r--LAPACKE/src/lapacke_cggev.c96
-rw-r--r--LAPACKE/src/lapacke_cggev_work.c168
-rw-r--r--LAPACKE/src/lapacke_cggevx.c139
-rw-r--r--LAPACKE/src/lapacke_cggevx_work.c171
-rw-r--r--LAPACKE/src/lapacke_cggglm.c86
-rw-r--r--LAPACKE/src/lapacke_cggglm_work.c112
-rw-r--r--LAPACKE/src/lapacke_cgghrd.c68
-rw-r--r--LAPACKE/src/lapacke_cgghrd_work.c157
-rw-r--r--LAPACKE/src/lapacke_cgglse.c89
-rw-r--r--LAPACKE/src/lapacke_cgglse_work.c112
-rw-r--r--LAPACKE/src/lapacke_cggqrf.c83
-rw-r--r--LAPACKE/src/lapacke_cggqrf_work.c111
-rw-r--r--LAPACKE/src/lapacke_cggrqf.c83
-rw-r--r--LAPACKE/src/lapacke_cggrqf_work.c111
-rw-r--r--LAPACKE/src/lapacke_cggsvd.c87
-rw-r--r--LAPACKE/src/lapacke_cggsvd_work.c181
-rw-r--r--LAPACKE/src/lapacke_cggsvp.c109
-rw-r--r--LAPACKE/src/lapacke_cggsvp_work.c182
-rw-r--r--LAPACKE/src/lapacke_cgtcon.c80
-rw-r--r--LAPACKE/src/lapacke_cgtcon_work.c49
-rw-r--r--LAPACKE/src/lapacke_cgtrfs.c111
-rw-r--r--LAPACKE/src/lapacke_cgtrfs_work.c114
-rw-r--r--LAPACKE/src/lapacke_cgtsv.c61
-rw-r--r--LAPACKE/src/lapacke_cgtsv_work.c86
-rw-r--r--LAPACKE/src/lapacke_cgtsvx.c115
-rw-r--r--LAPACKE/src/lapacke_cgtsvx_work.c114
-rw-r--r--LAPACKE/src/lapacke_cgttrf.c53
-rw-r--r--LAPACKE/src/lapacke_cgttrf_work.c45
-rw-r--r--LAPACKE/src/lapacke_cgttrs.c68
-rw-r--r--LAPACKE/src/lapacke_cgttrs_work.c90
-rw-r--r--LAPACKE/src/lapacke_chbev.c78
-rw-r--r--LAPACKE/src/lapacke_chbev_work.c112
-rw-r--r--LAPACKE/src/lapacke_chbevd.c103
-rw-r--r--LAPACKE/src/lapacke_chbevd_work.c121
-rw-r--r--LAPACKE/src/lapacke_chbevx.c103
-rw-r--r--LAPACKE/src/lapacke_chbevx_work.c145
-rw-r--r--LAPACKE/src/lapacke_chbgst.c82
-rw-r--r--LAPACKE/src/lapacke_chbgst_work.c128
-rw-r--r--LAPACKE/src/lapacke_chbgv.c82
-rw-r--r--LAPACKE/src/lapacke_chbgv_work.c131
-rw-r--r--LAPACKE/src/lapacke_chbgvd.c107
-rw-r--r--LAPACKE/src/lapacke_chbgvd_work.c142
-rw-r--r--LAPACKE/src/lapacke_chbgvx.c107
-rw-r--r--LAPACKE/src/lapacke_chbgvx_work.c160
-rw-r--r--LAPACKE/src/lapacke_chbtrd.c75
-rw-r--r--LAPACKE/src/lapacke_chbtrd_work.c114
-rw-r--r--LAPACKE/src/lapacke_checon.c72
-rw-r--r--LAPACKE/src/lapacke_checon_work.c83
-rw-r--r--LAPACKE/src/lapacke_cheequb.c69
-rw-r--r--LAPACKE/src/lapacke_cheequb_work.c82
-rw-r--r--LAPACKE/src/lapacke_cheev.c86
-rw-r--r--LAPACKE/src/lapacke_cheev_work.c93
-rw-r--r--LAPACKE/src/lapacke_cheevd.c100
-rw-r--r--LAPACKE/src/lapacke_cheevd_work.c94
-rw-r--r--LAPACKE/src/lapacke_cheevr.c119
-rw-r--r--LAPACKE/src/lapacke_cheevr_work.c128
-rw-r--r--LAPACKE/src/lapacke_cheevx.c113
-rw-r--r--LAPACKE/src/lapacke_cheevx_work.c127
-rw-r--r--LAPACKE/src/lapacke_chegst.c55
-rw-r--r--LAPACKE/src/lapacke_chegst_work.c100
-rw-r--r--LAPACKE/src/lapacke_chegv.c91
-rw-r--r--LAPACKE/src/lapacke_chegv_work.c111
-rw-r--r--LAPACKE/src/lapacke_chegvd.c106
-rw-r--r--LAPACKE/src/lapacke_chegvd_work.c114
-rw-r--r--LAPACKE/src/lapacke_chegvx.c117
-rw-r--r--LAPACKE/src/lapacke_chegvx_work.c145
-rw-r--r--LAPACKE/src/lapacke_cherfs.c90
-rw-r--r--LAPACKE/src/lapacke_cherfs_work.c140
-rw-r--r--LAPACKE/src/lapacke_cherfsx.c105
-rw-r--r--LAPACKE/src/lapacke_cherfsx_work.c170
-rw-r--r--LAPACKE/src/lapacke_chesv.c82
-rw-r--r--LAPACKE/src/lapacke_chesv_work.c111
-rw-r--r--LAPACKE/src/lapacke_chesvx.c101
-rw-r--r--LAPACKE/src/lapacke_chesvx_work.c155
-rw-r--r--LAPACKE/src/lapacke_chesvxx.c105
-rw-r--r--LAPACKE/src/lapacke_chesvxx_work.c181
-rw-r--r--LAPACKE/src/lapacke_cheswapr.c51
-rw-r--r--LAPACKE/src/lapacke_cheswapr_work.c74
-rw-r--r--LAPACKE/src/lapacke_chetrd.c78
-rw-r--r--LAPACKE/src/lapacke_chetrd_work.c90
-rw-r--r--LAPACKE/src/lapacke_chetrf.c78
-rw-r--r--LAPACKE/src/lapacke_chetrf_work.c89
-rw-r--r--LAPACKE/src/lapacke_chetri.c68
-rw-r--r--LAPACKE/src/lapacke_chetri2.c78
-rw-r--r--LAPACKE/src/lapacke_chetri2_work.c89
-rw-r--r--LAPACKE/src/lapacke_chetri2x.c69
-rw-r--r--LAPACKE/src/lapacke_chetri2x_work.c84
-rw-r--r--LAPACKE/src/lapacke_chetri_work.c84
-rw-r--r--LAPACKE/src/lapacke_chetrs.c56
-rw-r--r--LAPACKE/src/lapacke_chetrs2.c73
-rw-r--r--LAPACKE/src/lapacke_chetrs2_work.c103
-rw-r--r--LAPACKE/src/lapacke_chetrs_work.c102
-rw-r--r--LAPACKE/src/lapacke_chfrk.c65
-rw-r--r--LAPACKE/src/lapacke_chfrk_work.c98
-rw-r--r--LAPACKE/src/lapacke_chgeqz.c107
-rw-r--r--LAPACKE/src/lapacke_chgeqz_work.c170
-rw-r--r--LAPACKE/src/lapacke_chpcon.c72
-rw-r--r--LAPACKE/src/lapacke_chpcon_work.c76
-rw-r--r--LAPACKE/src/lapacke_chpev.c77
-rw-r--r--LAPACKE/src/lapacke_chpev_work.c103
-rw-r--r--LAPACKE/src/lapacke_chpevd.c101
-rw-r--r--LAPACKE/src/lapacke_chpevd_work.c113
-rw-r--r--LAPACKE/src/lapacke_chpevx.c101
-rw-r--r--LAPACKE/src/lapacke_chpevx_work.c114
-rw-r--r--LAPACKE/src/lapacke_chpgst.c54
-rw-r--r--LAPACKE/src/lapacke_chpgst_work.c88
-rw-r--r--LAPACKE/src/lapacke_chpgv.c81
-rw-r--r--LAPACKE/src/lapacke_chpgv_work.c118
-rw-r--r--LAPACKE/src/lapacke_chpgvd.c106
-rw-r--r--LAPACKE/src/lapacke_chpgvd_work.c126
-rw-r--r--LAPACKE/src/lapacke_chpgvx.c106
-rw-r--r--LAPACKE/src/lapacke_chpgvx_work.c127
-rw-r--r--LAPACKE/src/lapacke_chprfs.c90
-rw-r--r--LAPACKE/src/lapacke_chprfs_work.c130
-rw-r--r--LAPACKE/src/lapacke_chpsv.c55
-rw-r--r--LAPACKE/src/lapacke_chpsv_work.c97
-rw-r--r--LAPACKE/src/lapacke_chpsvx.c89
-rw-r--r--LAPACKE/src/lapacke_chpsvx_work.c134
-rw-r--r--LAPACKE/src/lapacke_chptrd.c51
-rw-r--r--LAPACKE/src/lapacke_chptrd_work.c77
-rw-r--r--LAPACKE/src/lapacke_chptrf.c50
-rw-r--r--LAPACKE/src/lapacke_chptrf_work.c76
-rw-r--r--LAPACKE/src/lapacke_chptri.c67
-rw-r--r--LAPACKE/src/lapacke_chptri_work.c78
-rw-r--r--LAPACKE/src/lapacke_chptrs.c55
-rw-r--r--LAPACKE/src/lapacke_chptrs_work.c96
-rw-r--r--LAPACKE/src/lapacke_chsein.c95
-rw-r--r--LAPACKE/src/lapacke_chsein_work.c147
-rw-r--r--LAPACKE/src/lapacke_chseqr.c85
-rw-r--r--LAPACKE/src/lapacke_chseqr_work.c120
-rw-r--r--LAPACKE/src/lapacke_clacgv.c46
-rw-r--r--LAPACKE/src/lapacke_clacgv_work.c43
-rw-r--r--LAPACKE/src/lapacke_clacn2.c50
-rw-r--r--LAPACKE/src/lapacke_clacn2_work.c45
-rw-r--r--LAPACKE/src/lapacke_clacp2.c51
-rw-r--r--LAPACKE/src/lapacke_clacp2_work.c96
-rw-r--r--LAPACKE/src/lapacke_clacpy.c52
-rw-r--r--LAPACKE/src/lapacke_clacpy_work.c97
-rw-r--r--LAPACKE/src/lapacke_clag2z.c51
-rw-r--r--LAPACKE/src/lapacke_clag2z_work.c98
-rw-r--r--LAPACKE/src/lapacke_clagge.c70
-rw-r--r--LAPACKE/src/lapacke_clagge_work.c82
-rw-r--r--LAPACKE/src/lapacke_claghe.c68
-rw-r--r--LAPACKE/src/lapacke_claghe_work.c82
-rw-r--r--LAPACKE/src/lapacke_clagsy.c68
-rw-r--r--LAPACKE/src/lapacke_clagsy_work.c82
-rw-r--r--LAPACKE/src/lapacke_clange.c72
-rw-r--r--LAPACKE/src/lapacke_clange_work.c80
-rw-r--r--LAPACKE/src/lapacke_clanhe.c73
-rw-r--r--LAPACKE/src/lapacke_clanhe_work.c80
-rw-r--r--LAPACKE/src/lapacke_clansy.c73
-rw-r--r--LAPACKE/src/lapacke_clansy_work.c80
-rw-r--r--LAPACKE/src/lapacke_clantr.c75
-rw-r--r--LAPACKE/src/lapacke_clantr_work.c81
-rw-r--r--LAPACKE/src/lapacke_clapmr.c51
-rw-r--r--LAPACKE/src/lapacke_clapmr_work.c82
-rw-r--r--LAPACKE/src/lapacke_clarfb.c120
-rw-r--r--LAPACKE/src/lapacke_clarfb_work.c159
-rw-r--r--LAPACKE/src/lapacke_clarfg.c50
-rw-r--r--LAPACKE/src/lapacke_clarfg_work.c44
-rw-r--r--LAPACKE/src/lapacke_clarft.c62
-rw-r--r--LAPACKE/src/lapacke_clarft_work.c105
-rw-r--r--LAPACKE/src/lapacke_clarfx.c59
-rw-r--r--LAPACKE/src/lapacke_clarfx_work.c83
-rw-r--r--LAPACKE/src/lapacke_clarnv.c40
-rw-r--r--LAPACKE/src/lapacke_clarnv_work.c43
-rw-r--r--LAPACKE/src/lapacke_claset.c58
-rw-r--r--LAPACKE/src/lapacke_claset_work.c82
-rw-r--r--LAPACKE/src/lapacke_claswp.c52
-rw-r--r--LAPACKE/src/lapacke_claswp_work.c82
-rw-r--r--LAPACKE/src/lapacke_clatms.c80
-rw-r--r--LAPACKE/src/lapacke_clatms_work.c88
-rw-r--r--LAPACKE/src/lapacke_clauum.c50
-rw-r--r--LAPACKE/src/lapacke_clauum_work.c82
-rw-r--r--LAPACKE/src/lapacke_cpbcon.c80
-rw-r--r--LAPACKE/src/lapacke_cpbcon_work.c84
-rw-r--r--LAPACKE/src/lapacke_cpbequ.c53
-rw-r--r--LAPACKE/src/lapacke_cpbequ_work.c82
-rw-r--r--LAPACKE/src/lapacke_cpbrfs.c91
-rw-r--r--LAPACKE/src/lapacke_cpbrfs_work.c142
-rw-r--r--LAPACKE/src/lapacke_cpbstf.c51
-rw-r--r--LAPACKE/src/lapacke_cpbstf_work.c84
-rw-r--r--LAPACKE/src/lapacke_cpbsv.c56
-rw-r--r--LAPACKE/src/lapacke_cpbsv_work.c104
-rw-r--r--LAPACKE/src/lapacke_cpbsvx.c96
-rw-r--r--LAPACKE/src/lapacke_cpbsvx_work.c154
-rw-r--r--LAPACKE/src/lapacke_cpbtrf.c51
-rw-r--r--LAPACKE/src/lapacke_cpbtrf_work.c84
-rw-r--r--LAPACKE/src/lapacke_cpbtrs.c56
-rw-r--r--LAPACKE/src/lapacke_cpbtrs_work.c102
-rw-r--r--LAPACKE/src/lapacke_cpftrf.c50
-rw-r--r--LAPACKE/src/lapacke_cpftrf_work.c76
-rw-r--r--LAPACKE/src/lapacke_cpftri.c50
-rw-r--r--LAPACKE/src/lapacke_cpftri_work.c76
-rw-r--r--LAPACKE/src/lapacke_cpftrs.c56
-rw-r--r--LAPACKE/src/lapacke_cpftrs_work.c96
-rw-r--r--LAPACKE/src/lapacke_cpocon.c80
-rw-r--r--LAPACKE/src/lapacke_cpocon_work.c83
-rw-r--r--LAPACKE/src/lapacke_cpoequ.c51
-rw-r--r--LAPACKE/src/lapacke_cpoequ_work.c81
-rw-r--r--LAPACKE/src/lapacke_cpoequb.c51
-rw-r--r--LAPACKE/src/lapacke_cpoequb_work.c81
-rw-r--r--LAPACKE/src/lapacke_cporfs.c89
-rw-r--r--LAPACKE/src/lapacke_cporfs_work.c139
-rw-r--r--LAPACKE/src/lapacke_cporfsx.c105
-rw-r--r--LAPACKE/src/lapacke_cporfsx_work.c169
-rw-r--r--LAPACKE/src/lapacke_cposv.c55
-rw-r--r--LAPACKE/src/lapacke_cposv_work.c102
-rw-r--r--LAPACKE/src/lapacke_cposvx.c95
-rw-r--r--LAPACKE/src/lapacke_cposvx_work.c151
-rw-r--r--LAPACKE/src/lapacke_cposvxx.c104
-rw-r--r--LAPACKE/src/lapacke_cposvxx_work.c178
-rw-r--r--LAPACKE/src/lapacke_cpotrf.c50
-rw-r--r--LAPACKE/src/lapacke_cpotrf_work.c82
-rw-r--r--LAPACKE/src/lapacke_cpotri.c50
-rw-r--r--LAPACKE/src/lapacke_cpotri_work.c82
-rw-r--r--LAPACKE/src/lapacke_cpotrs.c55
-rw-r--r--LAPACKE/src/lapacke_cpotrs_work.c101
-rw-r--r--LAPACKE/src/lapacke_cppcon.c80
-rw-r--r--LAPACKE/src/lapacke_cppcon_work.c76
-rw-r--r--LAPACKE/src/lapacke_cppequ.c51
-rw-r--r--LAPACKE/src/lapacke_cppequ_work.c75
-rw-r--r--LAPACKE/src/lapacke_cpprfs.c89
-rw-r--r--LAPACKE/src/lapacke_cpprfs_work.c129
-rw-r--r--LAPACKE/src/lapacke_cppsv.c54
-rw-r--r--LAPACKE/src/lapacke_cppsv_work.c96
-rw-r--r--LAPACKE/src/lapacke_cppsvx.c94
-rw-r--r--LAPACKE/src/lapacke_cppsvx_work.c140
-rw-r--r--LAPACKE/src/lapacke_cpptrf.c50
-rw-r--r--LAPACKE/src/lapacke_cpptrf_work.c76
-rw-r--r--LAPACKE/src/lapacke_cpptri.c50
-rw-r--r--LAPACKE/src/lapacke_cpptri_work.c76
-rw-r--r--LAPACKE/src/lapacke_cpptrs.c54
-rw-r--r--LAPACKE/src/lapacke_cpptrs_work.c95
-rw-r--r--LAPACKE/src/lapacke_cpstrf.c71
-rw-r--r--LAPACKE/src/lapacke_cpstrf_work.c84
-rw-r--r--LAPACKE/src/lapacke_cptcon.c69
-rw-r--r--LAPACKE/src/lapacke_cptcon_work.c44
-rw-r--r--LAPACKE/src/lapacke_cpteqr.c82
-rw-r--r--LAPACKE/src/lapacke_cpteqr_work.c85
-rw-r--r--LAPACKE/src/lapacke_cptrfs.c96
-rw-r--r--LAPACKE/src/lapacke_cptrfs_work.c108
-rw-r--r--LAPACKE/src/lapacke_cptsv.c57
-rw-r--r--LAPACKE/src/lapacke_cptsv_work.c84
-rw-r--r--LAPACKE/src/lapacke_cptsvx.c97
-rw-r--r--LAPACKE/src/lapacke_cptsvx_work.c107
-rw-r--r--LAPACKE/src/lapacke_cpttrf.c48
-rw-r--r--LAPACKE/src/lapacke_cpttrf_work.c43
-rw-r--r--LAPACKE/src/lapacke_cpttrs.c58
-rw-r--r--LAPACKE/src/lapacke_cpttrs_work.c85
-rw-r--r--LAPACKE/src/lapacke_cspcon.c72
-rw-r--r--LAPACKE/src/lapacke_cspcon_work.c76
-rw-r--r--LAPACKE/src/lapacke_csprfs.c90
-rw-r--r--LAPACKE/src/lapacke_csprfs_work.c130
-rw-r--r--LAPACKE/src/lapacke_cspsv.c55
-rw-r--r--LAPACKE/src/lapacke_cspsv_work.c97
-rw-r--r--LAPACKE/src/lapacke_cspsvx.c89
-rw-r--r--LAPACKE/src/lapacke_cspsvx_work.c134
-rw-r--r--LAPACKE/src/lapacke_csptrf.c50
-rw-r--r--LAPACKE/src/lapacke_csptrf_work.c76
-rw-r--r--LAPACKE/src/lapacke_csptri.c67
-rw-r--r--LAPACKE/src/lapacke_csptri_work.c78
-rw-r--r--LAPACKE/src/lapacke_csptrs.c55
-rw-r--r--LAPACKE/src/lapacke_csptrs_work.c96
-rw-r--r--LAPACKE/src/lapacke_cstedc.c108
-rw-r--r--LAPACKE/src/lapacke_cstedc_work.c103
-rw-r--r--LAPACKE/src/lapacke_cstegr.c108
-rw-r--r--LAPACKE/src/lapacke_cstegr_work.c105
-rw-r--r--LAPACKE/src/lapacke_cstein.c84
-rw-r--r--LAPACKE/src/lapacke_cstein_work.c87
-rw-r--r--LAPACKE/src/lapacke_cstemr.c102
-rw-r--r--LAPACKE/src/lapacke_cstemr_work.c105
-rw-r--r--LAPACKE/src/lapacke_csteqr.c82
-rw-r--r--LAPACKE/src/lapacke_csteqr_work.c92
-rw-r--r--LAPACKE/src/lapacke_csycon.c72
-rw-r--r--LAPACKE/src/lapacke_csycon_work.c83
-rw-r--r--LAPACKE/src/lapacke_csyconv.c69
-rw-r--r--LAPACKE/src/lapacke_csyconv_work.c84
-rw-r--r--LAPACKE/src/lapacke_csyequb.c69
-rw-r--r--LAPACKE/src/lapacke_csyequb_work.c82
-rw-r--r--LAPACKE/src/lapacke_csyr.c59
-rw-r--r--LAPACKE/src/lapacke_csyr_work.c83
-rw-r--r--LAPACKE/src/lapacke_csyrfs.c90
-rw-r--r--LAPACKE/src/lapacke_csyrfs_work.c140
-rw-r--r--LAPACKE/src/lapacke_csyrfsx.c105
-rw-r--r--LAPACKE/src/lapacke_csyrfsx_work.c170
-rw-r--r--LAPACKE/src/lapacke_csysv.c82
-rw-r--r--LAPACKE/src/lapacke_csysv_rook.c82
-rw-r--r--LAPACKE/src/lapacke_csysv_rook_work.c112
-rw-r--r--LAPACKE/src/lapacke_csysv_work.c111
-rw-r--r--LAPACKE/src/lapacke_csysvx.c101
-rw-r--r--LAPACKE/src/lapacke_csysvx_work.c155
-rw-r--r--LAPACKE/src/lapacke_csysvxx.c105
-rw-r--r--LAPACKE/src/lapacke_csysvxx_work.c181
-rw-r--r--LAPACKE/src/lapacke_csyswapr.c51
-rw-r--r--LAPACKE/src/lapacke_csyswapr_work.c74
-rw-r--r--LAPACKE/src/lapacke_csytrf.c78
-rw-r--r--LAPACKE/src/lapacke_csytrf_work.c89
-rw-r--r--LAPACKE/src/lapacke_csytri.c68
-rw-r--r--LAPACKE/src/lapacke_csytri2.c78
-rw-r--r--LAPACKE/src/lapacke_csytri2_work.c89
-rw-r--r--LAPACKE/src/lapacke_csytri2x.c69
-rw-r--r--LAPACKE/src/lapacke_csytri2x_work.c84
-rw-r--r--LAPACKE/src/lapacke_csytri_work.c84
-rw-r--r--LAPACKE/src/lapacke_csytrs.c56
-rw-r--r--LAPACKE/src/lapacke_csytrs2.c73
-rw-r--r--LAPACKE/src/lapacke_csytrs2_work.c103
-rw-r--r--LAPACKE/src/lapacke_csytrs_work.c102
-rw-r--r--LAPACKE/src/lapacke_ctbcon.c78
-rw-r--r--LAPACKE/src/lapacke_ctbcon_work.c86
-rw-r--r--LAPACKE/src/lapacke_ctbrfs.c87
-rw-r--r--LAPACKE/src/lapacke_ctbrfs_work.c122
-rw-r--r--LAPACKE/src/lapacke_ctbtrs.c56
-rw-r--r--LAPACKE/src/lapacke_ctbtrs_work.c105
-rw-r--r--LAPACKE/src/lapacke_ctfsm.c64
-rw-r--r--LAPACKE/src/lapacke_ctfsm_work.c104
-rw-r--r--LAPACKE/src/lapacke_ctftri.c50
-rw-r--r--LAPACKE/src/lapacke_ctftri_work.c77
-rw-r--r--LAPACKE/src/lapacke_ctfttp.c51
-rw-r--r--LAPACKE/src/lapacke_ctfttp_work.c87
-rw-r--r--LAPACKE/src/lapacke_ctfttr.c51
-rw-r--r--LAPACKE/src/lapacke_ctfttr_work.c93
-rw-r--r--LAPACKE/src/lapacke_ctgevc.c95
-rw-r--r--LAPACKE/src/lapacke_ctgevc_work.c162
-rw-r--r--LAPACKE/src/lapacke_ctgexc.c69
-rw-r--r--LAPACKE/src/lapacke_ctgexc_work.c158
-rw-r--r--LAPACKE/src/lapacke_ctgsen.c116
-rw-r--r--LAPACKE/src/lapacke_ctgsen_work.c172
-rw-r--r--LAPACKE/src/lapacke_ctgsja.c100
-rw-r--r--LAPACKE/src/lapacke_ctgsja_work.c190
-rw-r--r--LAPACKE/src/lapacke_ctgsna.c114
-rw-r--r--LAPACKE/src/lapacke_ctgsna_work.c159
-rw-r--r--LAPACKE/src/lapacke_ctgsyl.c110
-rw-r--r--LAPACKE/src/lapacke_ctgsyl_work.c183
-rw-r--r--LAPACKE/src/lapacke_ctpcon.c77
-rw-r--r--LAPACKE/src/lapacke_ctpcon_work.c77
-rw-r--r--LAPACKE/src/lapacke_ctpmqrt.c82
-rw-r--r--LAPACKE/src/lapacke_ctpmqrt_work.c140
-rw-r--r--LAPACKE/src/lapacke_ctpqrt.c74
-rw-r--r--LAPACKE/src/lapacke_ctpqrt2.c56
-rw-r--r--LAPACKE/src/lapacke_ctpqrt2_work.c118
-rw-r--r--LAPACKE/src/lapacke_ctpqrt_work.c121
-rw-r--r--LAPACKE/src/lapacke_ctprfb.c93
-rw-r--r--LAPACKE/src/lapacke_ctprfb_work.c139
-rw-r--r--LAPACKE/src/lapacke_ctprfs.c86
-rw-r--r--LAPACKE/src/lapacke_ctprfs_work.c116
-rw-r--r--LAPACKE/src/lapacke_ctptri.c50
-rw-r--r--LAPACKE/src/lapacke_ctptri_work.c76
-rw-r--r--LAPACKE/src/lapacke_ctptrs.c56
-rw-r--r--LAPACKE/src/lapacke_ctptrs_work.c97
-rw-r--r--LAPACKE/src/lapacke_ctpttf.c51
-rw-r--r--LAPACKE/src/lapacke_ctpttf_work.c87
-rw-r--r--LAPACKE/src/lapacke_ctpttr.c51
-rw-r--r--LAPACKE/src/lapacke_ctpttr_work.c93
-rw-r--r--LAPACKE/src/lapacke_ctrcon.c77
-rw-r--r--LAPACKE/src/lapacke_ctrcon_work.c85
-rw-r--r--LAPACKE/src/lapacke_ctrevc.c90
-rw-r--r--LAPACKE/src/lapacke_ctrevc_work.c145
-rw-r--r--LAPACKE/src/lapacke_ctrexc.c58
-rw-r--r--LAPACKE/src/lapacke_ctrexc_work.c111
-rw-r--r--LAPACKE/src/lapacke_ctrrfs.c86
-rw-r--r--LAPACKE/src/lapacke_ctrrfs_work.c121
-rw-r--r--LAPACKE/src/lapacke_ctrsen.c86
-rw-r--r--LAPACKE/src/lapacke_ctrsen_work.c121
-rw-r--r--LAPACKE/src/lapacke_ctrsna.c101
-rw-r--r--LAPACKE/src/lapacke_ctrsna_work.c135
-rw-r--r--LAPACKE/src/lapacke_ctrsyl.c61
-rw-r--r--LAPACKE/src/lapacke_ctrsyl_work.c120
-rw-r--r--LAPACKE/src/lapacke_ctrtri.c50
-rw-r--r--LAPACKE/src/lapacke_ctrtri_work.c84
-rw-r--r--LAPACKE/src/lapacke_ctrtrs.c56
-rw-r--r--LAPACKE/src/lapacke_ctrtrs_work.c103
-rw-r--r--LAPACKE/src/lapacke_ctrttf.c51
-rw-r--r--LAPACKE/src/lapacke_ctrttf_work.c93
-rw-r--r--LAPACKE/src/lapacke_ctrttp.c51
-rw-r--r--LAPACKE/src/lapacke_ctrttp_work.c93
-rw-r--r--LAPACKE/src/lapacke_ctzrzf.c77
-rw-r--r--LAPACKE/src/lapacke_ctzrzf_work.c89
-rw-r--r--LAPACKE/src/lapacke_cunbdb.c103
-rw-r--r--LAPACKE/src/lapacke_cunbdb_work.c168
-rw-r--r--LAPACKE/src/lapacke_cuncsd.c127
-rw-r--r--LAPACKE/src/lapacke_cuncsd_work.c276
-rw-r--r--LAPACKE/src/lapacke_cungbr.c81
-rw-r--r--LAPACKE/src/lapacke_cungbr_work.c92
-rw-r--r--LAPACKE/src/lapacke_cunghr.c81
-rw-r--r--LAPACKE/src/lapacke_cunghr_work.c90
-rw-r--r--LAPACKE/src/lapacke_cunglq.c81
-rw-r--r--LAPACKE/src/lapacke_cunglq_work.c89
-rw-r--r--LAPACKE/src/lapacke_cungql.c81
-rw-r--r--LAPACKE/src/lapacke_cungql_work.c89
-rw-r--r--LAPACKE/src/lapacke_cungqr.c81
-rw-r--r--LAPACKE/src/lapacke_cungqr_work.c89
-rw-r--r--LAPACKE/src/lapacke_cungrq.c81
-rw-r--r--LAPACKE/src/lapacke_cungrq_work.c89
-rw-r--r--LAPACKE/src/lapacke_cungtr.c81
-rw-r--r--LAPACKE/src/lapacke_cungtr_work.c89
-rw-r--r--LAPACKE/src/lapacke_cunmbr.c89
-rw-r--r--LAPACKE/src/lapacke_cunmbr_work.c113
-rw-r--r--LAPACKE/src/lapacke_cunmhr.c88
-rw-r--r--LAPACKE/src/lapacke_cunmhr_work.c111
-rw-r--r--LAPACKE/src/lapacke_cunmlq.c86
-rw-r--r--LAPACKE/src/lapacke_cunmlq_work.c110
-rw-r--r--LAPACKE/src/lapacke_cunmql.c88
-rw-r--r--LAPACKE/src/lapacke_cunmql_work.c111
-rw-r--r--LAPACKE/src/lapacke_cunmqr.c88
-rw-r--r--LAPACKE/src/lapacke_cunmqr_work.c111
-rw-r--r--LAPACKE/src/lapacke_cunmrq.c86
-rw-r--r--LAPACKE/src/lapacke_cunmrq_work.c110
-rw-r--r--LAPACKE/src/lapacke_cunmrz.c86
-rw-r--r--LAPACKE/src/lapacke_cunmrz_work.c110
-rw-r--r--LAPACKE/src/lapacke_cunmtr.c88
-rw-r--r--LAPACKE/src/lapacke_cunmtr_work.c111
-rw-r--r--LAPACKE/src/lapacke_cupgtr.c72
-rw-r--r--LAPACKE/src/lapacke_cupgtr_work.c95
-rw-r--r--LAPACKE/src/lapacke_cupmtr.c89
-rw-r--r--LAPACKE/src/lapacke_cupmtr_work.c100
-rw-r--r--LAPACKE/src/lapacke_dbbcsd.c115
-rw-r--r--LAPACKE/src/lapacke_dbbcsd_work.c199
-rw-r--r--LAPACKE/src/lapacke_dbdsdc.c92
-rw-r--r--LAPACKE/src/lapacke_dbdsdc_work.c112
-rw-r--r--LAPACKE/src/lapacke_dbdsqr.c88
-rw-r--r--LAPACKE/src/lapacke_dbdsqr_work.c145
-rw-r--r--LAPACKE/src/lapacke_ddisna.c46
-rw-r--r--LAPACKE/src/lapacke_ddisna_work.c43
-rw-r--r--LAPACKE/src/lapacke_dgbbrd.c76
-rw-r--r--LAPACKE/src/lapacke_dgbbrd_work.c156
-rw-r--r--LAPACKE/src/lapacke_dgbcon.c80
-rw-r--r--LAPACKE/src/lapacke_dgbcon_work.c85
-rw-r--r--LAPACKE/src/lapacke_dgbequ.c53
-rw-r--r--LAPACKE/src/lapacke_dgbequ_work.c83
-rw-r--r--LAPACKE/src/lapacke_dgbequb.c53
-rw-r--r--LAPACKE/src/lapacke_dgbequb_work.c83
-rw-r--r--LAPACKE/src/lapacke_dgbrfs.c89
-rw-r--r--LAPACKE/src/lapacke_dgbrfs_work.c136
-rw-r--r--LAPACKE/src/lapacke_dgbrfsx.c109
-rw-r--r--LAPACKE/src/lapacke_dgbrfsx_work.c165
-rw-r--r--LAPACKE/src/lapacke_dgbsv.c56
-rw-r--r--LAPACKE/src/lapacke_dgbsv_work.c102
-rw-r--r--LAPACKE/src/lapacke_dgbsvx.c105
-rw-r--r--LAPACKE/src/lapacke_dgbsvx_work.c151
-rw-r--r--LAPACKE/src/lapacke_dgbsvxx.c112
-rw-r--r--LAPACKE/src/lapacke_dgbsvxx_work.c180
-rw-r--r--LAPACKE/src/lapacke_dgbtrf.c51
-rw-r--r--LAPACKE/src/lapacke_dgbtrf_work.c84
-rw-r--r--LAPACKE/src/lapacke_dgbtrs.c56
-rw-r--r--LAPACKE/src/lapacke_dgbtrs_work.c102
-rw-r--r--LAPACKE/src/lapacke_dgebak.c55
-rw-r--r--LAPACKE/src/lapacke_dgebak_work.c84
-rw-r--r--LAPACKE/src/lapacke_dgebal.c54
-rw-r--r--LAPACKE/src/lapacke_dgebal_work.c94
-rw-r--r--LAPACKE/src/lapacke_dgebrd.c77
-rw-r--r--LAPACKE/src/lapacke_dgebrd_work.c90
-rw-r--r--LAPACKE/src/lapacke_dgecon.c79
-rw-r--r--LAPACKE/src/lapacke_dgecon_work.c81
-rw-r--r--LAPACKE/src/lapacke_dgeequ.c53
-rw-r--r--LAPACKE/src/lapacke_dgeequ_work.c81
-rw-r--r--LAPACKE/src/lapacke_dgeequb.c53
-rw-r--r--LAPACKE/src/lapacke_dgeequb_work.c82
-rw-r--r--LAPACKE/src/lapacke_dgees.c93
-rw-r--r--LAPACKE/src/lapacke_dgees_work.c115
-rw-r--r--LAPACKE/src/lapacke_dgeesx.c111
-rw-r--r--LAPACKE/src/lapacke_dgeesx_work.c120
-rw-r--r--LAPACKE/src/lapacke_dgeev.c78
-rw-r--r--LAPACKE/src/lapacke_dgeev_work.c136
-rw-r--r--LAPACKE/src/lapacke_dgeevx.c98
-rw-r--r--LAPACKE/src/lapacke_dgeevx_work.c142
-rw-r--r--LAPACKE/src/lapacke_dgehrd.c77
-rw-r--r--LAPACKE/src/lapacke_dgehrd_work.c88
-rw-r--r--LAPACKE/src/lapacke_dgejsv.c133
-rw-r--r--LAPACKE/src/lapacke_dgejsv_work.c147
-rw-r--r--LAPACKE/src/lapacke_dgelq2.c66
-rw-r--r--LAPACKE/src/lapacke_dgelq2_work.c82
-rw-r--r--LAPACKE/src/lapacke_dgelqf.c75
-rw-r--r--LAPACKE/src/lapacke_dgelqf_work.c87
-rw-r--r--LAPACKE/src/lapacke_dgels.c80
-rw-r--r--LAPACKE/src/lapacke_dgels_work.c108
-rw-r--r--LAPACKE/src/lapacke_dgelsd.c96
-rw-r--r--LAPACKE/src/lapacke_dgelsd_work.c109
-rw-r--r--LAPACKE/src/lapacke_dgelss.c84
-rw-r--r--LAPACKE/src/lapacke_dgelss_work.c109
-rw-r--r--LAPACKE/src/lapacke_dgelsy.c84
-rw-r--r--LAPACKE/src/lapacke_dgelsy_work.c109
-rw-r--r--LAPACKE/src/lapacke_dgemqrt.c76
-rw-r--r--LAPACKE/src/lapacke_dgemqrt_work.c116
-rw-r--r--LAPACKE/src/lapacke_dgeqlf.c75
-rw-r--r--LAPACKE/src/lapacke_dgeqlf_work.c87
-rw-r--r--LAPACKE/src/lapacke_dgeqp3.c77
-rw-r--r--LAPACKE/src/lapacke_dgeqp3_work.c87
-rw-r--r--LAPACKE/src/lapacke_dgeqpf.c67
-rw-r--r--LAPACKE/src/lapacke_dgeqpf_work.c82
-rw-r--r--LAPACKE/src/lapacke_dgeqr2.c66
-rw-r--r--LAPACKE/src/lapacke_dgeqr2_work.c82
-rw-r--r--LAPACKE/src/lapacke_dgeqrf.c75
-rw-r--r--LAPACKE/src/lapacke_dgeqrf_work.c87
-rw-r--r--LAPACKE/src/lapacke_dgeqrfp.c75
-rw-r--r--LAPACKE/src/lapacke_dgeqrfp_work.c87
-rw-r--r--LAPACKE/src/lapacke_dgeqrt.c67
-rw-r--r--LAPACKE/src/lapacke_dgeqrt2.c51
-rw-r--r--LAPACKE/src/lapacke_dgeqrt2_work.c97
-rw-r--r--LAPACKE/src/lapacke_dgeqrt3.c51
-rw-r--r--LAPACKE/src/lapacke_dgeqrt3_work.c97
-rw-r--r--LAPACKE/src/lapacke_dgeqrt_work.c99
-rw-r--r--LAPACKE/src/lapacke_dgerfs.c88
-rw-r--r--LAPACKE/src/lapacke_dgerfs_work.c133
-rw-r--r--LAPACKE/src/lapacke_dgerfsx.c108
-rw-r--r--LAPACKE/src/lapacke_dgerfsx_work.c163
-rw-r--r--LAPACKE/src/lapacke_dgerqf.c75
-rw-r--r--LAPACKE/src/lapacke_dgerqf_work.c87
-rw-r--r--LAPACKE/src/lapacke_dgesdd.c88
-rw-r--r--LAPACKE/src/lapacke_dgesdd_work.c153
-rw-r--r--LAPACKE/src/lapacke_dgesv.c54
-rw-r--r--LAPACKE/src/lapacke_dgesv_work.c98
-rw-r--r--LAPACKE/src/lapacke_dgesvd.c83
-rw-r--r--LAPACKE/src/lapacke_dgesvd_work.c144
-rw-r--r--LAPACKE/src/lapacke_dgesvj.c84
-rw-r--r--LAPACKE/src/lapacke_dgesvj_work.c113
-rw-r--r--LAPACKE/src/lapacke_dgesvx.c103
-rw-r--r--LAPACKE/src/lapacke_dgesvx_work.c147
-rw-r--r--LAPACKE/src/lapacke_dgesvxx.c109
-rw-r--r--LAPACKE/src/lapacke_dgesvxx_work.c175
-rw-r--r--LAPACKE/src/lapacke_dgetf2.c50
-rw-r--r--LAPACKE/src/lapacke_dgetf2_work.c81
-rw-r--r--LAPACKE/src/lapacke_dgetrf.c50
-rw-r--r--LAPACKE/src/lapacke_dgetrf_work.c81
-rw-r--r--LAPACKE/src/lapacke_dgetri.c75
-rw-r--r--LAPACKE/src/lapacke_dgetri_work.c87
-rw-r--r--LAPACKE/src/lapacke_dgetrs.c55
-rw-r--r--LAPACKE/src/lapacke_dgetrs_work.c99
-rw-r--r--LAPACKE/src/lapacke_dggbak.c59
-rw-r--r--LAPACKE/src/lapacke_dggbak_work.c85
-rw-r--r--LAPACKE/src/lapacke_dggbal.c86
-rw-r--r--LAPACKE/src/lapacke_dggbal_work.c126
-rw-r--r--LAPACKE/src/lapacke_dgges.c99
-rw-r--r--LAPACKE/src/lapacke_dgges_work.c160
-rw-r--r--LAPACKE/src/lapacke_dggesx.c114
-rw-r--r--LAPACKE/src/lapacke_dggesx_work.c165
-rw-r--r--LAPACKE/src/lapacke_dggev.c84
-rw-r--r--LAPACKE/src/lapacke_dggev_work.c161
-rw-r--r--LAPACKE/src/lapacke_dggevx.c120
-rw-r--r--LAPACKE/src/lapacke_dggevx_work.c163
-rw-r--r--LAPACKE/src/lapacke_dggglm.c83
-rw-r--r--LAPACKE/src/lapacke_dggglm_work.c107
-rw-r--r--LAPACKE/src/lapacke_dgghrd.c67
-rw-r--r--LAPACKE/src/lapacke_dgghrd_work.c150
-rw-r--r--LAPACKE/src/lapacke_dgglse.c86
-rw-r--r--LAPACKE/src/lapacke_dgglse_work.c107
-rw-r--r--LAPACKE/src/lapacke_dggqrf.c81
-rw-r--r--LAPACKE/src/lapacke_dggqrf_work.c107
-rw-r--r--LAPACKE/src/lapacke_dggrqf.c81
-rw-r--r--LAPACKE/src/lapacke_dggrqf_work.c107
-rw-r--r--LAPACKE/src/lapacke_dggsvd.c76
-rw-r--r--LAPACKE/src/lapacke_dggsvd_work.c170
-rw-r--r--LAPACKE/src/lapacke_dggsvp.c97
-rw-r--r--LAPACKE/src/lapacke_dggsvp_work.c170
-rw-r--r--LAPACKE/src/lapacke_dgtcon.c84
-rw-r--r--LAPACKE/src/lapacke_dgtcon_work.c47
-rw-r--r--LAPACKE/src/lapacke_dgtrfs.c105
-rw-r--r--LAPACKE/src/lapacke_dgtrfs_work.c106
-rw-r--r--LAPACKE/src/lapacke_dgtsv.c60
-rw-r--r--LAPACKE/src/lapacke_dgtsv_work.c82
-rw-r--r--LAPACKE/src/lapacke_dgtsvx.c110
-rw-r--r--LAPACKE/src/lapacke_dgtsvx_work.c105
-rw-r--r--LAPACKE/src/lapacke_dgttrf.c52
-rw-r--r--LAPACKE/src/lapacke_dgttrf_work.c43
-rw-r--r--LAPACKE/src/lapacke_dgttrs.c65
-rw-r--r--LAPACKE/src/lapacke_dgttrs_work.c86
-rw-r--r--LAPACKE/src/lapacke_dhgeqz.c95
-rw-r--r--LAPACKE/src/lapacke_dhgeqz_work.c161
-rw-r--r--LAPACKE/src/lapacke_dhsein.c89
-rw-r--r--LAPACKE/src/lapacke_dhsein_work.c142
-rw-r--r--LAPACKE/src/lapacke_dhseqr.c83
-rw-r--r--LAPACKE/src/lapacke_dhseqr_work.c116
-rw-r--r--LAPACKE/src/lapacke_dlacn2.c49
-rw-r--r--LAPACKE/src/lapacke_dlacn2_work.c44
-rw-r--r--LAPACKE/src/lapacke_dlacpy.c51
-rw-r--r--LAPACKE/src/lapacke_dlacpy_work.c94
-rw-r--r--LAPACKE/src/lapacke_dlag2s.c51
-rw-r--r--LAPACKE/src/lapacke_dlag2s_work.c96
-rw-r--r--LAPACKE/src/lapacke_dlagge.c68
-rw-r--r--LAPACKE/src/lapacke_dlagge_work.c81
-rw-r--r--LAPACKE/src/lapacke_dlagsy.c67
-rw-r--r--LAPACKE/src/lapacke_dlagsy_work.c80
-rw-r--r--LAPACKE/src/lapacke_dlamch.c39
-rw-r--r--LAPACKE/src/lapacke_dlamch_work.c43
-rw-r--r--LAPACKE/src/lapacke_dlange.c71
-rw-r--r--LAPACKE/src/lapacke_dlange_work.c79
-rw-r--r--LAPACKE/src/lapacke_dlansy.c73
-rw-r--r--LAPACKE/src/lapacke_dlansy_work.c79
-rw-r--r--LAPACKE/src/lapacke_dlantr.c75
-rw-r--r--LAPACKE/src/lapacke_dlantr_work.c79
-rw-r--r--LAPACKE/src/lapacke_dlapmr.c51
-rw-r--r--LAPACKE/src/lapacke_dlapmr_work.c80
-rw-r--r--LAPACKE/src/lapacke_dlapy2.c48
-rw-r--r--LAPACKE/src/lapacke_dlapy2_work.c42
-rw-r--r--LAPACKE/src/lapacke_dlapy3.c51
-rw-r--r--LAPACKE/src/lapacke_dlapy3_work.c42
-rw-r--r--LAPACKE/src/lapacke_dlarfb.c118
-rw-r--r--LAPACKE/src/lapacke_dlarfb_work.c155
-rw-r--r--LAPACKE/src/lapacke_dlarfg.c49
-rw-r--r--LAPACKE/src/lapacke_dlarfg_work.c43
-rw-r--r--LAPACKE/src/lapacke_dlarft.c61
-rw-r--r--LAPACKE/src/lapacke_dlarft_work.c102
-rw-r--r--LAPACKE/src/lapacke_dlarfx.c58
-rw-r--r--LAPACKE/src/lapacke_dlarfx_work.c80
-rw-r--r--LAPACKE/src/lapacke_dlarnv.c40
-rw-r--r--LAPACKE/src/lapacke_dlarnv_work.c43
-rw-r--r--LAPACKE/src/lapacke_dlartgp.c49
-rw-r--r--LAPACKE/src/lapacke_dlartgp_work.c43
-rw-r--r--LAPACKE/src/lapacke_dlartgs.c52
-rw-r--r--LAPACKE/src/lapacke_dlartgs_work.c43
-rw-r--r--LAPACKE/src/lapacke_dlaset.c57
-rw-r--r--LAPACKE/src/lapacke_dlaset_work.c80
-rw-r--r--LAPACKE/src/lapacke_dlasrt.c45
-rw-r--r--LAPACKE/src/lapacke_dlasrt_work.c42
-rw-r--r--LAPACKE/src/lapacke_dlaswp.c51
-rw-r--r--LAPACKE/src/lapacke_dlaswp_work.c80
-rw-r--r--LAPACKE/src/lapacke_dlatms.c79
-rw-r--r--LAPACKE/src/lapacke_dlatms_work.c87
-rw-r--r--LAPACKE/src/lapacke_dlauum.c50
-rw-r--r--LAPACKE/src/lapacke_dlauum_work.c81
-rw-r--r--LAPACKE/src/lapacke_dopgtr.c70
-rw-r--r--LAPACKE/src/lapacke_dopgtr_work.c91
-rw-r--r--LAPACKE/src/lapacke_dopmtr.c86
-rw-r--r--LAPACKE/src/lapacke_dopmtr_work.c97
-rw-r--r--LAPACKE/src/lapacke_dorbdb.c98
-rw-r--r--LAPACKE/src/lapacke_dorbdb_work.c160
-rw-r--r--LAPACKE/src/lapacke_dorcsd.c112
-rw-r--r--LAPACKE/src/lapacke_dorcsd_work.c264
-rw-r--r--LAPACKE/src/lapacke_dorgbr.c80
-rw-r--r--LAPACKE/src/lapacke_dorgbr_work.c90
-rw-r--r--LAPACKE/src/lapacke_dorghr.c80
-rw-r--r--LAPACKE/src/lapacke_dorghr_work.c89
-rw-r--r--LAPACKE/src/lapacke_dorglq.c80
-rw-r--r--LAPACKE/src/lapacke_dorglq_work.c88
-rw-r--r--LAPACKE/src/lapacke_dorgql.c80
-rw-r--r--LAPACKE/src/lapacke_dorgql_work.c88
-rw-r--r--LAPACKE/src/lapacke_dorgqr.c80
-rw-r--r--LAPACKE/src/lapacke_dorgqr_work.c88
-rw-r--r--LAPACKE/src/lapacke_dorgrq.c80
-rw-r--r--LAPACKE/src/lapacke_dorgrq_work.c88
-rw-r--r--LAPACKE/src/lapacke_dorgtr.c79
-rw-r--r--LAPACKE/src/lapacke_dorgtr_work.c87
-rw-r--r--LAPACKE/src/lapacke_dormbr.c87
-rw-r--r--LAPACKE/src/lapacke_dormbr_work.c111
-rw-r--r--LAPACKE/src/lapacke_dormhr.c86
-rw-r--r--LAPACKE/src/lapacke_dormhr_work.c109
-rw-r--r--LAPACKE/src/lapacke_dormlq.c84
-rw-r--r--LAPACKE/src/lapacke_dormlq_work.c107
-rw-r--r--LAPACKE/src/lapacke_dormql.c86
-rw-r--r--LAPACKE/src/lapacke_dormql_work.c109
-rw-r--r--LAPACKE/src/lapacke_dormqr.c86
-rw-r--r--LAPACKE/src/lapacke_dormqr_work.c109
-rw-r--r--LAPACKE/src/lapacke_dormrq.c84
-rw-r--r--LAPACKE/src/lapacke_dormrq_work.c107
-rw-r--r--LAPACKE/src/lapacke_dormrz.c84
-rw-r--r--LAPACKE/src/lapacke_dormrz_work.c107
-rw-r--r--LAPACKE/src/lapacke_dormtr.c86
-rw-r--r--LAPACKE/src/lapacke_dormtr_work.c108
-rw-r--r--LAPACKE/src/lapacke_dpbcon.c79
-rw-r--r--LAPACKE/src/lapacke_dpbcon_work.c83
-rw-r--r--LAPACKE/src/lapacke_dpbequ.c52
-rw-r--r--LAPACKE/src/lapacke_dpbequ_work.c81
-rw-r--r--LAPACKE/src/lapacke_dpbrfs.c88
-rw-r--r--LAPACKE/src/lapacke_dpbrfs_work.c135
-rw-r--r--LAPACKE/src/lapacke_dpbstf.c50
-rw-r--r--LAPACKE/src/lapacke_dpbstf_work.c82
-rw-r--r--LAPACKE/src/lapacke_dpbsv.c55
-rw-r--r--LAPACKE/src/lapacke_dpbsv_work.c100
-rw-r--r--LAPACKE/src/lapacke_dpbsvx.c93
-rw-r--r--LAPACKE/src/lapacke_dpbsvx_work.c146
-rw-r--r--LAPACKE/src/lapacke_dpbtrf.c50
-rw-r--r--LAPACKE/src/lapacke_dpbtrf_work.c82
-rw-r--r--LAPACKE/src/lapacke_dpbtrs.c55
-rw-r--r--LAPACKE/src/lapacke_dpbtrs_work.c99
-rw-r--r--LAPACKE/src/lapacke_dpftrf.c50
-rw-r--r--LAPACKE/src/lapacke_dpftrf_work.c75
-rw-r--r--LAPACKE/src/lapacke_dpftri.c50
-rw-r--r--LAPACKE/src/lapacke_dpftri_work.c75
-rw-r--r--LAPACKE/src/lapacke_dpftrs.c55
-rw-r--r--LAPACKE/src/lapacke_dpftrs_work.c92
-rw-r--r--LAPACKE/src/lapacke_dpocon.c79
-rw-r--r--LAPACKE/src/lapacke_dpocon_work.c81
-rw-r--r--LAPACKE/src/lapacke_dpoequ.c51
-rw-r--r--LAPACKE/src/lapacke_dpoequ_work.c80
-rw-r--r--LAPACKE/src/lapacke_dpoequb.c51
-rw-r--r--LAPACKE/src/lapacke_dpoequb_work.c80
-rw-r--r--LAPACKE/src/lapacke_dporfs.c87
-rw-r--r--LAPACKE/src/lapacke_dporfs_work.c133
-rw-r--r--LAPACKE/src/lapacke_dporfsx.c102
-rw-r--r--LAPACKE/src/lapacke_dporfsx_work.c161
-rw-r--r--LAPACKE/src/lapacke_dposv.c54
-rw-r--r--LAPACKE/src/lapacke_dposv_work.c98
-rw-r--r--LAPACKE/src/lapacke_dposvx.c92
-rw-r--r--LAPACKE/src/lapacke_dposvx_work.c143
-rw-r--r--LAPACKE/src/lapacke_dposvxx.c101
-rw-r--r--LAPACKE/src/lapacke_dposvxx_work.c171
-rw-r--r--LAPACKE/src/lapacke_dpotrf.c50
-rw-r--r--LAPACKE/src/lapacke_dpotrf_work.c81
-rw-r--r--LAPACKE/src/lapacke_dpotri.c50
-rw-r--r--LAPACKE/src/lapacke_dpotri_work.c81
-rw-r--r--LAPACKE/src/lapacke_dpotrs.c54
-rw-r--r--LAPACKE/src/lapacke_dpotrs_work.c97
-rw-r--r--LAPACKE/src/lapacke_dppcon.c78
-rw-r--r--LAPACKE/src/lapacke_dppcon_work.c74
-rw-r--r--LAPACKE/src/lapacke_dppequ.c51
-rw-r--r--LAPACKE/src/lapacke_dppequ_work.c74
-rw-r--r--LAPACKE/src/lapacke_dpprfs.c86
-rw-r--r--LAPACKE/src/lapacke_dpprfs_work.c122
-rw-r--r--LAPACKE/src/lapacke_dppsv.c54
-rw-r--r--LAPACKE/src/lapacke_dppsv_work.c93
-rw-r--r--LAPACKE/src/lapacke_dppsvx.c92
-rw-r--r--LAPACKE/src/lapacke_dppsvx_work.c131
-rw-r--r--LAPACKE/src/lapacke_dpptrf.c50
-rw-r--r--LAPACKE/src/lapacke_dpptrf_work.c75
-rw-r--r--LAPACKE/src/lapacke_dpptri.c50
-rw-r--r--LAPACKE/src/lapacke_dpptri_work.c75
-rw-r--r--LAPACKE/src/lapacke_dpptrs.c54
-rw-r--r--LAPACKE/src/lapacke_dpptrs_work.c92
-rw-r--r--LAPACKE/src/lapacke_dpstrf.c71
-rw-r--r--LAPACKE/src/lapacke_dpstrf_work.c82
-rw-r--r--LAPACKE/src/lapacke_dptcon.c68
-rw-r--r--LAPACKE/src/lapacke_dptcon_work.c43
-rw-r--r--LAPACKE/src/lapacke_dpteqr.c82
-rw-r--r--LAPACKE/src/lapacke_dpteqr_work.c84
-rw-r--r--LAPACKE/src/lapacke_dptrfs.c85
-rw-r--r--LAPACKE/src/lapacke_dptrfs_work.c102
-rw-r--r--LAPACKE/src/lapacke_dptsv.c56
-rw-r--r--LAPACKE/src/lapacke_dptsv_work.c81
-rw-r--r--LAPACKE/src/lapacke_dptsvx.c86
-rw-r--r--LAPACKE/src/lapacke_dptsvx_work.c101
-rw-r--r--LAPACKE/src/lapacke_dpttrf.c48
-rw-r--r--LAPACKE/src/lapacke_dpttrf_work.c42
-rw-r--r--LAPACKE/src/lapacke_dpttrs.c57
-rw-r--r--LAPACKE/src/lapacke_dpttrs_work.c82
-rw-r--r--LAPACKE/src/lapacke_dsbev.c68
-rw-r--r--LAPACKE/src/lapacke_dsbev_work.c107
-rw-r--r--LAPACKE/src/lapacke_dsbevd.c88
-rw-r--r--LAPACKE/src/lapacke_dsbevd_work.c114
-rw-r--r--LAPACKE/src/lapacke_dsbevx.c93
-rw-r--r--LAPACKE/src/lapacke_dsbevx_work.c139
-rw-r--r--LAPACKE/src/lapacke_dsbgst.c72
-rw-r--r--LAPACKE/src/lapacke_dsbgst_work.c123
-rw-r--r--LAPACKE/src/lapacke_dsbgv.c72
-rw-r--r--LAPACKE/src/lapacke_dsbgv_work.c125
-rw-r--r--LAPACKE/src/lapacke_dsbgvd.c94
-rw-r--r--LAPACKE/src/lapacke_dsbgvd_work.c132
-rw-r--r--LAPACKE/src/lapacke_dsbgvx.c97
-rw-r--r--LAPACKE/src/lapacke_dsbgvx_work.c152
-rw-r--r--LAPACKE/src/lapacke_dsbtrd.c73
-rw-r--r--LAPACKE/src/lapacke_dsbtrd_work.c110
-rw-r--r--LAPACKE/src/lapacke_dsfrk.c65
-rw-r--r--LAPACKE/src/lapacke_dsfrk_work.c95
-rw-r--r--LAPACKE/src/lapacke_dsgesv.c80
-rw-r--r--LAPACKE/src/lapacke_dsgesv_work.c117
-rw-r--r--LAPACKE/src/lapacke_dspcon.c79
-rw-r--r--LAPACKE/src/lapacke_dspcon_work.c76
-rw-r--r--LAPACKE/src/lapacke_dspev.c67
-rw-r--r--LAPACKE/src/lapacke_dspev_work.c98
-rw-r--r--LAPACKE/src/lapacke_dspevd.c87
-rw-r--r--LAPACKE/src/lapacke_dspevd_work.c107
-rw-r--r--LAPACKE/src/lapacke_dspevx.c92
-rw-r--r--LAPACKE/src/lapacke_dspevx_work.c108
-rw-r--r--LAPACKE/src/lapacke_dspgst.c53
-rw-r--r--LAPACKE/src/lapacke_dspgst_work.c85
-rw-r--r--LAPACKE/src/lapacke_dspgv.c71
-rw-r--r--LAPACKE/src/lapacke_dspgv_work.c112
-rw-r--r--LAPACKE/src/lapacke_dspgvd.c92
-rw-r--r--LAPACKE/src/lapacke_dspgvd_work.c119
-rw-r--r--LAPACKE/src/lapacke_dspgvx.c96
-rw-r--r--LAPACKE/src/lapacke_dspgvx_work.c121
-rw-r--r--LAPACKE/src/lapacke_dsposv.c80
-rw-r--r--LAPACKE/src/lapacke_dsposv_work.c117
-rw-r--r--LAPACKE/src/lapacke_dsprfs.c87
-rw-r--r--LAPACKE/src/lapacke_dsprfs_work.c122
-rw-r--r--LAPACKE/src/lapacke_dspsv.c54
-rw-r--r--LAPACKE/src/lapacke_dspsv_work.c93
-rw-r--r--LAPACKE/src/lapacke_dspsvx.c87
-rw-r--r--LAPACKE/src/lapacke_dspsvx_work.c126
-rw-r--r--LAPACKE/src/lapacke_dsptrd.c50
-rw-r--r--LAPACKE/src/lapacke_dsptrd_work.c75
-rw-r--r--LAPACKE/src/lapacke_dsptrf.c50
-rw-r--r--LAPACKE/src/lapacke_dsptrf_work.c75
-rw-r--r--LAPACKE/src/lapacke_dsptri.c66
-rw-r--r--LAPACKE/src/lapacke_dsptri_work.c76
-rw-r--r--LAPACKE/src/lapacke_dsptrs.c54
-rw-r--r--LAPACKE/src/lapacke_dsptrs_work.c93
-rw-r--r--LAPACKE/src/lapacke_dstebz.c90
-rw-r--r--LAPACKE/src/lapacke_dstebz_work.c48
-rw-r--r--LAPACKE/src/lapacke_dstedc.c95
-rw-r--r--LAPACKE/src/lapacke_dstedc_work.c99
-rw-r--r--LAPACKE/src/lapacke_dstegr.c108
-rw-r--r--LAPACKE/src/lapacke_dstegr_work.c102
-rw-r--r--LAPACKE/src/lapacke_dstein.c83
-rw-r--r--LAPACKE/src/lapacke_dstein_work.c85
-rw-r--r--LAPACKE/src/lapacke_dstemr.c102
-rw-r--r--LAPACKE/src/lapacke_dstemr_work.c102
-rw-r--r--LAPACKE/src/lapacke_dsteqr.c82
-rw-r--r--LAPACKE/src/lapacke_dsteqr_work.c90
-rw-r--r--LAPACKE/src/lapacke_dsterf.c48
-rw-r--r--LAPACKE/src/lapacke_dsterf_work.c42
-rw-r--r--LAPACKE/src/lapacke_dstev.c73
-rw-r--r--LAPACKE/src/lapacke_dstev_work.c86
-rw-r--r--LAPACKE/src/lapacke_dstevd.c90
-rw-r--r--LAPACKE/src/lapacke_dstevd_work.c95
-rw-r--r--LAPACKE/src/lapacke_dstevr.c108
-rw-r--r--LAPACKE/src/lapacke_dstevr_work.c106
-rw-r--r--LAPACKE/src/lapacke_dstevx.c94
-rw-r--r--LAPACKE/src/lapacke_dstevx_work.c96
-rw-r--r--LAPACKE/src/lapacke_dsycon.c79
-rw-r--r--LAPACKE/src/lapacke_dsycon_work.c83
-rw-r--r--LAPACKE/src/lapacke_dsyconv.c67
-rw-r--r--LAPACKE/src/lapacke_dsyconv_work.c82
-rw-r--r--LAPACKE/src/lapacke_dsyequb.c68
-rw-r--r--LAPACKE/src/lapacke_dsyequb_work.c80
-rw-r--r--LAPACKE/src/lapacke_dsyev.c76
-rw-r--r--LAPACKE/src/lapacke_dsyev_work.c87
-rw-r--r--LAPACKE/src/lapacke_dsyevd.c87
-rw-r--r--LAPACKE/src/lapacke_dsyevd_work.c91
-rw-r--r--LAPACKE/src/lapacke_dsyevr.c105
-rw-r--r--LAPACKE/src/lapacke_dsyevr_work.c124
-rw-r--r--LAPACKE/src/lapacke_dsyevx.c103
-rw-r--r--LAPACKE/src/lapacke_dsyevx_work.c123
-rw-r--r--LAPACKE/src/lapacke_dsygst.c54
-rw-r--r--LAPACKE/src/lapacke_dsygst_work.c97
-rw-r--r--LAPACKE/src/lapacke_dsygv.c80
-rw-r--r--LAPACKE/src/lapacke_dsygv_work.c107
-rw-r--r--LAPACKE/src/lapacke_dsygvd.c92
-rw-r--r--LAPACKE/src/lapacke_dsygvd_work.c108
-rw-r--r--LAPACKE/src/lapacke_dsygvx.c107
-rw-r--r--LAPACKE/src/lapacke_dsygvx_work.c140
-rw-r--r--LAPACKE/src/lapacke_dsyrfs.c88
-rw-r--r--LAPACKE/src/lapacke_dsyrfs_work.c133
-rw-r--r--LAPACKE/src/lapacke_dsyrfsx.c103
-rw-r--r--LAPACKE/src/lapacke_dsyrfsx_work.c163
-rw-r--r--LAPACKE/src/lapacke_dsysv.c80
-rw-r--r--LAPACKE/src/lapacke_dsysv_rook.c80
-rw-r--r--LAPACKE/src/lapacke_dsysv_rook_work.c107
-rw-r--r--LAPACKE/src/lapacke_dsysv_work.c107
-rw-r--r--LAPACKE/src/lapacke_dsysvx.c99
-rw-r--r--LAPACKE/src/lapacke_dsysvx_work.c148
-rw-r--r--LAPACKE/src/lapacke_dsysvxx.c102
-rw-r--r--LAPACKE/src/lapacke_dsysvxx_work.c173
-rw-r--r--LAPACKE/src/lapacke_dsyswapr.c50
-rw-r--r--LAPACKE/src/lapacke_dsyswapr_work.c72
-rw-r--r--LAPACKE/src/lapacke_dsytrd.c76
-rw-r--r--LAPACKE/src/lapacke_dsytrd_work.c88
-rw-r--r--LAPACKE/src/lapacke_dsytrf.c76
-rw-r--r--LAPACKE/src/lapacke_dsytrf_work.c87
-rw-r--r--LAPACKE/src/lapacke_dsytri.c66
-rw-r--r--LAPACKE/src/lapacke_dsytri2.c77
-rw-r--r--LAPACKE/src/lapacke_dsytri2_work.c88
-rw-r--r--LAPACKE/src/lapacke_dsytri2x.c68
-rw-r--r--LAPACKE/src/lapacke_dsytri2x_work.c83
-rw-r--r--LAPACKE/src/lapacke_dsytri_work.c82
-rw-r--r--LAPACKE/src/lapacke_dsytrs.c55
-rw-r--r--LAPACKE/src/lapacke_dsytrs2.c71
-rw-r--r--LAPACKE/src/lapacke_dsytrs2_work.c99
-rw-r--r--LAPACKE/src/lapacke_dsytrs_work.c99
-rw-r--r--LAPACKE/src/lapacke_dtbcon.c76
-rw-r--r--LAPACKE/src/lapacke_dtbcon_work.c84
-rw-r--r--LAPACKE/src/lapacke_dtbrfs.c85
-rw-r--r--LAPACKE/src/lapacke_dtbrfs_work.c117
-rw-r--r--LAPACKE/src/lapacke_dtbtrs.c56
-rw-r--r--LAPACKE/src/lapacke_dtbtrs_work.c101
-rw-r--r--LAPACKE/src/lapacke_dtfsm.c63
-rw-r--r--LAPACKE/src/lapacke_dtfsm_work.c102
-rw-r--r--LAPACKE/src/lapacke_dtftri.c50
-rw-r--r--LAPACKE/src/lapacke_dtftri_work.c75
-rw-r--r--LAPACKE/src/lapacke_dtfttp.c50
-rw-r--r--LAPACKE/src/lapacke_dtfttp_work.c84
-rw-r--r--LAPACKE/src/lapacke_dtfttr.c51
-rw-r--r--LAPACKE/src/lapacke_dtfttr_work.c91
-rw-r--r--LAPACKE/src/lapacke_dtgevc.c84
-rw-r--r--LAPACKE/src/lapacke_dtgevc_work.c155
-rw-r--r--LAPACKE/src/lapacke_dtgexc.c93
-rw-r--r--LAPACKE/src/lapacke_dtgexc_work.c158
-rw-r--r--LAPACKE/src/lapacke_dtgsen.c113
-rw-r--r--LAPACKE/src/lapacke_dtgsen_work.c165
-rw-r--r--LAPACKE/src/lapacke_dtgsja.c98
-rw-r--r--LAPACKE/src/lapacke_dtgsja_work.c180
-rw-r--r--LAPACKE/src/lapacke_dtgsna.c112
-rw-r--r--LAPACKE/src/lapacke_dtgsna_work.c155
-rw-r--r--LAPACKE/src/lapacke_dtgsyl.c107
-rw-r--r--LAPACKE/src/lapacke_dtgsyl_work.c174
-rw-r--r--LAPACKE/src/lapacke_dtpcon.c75
-rw-r--r--LAPACKE/src/lapacke_dtpcon_work.c75
-rw-r--r--LAPACKE/src/lapacke_dtpmqrt.c80
-rw-r--r--LAPACKE/src/lapacke_dtpmqrt_work.c134
-rw-r--r--LAPACKE/src/lapacke_dtpqrt.c72
-rw-r--r--LAPACKE/src/lapacke_dtpqrt2.c55
-rw-r--r--LAPACKE/src/lapacke_dtpqrt2_work.c114
-rw-r--r--LAPACKE/src/lapacke_dtpqrt_work.c116
-rw-r--r--LAPACKE/src/lapacke_dtprfb.c91
-rw-r--r--LAPACKE/src/lapacke_dtprfb_work.c134
-rw-r--r--LAPACKE/src/lapacke_dtprfs.c83
-rw-r--r--LAPACKE/src/lapacke_dtprfs_work.c110
-rw-r--r--LAPACKE/src/lapacke_dtptri.c50
-rw-r--r--LAPACKE/src/lapacke_dtptri_work.c75
-rw-r--r--LAPACKE/src/lapacke_dtptrs.c55
-rw-r--r--LAPACKE/src/lapacke_dtptrs_work.c93
-rw-r--r--LAPACKE/src/lapacke_dtpttf.c50
-rw-r--r--LAPACKE/src/lapacke_dtpttf_work.c84
-rw-r--r--LAPACKE/src/lapacke_dtpttr.c50
-rw-r--r--LAPACKE/src/lapacke_dtpttr_work.c90
-rw-r--r--LAPACKE/src/lapacke_dtrcon.c76
-rw-r--r--LAPACKE/src/lapacke_dtrcon_work.c83
-rw-r--r--LAPACKE/src/lapacke_dtrevc.c80
-rw-r--r--LAPACKE/src/lapacke_dtrevc_work.c139
-rw-r--r--LAPACKE/src/lapacke_dtrexc.c73
-rw-r--r--LAPACKE/src/lapacke_dtrexc_work.c108
-rw-r--r--LAPACKE/src/lapacke_dtrrfs.c84
-rw-r--r--LAPACKE/src/lapacke_dtrrfs_work.c115
-rw-r--r--LAPACKE/src/lapacke_dtrsen.c101
-rw-r--r--LAPACKE/src/lapacke_dtrsen_work.c121
-rw-r--r--LAPACKE/src/lapacke_dtrsna.c100
-rw-r--r--LAPACKE/src/lapacke_dtrsna_work.c132
-rw-r--r--LAPACKE/src/lapacke_dtrsyl.c60
-rw-r--r--LAPACKE/src/lapacke_dtrsyl_work.c116
-rw-r--r--LAPACKE/src/lapacke_dtrtri.c50
-rw-r--r--LAPACKE/src/lapacke_dtrtri_work.c82
-rw-r--r--LAPACKE/src/lapacke_dtrtrs.c55
-rw-r--r--LAPACKE/src/lapacke_dtrtrs_work.c100
-rw-r--r--LAPACKE/src/lapacke_dtrttf.c51
-rw-r--r--LAPACKE/src/lapacke_dtrttf_work.c91
-rw-r--r--LAPACKE/src/lapacke_dtrttp.c50
-rw-r--r--LAPACKE/src/lapacke_dtrttp_work.c90
-rw-r--r--LAPACKE/src/lapacke_dtzrzf.c75
-rw-r--r--LAPACKE/src/lapacke_dtzrzf_work.c87
-rw-r--r--LAPACKE/src/lapacke_ilaver.c43
-rw-r--r--LAPACKE/src/lapacke_sbbcsd.c114
-rw-r--r--LAPACKE/src/lapacke_sbbcsd_work.c198
-rw-r--r--LAPACKE/src/lapacke_sbdsdc.c92
-rw-r--r--LAPACKE/src/lapacke_sbdsdc_work.c111
-rw-r--r--LAPACKE/src/lapacke_sbdsqr.c87
-rw-r--r--LAPACKE/src/lapacke_sbdsqr_work.c144
-rw-r--r--LAPACKE/src/lapacke_sdisna.c46
-rw-r--r--LAPACKE/src/lapacke_sdisna_work.c43
-rw-r--r--LAPACKE/src/lapacke_sgbbrd.c75
-rw-r--r--LAPACKE/src/lapacke_sgbbrd_work.c154
-rw-r--r--LAPACKE/src/lapacke_sgbcon.c80
-rw-r--r--LAPACKE/src/lapacke_sgbcon_work.c85
-rw-r--r--LAPACKE/src/lapacke_sgbequ.c53
-rw-r--r--LAPACKE/src/lapacke_sgbequ_work.c83
-rw-r--r--LAPACKE/src/lapacke_sgbequb.c53
-rw-r--r--LAPACKE/src/lapacke_sgbequb_work.c83
-rw-r--r--LAPACKE/src/lapacke_sgbrfs.c89
-rw-r--r--LAPACKE/src/lapacke_sgbrfs_work.c136
-rw-r--r--LAPACKE/src/lapacke_sgbrfsx.c109
-rw-r--r--LAPACKE/src/lapacke_sgbrfsx_work.c164
-rw-r--r--LAPACKE/src/lapacke_sgbsv.c56
-rw-r--r--LAPACKE/src/lapacke_sgbsv_work.c102
-rw-r--r--LAPACKE/src/lapacke_sgbsvx.c105
-rw-r--r--LAPACKE/src/lapacke_sgbsvx_work.c151
-rw-r--r--LAPACKE/src/lapacke_sgbsvxx.c112
-rw-r--r--LAPACKE/src/lapacke_sgbsvxx_work.c178
-rw-r--r--LAPACKE/src/lapacke_sgbtrf.c51
-rw-r--r--LAPACKE/src/lapacke_sgbtrf_work.c84
-rw-r--r--LAPACKE/src/lapacke_sgbtrs.c56
-rw-r--r--LAPACKE/src/lapacke_sgbtrs_work.c102
-rw-r--r--LAPACKE/src/lapacke_sgebak.c55
-rw-r--r--LAPACKE/src/lapacke_sgebak_work.c84
-rw-r--r--LAPACKE/src/lapacke_sgebal.c54
-rw-r--r--LAPACKE/src/lapacke_sgebal_work.c94
-rw-r--r--LAPACKE/src/lapacke_sgebrd.c77
-rw-r--r--LAPACKE/src/lapacke_sgebrd_work.c90
-rw-r--r--LAPACKE/src/lapacke_sgecon.c79
-rw-r--r--LAPACKE/src/lapacke_sgecon_work.c81
-rw-r--r--LAPACKE/src/lapacke_sgeequ.c52
-rw-r--r--LAPACKE/src/lapacke_sgeequ_work.c81
-rw-r--r--LAPACKE/src/lapacke_sgeequb.c52
-rw-r--r--LAPACKE/src/lapacke_sgeequb_work.c82
-rw-r--r--LAPACKE/src/lapacke_sgees.c93
-rw-r--r--LAPACKE/src/lapacke_sgees_work.c114
-rw-r--r--LAPACKE/src/lapacke_sgeesx.c111
-rw-r--r--LAPACKE/src/lapacke_sgeesx_work.c119
-rw-r--r--LAPACKE/src/lapacke_sgeev.c78
-rw-r--r--LAPACKE/src/lapacke_sgeev_work.c134
-rw-r--r--LAPACKE/src/lapacke_sgeevx.c98
-rw-r--r--LAPACKE/src/lapacke_sgeevx_work.c140
-rw-r--r--LAPACKE/src/lapacke_sgehrd.c77
-rw-r--r--LAPACKE/src/lapacke_sgehrd_work.c88
-rw-r--r--LAPACKE/src/lapacke_sgejsv.c133
-rw-r--r--LAPACKE/src/lapacke_sgejsv_work.c147
-rw-r--r--LAPACKE/src/lapacke_sgelq2.c66
-rw-r--r--LAPACKE/src/lapacke_sgelq2_work.c82
-rw-r--r--LAPACKE/src/lapacke_sgelqf.c75
-rw-r--r--LAPACKE/src/lapacke_sgelqf_work.c87
-rw-r--r--LAPACKE/src/lapacke_sgels.c80
-rw-r--r--LAPACKE/src/lapacke_sgels_work.c108
-rw-r--r--LAPACKE/src/lapacke_sgelsd.c96
-rw-r--r--LAPACKE/src/lapacke_sgelsd_work.c109
-rw-r--r--LAPACKE/src/lapacke_sgelss.c84
-rw-r--r--LAPACKE/src/lapacke_sgelss_work.c109
-rw-r--r--LAPACKE/src/lapacke_sgelsy.c84
-rw-r--r--LAPACKE/src/lapacke_sgelsy_work.c109
-rw-r--r--LAPACKE/src/lapacke_sgemqrt.c76
-rw-r--r--LAPACKE/src/lapacke_sgemqrt_work.c116
-rw-r--r--LAPACKE/src/lapacke_sgeqlf.c75
-rw-r--r--LAPACKE/src/lapacke_sgeqlf_work.c87
-rw-r--r--LAPACKE/src/lapacke_sgeqp3.c77
-rw-r--r--LAPACKE/src/lapacke_sgeqp3_work.c87
-rw-r--r--LAPACKE/src/lapacke_sgeqpf.c67
-rw-r--r--LAPACKE/src/lapacke_sgeqpf_work.c82
-rw-r--r--LAPACKE/src/lapacke_sgeqr2.c66
-rw-r--r--LAPACKE/src/lapacke_sgeqr2_work.c82
-rw-r--r--LAPACKE/src/lapacke_sgeqrf.c75
-rw-r--r--LAPACKE/src/lapacke_sgeqrf_work.c87
-rw-r--r--LAPACKE/src/lapacke_sgeqrfp.c75
-rw-r--r--LAPACKE/src/lapacke_sgeqrfp_work.c87
-rw-r--r--LAPACKE/src/lapacke_sgeqrt.c67
-rw-r--r--LAPACKE/src/lapacke_sgeqrt2.c50
-rw-r--r--LAPACKE/src/lapacke_sgeqrt2_work.c97
-rw-r--r--LAPACKE/src/lapacke_sgeqrt3.c50
-rw-r--r--LAPACKE/src/lapacke_sgeqrt3_work.c97
-rw-r--r--LAPACKE/src/lapacke_sgeqrt_work.c98
-rw-r--r--LAPACKE/src/lapacke_sgerfs.c88
-rw-r--r--LAPACKE/src/lapacke_sgerfs_work.c133
-rw-r--r--LAPACKE/src/lapacke_sgerfsx.c108
-rw-r--r--LAPACKE/src/lapacke_sgerfsx_work.c162
-rw-r--r--LAPACKE/src/lapacke_sgerqf.c75
-rw-r--r--LAPACKE/src/lapacke_sgerqf_work.c87
-rw-r--r--LAPACKE/src/lapacke_sgesdd.c88
-rw-r--r--LAPACKE/src/lapacke_sgesdd_work.c152
-rw-r--r--LAPACKE/src/lapacke_sgesv.c54
-rw-r--r--LAPACKE/src/lapacke_sgesv_work.c98
-rw-r--r--LAPACKE/src/lapacke_sgesvd.c83
-rw-r--r--LAPACKE/src/lapacke_sgesvd_work.c143
-rw-r--r--LAPACKE/src/lapacke_sgesvj.c84
-rw-r--r--LAPACKE/src/lapacke_sgesvj_work.c113
-rw-r--r--LAPACKE/src/lapacke_sgesvx.c103
-rw-r--r--LAPACKE/src/lapacke_sgesvx_work.c147
-rw-r--r--LAPACKE/src/lapacke_sgesvxx.c109
-rw-r--r--LAPACKE/src/lapacke_sgesvxx_work.c174
-rw-r--r--LAPACKE/src/lapacke_sgetf2.c50
-rw-r--r--LAPACKE/src/lapacke_sgetf2_work.c81
-rw-r--r--LAPACKE/src/lapacke_sgetrf.c50
-rw-r--r--LAPACKE/src/lapacke_sgetrf_work.c81
-rw-r--r--LAPACKE/src/lapacke_sgetri.c75
-rw-r--r--LAPACKE/src/lapacke_sgetri_work.c87
-rw-r--r--LAPACKE/src/lapacke_sgetrs.c55
-rw-r--r--LAPACKE/src/lapacke_sgetrs_work.c99
-rw-r--r--LAPACKE/src/lapacke_sggbak.c59
-rw-r--r--LAPACKE/src/lapacke_sggbak_work.c85
-rw-r--r--LAPACKE/src/lapacke_sggbal.c86
-rw-r--r--LAPACKE/src/lapacke_sggbal_work.c126
-rw-r--r--LAPACKE/src/lapacke_sgges.c99
-rw-r--r--LAPACKE/src/lapacke_sgges_work.c160
-rw-r--r--LAPACKE/src/lapacke_sggesx.c114
-rw-r--r--LAPACKE/src/lapacke_sggesx_work.c165
-rw-r--r--LAPACKE/src/lapacke_sggev.c84
-rw-r--r--LAPACKE/src/lapacke_sggev_work.c161
-rw-r--r--LAPACKE/src/lapacke_sggevx.c120
-rw-r--r--LAPACKE/src/lapacke_sggevx_work.c161
-rw-r--r--LAPACKE/src/lapacke_sggglm.c83
-rw-r--r--LAPACKE/src/lapacke_sggglm_work.c107
-rw-r--r--LAPACKE/src/lapacke_sgghrd.c66
-rw-r--r--LAPACKE/src/lapacke_sgghrd_work.c150
-rw-r--r--LAPACKE/src/lapacke_sgglse.c86
-rw-r--r--LAPACKE/src/lapacke_sgglse_work.c107
-rw-r--r--LAPACKE/src/lapacke_sggqrf.c80
-rw-r--r--LAPACKE/src/lapacke_sggqrf_work.c107
-rw-r--r--LAPACKE/src/lapacke_sggrqf.c80
-rw-r--r--LAPACKE/src/lapacke_sggrqf_work.c107
-rw-r--r--LAPACKE/src/lapacke_sggsvd.c76
-rw-r--r--LAPACKE/src/lapacke_sggsvd_work.c170
-rw-r--r--LAPACKE/src/lapacke_sggsvp.c97
-rw-r--r--LAPACKE/src/lapacke_sggsvp_work.c170
-rw-r--r--LAPACKE/src/lapacke_sgtcon.c84
-rw-r--r--LAPACKE/src/lapacke_sgtcon_work.c47
-rw-r--r--LAPACKE/src/lapacke_sgtrfs.c105
-rw-r--r--LAPACKE/src/lapacke_sgtrfs_work.c106
-rw-r--r--LAPACKE/src/lapacke_sgtsv.c60
-rw-r--r--LAPACKE/src/lapacke_sgtsv_work.c82
-rw-r--r--LAPACKE/src/lapacke_sgtsvx.c110
-rw-r--r--LAPACKE/src/lapacke_sgtsvx_work.c105
-rw-r--r--LAPACKE/src/lapacke_sgttrf.c52
-rw-r--r--LAPACKE/src/lapacke_sgttrf_work.c43
-rw-r--r--LAPACKE/src/lapacke_sgttrs.c65
-rw-r--r--LAPACKE/src/lapacke_sgttrs_work.c86
-rw-r--r--LAPACKE/src/lapacke_shgeqz.c94
-rw-r--r--LAPACKE/src/lapacke_shgeqz_work.c161
-rw-r--r--LAPACKE/src/lapacke_shsein.c88
-rw-r--r--LAPACKE/src/lapacke_shsein_work.c140
-rw-r--r--LAPACKE/src/lapacke_shseqr.c83
-rw-r--r--LAPACKE/src/lapacke_shseqr_work.c116
-rw-r--r--LAPACKE/src/lapacke_slacn2.c49
-rw-r--r--LAPACKE/src/lapacke_slacn2_work.c44
-rw-r--r--LAPACKE/src/lapacke_slacpy.c51
-rw-r--r--LAPACKE/src/lapacke_slacpy_work.c94
-rw-r--r--LAPACKE/src/lapacke_slag2d.c51
-rw-r--r--LAPACKE/src/lapacke_slag2d_work.c96
-rw-r--r--LAPACKE/src/lapacke_slagge.c68
-rw-r--r--LAPACKE/src/lapacke_slagge_work.c81
-rw-r--r--LAPACKE/src/lapacke_slagsy.c67
-rw-r--r--LAPACKE/src/lapacke_slagsy_work.c80
-rw-r--r--LAPACKE/src/lapacke_slamch.c39
-rw-r--r--LAPACKE/src/lapacke_slamch_work.c43
-rw-r--r--LAPACKE/src/lapacke_slange.c71
-rw-r--r--LAPACKE/src/lapacke_slange_work.c79
-rw-r--r--LAPACKE/src/lapacke_slansy.c73
-rw-r--r--LAPACKE/src/lapacke_slansy_work.c79
-rw-r--r--LAPACKE/src/lapacke_slantr.c75
-rw-r--r--LAPACKE/src/lapacke_slantr_work.c79
-rw-r--r--LAPACKE/src/lapacke_slapmr.c51
-rw-r--r--LAPACKE/src/lapacke_slapmr_work.c80
-rw-r--r--LAPACKE/src/lapacke_slapy2.c48
-rw-r--r--LAPACKE/src/lapacke_slapy2_work.c42
-rw-r--r--LAPACKE/src/lapacke_slapy3.c51
-rw-r--r--LAPACKE/src/lapacke_slapy3_work.c42
-rw-r--r--LAPACKE/src/lapacke_slarfb.c118
-rw-r--r--LAPACKE/src/lapacke_slarfb_work.c154
-rw-r--r--LAPACKE/src/lapacke_slarfg.c49
-rw-r--r--LAPACKE/src/lapacke_slarfg_work.c43
-rw-r--r--LAPACKE/src/lapacke_slarft.c61
-rw-r--r--LAPACKE/src/lapacke_slarft_work.c101
-rw-r--r--LAPACKE/src/lapacke_slarfx.c58
-rw-r--r--LAPACKE/src/lapacke_slarfx_work.c80
-rw-r--r--LAPACKE/src/lapacke_slarnv.c40
-rw-r--r--LAPACKE/src/lapacke_slarnv_work.c43
-rw-r--r--LAPACKE/src/lapacke_slartgp.c48
-rw-r--r--LAPACKE/src/lapacke_slartgp_work.c43
-rw-r--r--LAPACKE/src/lapacke_slartgs.c52
-rw-r--r--LAPACKE/src/lapacke_slartgs_work.c43
-rw-r--r--LAPACKE/src/lapacke_slaset.c57
-rw-r--r--LAPACKE/src/lapacke_slaset_work.c80
-rw-r--r--LAPACKE/src/lapacke_slasrt.c45
-rw-r--r--LAPACKE/src/lapacke_slasrt_work.c42
-rw-r--r--LAPACKE/src/lapacke_slaswp.c51
-rw-r--r--LAPACKE/src/lapacke_slaswp_work.c80
-rw-r--r--LAPACKE/src/lapacke_slatms.c79
-rw-r--r--LAPACKE/src/lapacke_slatms_work.c87
-rw-r--r--LAPACKE/src/lapacke_slauum.c50
-rw-r--r--LAPACKE/src/lapacke_slauum_work.c81
-rw-r--r--LAPACKE/src/lapacke_sopgtr.c70
-rw-r--r--LAPACKE/src/lapacke_sopgtr_work.c91
-rw-r--r--LAPACKE/src/lapacke_sopmtr.c86
-rw-r--r--LAPACKE/src/lapacke_sopmtr_work.c97
-rw-r--r--LAPACKE/src/lapacke_sorbdb.c98
-rw-r--r--LAPACKE/src/lapacke_sorbdb_work.c158
-rw-r--r--LAPACKE/src/lapacke_sorcsd.c112
-rw-r--r--LAPACKE/src/lapacke_sorcsd_work.c261
-rw-r--r--LAPACKE/src/lapacke_sorgbr.c80
-rw-r--r--LAPACKE/src/lapacke_sorgbr_work.c90
-rw-r--r--LAPACKE/src/lapacke_sorghr.c80
-rw-r--r--LAPACKE/src/lapacke_sorghr_work.c89
-rw-r--r--LAPACKE/src/lapacke_sorglq.c80
-rw-r--r--LAPACKE/src/lapacke_sorglq_work.c88
-rw-r--r--LAPACKE/src/lapacke_sorgql.c80
-rw-r--r--LAPACKE/src/lapacke_sorgql_work.c88
-rw-r--r--LAPACKE/src/lapacke_sorgqr.c80
-rw-r--r--LAPACKE/src/lapacke_sorgqr_work.c88
-rw-r--r--LAPACKE/src/lapacke_sorgrq.c80
-rw-r--r--LAPACKE/src/lapacke_sorgrq_work.c88
-rw-r--r--LAPACKE/src/lapacke_sorgtr.c79
-rw-r--r--LAPACKE/src/lapacke_sorgtr_work.c87
-rw-r--r--LAPACKE/src/lapacke_sormbr.c87
-rw-r--r--LAPACKE/src/lapacke_sormbr_work.c111
-rw-r--r--LAPACKE/src/lapacke_sormhr.c86
-rw-r--r--LAPACKE/src/lapacke_sormhr_work.c109
-rw-r--r--LAPACKE/src/lapacke_sormlq.c84
-rw-r--r--LAPACKE/src/lapacke_sormlq_work.c107
-rw-r--r--LAPACKE/src/lapacke_sormql.c86
-rw-r--r--LAPACKE/src/lapacke_sormql_work.c109
-rw-r--r--LAPACKE/src/lapacke_sormqr.c86
-rw-r--r--LAPACKE/src/lapacke_sormqr_work.c109
-rw-r--r--LAPACKE/src/lapacke_sormrq.c84
-rw-r--r--LAPACKE/src/lapacke_sormrq_work.c107
-rw-r--r--LAPACKE/src/lapacke_sormrz.c84
-rw-r--r--LAPACKE/src/lapacke_sormrz_work.c107
-rw-r--r--LAPACKE/src/lapacke_sormtr.c86
-rw-r--r--LAPACKE/src/lapacke_sormtr_work.c108
-rw-r--r--LAPACKE/src/lapacke_spbcon.c79
-rw-r--r--LAPACKE/src/lapacke_spbcon_work.c83
-rw-r--r--LAPACKE/src/lapacke_spbequ.c52
-rw-r--r--LAPACKE/src/lapacke_spbequ_work.c80
-rw-r--r--LAPACKE/src/lapacke_spbrfs.c88
-rw-r--r--LAPACKE/src/lapacke_spbrfs_work.c135
-rw-r--r--LAPACKE/src/lapacke_spbstf.c50
-rw-r--r--LAPACKE/src/lapacke_spbstf_work.c82
-rw-r--r--LAPACKE/src/lapacke_spbsv.c55
-rw-r--r--LAPACKE/src/lapacke_spbsv_work.c100
-rw-r--r--LAPACKE/src/lapacke_spbsvx.c93
-rw-r--r--LAPACKE/src/lapacke_spbsvx_work.c146
-rw-r--r--LAPACKE/src/lapacke_spbtrf.c50
-rw-r--r--LAPACKE/src/lapacke_spbtrf_work.c82
-rw-r--r--LAPACKE/src/lapacke_spbtrs.c55
-rw-r--r--LAPACKE/src/lapacke_spbtrs_work.c98
-rw-r--r--LAPACKE/src/lapacke_spftrf.c50
-rw-r--r--LAPACKE/src/lapacke_spftrf_work.c75
-rw-r--r--LAPACKE/src/lapacke_spftri.c50
-rw-r--r--LAPACKE/src/lapacke_spftri_work.c75
-rw-r--r--LAPACKE/src/lapacke_spftrs.c55
-rw-r--r--LAPACKE/src/lapacke_spftrs_work.c92
-rw-r--r--LAPACKE/src/lapacke_spocon.c79
-rw-r--r--LAPACKE/src/lapacke_spocon_work.c81
-rw-r--r--LAPACKE/src/lapacke_spoequ.c50
-rw-r--r--LAPACKE/src/lapacke_spoequ_work.c80
-rw-r--r--LAPACKE/src/lapacke_spoequb.c51
-rw-r--r--LAPACKE/src/lapacke_spoequb_work.c80
-rw-r--r--LAPACKE/src/lapacke_sporfs.c87
-rw-r--r--LAPACKE/src/lapacke_sporfs_work.c132
-rw-r--r--LAPACKE/src/lapacke_sporfsx.c102
-rw-r--r--LAPACKE/src/lapacke_sporfsx_work.c160
-rw-r--r--LAPACKE/src/lapacke_sposv.c54
-rw-r--r--LAPACKE/src/lapacke_sposv_work.c98
-rw-r--r--LAPACKE/src/lapacke_sposvx.c92
-rw-r--r--LAPACKE/src/lapacke_sposvx_work.c143
-rw-r--r--LAPACKE/src/lapacke_sposvxx.c101
-rw-r--r--LAPACKE/src/lapacke_sposvxx_work.c170
-rw-r--r--LAPACKE/src/lapacke_spotrf.c50
-rw-r--r--LAPACKE/src/lapacke_spotrf_work.c81
-rw-r--r--LAPACKE/src/lapacke_spotri.c50
-rw-r--r--LAPACKE/src/lapacke_spotri_work.c81
-rw-r--r--LAPACKE/src/lapacke_spotrs.c54
-rw-r--r--LAPACKE/src/lapacke_spotrs_work.c97
-rw-r--r--LAPACKE/src/lapacke_sppcon.c78
-rw-r--r--LAPACKE/src/lapacke_sppcon_work.c74
-rw-r--r--LAPACKE/src/lapacke_sppequ.c51
-rw-r--r--LAPACKE/src/lapacke_sppequ_work.c74
-rw-r--r--LAPACKE/src/lapacke_spprfs.c86
-rw-r--r--LAPACKE/src/lapacke_spprfs_work.c122
-rw-r--r--LAPACKE/src/lapacke_sppsv.c53
-rw-r--r--LAPACKE/src/lapacke_sppsv_work.c93
-rw-r--r--LAPACKE/src/lapacke_sppsvx.c92
-rw-r--r--LAPACKE/src/lapacke_sppsvx_work.c131
-rw-r--r--LAPACKE/src/lapacke_spptrf.c50
-rw-r--r--LAPACKE/src/lapacke_spptrf_work.c75
-rw-r--r--LAPACKE/src/lapacke_spptri.c50
-rw-r--r--LAPACKE/src/lapacke_spptri_work.c75
-rw-r--r--LAPACKE/src/lapacke_spptrs.c54
-rw-r--r--LAPACKE/src/lapacke_spptrs_work.c92
-rw-r--r--LAPACKE/src/lapacke_spstrf.c71
-rw-r--r--LAPACKE/src/lapacke_spstrf_work.c82
-rw-r--r--LAPACKE/src/lapacke_sptcon.c68
-rw-r--r--LAPACKE/src/lapacke_sptcon_work.c43
-rw-r--r--LAPACKE/src/lapacke_spteqr.c82
-rw-r--r--LAPACKE/src/lapacke_spteqr_work.c84
-rw-r--r--LAPACKE/src/lapacke_sptrfs.c84
-rw-r--r--LAPACKE/src/lapacke_sptrfs_work.c101
-rw-r--r--LAPACKE/src/lapacke_sptsv.c56
-rw-r--r--LAPACKE/src/lapacke_sptsv_work.c81
-rw-r--r--LAPACKE/src/lapacke_sptsvx.c86
-rw-r--r--LAPACKE/src/lapacke_sptsvx_work.c101
-rw-r--r--LAPACKE/src/lapacke_spttrf.c48
-rw-r--r--LAPACKE/src/lapacke_spttrf_work.c42
-rw-r--r--LAPACKE/src/lapacke_spttrs.c57
-rw-r--r--LAPACKE/src/lapacke_spttrs_work.c82
-rw-r--r--LAPACKE/src/lapacke_ssbev.c68
-rw-r--r--LAPACKE/src/lapacke_ssbev_work.c107
-rw-r--r--LAPACKE/src/lapacke_ssbevd.c88
-rw-r--r--LAPACKE/src/lapacke_ssbevd_work.c114
-rw-r--r--LAPACKE/src/lapacke_ssbevx.c93
-rw-r--r--LAPACKE/src/lapacke_ssbevx_work.c139
-rw-r--r--LAPACKE/src/lapacke_ssbgst.c72
-rw-r--r--LAPACKE/src/lapacke_ssbgst_work.c123
-rw-r--r--LAPACKE/src/lapacke_ssbgv.c72
-rw-r--r--LAPACKE/src/lapacke_ssbgv_work.c125
-rw-r--r--LAPACKE/src/lapacke_ssbgvd.c94
-rw-r--r--LAPACKE/src/lapacke_ssbgvd_work.c132
-rw-r--r--LAPACKE/src/lapacke_ssbgvx.c97
-rw-r--r--LAPACKE/src/lapacke_ssbgvx_work.c152
-rw-r--r--LAPACKE/src/lapacke_ssbtrd.c73
-rw-r--r--LAPACKE/src/lapacke_ssbtrd_work.c110
-rw-r--r--LAPACKE/src/lapacke_ssfrk.c64
-rw-r--r--LAPACKE/src/lapacke_ssfrk_work.c95
-rw-r--r--LAPACKE/src/lapacke_sspcon.c79
-rw-r--r--LAPACKE/src/lapacke_sspcon_work.c76
-rw-r--r--LAPACKE/src/lapacke_sspev.c67
-rw-r--r--LAPACKE/src/lapacke_sspev_work.c98
-rw-r--r--LAPACKE/src/lapacke_sspevd.c87
-rw-r--r--LAPACKE/src/lapacke_sspevd_work.c107
-rw-r--r--LAPACKE/src/lapacke_sspevx.c92
-rw-r--r--LAPACKE/src/lapacke_sspevx_work.c108
-rw-r--r--LAPACKE/src/lapacke_sspgst.c53
-rw-r--r--LAPACKE/src/lapacke_sspgst_work.c85
-rw-r--r--LAPACKE/src/lapacke_sspgv.c71
-rw-r--r--LAPACKE/src/lapacke_sspgv_work.c111
-rw-r--r--LAPACKE/src/lapacke_sspgvd.c92
-rw-r--r--LAPACKE/src/lapacke_sspgvd_work.c119
-rw-r--r--LAPACKE/src/lapacke_sspgvx.c95
-rw-r--r--LAPACKE/src/lapacke_sspgvx_work.c120
-rw-r--r--LAPACKE/src/lapacke_ssprfs.c87
-rw-r--r--LAPACKE/src/lapacke_ssprfs_work.c122
-rw-r--r--LAPACKE/src/lapacke_sspsv.c54
-rw-r--r--LAPACKE/src/lapacke_sspsv_work.c93
-rw-r--r--LAPACKE/src/lapacke_sspsvx.c87
-rw-r--r--LAPACKE/src/lapacke_sspsvx_work.c126
-rw-r--r--LAPACKE/src/lapacke_ssptrd.c50
-rw-r--r--LAPACKE/src/lapacke_ssptrd_work.c75
-rw-r--r--LAPACKE/src/lapacke_ssptrf.c50
-rw-r--r--LAPACKE/src/lapacke_ssptrf_work.c75
-rw-r--r--LAPACKE/src/lapacke_ssptri.c66
-rw-r--r--LAPACKE/src/lapacke_ssptri_work.c75
-rw-r--r--LAPACKE/src/lapacke_ssptrs.c54
-rw-r--r--LAPACKE/src/lapacke_ssptrs_work.c93
-rw-r--r--LAPACKE/src/lapacke_sstebz.c90
-rw-r--r--LAPACKE/src/lapacke_sstebz_work.c48
-rw-r--r--LAPACKE/src/lapacke_sstedc.c95
-rw-r--r--LAPACKE/src/lapacke_sstedc_work.c99
-rw-r--r--LAPACKE/src/lapacke_sstegr.c108
-rw-r--r--LAPACKE/src/lapacke_sstegr_work.c102
-rw-r--r--LAPACKE/src/lapacke_sstein.c83
-rw-r--r--LAPACKE/src/lapacke_sstein_work.c85
-rw-r--r--LAPACKE/src/lapacke_sstemr.c101
-rw-r--r--LAPACKE/src/lapacke_sstemr_work.c102
-rw-r--r--LAPACKE/src/lapacke_ssteqr.c82
-rw-r--r--LAPACKE/src/lapacke_ssteqr_work.c90
-rw-r--r--LAPACKE/src/lapacke_ssterf.c48
-rw-r--r--LAPACKE/src/lapacke_ssterf_work.c42
-rw-r--r--LAPACKE/src/lapacke_sstev.c73
-rw-r--r--LAPACKE/src/lapacke_sstev_work.c86
-rw-r--r--LAPACKE/src/lapacke_sstevd.c90
-rw-r--r--LAPACKE/src/lapacke_sstevd_work.c95
-rw-r--r--LAPACKE/src/lapacke_sstevr.c108
-rw-r--r--LAPACKE/src/lapacke_sstevr_work.c106
-rw-r--r--LAPACKE/src/lapacke_sstevx.c94
-rw-r--r--LAPACKE/src/lapacke_sstevx_work.c96
-rw-r--r--LAPACKE/src/lapacke_ssycon.c79
-rw-r--r--LAPACKE/src/lapacke_ssycon_work.c83
-rw-r--r--LAPACKE/src/lapacke_ssyconv.c67
-rw-r--r--LAPACKE/src/lapacke_ssyconv_work.c82
-rw-r--r--LAPACKE/src/lapacke_ssyequb.c68
-rw-r--r--LAPACKE/src/lapacke_ssyequb_work.c80
-rw-r--r--LAPACKE/src/lapacke_ssyev.c76
-rw-r--r--LAPACKE/src/lapacke_ssyev_work.c87
-rw-r--r--LAPACKE/src/lapacke_ssyevd.c87
-rw-r--r--LAPACKE/src/lapacke_ssyevd_work.c91
-rw-r--r--LAPACKE/src/lapacke_ssyevr.c105
-rw-r--r--LAPACKE/src/lapacke_ssyevr_work.c124
-rw-r--r--LAPACKE/src/lapacke_ssyevx.c103
-rw-r--r--LAPACKE/src/lapacke_ssyevx_work.c123
-rw-r--r--LAPACKE/src/lapacke_ssygst.c54
-rw-r--r--LAPACKE/src/lapacke_ssygst_work.c97
-rw-r--r--LAPACKE/src/lapacke_ssygv.c80
-rw-r--r--LAPACKE/src/lapacke_ssygv_work.c107
-rw-r--r--LAPACKE/src/lapacke_ssygvd.c92
-rw-r--r--LAPACKE/src/lapacke_ssygvd_work.c108
-rw-r--r--LAPACKE/src/lapacke_ssygvx.c107
-rw-r--r--LAPACKE/src/lapacke_ssygvx_work.c140
-rw-r--r--LAPACKE/src/lapacke_ssyrfs.c88
-rw-r--r--LAPACKE/src/lapacke_ssyrfs_work.c133
-rw-r--r--LAPACKE/src/lapacke_ssyrfsx.c103
-rw-r--r--LAPACKE/src/lapacke_ssyrfsx_work.c162
-rw-r--r--LAPACKE/src/lapacke_ssysv.c80
-rw-r--r--LAPACKE/src/lapacke_ssysv_rook.c80
-rw-r--r--LAPACKE/src/lapacke_ssysv_rook_work.c107
-rw-r--r--LAPACKE/src/lapacke_ssysv_work.c107
-rw-r--r--LAPACKE/src/lapacke_ssysvx.c99
-rw-r--r--LAPACKE/src/lapacke_ssysvx_work.c148
-rw-r--r--LAPACKE/src/lapacke_ssysvxx.c102
-rw-r--r--LAPACKE/src/lapacke_ssysvxx_work.c173
-rw-r--r--LAPACKE/src/lapacke_ssyswapr.c50
-rw-r--r--LAPACKE/src/lapacke_ssyswapr_work.c72
-rw-r--r--LAPACKE/src/lapacke_ssytrd.c76
-rw-r--r--LAPACKE/src/lapacke_ssytrd_work.c88
-rw-r--r--LAPACKE/src/lapacke_ssytrf.c76
-rw-r--r--LAPACKE/src/lapacke_ssytrf_work.c87
-rw-r--r--LAPACKE/src/lapacke_ssytri.c66
-rw-r--r--LAPACKE/src/lapacke_ssytri2.c77
-rw-r--r--LAPACKE/src/lapacke_ssytri2_work.c88
-rw-r--r--LAPACKE/src/lapacke_ssytri2x.c68
-rw-r--r--LAPACKE/src/lapacke_ssytri2x_work.c83
-rw-r--r--LAPACKE/src/lapacke_ssytri_work.c82
-rw-r--r--LAPACKE/src/lapacke_ssytrs.c55
-rw-r--r--LAPACKE/src/lapacke_ssytrs2.c71
-rw-r--r--LAPACKE/src/lapacke_ssytrs2_work.c99
-rw-r--r--LAPACKE/src/lapacke_ssytrs_work.c99
-rw-r--r--LAPACKE/src/lapacke_stbcon.c76
-rw-r--r--LAPACKE/src/lapacke_stbcon_work.c84
-rw-r--r--LAPACKE/src/lapacke_stbrfs.c85
-rw-r--r--LAPACKE/src/lapacke_stbrfs_work.c116
-rw-r--r--LAPACKE/src/lapacke_stbtrs.c56
-rw-r--r--LAPACKE/src/lapacke_stbtrs_work.c101
-rw-r--r--LAPACKE/src/lapacke_stfsm.c63
-rw-r--r--LAPACKE/src/lapacke_stfsm_work.c101
-rw-r--r--LAPACKE/src/lapacke_stftri.c50
-rw-r--r--LAPACKE/src/lapacke_stftri_work.c75
-rw-r--r--LAPACKE/src/lapacke_stfttp.c50
-rw-r--r--LAPACKE/src/lapacke_stfttp_work.c84
-rw-r--r--LAPACKE/src/lapacke_stfttr.c51
-rw-r--r--LAPACKE/src/lapacke_stfttr_work.c91
-rw-r--r--LAPACKE/src/lapacke_stgevc.c84
-rw-r--r--LAPACKE/src/lapacke_stgevc_work.c153
-rw-r--r--LAPACKE/src/lapacke_stgexc.c93
-rw-r--r--LAPACKE/src/lapacke_stgexc_work.c158
-rw-r--r--LAPACKE/src/lapacke_stgsen.c113
-rw-r--r--LAPACKE/src/lapacke_stgsen_work.c165
-rw-r--r--LAPACKE/src/lapacke_stgsja.c97
-rw-r--r--LAPACKE/src/lapacke_stgsja_work.c180
-rw-r--r--LAPACKE/src/lapacke_stgsna.c112
-rw-r--r--LAPACKE/src/lapacke_stgsna_work.c152
-rw-r--r--LAPACKE/src/lapacke_stgsyl.c106
-rw-r--r--LAPACKE/src/lapacke_stgsyl_work.c174
-rw-r--r--LAPACKE/src/lapacke_stpcon.c75
-rw-r--r--LAPACKE/src/lapacke_stpcon_work.c75
-rw-r--r--LAPACKE/src/lapacke_stpmqrt.c79
-rw-r--r--LAPACKE/src/lapacke_stpmqrt_work.c134
-rw-r--r--LAPACKE/src/lapacke_stpqrt.c72
-rw-r--r--LAPACKE/src/lapacke_stpqrt2.c55
-rw-r--r--LAPACKE/src/lapacke_stpqrt2_work.c114
-rw-r--r--LAPACKE/src/lapacke_stpqrt_work.c116
-rw-r--r--LAPACKE/src/lapacke_stprfb.c91
-rw-r--r--LAPACKE/src/lapacke_stprfb_work.c134
-rw-r--r--LAPACKE/src/lapacke_stprfs.c83
-rw-r--r--LAPACKE/src/lapacke_stprfs_work.c109
-rw-r--r--LAPACKE/src/lapacke_stptri.c50
-rw-r--r--LAPACKE/src/lapacke_stptri_work.c75
-rw-r--r--LAPACKE/src/lapacke_stptrs.c55
-rw-r--r--LAPACKE/src/lapacke_stptrs_work.c93
-rw-r--r--LAPACKE/src/lapacke_stpttf.c50
-rw-r--r--LAPACKE/src/lapacke_stpttf_work.c84
-rw-r--r--LAPACKE/src/lapacke_stpttr.c50
-rw-r--r--LAPACKE/src/lapacke_stpttr_work.c90
-rw-r--r--LAPACKE/src/lapacke_strcon.c76
-rw-r--r--LAPACKE/src/lapacke_strcon_work.c83
-rw-r--r--LAPACKE/src/lapacke_strevc.c80
-rw-r--r--LAPACKE/src/lapacke_strevc_work.c137
-rw-r--r--LAPACKE/src/lapacke_strexc.c73
-rw-r--r--LAPACKE/src/lapacke_strexc_work.c108
-rw-r--r--LAPACKE/src/lapacke_strrfs.c84
-rw-r--r--LAPACKE/src/lapacke_strrfs_work.c115
-rw-r--r--LAPACKE/src/lapacke_strsen.c100
-rw-r--r--LAPACKE/src/lapacke_strsen_work.c121
-rw-r--r--LAPACKE/src/lapacke_strsna.c99
-rw-r--r--LAPACKE/src/lapacke_strsna_work.c129
-rw-r--r--LAPACKE/src/lapacke_strsyl.c60
-rw-r--r--LAPACKE/src/lapacke_strsyl_work.c116
-rw-r--r--LAPACKE/src/lapacke_strtri.c50
-rw-r--r--LAPACKE/src/lapacke_strtri_work.c82
-rw-r--r--LAPACKE/src/lapacke_strtrs.c55
-rw-r--r--LAPACKE/src/lapacke_strtrs_work.c100
-rw-r--r--LAPACKE/src/lapacke_strttf.c51
-rw-r--r--LAPACKE/src/lapacke_strttf_work.c91
-rw-r--r--LAPACKE/src/lapacke_strttp.c50
-rw-r--r--LAPACKE/src/lapacke_strttp_work.c90
-rw-r--r--LAPACKE/src/lapacke_stzrzf.c75
-rw-r--r--LAPACKE/src/lapacke_stzrzf_work.c87
-rw-r--r--LAPACKE/src/lapacke_zbbcsd.c116
-rw-r--r--LAPACKE/src/lapacke_zbbcsd_work.c205
-rw-r--r--LAPACKE/src/lapacke_zbdsqr.c89
-rw-r--r--LAPACKE/src/lapacke_zbdsqr_work.c150
-rw-r--r--LAPACKE/src/lapacke_zcgesv.c93
-rw-r--r--LAPACKE/src/lapacke_zcgesv_work.c124
-rw-r--r--LAPACKE/src/lapacke_zcposv.c93
-rw-r--r--LAPACKE/src/lapacke_zcposv_work.c124
-rw-r--r--LAPACKE/src/lapacke_zgbbrd.c86
-rw-r--r--LAPACKE/src/lapacke_zgbbrd_work.c163
-rw-r--r--LAPACKE/src/lapacke_zgbcon.c81
-rw-r--r--LAPACKE/src/lapacke_zgbcon_work.c87
-rw-r--r--LAPACKE/src/lapacke_zgbequ.c54
-rw-r--r--LAPACKE/src/lapacke_zgbequ_work.c85
-rw-r--r--LAPACKE/src/lapacke_zgbequb.c54
-rw-r--r--LAPACKE/src/lapacke_zgbequb_work.c85
-rw-r--r--LAPACKE/src/lapacke_zgbrfs.c92
-rw-r--r--LAPACKE/src/lapacke_zgbrfs_work.c145
-rw-r--r--LAPACKE/src/lapacke_zgbrfsx.c111
-rw-r--r--LAPACKE/src/lapacke_zgbrfsx_work.c175
-rw-r--r--LAPACKE/src/lapacke_zgbsv.c57
-rw-r--r--LAPACKE/src/lapacke_zgbsv_work.c106
-rw-r--r--LAPACKE/src/lapacke_zgbsvx.c107
-rw-r--r--LAPACKE/src/lapacke_zgbsvx_work.c160
-rw-r--r--LAPACKE/src/lapacke_zgbsvxx.c114
-rw-r--r--LAPACKE/src/lapacke_zgbsvxx_work.c188
-rw-r--r--LAPACKE/src/lapacke_zgbtrf.c52
-rw-r--r--LAPACKE/src/lapacke_zgbtrf_work.c86
-rw-r--r--LAPACKE/src/lapacke_zgbtrs.c57
-rw-r--r--LAPACKE/src/lapacke_zgbtrs_work.c105
-rw-r--r--LAPACKE/src/lapacke_zgebak.c56
-rw-r--r--LAPACKE/src/lapacke_zgebak_work.c85
-rw-r--r--LAPACKE/src/lapacke_zgebal.c54
-rw-r--r--LAPACKE/src/lapacke_zgebal_work.c97
-rw-r--r--LAPACKE/src/lapacke_zgebrd.c79
-rw-r--r--LAPACKE/src/lapacke_zgebrd_work.c93
-rw-r--r--LAPACKE/src/lapacke_zgecon.c80
-rw-r--r--LAPACKE/src/lapacke_zgecon_work.c83
-rw-r--r--LAPACKE/src/lapacke_zgeequ.c53
-rw-r--r--LAPACKE/src/lapacke_zgeequ_work.c82
-rw-r--r--LAPACKE/src/lapacke_zgeequb.c53
-rw-r--r--LAPACKE/src/lapacke_zgeequb_work.c83
-rw-r--r--LAPACKE/src/lapacke_zgees.c103
-rw-r--r--LAPACKE/src/lapacke_zgees_work.c118
-rw-r--r--LAPACKE/src/lapacke_zgeesx.c105
-rw-r--r--LAPACKE/src/lapacke_zgeesx_work.c123
-rw-r--r--LAPACKE/src/lapacke_zgeev.c89
-rw-r--r--LAPACKE/src/lapacke_zgeev_work.c141
-rw-r--r--LAPACKE/src/lapacke_zgeevx.c95
-rw-r--r--LAPACKE/src/lapacke_zgeevx_work.c147
-rw-r--r--LAPACKE/src/lapacke_zgehrd.c78
-rw-r--r--LAPACKE/src/lapacke_zgehrd_work.c90
-rw-r--r--LAPACKE/src/lapacke_zgelq2.c68
-rw-r--r--LAPACKE/src/lapacke_zgelq2_work.c84
-rw-r--r--LAPACKE/src/lapacke_zgelqf.c77
-rw-r--r--LAPACKE/src/lapacke_zgelqf_work.c89
-rw-r--r--LAPACKE/src/lapacke_zgels.c82
-rw-r--r--LAPACKE/src/lapacke_zgels_work.c112
-rw-r--r--LAPACKE/src/lapacke_zgelsd.c110
-rw-r--r--LAPACKE/src/lapacke_zgelsd_work.c114
-rw-r--r--LAPACKE/src/lapacke_zgelss.c95
-rw-r--r--LAPACKE/src/lapacke_zgelss_work.c113
-rw-r--r--LAPACKE/src/lapacke_zgelsy.c95
-rw-r--r--LAPACKE/src/lapacke_zgelsy_work.c113
-rw-r--r--LAPACKE/src/lapacke_zgemqrt.c78
-rw-r--r--LAPACKE/src/lapacke_zgemqrt_work.c120
-rw-r--r--LAPACKE/src/lapacke_zgeqlf.c77
-rw-r--r--LAPACKE/src/lapacke_zgeqlf_work.c89
-rw-r--r--LAPACKE/src/lapacke_zgeqp3.c87
-rw-r--r--LAPACKE/src/lapacke_zgeqp3_work.c92
-rw-r--r--LAPACKE/src/lapacke_zgeqpf.c77
-rw-r--r--LAPACKE/src/lapacke_zgeqpf_work.c84
-rw-r--r--LAPACKE/src/lapacke_zgeqr2.c68
-rw-r--r--LAPACKE/src/lapacke_zgeqr2_work.c84
-rw-r--r--LAPACKE/src/lapacke_zgeqrf.c77
-rw-r--r--LAPACKE/src/lapacke_zgeqrf_work.c89
-rw-r--r--LAPACKE/src/lapacke_zgeqrfp.c77
-rw-r--r--LAPACKE/src/lapacke_zgeqrfp_work.c89
-rw-r--r--LAPACKE/src/lapacke_zgeqrt.c69
-rw-r--r--LAPACKE/src/lapacke_zgeqrt2.c51
-rw-r--r--LAPACKE/src/lapacke_zgeqrt2_work.c99
-rw-r--r--LAPACKE/src/lapacke_zgeqrt3.c51
-rw-r--r--LAPACKE/src/lapacke_zgeqrt3_work.c99
-rw-r--r--LAPACKE/src/lapacke_zgeqrt_work.c102
-rw-r--r--LAPACKE/src/lapacke_zgerfs.c90
-rw-r--r--LAPACKE/src/lapacke_zgerfs_work.c140
-rw-r--r--LAPACKE/src/lapacke_zgerfsx.c111
-rw-r--r--LAPACKE/src/lapacke_zgerfsx_work.c171
-rw-r--r--LAPACKE/src/lapacke_zgerqf.c77
-rw-r--r--LAPACKE/src/lapacke_zgerqf_work.c89
-rw-r--r--LAPACKE/src/lapacke_zgesdd.c106
-rw-r--r--LAPACKE/src/lapacke_zgesdd_work.c158
-rw-r--r--LAPACKE/src/lapacke_zgesv.c55
-rw-r--r--LAPACKE/src/lapacke_zgesv_work.c102
-rw-r--r--LAPACKE/src/lapacke_zgesvd.c94
-rw-r--r--LAPACKE/src/lapacke_zgesvd_work.c149
-rw-r--r--LAPACKE/src/lapacke_zgesvx.c106
-rw-r--r--LAPACKE/src/lapacke_zgesvx_work.c156
-rw-r--r--LAPACKE/src/lapacke_zgesvxx.c112
-rw-r--r--LAPACKE/src/lapacke_zgesvxx_work.c182
-rw-r--r--LAPACKE/src/lapacke_zgetf2.c51
-rw-r--r--LAPACKE/src/lapacke_zgetf2_work.c83
-rw-r--r--LAPACKE/src/lapacke_zgetrf.c51
-rw-r--r--LAPACKE/src/lapacke_zgetrf_work.c83
-rw-r--r--LAPACKE/src/lapacke_zgetri.c77
-rw-r--r--LAPACKE/src/lapacke_zgetri_work.c89
-rw-r--r--LAPACKE/src/lapacke_zgetrs.c56
-rw-r--r--LAPACKE/src/lapacke_zgetrs_work.c102
-rw-r--r--LAPACKE/src/lapacke_zggbak.c59
-rw-r--r--LAPACKE/src/lapacke_zggbak_work.c87
-rw-r--r--LAPACKE/src/lapacke_zggbal.c87
-rw-r--r--LAPACKE/src/lapacke_zggbal_work.c130
-rw-r--r--LAPACKE/src/lapacke_zgges.c110
-rw-r--r--LAPACKE/src/lapacke_zgges_work.c166
-rw-r--r--LAPACKE/src/lapacke_zggesx.c126
-rw-r--r--LAPACKE/src/lapacke_zggesx_work.c172
-rw-r--r--LAPACKE/src/lapacke_zggev.c96
-rw-r--r--LAPACKE/src/lapacke_zggev_work.c168
-rw-r--r--LAPACKE/src/lapacke_zggevx.c140
-rw-r--r--LAPACKE/src/lapacke_zggevx_work.c171
-rw-r--r--LAPACKE/src/lapacke_zggglm.c86
-rw-r--r--LAPACKE/src/lapacke_zggglm_work.c112
-rw-r--r--LAPACKE/src/lapacke_zgghrd.c68
-rw-r--r--LAPACKE/src/lapacke_zgghrd_work.c157
-rw-r--r--LAPACKE/src/lapacke_zgglse.c89
-rw-r--r--LAPACKE/src/lapacke_zgglse_work.c112
-rw-r--r--LAPACKE/src/lapacke_zggqrf.c83
-rw-r--r--LAPACKE/src/lapacke_zggqrf_work.c111
-rw-r--r--LAPACKE/src/lapacke_zggrqf.c83
-rw-r--r--LAPACKE/src/lapacke_zggrqf_work.c111
-rw-r--r--LAPACKE/src/lapacke_zggsvd.c89
-rw-r--r--LAPACKE/src/lapacke_zggsvd_work.c181
-rw-r--r--LAPACKE/src/lapacke_zggsvp.c110
-rw-r--r--LAPACKE/src/lapacke_zggsvp_work.c182
-rw-r--r--LAPACKE/src/lapacke_zgtcon.c80
-rw-r--r--LAPACKE/src/lapacke_zgtcon_work.c49
-rw-r--r--LAPACKE/src/lapacke_zgtrfs.c111
-rw-r--r--LAPACKE/src/lapacke_zgtrfs_work.c115
-rw-r--r--LAPACKE/src/lapacke_zgtsv.c61
-rw-r--r--LAPACKE/src/lapacke_zgtsv_work.c86
-rw-r--r--LAPACKE/src/lapacke_zgtsvx.c116
-rw-r--r--LAPACKE/src/lapacke_zgtsvx_work.c114
-rw-r--r--LAPACKE/src/lapacke_zgttrf.c53
-rw-r--r--LAPACKE/src/lapacke_zgttrf_work.c45
-rw-r--r--LAPACKE/src/lapacke_zgttrs.c68
-rw-r--r--LAPACKE/src/lapacke_zgttrs_work.c91
-rw-r--r--LAPACKE/src/lapacke_zhbev.c78
-rw-r--r--LAPACKE/src/lapacke_zhbev_work.c112
-rw-r--r--LAPACKE/src/lapacke_zhbevd.c103
-rw-r--r--LAPACKE/src/lapacke_zhbevd_work.c121
-rw-r--r--LAPACKE/src/lapacke_zhbevx.c104
-rw-r--r--LAPACKE/src/lapacke_zhbevx_work.c145
-rw-r--r--LAPACKE/src/lapacke_zhbgst.c82
-rw-r--r--LAPACKE/src/lapacke_zhbgst_work.c129
-rw-r--r--LAPACKE/src/lapacke_zhbgv.c82
-rw-r--r--LAPACKE/src/lapacke_zhbgv_work.c131
-rw-r--r--LAPACKE/src/lapacke_zhbgvd.c107
-rw-r--r--LAPACKE/src/lapacke_zhbgvd_work.c142
-rw-r--r--LAPACKE/src/lapacke_zhbgvx.c108
-rw-r--r--LAPACKE/src/lapacke_zhbgvx_work.c160
-rw-r--r--LAPACKE/src/lapacke_zhbtrd.c75
-rw-r--r--LAPACKE/src/lapacke_zhbtrd_work.c114
-rw-r--r--LAPACKE/src/lapacke_zhecon.c72
-rw-r--r--LAPACKE/src/lapacke_zhecon_work.c83
-rw-r--r--LAPACKE/src/lapacke_zheequb.c69
-rw-r--r--LAPACKE/src/lapacke_zheequb_work.c82
-rw-r--r--LAPACKE/src/lapacke_zheev.c86
-rw-r--r--LAPACKE/src/lapacke_zheev_work.c93
-rw-r--r--LAPACKE/src/lapacke_zheevd.c100
-rw-r--r--LAPACKE/src/lapacke_zheevd_work.c94
-rw-r--r--LAPACKE/src/lapacke_zheevr.c119
-rw-r--r--LAPACKE/src/lapacke_zheevr_work.c128
-rw-r--r--LAPACKE/src/lapacke_zheevx.c113
-rw-r--r--LAPACKE/src/lapacke_zheevx_work.c127
-rw-r--r--LAPACKE/src/lapacke_zhegst.c55
-rw-r--r--LAPACKE/src/lapacke_zhegst_work.c100
-rw-r--r--LAPACKE/src/lapacke_zhegv.c91
-rw-r--r--LAPACKE/src/lapacke_zhegv_work.c111
-rw-r--r--LAPACKE/src/lapacke_zhegvd.c106
-rw-r--r--LAPACKE/src/lapacke_zhegvd_work.c114
-rw-r--r--LAPACKE/src/lapacke_zhegvx.c118
-rw-r--r--LAPACKE/src/lapacke_zhegvx_work.c145
-rw-r--r--LAPACKE/src/lapacke_zherfs.c90
-rw-r--r--LAPACKE/src/lapacke_zherfs_work.c140
-rw-r--r--LAPACKE/src/lapacke_zherfsx.c105
-rw-r--r--LAPACKE/src/lapacke_zherfsx_work.c171
-rw-r--r--LAPACKE/src/lapacke_zhesv.c82
-rw-r--r--LAPACKE/src/lapacke_zhesv_work.c111
-rw-r--r--LAPACKE/src/lapacke_zhesvx.c101
-rw-r--r--LAPACKE/src/lapacke_zhesvx_work.c156
-rw-r--r--LAPACKE/src/lapacke_zhesvxx.c105
-rw-r--r--LAPACKE/src/lapacke_zhesvxx_work.c181
-rw-r--r--LAPACKE/src/lapacke_zheswapr.c51
-rw-r--r--LAPACKE/src/lapacke_zheswapr_work.c74
-rw-r--r--LAPACKE/src/lapacke_zhetrd.c78
-rw-r--r--LAPACKE/src/lapacke_zhetrd_work.c91
-rw-r--r--LAPACKE/src/lapacke_zhetrf.c78
-rw-r--r--LAPACKE/src/lapacke_zhetrf_work.c89
-rw-r--r--LAPACKE/src/lapacke_zhetri.c68
-rw-r--r--LAPACKE/src/lapacke_zhetri2.c78
-rw-r--r--LAPACKE/src/lapacke_zhetri2_work.c89
-rw-r--r--LAPACKE/src/lapacke_zhetri2x.c69
-rw-r--r--LAPACKE/src/lapacke_zhetri2x_work.c84
-rw-r--r--LAPACKE/src/lapacke_zhetri_work.c84
-rw-r--r--LAPACKE/src/lapacke_zhetrs.c56
-rw-r--r--LAPACKE/src/lapacke_zhetrs2.c73
-rw-r--r--LAPACKE/src/lapacke_zhetrs2_work.c104
-rw-r--r--LAPACKE/src/lapacke_zhetrs_work.c102
-rw-r--r--LAPACKE/src/lapacke_zhfrk.c65
-rw-r--r--LAPACKE/src/lapacke_zhfrk_work.c98
-rw-r--r--LAPACKE/src/lapacke_zhgeqz.c107
-rw-r--r--LAPACKE/src/lapacke_zhgeqz_work.c170
-rw-r--r--LAPACKE/src/lapacke_zhpcon.c72
-rw-r--r--LAPACKE/src/lapacke_zhpcon_work.c76
-rw-r--r--LAPACKE/src/lapacke_zhpev.c77
-rw-r--r--LAPACKE/src/lapacke_zhpev_work.c104
-rw-r--r--LAPACKE/src/lapacke_zhpevd.c101
-rw-r--r--LAPACKE/src/lapacke_zhpevd_work.c113
-rw-r--r--LAPACKE/src/lapacke_zhpevx.c102
-rw-r--r--LAPACKE/src/lapacke_zhpevx_work.c114
-rw-r--r--LAPACKE/src/lapacke_zhpgst.c54
-rw-r--r--LAPACKE/src/lapacke_zhpgst_work.c88
-rw-r--r--LAPACKE/src/lapacke_zhpgv.c81
-rw-r--r--LAPACKE/src/lapacke_zhpgv_work.c118
-rw-r--r--LAPACKE/src/lapacke_zhpgvd.c106
-rw-r--r--LAPACKE/src/lapacke_zhpgvd_work.c126
-rw-r--r--LAPACKE/src/lapacke_zhpgvx.c106
-rw-r--r--LAPACKE/src/lapacke_zhpgvx_work.c127
-rw-r--r--LAPACKE/src/lapacke_zhprfs.c90
-rw-r--r--LAPACKE/src/lapacke_zhprfs_work.c131
-rw-r--r--LAPACKE/src/lapacke_zhpsv.c55
-rw-r--r--LAPACKE/src/lapacke_zhpsv_work.c97
-rw-r--r--LAPACKE/src/lapacke_zhpsvx.c89
-rw-r--r--LAPACKE/src/lapacke_zhpsvx_work.c134
-rw-r--r--LAPACKE/src/lapacke_zhptrd.c51
-rw-r--r--LAPACKE/src/lapacke_zhptrd_work.c77
-rw-r--r--LAPACKE/src/lapacke_zhptrf.c50
-rw-r--r--LAPACKE/src/lapacke_zhptrf_work.c76
-rw-r--r--LAPACKE/src/lapacke_zhptri.c67
-rw-r--r--LAPACKE/src/lapacke_zhptri_work.c78
-rw-r--r--LAPACKE/src/lapacke_zhptrs.c55
-rw-r--r--LAPACKE/src/lapacke_zhptrs_work.c97
-rw-r--r--LAPACKE/src/lapacke_zhsein.c95
-rw-r--r--LAPACKE/src/lapacke_zhsein_work.c147
-rw-r--r--LAPACKE/src/lapacke_zhseqr.c85
-rw-r--r--LAPACKE/src/lapacke_zhseqr_work.c120
-rw-r--r--LAPACKE/src/lapacke_zlacgv.c46
-rw-r--r--LAPACKE/src/lapacke_zlacgv_work.c43
-rw-r--r--LAPACKE/src/lapacke_zlacn2.c50
-rw-r--r--LAPACKE/src/lapacke_zlacn2_work.c45
-rw-r--r--LAPACKE/src/lapacke_zlacp2.c51
-rw-r--r--LAPACKE/src/lapacke_zlacp2_work.c96
-rw-r--r--LAPACKE/src/lapacke_zlacpy.c52
-rw-r--r--LAPACKE/src/lapacke_zlacpy_work.c97
-rw-r--r--LAPACKE/src/lapacke_zlag2c.c51
-rw-r--r--LAPACKE/src/lapacke_zlag2c_work.c98
-rw-r--r--LAPACKE/src/lapacke_zlagge.c70
-rw-r--r--LAPACKE/src/lapacke_zlagge_work.c82
-rw-r--r--LAPACKE/src/lapacke_zlaghe.c68
-rw-r--r--LAPACKE/src/lapacke_zlaghe_work.c82
-rw-r--r--LAPACKE/src/lapacke_zlagsy.c68
-rw-r--r--LAPACKE/src/lapacke_zlagsy_work.c82
-rw-r--r--LAPACKE/src/lapacke_zlange.c72
-rw-r--r--LAPACKE/src/lapacke_zlange_work.c80
-rw-r--r--LAPACKE/src/lapacke_zlanhe.c73
-rw-r--r--LAPACKE/src/lapacke_zlanhe_work.c80
-rw-r--r--LAPACKE/src/lapacke_zlansy.c73
-rw-r--r--LAPACKE/src/lapacke_zlansy_work.c80
-rw-r--r--LAPACKE/src/lapacke_zlantr.c75
-rw-r--r--LAPACKE/src/lapacke_zlantr_work.c81
-rw-r--r--LAPACKE/src/lapacke_zlapmr.c51
-rw-r--r--LAPACKE/src/lapacke_zlapmr_work.c82
-rw-r--r--LAPACKE/src/lapacke_zlarfb.c120
-rw-r--r--LAPACKE/src/lapacke_zlarfb_work.c159
-rw-r--r--LAPACKE/src/lapacke_zlarfg.c50
-rw-r--r--LAPACKE/src/lapacke_zlarfg_work.c44
-rw-r--r--LAPACKE/src/lapacke_zlarft.c62
-rw-r--r--LAPACKE/src/lapacke_zlarft_work.c105
-rw-r--r--LAPACKE/src/lapacke_zlarfx.c59
-rw-r--r--LAPACKE/src/lapacke_zlarfx_work.c83
-rw-r--r--LAPACKE/src/lapacke_zlarnv.c40
-rw-r--r--LAPACKE/src/lapacke_zlarnv_work.c43
-rw-r--r--LAPACKE/src/lapacke_zlaset.c58
-rw-r--r--LAPACKE/src/lapacke_zlaset_work.c82
-rw-r--r--LAPACKE/src/lapacke_zlaswp.c52
-rw-r--r--LAPACKE/src/lapacke_zlaswp_work.c82
-rw-r--r--LAPACKE/src/lapacke_zlatms.c80
-rw-r--r--LAPACKE/src/lapacke_zlatms_work.c88
-rw-r--r--LAPACKE/src/lapacke_zlauum.c50
-rw-r--r--LAPACKE/src/lapacke_zlauum_work.c82
-rw-r--r--LAPACKE/src/lapacke_zpbcon.c80
-rw-r--r--LAPACKE/src/lapacke_zpbcon_work.c84
-rw-r--r--LAPACKE/src/lapacke_zpbequ.c53
-rw-r--r--LAPACKE/src/lapacke_zpbequ_work.c82
-rw-r--r--LAPACKE/src/lapacke_zpbrfs.c91
-rw-r--r--LAPACKE/src/lapacke_zpbrfs_work.c145
-rw-r--r--LAPACKE/src/lapacke_zpbstf.c51
-rw-r--r--LAPACKE/src/lapacke_zpbstf_work.c84
-rw-r--r--LAPACKE/src/lapacke_zpbsv.c56
-rw-r--r--LAPACKE/src/lapacke_zpbsv_work.c104
-rw-r--r--LAPACKE/src/lapacke_zpbsvx.c96
-rw-r--r--LAPACKE/src/lapacke_zpbsvx_work.c155
-rw-r--r--LAPACKE/src/lapacke_zpbtrf.c51
-rw-r--r--LAPACKE/src/lapacke_zpbtrf_work.c84
-rw-r--r--LAPACKE/src/lapacke_zpbtrs.c56
-rw-r--r--LAPACKE/src/lapacke_zpbtrs_work.c103
-rw-r--r--LAPACKE/src/lapacke_zpftrf.c50
-rw-r--r--LAPACKE/src/lapacke_zpftrf_work.c76
-rw-r--r--LAPACKE/src/lapacke_zpftri.c50
-rw-r--r--LAPACKE/src/lapacke_zpftri_work.c76
-rw-r--r--LAPACKE/src/lapacke_zpftrs.c56
-rw-r--r--LAPACKE/src/lapacke_zpftrs_work.c96
-rw-r--r--LAPACKE/src/lapacke_zpocon.c80
-rw-r--r--LAPACKE/src/lapacke_zpocon_work.c83
-rw-r--r--LAPACKE/src/lapacke_zpoequ.c51
-rw-r--r--LAPACKE/src/lapacke_zpoequ_work.c81
-rw-r--r--LAPACKE/src/lapacke_zpoequb.c51
-rw-r--r--LAPACKE/src/lapacke_zpoequb_work.c81
-rw-r--r--LAPACKE/src/lapacke_zporfs.c89
-rw-r--r--LAPACKE/src/lapacke_zporfs_work.c139
-rw-r--r--LAPACKE/src/lapacke_zporfsx.c105
-rw-r--r--LAPACKE/src/lapacke_zporfsx_work.c169
-rw-r--r--LAPACKE/src/lapacke_zposv.c55
-rw-r--r--LAPACKE/src/lapacke_zposv_work.c102
-rw-r--r--LAPACKE/src/lapacke_zposvx.c95
-rw-r--r--LAPACKE/src/lapacke_zposvx_work.c151
-rw-r--r--LAPACKE/src/lapacke_zposvxx.c104
-rw-r--r--LAPACKE/src/lapacke_zposvxx_work.c179
-rw-r--r--LAPACKE/src/lapacke_zpotrf.c50
-rw-r--r--LAPACKE/src/lapacke_zpotrf_work.c82
-rw-r--r--LAPACKE/src/lapacke_zpotri.c50
-rw-r--r--LAPACKE/src/lapacke_zpotri_work.c82
-rw-r--r--LAPACKE/src/lapacke_zpotrs.c55
-rw-r--r--LAPACKE/src/lapacke_zpotrs_work.c101
-rw-r--r--LAPACKE/src/lapacke_zppcon.c80
-rw-r--r--LAPACKE/src/lapacke_zppcon_work.c76
-rw-r--r--LAPACKE/src/lapacke_zppequ.c51
-rw-r--r--LAPACKE/src/lapacke_zppequ_work.c75
-rw-r--r--LAPACKE/src/lapacke_zpprfs.c89
-rw-r--r--LAPACKE/src/lapacke_zpprfs_work.c130
-rw-r--r--LAPACKE/src/lapacke_zppsv.c54
-rw-r--r--LAPACKE/src/lapacke_zppsv_work.c96
-rw-r--r--LAPACKE/src/lapacke_zppsvx.c94
-rw-r--r--LAPACKE/src/lapacke_zppsvx_work.c140
-rw-r--r--LAPACKE/src/lapacke_zpptrf.c50
-rw-r--r--LAPACKE/src/lapacke_zpptrf_work.c76
-rw-r--r--LAPACKE/src/lapacke_zpptri.c50
-rw-r--r--LAPACKE/src/lapacke_zpptri_work.c76
-rw-r--r--LAPACKE/src/lapacke_zpptrs.c54
-rw-r--r--LAPACKE/src/lapacke_zpptrs_work.c96
-rw-r--r--LAPACKE/src/lapacke_zpstrf.c71
-rw-r--r--LAPACKE/src/lapacke_zpstrf_work.c84
-rw-r--r--LAPACKE/src/lapacke_zptcon.c69
-rw-r--r--LAPACKE/src/lapacke_zptcon_work.c44
-rw-r--r--LAPACKE/src/lapacke_zpteqr.c83
-rw-r--r--LAPACKE/src/lapacke_zpteqr_work.c85
-rw-r--r--LAPACKE/src/lapacke_zptrfs.c96
-rw-r--r--LAPACKE/src/lapacke_zptrfs_work.c109
-rw-r--r--LAPACKE/src/lapacke_zptsv.c57
-rw-r--r--LAPACKE/src/lapacke_zptsv_work.c84
-rw-r--r--LAPACKE/src/lapacke_zptsvx.c97
-rw-r--r--LAPACKE/src/lapacke_zptsvx_work.c107
-rw-r--r--LAPACKE/src/lapacke_zpttrf.c48
-rw-r--r--LAPACKE/src/lapacke_zpttrf_work.c43
-rw-r--r--LAPACKE/src/lapacke_zpttrs.c58
-rw-r--r--LAPACKE/src/lapacke_zpttrs_work.c85
-rw-r--r--LAPACKE/src/lapacke_zspcon.c72
-rw-r--r--LAPACKE/src/lapacke_zspcon_work.c76
-rw-r--r--LAPACKE/src/lapacke_zsprfs.c90
-rw-r--r--LAPACKE/src/lapacke_zsprfs_work.c131
-rw-r--r--LAPACKE/src/lapacke_zspsv.c55
-rw-r--r--LAPACKE/src/lapacke_zspsv_work.c97
-rw-r--r--LAPACKE/src/lapacke_zspsvx.c89
-rw-r--r--LAPACKE/src/lapacke_zspsvx_work.c134
-rw-r--r--LAPACKE/src/lapacke_zsptrf.c50
-rw-r--r--LAPACKE/src/lapacke_zsptrf_work.c76
-rw-r--r--LAPACKE/src/lapacke_zsptri.c67
-rw-r--r--LAPACKE/src/lapacke_zsptri_work.c78
-rw-r--r--LAPACKE/src/lapacke_zsptrs.c55
-rw-r--r--LAPACKE/src/lapacke_zsptrs_work.c97
-rw-r--r--LAPACKE/src/lapacke_zstedc.c109
-rw-r--r--LAPACKE/src/lapacke_zstedc_work.c103
-rw-r--r--LAPACKE/src/lapacke_zstegr.c109
-rw-r--r--LAPACKE/src/lapacke_zstegr_work.c105
-rw-r--r--LAPACKE/src/lapacke_zstein.c84
-rw-r--r--LAPACKE/src/lapacke_zstein_work.c87
-rw-r--r--LAPACKE/src/lapacke_zstemr.c102
-rw-r--r--LAPACKE/src/lapacke_zstemr_work.c105
-rw-r--r--LAPACKE/src/lapacke_zsteqr.c83
-rw-r--r--LAPACKE/src/lapacke_zsteqr_work.c92
-rw-r--r--LAPACKE/src/lapacke_zsycon.c72
-rw-r--r--LAPACKE/src/lapacke_zsycon_work.c83
-rw-r--r--LAPACKE/src/lapacke_zsyconv.c69
-rw-r--r--LAPACKE/src/lapacke_zsyconv_work.c84
-rw-r--r--LAPACKE/src/lapacke_zsyequb.c69
-rw-r--r--LAPACKE/src/lapacke_zsyequb_work.c82
-rw-r--r--LAPACKE/src/lapacke_zsyr.c59
-rw-r--r--LAPACKE/src/lapacke_zsyr_work.c83
-rw-r--r--LAPACKE/src/lapacke_zsyrfs.c90
-rw-r--r--LAPACKE/src/lapacke_zsyrfs_work.c140
-rw-r--r--LAPACKE/src/lapacke_zsyrfsx.c105
-rw-r--r--LAPACKE/src/lapacke_zsyrfsx_work.c171
-rw-r--r--LAPACKE/src/lapacke_zsysv.c82
-rw-r--r--LAPACKE/src/lapacke_zsysv_rook.c82
-rw-r--r--LAPACKE/src/lapacke_zsysv_rook_work.c112
-rw-r--r--LAPACKE/src/lapacke_zsysv_work.c111
-rw-r--r--LAPACKE/src/lapacke_zsysvx.c101
-rw-r--r--LAPACKE/src/lapacke_zsysvx_work.c156
-rw-r--r--LAPACKE/src/lapacke_zsysvxx.c105
-rw-r--r--LAPACKE/src/lapacke_zsysvxx_work.c181
-rw-r--r--LAPACKE/src/lapacke_zsyswapr.c51
-rw-r--r--LAPACKE/src/lapacke_zsyswapr_work.c74
-rw-r--r--LAPACKE/src/lapacke_zsytrf.c78
-rw-r--r--LAPACKE/src/lapacke_zsytrf_work.c89
-rw-r--r--LAPACKE/src/lapacke_zsytri.c68
-rw-r--r--LAPACKE/src/lapacke_zsytri2.c78
-rw-r--r--LAPACKE/src/lapacke_zsytri2_work.c89
-rw-r--r--LAPACKE/src/lapacke_zsytri2x.c69
-rw-r--r--LAPACKE/src/lapacke_zsytri2x_work.c84
-rw-r--r--LAPACKE/src/lapacke_zsytri_work.c84
-rw-r--r--LAPACKE/src/lapacke_zsytrs.c56
-rw-r--r--LAPACKE/src/lapacke_zsytrs2.c73
-rw-r--r--LAPACKE/src/lapacke_zsytrs2_work.c104
-rw-r--r--LAPACKE/src/lapacke_zsytrs_work.c102
-rw-r--r--LAPACKE/src/lapacke_ztbcon.c78
-rw-r--r--LAPACKE/src/lapacke_ztbcon_work.c86
-rw-r--r--LAPACKE/src/lapacke_ztbrfs.c87
-rw-r--r--LAPACKE/src/lapacke_ztbrfs_work.c123
-rw-r--r--LAPACKE/src/lapacke_ztbtrs.c56
-rw-r--r--LAPACKE/src/lapacke_ztbtrs_work.c106
-rw-r--r--LAPACKE/src/lapacke_ztfsm.c64
-rw-r--r--LAPACKE/src/lapacke_ztfsm_work.c104
-rw-r--r--LAPACKE/src/lapacke_ztftri.c50
-rw-r--r--LAPACKE/src/lapacke_ztftri_work.c77
-rw-r--r--LAPACKE/src/lapacke_ztfttp.c51
-rw-r--r--LAPACKE/src/lapacke_ztfttp_work.c87
-rw-r--r--LAPACKE/src/lapacke_ztfttr.c51
-rw-r--r--LAPACKE/src/lapacke_ztfttr_work.c93
-rw-r--r--LAPACKE/src/lapacke_ztgevc.c95
-rw-r--r--LAPACKE/src/lapacke_ztgevc_work.c162
-rw-r--r--LAPACKE/src/lapacke_ztgexc.c69
-rw-r--r--LAPACKE/src/lapacke_ztgexc_work.c158
-rw-r--r--LAPACKE/src/lapacke_ztgsen.c116
-rw-r--r--LAPACKE/src/lapacke_ztgsen_work.c173
-rw-r--r--LAPACKE/src/lapacke_ztgsja.c101
-rw-r--r--LAPACKE/src/lapacke_ztgsja_work.c190
-rw-r--r--LAPACKE/src/lapacke_ztgsna.c115
-rw-r--r--LAPACKE/src/lapacke_ztgsna_work.c161
-rw-r--r--LAPACKE/src/lapacke_ztgsyl.c110
-rw-r--r--LAPACKE/src/lapacke_ztgsyl_work.c183
-rw-r--r--LAPACKE/src/lapacke_ztpcon.c77
-rw-r--r--LAPACKE/src/lapacke_ztpcon_work.c77
-rw-r--r--LAPACKE/src/lapacke_ztpmqrt.c82
-rw-r--r--LAPACKE/src/lapacke_ztpmqrt_work.c140
-rw-r--r--LAPACKE/src/lapacke_ztpqrt.c74
-rw-r--r--LAPACKE/src/lapacke_ztpqrt2.c56
-rw-r--r--LAPACKE/src/lapacke_ztpqrt2_work.c118
-rw-r--r--LAPACKE/src/lapacke_ztpqrt_work.c121
-rw-r--r--LAPACKE/src/lapacke_ztprfb.c94
-rw-r--r--LAPACKE/src/lapacke_ztprfb_work.c139
-rw-r--r--LAPACKE/src/lapacke_ztprfs.c86
-rw-r--r--LAPACKE/src/lapacke_ztprfs_work.c116
-rw-r--r--LAPACKE/src/lapacke_ztptri.c50
-rw-r--r--LAPACKE/src/lapacke_ztptri_work.c76
-rw-r--r--LAPACKE/src/lapacke_ztptrs.c56
-rw-r--r--LAPACKE/src/lapacke_ztptrs_work.c97
-rw-r--r--LAPACKE/src/lapacke_ztpttf.c51
-rw-r--r--LAPACKE/src/lapacke_ztpttf_work.c87
-rw-r--r--LAPACKE/src/lapacke_ztpttr.c51
-rw-r--r--LAPACKE/src/lapacke_ztpttr_work.c93
-rw-r--r--LAPACKE/src/lapacke_ztrcon.c77
-rw-r--r--LAPACKE/src/lapacke_ztrcon_work.c85
-rw-r--r--LAPACKE/src/lapacke_ztrevc.c90
-rw-r--r--LAPACKE/src/lapacke_ztrevc_work.c145
-rw-r--r--LAPACKE/src/lapacke_ztrexc.c58
-rw-r--r--LAPACKE/src/lapacke_ztrexc_work.c111
-rw-r--r--LAPACKE/src/lapacke_ztrrfs.c86
-rw-r--r--LAPACKE/src/lapacke_ztrrfs_work.c121
-rw-r--r--LAPACKE/src/lapacke_ztrsen.c86
-rw-r--r--LAPACKE/src/lapacke_ztrsen_work.c121
-rw-r--r--LAPACKE/src/lapacke_ztrsna.c102
-rw-r--r--LAPACKE/src/lapacke_ztrsna_work.c137
-rw-r--r--LAPACKE/src/lapacke_ztrsyl.c61
-rw-r--r--LAPACKE/src/lapacke_ztrsyl_work.c120
-rw-r--r--LAPACKE/src/lapacke_ztrtri.c50
-rw-r--r--LAPACKE/src/lapacke_ztrtri_work.c84
-rw-r--r--LAPACKE/src/lapacke_ztrtrs.c56
-rw-r--r--LAPACKE/src/lapacke_ztrtrs_work.c103
-rw-r--r--LAPACKE/src/lapacke_ztrttf.c51
-rw-r--r--LAPACKE/src/lapacke_ztrttf_work.c93
-rw-r--r--LAPACKE/src/lapacke_ztrttp.c51
-rw-r--r--LAPACKE/src/lapacke_ztrttp_work.c93
-rw-r--r--LAPACKE/src/lapacke_ztzrzf.c77
-rw-r--r--LAPACKE/src/lapacke_ztzrzf_work.c89
-rw-r--r--LAPACKE/src/lapacke_zunbdb.c103
-rw-r--r--LAPACKE/src/lapacke_zunbdb_work.c170
-rw-r--r--LAPACKE/src/lapacke_zuncsd.c127
-rw-r--r--LAPACKE/src/lapacke_zuncsd_work.c278
-rw-r--r--LAPACKE/src/lapacke_zungbr.c81
-rw-r--r--LAPACKE/src/lapacke_zungbr_work.c92
-rw-r--r--LAPACKE/src/lapacke_zunghr.c81
-rw-r--r--LAPACKE/src/lapacke_zunghr_work.c91
-rw-r--r--LAPACKE/src/lapacke_zunglq.c81
-rw-r--r--LAPACKE/src/lapacke_zunglq_work.c90
-rw-r--r--LAPACKE/src/lapacke_zungql.c81
-rw-r--r--LAPACKE/src/lapacke_zungql_work.c90
-rw-r--r--LAPACKE/src/lapacke_zungqr.c81
-rw-r--r--LAPACKE/src/lapacke_zungqr_work.c90
-rw-r--r--LAPACKE/src/lapacke_zungrq.c81
-rw-r--r--LAPACKE/src/lapacke_zungrq_work.c90
-rw-r--r--LAPACKE/src/lapacke_zungtr.c81
-rw-r--r--LAPACKE/src/lapacke_zungtr_work.c89
-rw-r--r--LAPACKE/src/lapacke_zunmbr.c89
-rw-r--r--LAPACKE/src/lapacke_zunmbr_work.c114
-rw-r--r--LAPACKE/src/lapacke_zunmhr.c88
-rw-r--r--LAPACKE/src/lapacke_zunmhr_work.c112
-rw-r--r--LAPACKE/src/lapacke_zunmlq.c86
-rw-r--r--LAPACKE/src/lapacke_zunmlq_work.c110
-rw-r--r--LAPACKE/src/lapacke_zunmql.c88
-rw-r--r--LAPACKE/src/lapacke_zunmql_work.c111
-rw-r--r--LAPACKE/src/lapacke_zunmqr.c88
-rw-r--r--LAPACKE/src/lapacke_zunmqr_work.c111
-rw-r--r--LAPACKE/src/lapacke_zunmrq.c86
-rw-r--r--LAPACKE/src/lapacke_zunmrq_work.c110
-rw-r--r--LAPACKE/src/lapacke_zunmrz.c86
-rw-r--r--LAPACKE/src/lapacke_zunmrz_work.c111
-rw-r--r--LAPACKE/src/lapacke_zunmtr.c88
-rw-r--r--LAPACKE/src/lapacke_zunmtr_work.c111
-rw-r--r--LAPACKE/src/lapacke_zupgtr.c72
-rw-r--r--LAPACKE/src/lapacke_zupgtr_work.c95
-rw-r--r--LAPACKE/src/lapacke_zupmtr.c89
-rw-r--r--LAPACKE/src/lapacke_zupmtr_work.c100
2083 files changed, 194361 insertions, 0 deletions
diff --git a/LAPACKE/src/CMakeLists.txt b/LAPACKE/src/CMakeLists.txt
new file mode 100644
index 00000000..20bac67e
--- /dev/null
+++ b/LAPACKE/src/CMakeLists.txt
@@ -0,0 +1,2032 @@
+#AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SRC_OBJ)
+
+SET (SRC_OBJ
+lapacke_cbbcsd.c
+lapacke_cbbcsd_work.c
+lapacke_cbdsqr.c
+lapacke_cbdsqr_work.c
+lapacke_cgbbrd.c
+lapacke_cgbbrd_work.c
+lapacke_cgbcon.c
+lapacke_cgbcon_work.c
+lapacke_cgbequ.c
+lapacke_cgbequ_work.c
+lapacke_cgbequb.c
+lapacke_cgbequb_work.c
+lapacke_cgbrfs.c
+lapacke_cgbrfs_work.c
+lapacke_cgbsv.c
+lapacke_cgbsv_work.c
+lapacke_cgbsvx.c
+lapacke_cgbsvx_work.c
+lapacke_cgbtrf.c
+lapacke_cgbtrf_work.c
+lapacke_cgbtrs.c
+lapacke_cgbtrs_work.c
+lapacke_cgebak.c
+lapacke_cgebak_work.c
+lapacke_cgebal.c
+lapacke_cgebal_work.c
+lapacke_cgebrd.c
+lapacke_cgebrd_work.c
+lapacke_cgecon.c
+lapacke_cgecon_work.c
+lapacke_cgeequ.c
+lapacke_cgeequ_work.c
+lapacke_cgeequb.c
+lapacke_cgeequb_work.c
+lapacke_cgees.c
+lapacke_cgees_work.c
+lapacke_cgeesx.c
+lapacke_cgeesx_work.c
+lapacke_cgeev.c
+lapacke_cgeev_work.c
+lapacke_cgeevx.c
+lapacke_cgeevx_work.c
+lapacke_cgehrd.c
+lapacke_cgehrd_work.c
+lapacke_cgelq2.c
+lapacke_cgelq2_work.c
+lapacke_cgelqf.c
+lapacke_cgelqf_work.c
+lapacke_cgels.c
+lapacke_cgels_work.c
+lapacke_cgelsd.c
+lapacke_cgelsd_work.c
+lapacke_cgelss.c
+lapacke_cgelss_work.c
+lapacke_cgelsy.c
+lapacke_cgelsy_work.c
+lapacke_cgemqrt.c
+lapacke_cgemqrt_work.c
+lapacke_cgeqlf.c
+lapacke_cgeqlf_work.c
+lapacke_cgeqp3.c
+lapacke_cgeqp3_work.c
+lapacke_cgeqpf.c
+lapacke_cgeqpf_work.c
+lapacke_cgeqr2.c
+lapacke_cgeqr2_work.c
+lapacke_cgeqrf.c
+lapacke_cgeqrf_work.c
+lapacke_cgeqrfp.c
+lapacke_cgeqrfp_work.c
+lapacke_cgeqrt.c
+lapacke_cgeqrt2.c
+lapacke_cgeqrt2_work.c
+lapacke_cgeqrt3.c
+lapacke_cgeqrt3_work.c
+lapacke_cgeqrt_work.c
+lapacke_cgerfs.c
+lapacke_cgerfs_work.c
+lapacke_cgerqf.c
+lapacke_cgerqf_work.c
+lapacke_cgesdd.c
+lapacke_cgesdd_work.c
+lapacke_cgesv.c
+lapacke_cgesv_work.c
+lapacke_cgesvd.c
+lapacke_cgesvd_work.c
+lapacke_cgesvx.c
+lapacke_cgesvx_work.c
+lapacke_cgetf2.c
+lapacke_cgetf2_work.c
+lapacke_cgetrf.c
+lapacke_cgetrf_work.c
+lapacke_cgetri.c
+lapacke_cgetri_work.c
+lapacke_cgetrs.c
+lapacke_cgetrs_work.c
+lapacke_cggbak.c
+lapacke_cggbak_work.c
+lapacke_cggbal.c
+lapacke_cggbal_work.c
+lapacke_cgges.c
+lapacke_cgges_work.c
+lapacke_cggesx.c
+lapacke_cggesx_work.c
+lapacke_cggev.c
+lapacke_cggev_work.c
+lapacke_cggevx.c
+lapacke_cggevx_work.c
+lapacke_cggglm.c
+lapacke_cggglm_work.c
+lapacke_cgghrd.c
+lapacke_cgghrd_work.c
+lapacke_cgglse.c
+lapacke_cgglse_work.c
+lapacke_cggqrf.c
+lapacke_cggqrf_work.c
+lapacke_cggrqf.c
+lapacke_cggrqf_work.c
+lapacke_cggsvd.c
+lapacke_cggsvd_work.c
+lapacke_cggsvp.c
+lapacke_cggsvp_work.c
+lapacke_cgtcon.c
+lapacke_cgtcon_work.c
+lapacke_cgtrfs.c
+lapacke_cgtrfs_work.c
+lapacke_cgtsv.c
+lapacke_cgtsv_work.c
+lapacke_cgtsvx.c
+lapacke_cgtsvx_work.c
+lapacke_cgttrf.c
+lapacke_cgttrf_work.c
+lapacke_cgttrs.c
+lapacke_cgttrs_work.c
+lapacke_chbev.c
+lapacke_chbev_work.c
+lapacke_chbevd.c
+lapacke_chbevd_work.c
+lapacke_chbevx.c
+lapacke_chbevx_work.c
+lapacke_chbgst.c
+lapacke_chbgst_work.c
+lapacke_chbgv.c
+lapacke_chbgv_work.c
+lapacke_chbgvd.c
+lapacke_chbgvd_work.c
+lapacke_chbgvx.c
+lapacke_chbgvx_work.c
+lapacke_chbtrd.c
+lapacke_chbtrd_work.c
+lapacke_checon.c
+lapacke_checon_work.c
+lapacke_cheequb.c
+lapacke_cheequb_work.c
+lapacke_cheev.c
+lapacke_cheev_work.c
+lapacke_cheevd.c
+lapacke_cheevd_work.c
+lapacke_cheevr.c
+lapacke_cheevr_work.c
+lapacke_cheevx.c
+lapacke_cheevx_work.c
+lapacke_chegst.c
+lapacke_chegst_work.c
+lapacke_chegv.c
+lapacke_chegv_work.c
+lapacke_chegvd.c
+lapacke_chegvd_work.c
+lapacke_chegvx.c
+lapacke_chegvx_work.c
+lapacke_cherfs.c
+lapacke_cherfs_work.c
+lapacke_chesv.c
+lapacke_chesv_work.c
+lapacke_chesvx.c
+lapacke_chesvx_work.c
+lapacke_cheswapr.c
+lapacke_cheswapr_work.c
+lapacke_chetrd.c
+lapacke_chetrd_work.c
+lapacke_chetrf.c
+lapacke_chetrf_work.c
+lapacke_chetri.c
+lapacke_chetri2.c
+lapacke_chetri2_work.c
+lapacke_chetri2x.c
+lapacke_chetri2x_work.c
+lapacke_chetri_work.c
+lapacke_chetrs.c
+lapacke_chetrs2.c
+lapacke_chetrs2_work.c
+lapacke_chetrs_work.c
+lapacke_chfrk.c
+lapacke_chfrk_work.c
+lapacke_chgeqz.c
+lapacke_chgeqz_work.c
+lapacke_chpcon.c
+lapacke_chpcon_work.c
+lapacke_chpev.c
+lapacke_chpev_work.c
+lapacke_chpevd.c
+lapacke_chpevd_work.c
+lapacke_chpevx.c
+lapacke_chpevx_work.c
+lapacke_chpgst.c
+lapacke_chpgst_work.c
+lapacke_chpgv.c
+lapacke_chpgv_work.c
+lapacke_chpgvd.c
+lapacke_chpgvd_work.c
+lapacke_chpgvx.c
+lapacke_chpgvx_work.c
+lapacke_chprfs.c
+lapacke_chprfs_work.c
+lapacke_chpsv.c
+lapacke_chpsv_work.c
+lapacke_chpsvx.c
+lapacke_chpsvx_work.c
+lapacke_chptrd.c
+lapacke_chptrd_work.c
+lapacke_chptrf.c
+lapacke_chptrf_work.c
+lapacke_chptri.c
+lapacke_chptri_work.c
+lapacke_chptrs.c
+lapacke_chptrs_work.c
+lapacke_chsein.c
+lapacke_chsein_work.c
+lapacke_chseqr.c
+lapacke_chseqr_work.c
+lapacke_clacgv.c
+lapacke_clacgv_work.c
+lapacke_clacn2.c
+lapacke_clacn2_work.c
+lapacke_clacp2.c
+lapacke_clacp2_work.c
+lapacke_clacpy.c
+lapacke_clacpy_work.c
+lapacke_clag2z.c
+lapacke_clag2z_work.c
+lapacke_clange.c
+lapacke_clange_work.c
+lapacke_clanhe.c
+lapacke_clanhe_work.c
+lapacke_clansy.c
+lapacke_clansy_work.c
+lapacke_clantr.c
+lapacke_clantr_work.c
+lapacke_clapmr.c
+lapacke_clapmr_work.c
+lapacke_clarfb.c
+lapacke_clarfb_work.c
+lapacke_clarfg.c
+lapacke_clarfg_work.c
+lapacke_clarft.c
+lapacke_clarft_work.c
+lapacke_clarfx.c
+lapacke_clarfx_work.c
+lapacke_clarnv.c
+lapacke_clarnv_work.c
+lapacke_claset.c
+lapacke_claset_work.c
+lapacke_claswp.c
+lapacke_claswp_work.c
+lapacke_clauum.c
+lapacke_clauum_work.c
+lapacke_cpbcon.c
+lapacke_cpbcon_work.c
+lapacke_cpbequ.c
+lapacke_cpbequ_work.c
+lapacke_cpbrfs.c
+lapacke_cpbrfs_work.c
+lapacke_cpbstf.c
+lapacke_cpbstf_work.c
+lapacke_cpbsv.c
+lapacke_cpbsv_work.c
+lapacke_cpbsvx.c
+lapacke_cpbsvx_work.c
+lapacke_cpbtrf.c
+lapacke_cpbtrf_work.c
+lapacke_cpbtrs.c
+lapacke_cpbtrs_work.c
+lapacke_cpftrf.c
+lapacke_cpftrf_work.c
+lapacke_cpftri.c
+lapacke_cpftri_work.c
+lapacke_cpftrs.c
+lapacke_cpftrs_work.c
+lapacke_cpocon.c
+lapacke_cpocon_work.c
+lapacke_cpoequ.c
+lapacke_cpoequ_work.c
+lapacke_cpoequb.c
+lapacke_cpoequb_work.c
+lapacke_cporfs.c
+lapacke_cporfs_work.c
+lapacke_cposv.c
+lapacke_cposv_work.c
+lapacke_cposvx.c
+lapacke_cposvx_work.c
+lapacke_cpotrf.c
+lapacke_cpotrf_work.c
+lapacke_cpotri.c
+lapacke_cpotri_work.c
+lapacke_cpotrs.c
+lapacke_cpotrs_work.c
+lapacke_cppcon.c
+lapacke_cppcon_work.c
+lapacke_cppequ.c
+lapacke_cppequ_work.c
+lapacke_cpprfs.c
+lapacke_cpprfs_work.c
+lapacke_cppsv.c
+lapacke_cppsv_work.c
+lapacke_cppsvx.c
+lapacke_cppsvx_work.c
+lapacke_cpptrf.c
+lapacke_cpptrf_work.c
+lapacke_cpptri.c
+lapacke_cpptri_work.c
+lapacke_cpptrs.c
+lapacke_cpptrs_work.c
+lapacke_cpstrf.c
+lapacke_cpstrf_work.c
+lapacke_cptcon.c
+lapacke_cptcon_work.c
+lapacke_cpteqr.c
+lapacke_cpteqr_work.c
+lapacke_cptrfs.c
+lapacke_cptrfs_work.c
+lapacke_cptsv.c
+lapacke_cptsv_work.c
+lapacke_cptsvx.c
+lapacke_cptsvx_work.c
+lapacke_cpttrf.c
+lapacke_cpttrf_work.c
+lapacke_cpttrs.c
+lapacke_cpttrs_work.c
+lapacke_cspcon.c
+lapacke_cspcon_work.c
+lapacke_csprfs.c
+lapacke_csprfs_work.c
+lapacke_cspsv.c
+lapacke_cspsv_work.c
+lapacke_cspsvx.c
+lapacke_cspsvx_work.c
+lapacke_csptrf.c
+lapacke_csptrf_work.c
+lapacke_csptri.c
+lapacke_csptri_work.c
+lapacke_csptrs.c
+lapacke_csptrs_work.c
+lapacke_cstedc.c
+lapacke_cstedc_work.c
+lapacke_cstegr.c
+lapacke_cstegr_work.c
+lapacke_cstein.c
+lapacke_cstein_work.c
+lapacke_cstemr.c
+lapacke_cstemr_work.c
+lapacke_csteqr.c
+lapacke_csteqr_work.c
+lapacke_csycon.c
+lapacke_csycon_work.c
+lapacke_csyconv.c
+lapacke_csyconv_work.c
+lapacke_csyequb.c
+lapacke_csyequb_work.c
+lapacke_csyrfs.c
+lapacke_csyrfs_work.c
+lapacke_csysv.c
+lapacke_csysv_rook.c
+lapacke_csysv_rook_work.c
+lapacke_csysv_work.c
+lapacke_csysvx.c
+lapacke_csysvx_work.c
+lapacke_csyswapr.c
+lapacke_csyswapr_work.c
+lapacke_csytrf.c
+lapacke_csytrf_work.c
+lapacke_csytri.c
+lapacke_csytri2.c
+lapacke_csytri2_work.c
+lapacke_csytri2x.c
+lapacke_csytri2x_work.c
+lapacke_csytri_work.c
+lapacke_csytrs.c
+lapacke_csytrs2.c
+lapacke_csytrs2_work.c
+lapacke_csytrs_work.c
+lapacke_ctbcon.c
+lapacke_ctbcon_work.c
+lapacke_ctbrfs.c
+lapacke_ctbrfs_work.c
+lapacke_ctbtrs.c
+lapacke_ctbtrs_work.c
+lapacke_ctfsm.c
+lapacke_ctfsm_work.c
+lapacke_ctftri.c
+lapacke_ctftri_work.c
+lapacke_ctfttp.c
+lapacke_ctfttp_work.c
+lapacke_ctfttr.c
+lapacke_ctfttr_work.c
+lapacke_ctgevc.c
+lapacke_ctgevc_work.c
+lapacke_ctgexc.c
+lapacke_ctgexc_work.c
+lapacke_ctgsen.c
+lapacke_ctgsen_work.c
+lapacke_ctgsja.c
+lapacke_ctgsja_work.c
+lapacke_ctgsna.c
+lapacke_ctgsna_work.c
+lapacke_ctgsyl.c
+lapacke_ctgsyl_work.c
+lapacke_ctpcon.c
+lapacke_ctpcon_work.c
+lapacke_ctpmqrt.c
+lapacke_ctpmqrt_work.c
+lapacke_ctpqrt.c
+lapacke_ctpqrt2.c
+lapacke_ctpqrt2_work.c
+lapacke_ctpqrt_work.c
+lapacke_ctprfb.c
+lapacke_ctprfb_work.c
+lapacke_ctprfs.c
+lapacke_ctprfs_work.c
+lapacke_ctptri.c
+lapacke_ctptri_work.c
+lapacke_ctptrs.c
+lapacke_ctptrs_work.c
+lapacke_ctpttf.c
+lapacke_ctpttf_work.c
+lapacke_ctpttr.c
+lapacke_ctpttr_work.c
+lapacke_ctrcon.c
+lapacke_ctrcon_work.c
+lapacke_ctrevc.c
+lapacke_ctrevc_work.c
+lapacke_ctrexc.c
+lapacke_ctrexc_work.c
+lapacke_ctrrfs.c
+lapacke_ctrrfs_work.c
+lapacke_ctrsen.c
+lapacke_ctrsen_work.c
+lapacke_ctrsna.c
+lapacke_ctrsna_work.c
+lapacke_ctrsyl.c
+lapacke_ctrsyl_work.c
+lapacke_ctrtri.c
+lapacke_ctrtri_work.c
+lapacke_ctrtrs.c
+lapacke_ctrtrs_work.c
+lapacke_ctrttf.c
+lapacke_ctrttf_work.c
+lapacke_ctrttp.c
+lapacke_ctrttp_work.c
+lapacke_ctzrzf.c
+lapacke_ctzrzf_work.c
+lapacke_cunbdb.c
+lapacke_cunbdb_work.c
+lapacke_cuncsd.c
+lapacke_cuncsd_work.c
+lapacke_cungbr.c
+lapacke_cungbr_work.c
+lapacke_cunghr.c
+lapacke_cunghr_work.c
+lapacke_cunglq.c
+lapacke_cunglq_work.c
+lapacke_cungql.c
+lapacke_cungql_work.c
+lapacke_cungqr.c
+lapacke_cungqr_work.c
+lapacke_cungrq.c
+lapacke_cungrq_work.c
+lapacke_cungtr.c
+lapacke_cungtr_work.c
+lapacke_cunmbr.c
+lapacke_cunmbr_work.c
+lapacke_cunmhr.c
+lapacke_cunmhr_work.c
+lapacke_cunmlq.c
+lapacke_cunmlq_work.c
+lapacke_cunmql.c
+lapacke_cunmql_work.c
+lapacke_cunmqr.c
+lapacke_cunmqr_work.c
+lapacke_cunmrq.c
+lapacke_cunmrq_work.c
+lapacke_cunmrz.c
+lapacke_cunmrz_work.c
+lapacke_cunmtr.c
+lapacke_cunmtr_work.c
+lapacke_cupgtr.c
+lapacke_cupgtr_work.c
+lapacke_cupmtr.c
+lapacke_cupmtr_work.c
+lapacke_dbbcsd.c
+lapacke_dbbcsd_work.c
+lapacke_dbdsdc.c
+lapacke_dbdsdc_work.c
+lapacke_dbdsqr.c
+lapacke_dbdsqr_work.c
+lapacke_ddisna.c
+lapacke_ddisna_work.c
+lapacke_dgbbrd.c
+lapacke_dgbbrd_work.c
+lapacke_dgbcon.c
+lapacke_dgbcon_work.c
+lapacke_dgbequ.c
+lapacke_dgbequ_work.c
+lapacke_dgbequb.c
+lapacke_dgbequb_work.c
+lapacke_dgbrfs.c
+lapacke_dgbrfs_work.c
+lapacke_dgbsv.c
+lapacke_dgbsv_work.c
+lapacke_dgbsvx.c
+lapacke_dgbsvx_work.c
+lapacke_dgbtrf.c
+lapacke_dgbtrf_work.c
+lapacke_dgbtrs.c
+lapacke_dgbtrs_work.c
+lapacke_dgebak.c
+lapacke_dgebak_work.c
+lapacke_dgebal.c
+lapacke_dgebal_work.c
+lapacke_dgebrd.c
+lapacke_dgebrd_work.c
+lapacke_dgecon.c
+lapacke_dgecon_work.c
+lapacke_dgeequ.c
+lapacke_dgeequ_work.c
+lapacke_dgeequb.c
+lapacke_dgeequb_work.c
+lapacke_dgees.c
+lapacke_dgees_work.c
+lapacke_dgeesx.c
+lapacke_dgeesx_work.c
+lapacke_dgeev.c
+lapacke_dgeev_work.c
+lapacke_dgeevx.c
+lapacke_dgeevx_work.c
+lapacke_dgehrd.c
+lapacke_dgehrd_work.c
+lapacke_dgejsv.c
+lapacke_dgejsv_work.c
+lapacke_dgelq2.c
+lapacke_dgelq2_work.c
+lapacke_dgelqf.c
+lapacke_dgelqf_work.c
+lapacke_dgels.c
+lapacke_dgels_work.c
+lapacke_dgelsd.c
+lapacke_dgelsd_work.c
+lapacke_dgelss.c
+lapacke_dgelss_work.c
+lapacke_dgelsy.c
+lapacke_dgelsy_work.c
+lapacke_dgemqrt.c
+lapacke_dgemqrt_work.c
+lapacke_dgeqlf.c
+lapacke_dgeqlf_work.c
+lapacke_dgeqp3.c
+lapacke_dgeqp3_work.c
+lapacke_dgeqpf.c
+lapacke_dgeqpf_work.c
+lapacke_dgeqr2.c
+lapacke_dgeqr2_work.c
+lapacke_dgeqrf.c
+lapacke_dgeqrf_work.c
+lapacke_dgeqrfp.c
+lapacke_dgeqrfp_work.c
+lapacke_dgeqrt.c
+lapacke_dgeqrt2.c
+lapacke_dgeqrt2_work.c
+lapacke_dgeqrt3.c
+lapacke_dgeqrt3_work.c
+lapacke_dgeqrt_work.c
+lapacke_dgerfs.c
+lapacke_dgerfs_work.c
+lapacke_dgerqf.c
+lapacke_dgerqf_work.c
+lapacke_dgesdd.c
+lapacke_dgesdd_work.c
+lapacke_dgesv.c
+lapacke_dgesv_work.c
+lapacke_dgesvd.c
+lapacke_dgesvd_work.c
+lapacke_dgesvj.c
+lapacke_dgesvj_work.c
+lapacke_dgesvx.c
+lapacke_dgesvx_work.c
+lapacke_dgetf2.c
+lapacke_dgetf2_work.c
+lapacke_dgetrf.c
+lapacke_dgetrf_work.c
+lapacke_dgetri.c
+lapacke_dgetri_work.c
+lapacke_dgetrs.c
+lapacke_dgetrs_work.c
+lapacke_dggbak.c
+lapacke_dggbak_work.c
+lapacke_dggbal.c
+lapacke_dggbal_work.c
+lapacke_dgges.c
+lapacke_dgges_work.c
+lapacke_dggesx.c
+lapacke_dggesx_work.c
+lapacke_dggev.c
+lapacke_dggev_work.c
+lapacke_dggevx.c
+lapacke_dggevx_work.c
+lapacke_dggglm.c
+lapacke_dggglm_work.c
+lapacke_dgghrd.c
+lapacke_dgghrd_work.c
+lapacke_dgglse.c
+lapacke_dgglse_work.c
+lapacke_dggqrf.c
+lapacke_dggqrf_work.c
+lapacke_dggrqf.c
+lapacke_dggrqf_work.c
+lapacke_dggsvd.c
+lapacke_dggsvd_work.c
+lapacke_dggsvp.c
+lapacke_dggsvp_work.c
+lapacke_dgtcon.c
+lapacke_dgtcon_work.c
+lapacke_dgtrfs.c
+lapacke_dgtrfs_work.c
+lapacke_dgtsv.c
+lapacke_dgtsv_work.c
+lapacke_dgtsvx.c
+lapacke_dgtsvx_work.c
+lapacke_dgttrf.c
+lapacke_dgttrf_work.c
+lapacke_dgttrs.c
+lapacke_dgttrs_work.c
+lapacke_dhgeqz.c
+lapacke_dhgeqz_work.c
+lapacke_dhsein.c
+lapacke_dhsein_work.c
+lapacke_dhseqr.c
+lapacke_dhseqr_work.c
+lapacke_dlacn2.c
+lapacke_dlacn2_work.c
+lapacke_dlacpy.c
+lapacke_dlacpy_work.c
+lapacke_dlag2s.c
+lapacke_dlag2s_work.c
+lapacke_dlamch.c
+lapacke_dlamch_work.c
+lapacke_dlange.c
+lapacke_dlange_work.c
+lapacke_dlansy.c
+lapacke_dlansy_work.c
+lapacke_dlantr.c
+lapacke_dlantr_work.c
+lapacke_dlapmr.c
+lapacke_dlapmr_work.c
+lapacke_dlapy2.c
+lapacke_dlapy2_work.c
+lapacke_dlapy3.c
+lapacke_dlapy3_work.c
+lapacke_dlarfb.c
+lapacke_dlarfb_work.c
+lapacke_dlarfg.c
+lapacke_dlarfg_work.c
+lapacke_dlarft.c
+lapacke_dlarft_work.c
+lapacke_dlarfx.c
+lapacke_dlarfx_work.c
+lapacke_dlarnv.c
+lapacke_dlarnv_work.c
+lapacke_dlartgp.c
+lapacke_dlartgp_work.c
+lapacke_dlartgs.c
+lapacke_dlartgs_work.c
+lapacke_dlaset.c
+lapacke_dlaset_work.c
+lapacke_dlasrt.c
+lapacke_dlasrt_work.c
+lapacke_dlaswp.c
+lapacke_dlaswp_work.c
+lapacke_dlauum.c
+lapacke_dlauum_work.c
+lapacke_dopgtr.c
+lapacke_dopgtr_work.c
+lapacke_dopmtr.c
+lapacke_dopmtr_work.c
+lapacke_dorbdb.c
+lapacke_dorbdb_work.c
+lapacke_dorcsd.c
+lapacke_dorcsd_work.c
+lapacke_dorgbr.c
+lapacke_dorgbr_work.c
+lapacke_dorghr.c
+lapacke_dorghr_work.c
+lapacke_dorglq.c
+lapacke_dorglq_work.c
+lapacke_dorgql.c
+lapacke_dorgql_work.c
+lapacke_dorgqr.c
+lapacke_dorgqr_work.c
+lapacke_dorgrq.c
+lapacke_dorgrq_work.c
+lapacke_dorgtr.c
+lapacke_dorgtr_work.c
+lapacke_dormbr.c
+lapacke_dormbr_work.c
+lapacke_dormhr.c
+lapacke_dormhr_work.c
+lapacke_dormlq.c
+lapacke_dormlq_work.c
+lapacke_dormql.c
+lapacke_dormql_work.c
+lapacke_dormqr.c
+lapacke_dormqr_work.c
+lapacke_dormrq.c
+lapacke_dormrq_work.c
+lapacke_dormrz.c
+lapacke_dormrz_work.c
+lapacke_dormtr.c
+lapacke_dormtr_work.c
+lapacke_dpbcon.c
+lapacke_dpbcon_work.c
+lapacke_dpbequ.c
+lapacke_dpbequ_work.c
+lapacke_dpbrfs.c
+lapacke_dpbrfs_work.c
+lapacke_dpbstf.c
+lapacke_dpbstf_work.c
+lapacke_dpbsv.c
+lapacke_dpbsv_work.c
+lapacke_dpbsvx.c
+lapacke_dpbsvx_work.c
+lapacke_dpbtrf.c
+lapacke_dpbtrf_work.c
+lapacke_dpbtrs.c
+lapacke_dpbtrs_work.c
+lapacke_dpftrf.c
+lapacke_dpftrf_work.c
+lapacke_dpftri.c
+lapacke_dpftri_work.c
+lapacke_dpftrs.c
+lapacke_dpftrs_work.c
+lapacke_dpocon.c
+lapacke_dpocon_work.c
+lapacke_dpoequ.c
+lapacke_dpoequ_work.c
+lapacke_dpoequb.c
+lapacke_dpoequb_work.c
+lapacke_dporfs.c
+lapacke_dporfs_work.c
+lapacke_dposv.c
+lapacke_dposv_work.c
+lapacke_dposvx.c
+lapacke_dposvx_work.c
+lapacke_dpotrf.c
+lapacke_dpotrf_work.c
+lapacke_dpotri.c
+lapacke_dpotri_work.c
+lapacke_dpotrs.c
+lapacke_dpotrs_work.c
+lapacke_dppcon.c
+lapacke_dppcon_work.c
+lapacke_dppequ.c
+lapacke_dppequ_work.c
+lapacke_dpprfs.c
+lapacke_dpprfs_work.c
+lapacke_dppsv.c
+lapacke_dppsv_work.c
+lapacke_dppsvx.c
+lapacke_dppsvx_work.c
+lapacke_dpptrf.c
+lapacke_dpptrf_work.c
+lapacke_dpptri.c
+lapacke_dpptri_work.c
+lapacke_dpptrs.c
+lapacke_dpptrs_work.c
+lapacke_dpstrf.c
+lapacke_dpstrf_work.c
+lapacke_dptcon.c
+lapacke_dptcon_work.c
+lapacke_dpteqr.c
+lapacke_dpteqr_work.c
+lapacke_dptrfs.c
+lapacke_dptrfs_work.c
+lapacke_dptsv.c
+lapacke_dptsv_work.c
+lapacke_dptsvx.c
+lapacke_dptsvx_work.c
+lapacke_dpttrf.c
+lapacke_dpttrf_work.c
+lapacke_dpttrs.c
+lapacke_dpttrs_work.c
+lapacke_dsbev.c
+lapacke_dsbev_work.c
+lapacke_dsbevd.c
+lapacke_dsbevd_work.c
+lapacke_dsbevx.c
+lapacke_dsbevx_work.c
+lapacke_dsbgst.c
+lapacke_dsbgst_work.c
+lapacke_dsbgv.c
+lapacke_dsbgv_work.c
+lapacke_dsbgvd.c
+lapacke_dsbgvd_work.c
+lapacke_dsbgvx.c
+lapacke_dsbgvx_work.c
+lapacke_dsbtrd.c
+lapacke_dsbtrd_work.c
+lapacke_dsfrk.c
+lapacke_dsfrk_work.c
+lapacke_dsgesv.c
+lapacke_dsgesv_work.c
+lapacke_dspcon.c
+lapacke_dspcon_work.c
+lapacke_dspev.c
+lapacke_dspev_work.c
+lapacke_dspevd.c
+lapacke_dspevd_work.c
+lapacke_dspevx.c
+lapacke_dspevx_work.c
+lapacke_dspgst.c
+lapacke_dspgst_work.c
+lapacke_dspgv.c
+lapacke_dspgv_work.c
+lapacke_dspgvd.c
+lapacke_dspgvd_work.c
+lapacke_dspgvx.c
+lapacke_dspgvx_work.c
+lapacke_dsposv.c
+lapacke_dsposv_work.c
+lapacke_dsprfs.c
+lapacke_dsprfs_work.c
+lapacke_dspsv.c
+lapacke_dspsv_work.c
+lapacke_dspsvx.c
+lapacke_dspsvx_work.c
+lapacke_dsptrd.c
+lapacke_dsptrd_work.c
+lapacke_dsptrf.c
+lapacke_dsptrf_work.c
+lapacke_dsptri.c
+lapacke_dsptri_work.c
+lapacke_dsptrs.c
+lapacke_dsptrs_work.c
+lapacke_dstebz.c
+lapacke_dstebz_work.c
+lapacke_dstedc.c
+lapacke_dstedc_work.c
+lapacke_dstegr.c
+lapacke_dstegr_work.c
+lapacke_dstein.c
+lapacke_dstein_work.c
+lapacke_dstemr.c
+lapacke_dstemr_work.c
+lapacke_dsteqr.c
+lapacke_dsteqr_work.c
+lapacke_dsterf.c
+lapacke_dsterf_work.c
+lapacke_dstev.c
+lapacke_dstev_work.c
+lapacke_dstevd.c
+lapacke_dstevd_work.c
+lapacke_dstevr.c
+lapacke_dstevr_work.c
+lapacke_dstevx.c
+lapacke_dstevx_work.c
+lapacke_dsycon.c
+lapacke_dsycon_work.c
+lapacke_dsyconv.c
+lapacke_dsyconv_work.c
+lapacke_dsyequb.c
+lapacke_dsyequb_work.c
+lapacke_dsyev.c
+lapacke_dsyev_work.c
+lapacke_dsyevd.c
+lapacke_dsyevd_work.c
+lapacke_dsyevr.c
+lapacke_dsyevr_work.c
+lapacke_dsyevx.c
+lapacke_dsyevx_work.c
+lapacke_dsygst.c
+lapacke_dsygst_work.c
+lapacke_dsygv.c
+lapacke_dsygv_work.c
+lapacke_dsygvd.c
+lapacke_dsygvd_work.c
+lapacke_dsygvx.c
+lapacke_dsygvx_work.c
+lapacke_dsyrfs.c
+lapacke_dsyrfs_work.c
+lapacke_dsysv.c
+lapacke_dsysv_rook.c
+lapacke_dsysv_rook_work.c
+lapacke_dsysv_work.c
+lapacke_dsysvx.c
+lapacke_dsysvx_work.c
+lapacke_dsyswapr.c
+lapacke_dsyswapr_work.c
+lapacke_dsytrd.c
+lapacke_dsytrd_work.c
+lapacke_dsytrf.c
+lapacke_dsytrf_work.c
+lapacke_dsytri.c
+lapacke_dsytri2.c
+lapacke_dsytri2_work.c
+lapacke_dsytri2x.c
+lapacke_dsytri2x_work.c
+lapacke_dsytri_work.c
+lapacke_dsytrs.c
+lapacke_dsytrs2.c
+lapacke_dsytrs2_work.c
+lapacke_dsytrs_work.c
+lapacke_dtbcon.c
+lapacke_dtbcon_work.c
+lapacke_dtbrfs.c
+lapacke_dtbrfs_work.c
+lapacke_dtbtrs.c
+lapacke_dtbtrs_work.c
+lapacke_dtfsm.c
+lapacke_dtfsm_work.c
+lapacke_dtftri.c
+lapacke_dtftri_work.c
+lapacke_dtfttp.c
+lapacke_dtfttp_work.c
+lapacke_dtfttr.c
+lapacke_dtfttr_work.c
+lapacke_dtgevc.c
+lapacke_dtgevc_work.c
+lapacke_dtgexc.c
+lapacke_dtgexc_work.c
+lapacke_dtgsen.c
+lapacke_dtgsen_work.c
+lapacke_dtgsja.c
+lapacke_dtgsja_work.c
+lapacke_dtgsna.c
+lapacke_dtgsna_work.c
+lapacke_dtgsyl.c
+lapacke_dtgsyl_work.c
+lapacke_dtpcon.c
+lapacke_dtpcon_work.c
+lapacke_dtpmqrt.c
+lapacke_dtpmqrt_work.c
+lapacke_dtpqrt.c
+lapacke_dtpqrt2.c
+lapacke_dtpqrt2_work.c
+lapacke_dtpqrt_work.c
+lapacke_dtprfb.c
+lapacke_dtprfb_work.c
+lapacke_dtprfs.c
+lapacke_dtprfs_work.c
+lapacke_dtptri.c
+lapacke_dtptri_work.c
+lapacke_dtptrs.c
+lapacke_dtptrs_work.c
+lapacke_dtpttf.c
+lapacke_dtpttf_work.c
+lapacke_dtpttr.c
+lapacke_dtpttr_work.c
+lapacke_dtrcon.c
+lapacke_dtrcon_work.c
+lapacke_dtrevc.c
+lapacke_dtrevc_work.c
+lapacke_dtrexc.c
+lapacke_dtrexc_work.c
+lapacke_dtrrfs.c
+lapacke_dtrrfs_work.c
+lapacke_dtrsen.c
+lapacke_dtrsen_work.c
+lapacke_dtrsna.c
+lapacke_dtrsna_work.c
+lapacke_dtrsyl.c
+lapacke_dtrsyl_work.c
+lapacke_dtrtri.c
+lapacke_dtrtri_work.c
+lapacke_dtrtrs.c
+lapacke_dtrtrs_work.c
+lapacke_dtrttf.c
+lapacke_dtrttf_work.c
+lapacke_dtrttp.c
+lapacke_dtrttp_work.c
+lapacke_dtzrzf.c
+lapacke_dtzrzf_work.c
+lapacke_sbbcsd.c
+lapacke_sbbcsd_work.c
+lapacke_sbdsdc.c
+lapacke_sbdsdc_work.c
+lapacke_sbdsqr.c
+lapacke_sbdsqr_work.c
+lapacke_sdisna.c
+lapacke_sdisna_work.c
+lapacke_sgbbrd.c
+lapacke_sgbbrd_work.c
+lapacke_sgbcon.c
+lapacke_sgbcon_work.c
+lapacke_sgbequ.c
+lapacke_sgbequ_work.c
+lapacke_sgbequb.c
+lapacke_sgbequb_work.c
+lapacke_sgbrfs.c
+lapacke_sgbrfs_work.c
+lapacke_sgbsv.c
+lapacke_sgbsv_work.c
+lapacke_sgbsvx.c
+lapacke_sgbsvx_work.c
+lapacke_sgbtrf.c
+lapacke_sgbtrf_work.c
+lapacke_sgbtrs.c
+lapacke_sgbtrs_work.c
+lapacke_sgebak.c
+lapacke_sgebak_work.c
+lapacke_sgebal.c
+lapacke_sgebal_work.c
+lapacke_sgebrd.c
+lapacke_sgebrd_work.c
+lapacke_sgecon.c
+lapacke_sgecon_work.c
+lapacke_sgeequ.c
+lapacke_sgeequ_work.c
+lapacke_sgeequb.c
+lapacke_sgeequb_work.c
+lapacke_sgees.c
+lapacke_sgees_work.c
+lapacke_sgeesx.c
+lapacke_sgeesx_work.c
+lapacke_sgeev.c
+lapacke_sgeev_work.c
+lapacke_sgeevx.c
+lapacke_sgeevx_work.c
+lapacke_sgehrd.c
+lapacke_sgehrd_work.c
+lapacke_sgejsv.c
+lapacke_sgejsv_work.c
+lapacke_sgelq2.c
+lapacke_sgelq2_work.c
+lapacke_sgelqf.c
+lapacke_sgelqf_work.c
+lapacke_sgels.c
+lapacke_sgels_work.c
+lapacke_sgelsd.c
+lapacke_sgelsd_work.c
+lapacke_sgelss.c
+lapacke_sgelss_work.c
+lapacke_sgelsy.c
+lapacke_sgelsy_work.c
+lapacke_sgemqrt.c
+lapacke_sgemqrt_work.c
+lapacke_sgeqlf.c
+lapacke_sgeqlf_work.c
+lapacke_sgeqp3.c
+lapacke_sgeqp3_work.c
+lapacke_sgeqpf.c
+lapacke_sgeqpf_work.c
+lapacke_sgeqr2.c
+lapacke_sgeqr2_work.c
+lapacke_sgeqrf.c
+lapacke_sgeqrf_work.c
+lapacke_sgeqrfp.c
+lapacke_sgeqrfp_work.c
+lapacke_sgeqrt.c
+lapacke_sgeqrt2.c
+lapacke_sgeqrt2_work.c
+lapacke_sgeqrt3.c
+lapacke_sgeqrt3_work.c
+lapacke_sgeqrt_work.c
+lapacke_sgerfs.c
+lapacke_sgerfs_work.c
+lapacke_sgerqf.c
+lapacke_sgerqf_work.c
+lapacke_sgesdd.c
+lapacke_sgesdd_work.c
+lapacke_sgesv.c
+lapacke_sgesv_work.c
+lapacke_sgesvd.c
+lapacke_sgesvd_work.c
+lapacke_sgesvj.c
+lapacke_sgesvj_work.c
+lapacke_sgesvx.c
+lapacke_sgesvx_work.c
+lapacke_sgetf2.c
+lapacke_sgetf2_work.c
+lapacke_sgetrf.c
+lapacke_sgetrf_work.c
+lapacke_sgetri.c
+lapacke_sgetri_work.c
+lapacke_sgetrs.c
+lapacke_sgetrs_work.c
+lapacke_sggbak.c
+lapacke_sggbak_work.c
+lapacke_sggbal.c
+lapacke_sggbal_work.c
+lapacke_sgges.c
+lapacke_sgges_work.c
+lapacke_sggesx.c
+lapacke_sggesx_work.c
+lapacke_sggev.c
+lapacke_sggev_work.c
+lapacke_sggevx.c
+lapacke_sggevx_work.c
+lapacke_sggglm.c
+lapacke_sggglm_work.c
+lapacke_sgghrd.c
+lapacke_sgghrd_work.c
+lapacke_sgglse.c
+lapacke_sgglse_work.c
+lapacke_sggqrf.c
+lapacke_sggqrf_work.c
+lapacke_sggrqf.c
+lapacke_sggrqf_work.c
+lapacke_sggsvd.c
+lapacke_sggsvd_work.c
+lapacke_sggsvp.c
+lapacke_sggsvp_work.c
+lapacke_sgtcon.c
+lapacke_sgtcon_work.c
+lapacke_sgtrfs.c
+lapacke_sgtrfs_work.c
+lapacke_sgtsv.c
+lapacke_sgtsv_work.c
+lapacke_sgtsvx.c
+lapacke_sgtsvx_work.c
+lapacke_sgttrf.c
+lapacke_sgttrf_work.c
+lapacke_sgttrs.c
+lapacke_sgttrs_work.c
+lapacke_shgeqz.c
+lapacke_shgeqz_work.c
+lapacke_shsein.c
+lapacke_shsein_work.c
+lapacke_shseqr.c
+lapacke_shseqr_work.c
+lapacke_slacn2.c
+lapacke_slacn2_work.c
+lapacke_slacpy.c
+lapacke_slacpy_work.c
+lapacke_slag2d.c
+lapacke_slag2d_work.c
+lapacke_slamch.c
+lapacke_slamch_work.c
+lapacke_slange.c
+lapacke_slange_work.c
+lapacke_slansy.c
+lapacke_slansy_work.c
+lapacke_slantr.c
+lapacke_slantr_work.c
+lapacke_slapmr.c
+lapacke_slapmr_work.c
+lapacke_slapy2.c
+lapacke_slapy2_work.c
+lapacke_slapy3.c
+lapacke_slapy3_work.c
+lapacke_slarfb.c
+lapacke_slarfb_work.c
+lapacke_slarfg.c
+lapacke_slarfg_work.c
+lapacke_slarft.c
+lapacke_slarft_work.c
+lapacke_slarfx.c
+lapacke_slarfx_work.c
+lapacke_slarnv.c
+lapacke_slarnv_work.c
+lapacke_slartgp.c
+lapacke_slartgp_work.c
+lapacke_slartgs.c
+lapacke_slartgs_work.c
+lapacke_slaset.c
+lapacke_slaset_work.c
+lapacke_slasrt.c
+lapacke_slasrt_work.c
+lapacke_slaswp.c
+lapacke_slaswp_work.c
+lapacke_slauum.c
+lapacke_slauum_work.c
+lapacke_sopgtr.c
+lapacke_sopgtr_work.c
+lapacke_sopmtr.c
+lapacke_sopmtr_work.c
+lapacke_sorbdb.c
+lapacke_sorbdb_work.c
+lapacke_sorcsd.c
+lapacke_sorcsd_work.c
+lapacke_sorgbr.c
+lapacke_sorgbr_work.c
+lapacke_sorghr.c
+lapacke_sorghr_work.c
+lapacke_sorglq.c
+lapacke_sorglq_work.c
+lapacke_sorgql.c
+lapacke_sorgql_work.c
+lapacke_sorgqr.c
+lapacke_sorgqr_work.c
+lapacke_sorgrq.c
+lapacke_sorgrq_work.c
+lapacke_sorgtr.c
+lapacke_sorgtr_work.c
+lapacke_sormbr.c
+lapacke_sormbr_work.c
+lapacke_sormhr.c
+lapacke_sormhr_work.c
+lapacke_sormlq.c
+lapacke_sormlq_work.c
+lapacke_sormql.c
+lapacke_sormql_work.c
+lapacke_sormqr.c
+lapacke_sormqr_work.c
+lapacke_sormrq.c
+lapacke_sormrq_work.c
+lapacke_sormrz.c
+lapacke_sormrz_work.c
+lapacke_sormtr.c
+lapacke_sormtr_work.c
+lapacke_spbcon.c
+lapacke_spbcon_work.c
+lapacke_spbequ.c
+lapacke_spbequ_work.c
+lapacke_spbrfs.c
+lapacke_spbrfs_work.c
+lapacke_spbstf.c
+lapacke_spbstf_work.c
+lapacke_spbsv.c
+lapacke_spbsv_work.c
+lapacke_spbsvx.c
+lapacke_spbsvx_work.c
+lapacke_spbtrf.c
+lapacke_spbtrf_work.c
+lapacke_spbtrs.c
+lapacke_spbtrs_work.c
+lapacke_spftrf.c
+lapacke_spftrf_work.c
+lapacke_spftri.c
+lapacke_spftri_work.c
+lapacke_spftrs.c
+lapacke_spftrs_work.c
+lapacke_spocon.c
+lapacke_spocon_work.c
+lapacke_spoequ.c
+lapacke_spoequ_work.c
+lapacke_spoequb.c
+lapacke_spoequb_work.c
+lapacke_sporfs.c
+lapacke_sporfs_work.c
+lapacke_sposv.c
+lapacke_sposv_work.c
+lapacke_sposvx.c
+lapacke_sposvx_work.c
+lapacke_spotrf.c
+lapacke_spotrf_work.c
+lapacke_spotri.c
+lapacke_spotri_work.c
+lapacke_spotrs.c
+lapacke_spotrs_work.c
+lapacke_sppcon.c
+lapacke_sppcon_work.c
+lapacke_sppequ.c
+lapacke_sppequ_work.c
+lapacke_spprfs.c
+lapacke_spprfs_work.c
+lapacke_sppsv.c
+lapacke_sppsv_work.c
+lapacke_sppsvx.c
+lapacke_sppsvx_work.c
+lapacke_spptrf.c
+lapacke_spptrf_work.c
+lapacke_spptri.c
+lapacke_spptri_work.c
+lapacke_spptrs.c
+lapacke_spptrs_work.c
+lapacke_spstrf.c
+lapacke_spstrf_work.c
+lapacke_sptcon.c
+lapacke_sptcon_work.c
+lapacke_spteqr.c
+lapacke_spteqr_work.c
+lapacke_sptrfs.c
+lapacke_sptrfs_work.c
+lapacke_sptsv.c
+lapacke_sptsv_work.c
+lapacke_sptsvx.c
+lapacke_sptsvx_work.c
+lapacke_spttrf.c
+lapacke_spttrf_work.c
+lapacke_spttrs.c
+lapacke_spttrs_work.c
+lapacke_ssbev.c
+lapacke_ssbev_work.c
+lapacke_ssbevd.c
+lapacke_ssbevd_work.c
+lapacke_ssbevx.c
+lapacke_ssbevx_work.c
+lapacke_ssbgst.c
+lapacke_ssbgst_work.c
+lapacke_ssbgv.c
+lapacke_ssbgv_work.c
+lapacke_ssbgvd.c
+lapacke_ssbgvd_work.c
+lapacke_ssbgvx.c
+lapacke_ssbgvx_work.c
+lapacke_ssbtrd.c
+lapacke_ssbtrd_work.c
+lapacke_ssfrk.c
+lapacke_ssfrk_work.c
+lapacke_sspcon.c
+lapacke_sspcon_work.c
+lapacke_sspev.c
+lapacke_sspev_work.c
+lapacke_sspevd.c
+lapacke_sspevd_work.c
+lapacke_sspevx.c
+lapacke_sspevx_work.c
+lapacke_sspgst.c
+lapacke_sspgst_work.c
+lapacke_sspgv.c
+lapacke_sspgv_work.c
+lapacke_sspgvd.c
+lapacke_sspgvd_work.c
+lapacke_sspgvx.c
+lapacke_sspgvx_work.c
+lapacke_ssprfs.c
+lapacke_ssprfs_work.c
+lapacke_sspsv.c
+lapacke_sspsv_work.c
+lapacke_sspsvx.c
+lapacke_sspsvx_work.c
+lapacke_ssptrd.c
+lapacke_ssptrd_work.c
+lapacke_ssptrf.c
+lapacke_ssptrf_work.c
+lapacke_ssptri.c
+lapacke_ssptri_work.c
+lapacke_ssptrs.c
+lapacke_ssptrs_work.c
+lapacke_sstebz.c
+lapacke_sstebz_work.c
+lapacke_sstedc.c
+lapacke_sstedc_work.c
+lapacke_sstegr.c
+lapacke_sstegr_work.c
+lapacke_sstein.c
+lapacke_sstein_work.c
+lapacke_sstemr.c
+lapacke_sstemr_work.c
+lapacke_ssteqr.c
+lapacke_ssteqr_work.c
+lapacke_ssterf.c
+lapacke_ssterf_work.c
+lapacke_sstev.c
+lapacke_sstev_work.c
+lapacke_sstevd.c
+lapacke_sstevd_work.c
+lapacke_sstevr.c
+lapacke_sstevr_work.c
+lapacke_sstevx.c
+lapacke_sstevx_work.c
+lapacke_ssycon.c
+lapacke_ssycon_work.c
+lapacke_ssyconv.c
+lapacke_ssyconv_work.c
+lapacke_ssyequb.c
+lapacke_ssyequb_work.c
+lapacke_ssyev.c
+lapacke_ssyev_work.c
+lapacke_ssyevd.c
+lapacke_ssyevd_work.c
+lapacke_ssyevr.c
+lapacke_ssyevr_work.c
+lapacke_ssyevx.c
+lapacke_ssyevx_work.c
+lapacke_ssygst.c
+lapacke_ssygst_work.c
+lapacke_ssygv.c
+lapacke_ssygv_work.c
+lapacke_ssygvd.c
+lapacke_ssygvd_work.c
+lapacke_ssygvx.c
+lapacke_ssygvx_work.c
+lapacke_ssyrfs.c
+lapacke_ssyrfs_work.c
+lapacke_ssysv.c
+lapacke_ssysv_rook.c
+lapacke_ssysv_rook_work.c
+lapacke_ssysv_work.c
+lapacke_ssysvx.c
+lapacke_ssysvx_work.c
+lapacke_ssyswapr.c
+lapacke_ssyswapr_work.c
+lapacke_ssytrd.c
+lapacke_ssytrd_work.c
+lapacke_ssytrf.c
+lapacke_ssytrf_work.c
+lapacke_ssytri.c
+lapacke_ssytri2.c
+lapacke_ssytri2_work.c
+lapacke_ssytri2x.c
+lapacke_ssytri2x_work.c
+lapacke_ssytri_work.c
+lapacke_ssytrs.c
+lapacke_ssytrs2.c
+lapacke_ssytrs2_work.c
+lapacke_ssytrs_work.c
+lapacke_stbcon.c
+lapacke_stbcon_work.c
+lapacke_stbrfs.c
+lapacke_stbrfs_work.c
+lapacke_stbtrs.c
+lapacke_stbtrs_work.c
+lapacke_stfsm.c
+lapacke_stfsm_work.c
+lapacke_stftri.c
+lapacke_stftri_work.c
+lapacke_stfttp.c
+lapacke_stfttp_work.c
+lapacke_stfttr.c
+lapacke_stfttr_work.c
+lapacke_stgevc.c
+lapacke_stgevc_work.c
+lapacke_stgexc.c
+lapacke_stgexc_work.c
+lapacke_stgsen.c
+lapacke_stgsen_work.c
+lapacke_stgsja.c
+lapacke_stgsja_work.c
+lapacke_stgsna.c
+lapacke_stgsna_work.c
+lapacke_stgsyl.c
+lapacke_stgsyl_work.c
+lapacke_stpcon.c
+lapacke_stpcon_work.c
+lapacke_stpmqrt.c
+lapacke_stpmqrt_work.c
+lapacke_stpqrt.c
+lapacke_stpqrt_work.c
+lapacke_stpqrt2.c
+lapacke_stpqrt2_work.c
+lapacke_stprfb.c
+lapacke_stprfb_work.c
+lapacke_stprfs.c
+lapacke_stprfs_work.c
+lapacke_stptri.c
+lapacke_stptri_work.c
+lapacke_stptrs.c
+lapacke_stptrs_work.c
+lapacke_stpttf.c
+lapacke_stpttf_work.c
+lapacke_stpttr.c
+lapacke_stpttr_work.c
+lapacke_strcon.c
+lapacke_strcon_work.c
+lapacke_strevc.c
+lapacke_strevc_work.c
+lapacke_strexc.c
+lapacke_strexc_work.c
+lapacke_strrfs.c
+lapacke_strrfs_work.c
+lapacke_strsen.c
+lapacke_strsen_work.c
+lapacke_strsna.c
+lapacke_strsna_work.c
+lapacke_strsyl.c
+lapacke_strsyl_work.c
+lapacke_strtri.c
+lapacke_strtri_work.c
+lapacke_strtrs.c
+lapacke_strtrs_work.c
+lapacke_strttf.c
+lapacke_strttf_work.c
+lapacke_strttp.c
+lapacke_strttp_work.c
+lapacke_stzrzf.c
+lapacke_stzrzf_work.c
+lapacke_zbbcsd.c
+lapacke_zbbcsd_work.c
+lapacke_zbdsqr.c
+lapacke_zbdsqr_work.c
+lapacke_zcgesv.c
+lapacke_zcgesv_work.c
+lapacke_zcposv.c
+lapacke_zcposv_work.c
+lapacke_zgbbrd.c
+lapacke_zgbbrd_work.c
+lapacke_zgbcon.c
+lapacke_zgbcon_work.c
+lapacke_zgbequ.c
+lapacke_zgbequ_work.c
+lapacke_zgbequb.c
+lapacke_zgbequb_work.c
+lapacke_zgbrfs.c
+lapacke_zgbrfs_work.c
+lapacke_zgbsv.c
+lapacke_zgbsv_work.c
+lapacke_zgbsvx.c
+lapacke_zgbsvx_work.c
+lapacke_zgbtrf.c
+lapacke_zgbtrf_work.c
+lapacke_zgbtrs.c
+lapacke_zgbtrs_work.c
+lapacke_zgebak.c
+lapacke_zgebak_work.c
+lapacke_zgebal.c
+lapacke_zgebal_work.c
+lapacke_zgebrd.c
+lapacke_zgebrd_work.c
+lapacke_zgecon.c
+lapacke_zgecon_work.c
+lapacke_zgeequ.c
+lapacke_zgeequ_work.c
+lapacke_zgeequb.c
+lapacke_zgeequb_work.c
+lapacke_zgees.c
+lapacke_zgees_work.c
+lapacke_zgeesx.c
+lapacke_zgeesx_work.c
+lapacke_zgeev.c
+lapacke_zgeev_work.c
+lapacke_zgeevx.c
+lapacke_zgeevx_work.c
+lapacke_zgehrd.c
+lapacke_zgehrd_work.c
+lapacke_zgelq2.c
+lapacke_zgelq2_work.c
+lapacke_zgelqf.c
+lapacke_zgelqf_work.c
+lapacke_zgels.c
+lapacke_zgels_work.c
+lapacke_zgelsd.c
+lapacke_zgelsd_work.c
+lapacke_zgelss.c
+lapacke_zgelss_work.c
+lapacke_zgelsy.c
+lapacke_zgelsy_work.c
+lapacke_zgemqrt.c
+lapacke_zgemqrt_work.c
+lapacke_zgeqlf.c
+lapacke_zgeqlf_work.c
+lapacke_zgeqp3.c
+lapacke_zgeqp3_work.c
+lapacke_zgeqpf.c
+lapacke_zgeqpf_work.c
+lapacke_zgeqr2.c
+lapacke_zgeqr2_work.c
+lapacke_zgeqrf.c
+lapacke_zgeqrf_work.c
+lapacke_zgeqrfp.c
+lapacke_zgeqrfp_work.c
+lapacke_zgeqrt.c
+lapacke_zgeqrt2.c
+lapacke_zgeqrt2_work.c
+lapacke_zgeqrt3.c
+lapacke_zgeqrt3_work.c
+lapacke_zgeqrt_work.c
+lapacke_zgerfs.c
+lapacke_zgerfs_work.c
+lapacke_zgerqf.c
+lapacke_zgerqf_work.c
+lapacke_zgesdd.c
+lapacke_zgesdd_work.c
+lapacke_zgesv.c
+lapacke_zgesv_work.c
+lapacke_zgesvd.c
+lapacke_zgesvd_work.c
+lapacke_zgesvx.c
+lapacke_zgesvx_work.c
+lapacke_zgetf2.c
+lapacke_zgetf2_work.c
+lapacke_zgetrf.c
+lapacke_zgetrf_work.c
+lapacke_zgetri.c
+lapacke_zgetri_work.c
+lapacke_zgetrs.c
+lapacke_zgetrs_work.c
+lapacke_zggbak.c
+lapacke_zggbak_work.c
+lapacke_zggbal.c
+lapacke_zggbal_work.c
+lapacke_zgges.c
+lapacke_zgges_work.c
+lapacke_zggesx.c
+lapacke_zggesx_work.c
+lapacke_zggev.c
+lapacke_zggev_work.c
+lapacke_zggevx.c
+lapacke_zggevx_work.c
+lapacke_zggglm.c
+lapacke_zggglm_work.c
+lapacke_zgghrd.c
+lapacke_zgghrd_work.c
+lapacke_zgglse.c
+lapacke_zgglse_work.c
+lapacke_zggqrf.c
+lapacke_zggqrf_work.c
+lapacke_zggrqf.c
+lapacke_zggrqf_work.c
+lapacke_zggsvd.c
+lapacke_zggsvd_work.c
+lapacke_zggsvp.c
+lapacke_zggsvp_work.c
+lapacke_zgtcon.c
+lapacke_zgtcon_work.c
+lapacke_zgtrfs.c
+lapacke_zgtrfs_work.c
+lapacke_zgtsv.c
+lapacke_zgtsv_work.c
+lapacke_zgtsvx.c
+lapacke_zgtsvx_work.c
+lapacke_zgttrf.c
+lapacke_zgttrf_work.c
+lapacke_zgttrs.c
+lapacke_zgttrs_work.c
+lapacke_zhbev.c
+lapacke_zhbev_work.c
+lapacke_zhbevd.c
+lapacke_zhbevd_work.c
+lapacke_zhbevx.c
+lapacke_zhbevx_work.c
+lapacke_zhbgst.c
+lapacke_zhbgst_work.c
+lapacke_zhbgv.c
+lapacke_zhbgv_work.c
+lapacke_zhbgvd.c
+lapacke_zhbgvd_work.c
+lapacke_zhbgvx.c
+lapacke_zhbgvx_work.c
+lapacke_zhbtrd.c
+lapacke_zhbtrd_work.c
+lapacke_zhecon.c
+lapacke_zhecon_work.c
+lapacke_zheequb.c
+lapacke_zheequb_work.c
+lapacke_zheev.c
+lapacke_zheev_work.c
+lapacke_zheevd.c
+lapacke_zheevd_work.c
+lapacke_zheevr.c
+lapacke_zheevr_work.c
+lapacke_zheevx.c
+lapacke_zheevx_work.c
+lapacke_zhegst.c
+lapacke_zhegst_work.c
+lapacke_zhegv.c
+lapacke_zhegv_work.c
+lapacke_zhegvd.c
+lapacke_zhegvd_work.c
+lapacke_zhegvx.c
+lapacke_zhegvx_work.c
+lapacke_zherfs.c
+lapacke_zherfs_work.c
+lapacke_zhesv.c
+lapacke_zhesv_work.c
+lapacke_zhesvx.c
+lapacke_zhesvx_work.c
+lapacke_zheswapr.c
+lapacke_zheswapr_work.c
+lapacke_zhetrd.c
+lapacke_zhetrd_work.c
+lapacke_zhetrf.c
+lapacke_zhetrf_work.c
+lapacke_zhetri.c
+lapacke_zhetri2.c
+lapacke_zhetri2_work.c
+lapacke_zhetri2x.c
+lapacke_zhetri2x_work.c
+lapacke_zhetri_work.c
+lapacke_zhetrs.c
+lapacke_zhetrs2.c
+lapacke_zhetrs2_work.c
+lapacke_zhetrs_work.c
+lapacke_zhfrk.c
+lapacke_zhfrk_work.c
+lapacke_zhgeqz.c
+lapacke_zhgeqz_work.c
+lapacke_zhpcon.c
+lapacke_zhpcon_work.c
+lapacke_zhpev.c
+lapacke_zhpev_work.c
+lapacke_zhpevd.c
+lapacke_zhpevd_work.c
+lapacke_zhpevx.c
+lapacke_zhpevx_work.c
+lapacke_zhpgst.c
+lapacke_zhpgst_work.c
+lapacke_zhpgv.c
+lapacke_zhpgv_work.c
+lapacke_zhpgvd.c
+lapacke_zhpgvd_work.c
+lapacke_zhpgvx.c
+lapacke_zhpgvx_work.c
+lapacke_zhprfs.c
+lapacke_zhprfs_work.c
+lapacke_zhpsv.c
+lapacke_zhpsv_work.c
+lapacke_zhpsvx.c
+lapacke_zhpsvx_work.c
+lapacke_zhptrd.c
+lapacke_zhptrd_work.c
+lapacke_zhptrf.c
+lapacke_zhptrf_work.c
+lapacke_zhptri.c
+lapacke_zhptri_work.c
+lapacke_zhptrs.c
+lapacke_zhptrs_work.c
+lapacke_zhsein.c
+lapacke_zhsein_work.c
+lapacke_zhseqr.c
+lapacke_zhseqr_work.c
+lapacke_zlacgv.c
+lapacke_zlacgv_work.c
+lapacke_zlacn2.c
+lapacke_zlacn2_work.c
+lapacke_zlacp2.c
+lapacke_zlacp2_work.c
+lapacke_zlacpy.c
+lapacke_zlacpy_work.c
+lapacke_zlag2c.c
+lapacke_zlag2c_work.c
+lapacke_zlange.c
+lapacke_zlange_work.c
+lapacke_zlanhe.c
+lapacke_zlanhe_work.c
+lapacke_zlansy.c
+lapacke_zlansy_work.c
+lapacke_zlantr.c
+lapacke_zlantr_work.c
+lapacke_zlapmr.c
+lapacke_zlapmr_work.c
+lapacke_zlarfb.c
+lapacke_zlarfb_work.c
+lapacke_zlarfg.c
+lapacke_zlarfg_work.c
+lapacke_zlarft.c
+lapacke_zlarft_work.c
+lapacke_zlarfx.c
+lapacke_zlarfx_work.c
+lapacke_zlarnv.c
+lapacke_zlarnv_work.c
+lapacke_zlaset.c
+lapacke_zlaset_work.c
+lapacke_zlaswp.c
+lapacke_zlaswp_work.c
+lapacke_zlauum.c
+lapacke_zlauum_work.c
+lapacke_zpbcon.c
+lapacke_zpbcon_work.c
+lapacke_zpbequ.c
+lapacke_zpbequ_work.c
+lapacke_zpbrfs.c
+lapacke_zpbrfs_work.c
+lapacke_zpbstf.c
+lapacke_zpbstf_work.c
+lapacke_zpbsv.c
+lapacke_zpbsv_work.c
+lapacke_zpbsvx.c
+lapacke_zpbsvx_work.c
+lapacke_zpbtrf.c
+lapacke_zpbtrf_work.c
+lapacke_zpbtrs.c
+lapacke_zpbtrs_work.c
+lapacke_zpftrf.c
+lapacke_zpftrf_work.c
+lapacke_zpftri.c
+lapacke_zpftri_work.c
+lapacke_zpftrs.c
+lapacke_zpftrs_work.c
+lapacke_zpocon.c
+lapacke_zpocon_work.c
+lapacke_zpoequ.c
+lapacke_zpoequ_work.c
+lapacke_zpoequb.c
+lapacke_zpoequb_work.c
+lapacke_zporfs.c
+lapacke_zporfs_work.c
+lapacke_zposv.c
+lapacke_zposv_work.c
+lapacke_zposvx.c
+lapacke_zposvx_work.c
+lapacke_zpotrf.c
+lapacke_zpotrf_work.c
+lapacke_zpotri.c
+lapacke_zpotri_work.c
+lapacke_zpotrs.c
+lapacke_zpotrs_work.c
+lapacke_zppcon.c
+lapacke_zppcon_work.c
+lapacke_zppequ.c
+lapacke_zppequ_work.c
+lapacke_zpprfs.c
+lapacke_zpprfs_work.c
+lapacke_zppsv.c
+lapacke_zppsv_work.c
+lapacke_zppsvx.c
+lapacke_zppsvx_work.c
+lapacke_zpptrf.c
+lapacke_zpptrf_work.c
+lapacke_zpptri.c
+lapacke_zpptri_work.c
+lapacke_zpptrs.c
+lapacke_zpptrs_work.c
+lapacke_zpstrf.c
+lapacke_zpstrf_work.c
+lapacke_zptcon.c
+lapacke_zptcon_work.c
+lapacke_zpteqr.c
+lapacke_zpteqr_work.c
+lapacke_zptrfs.c
+lapacke_zptrfs_work.c
+lapacke_zptsv.c
+lapacke_zptsv_work.c
+lapacke_zptsvx.c
+lapacke_zptsvx_work.c
+lapacke_zpttrf.c
+lapacke_zpttrf_work.c
+lapacke_zpttrs.c
+lapacke_zpttrs_work.c
+lapacke_zspcon.c
+lapacke_zspcon_work.c
+lapacke_zsprfs.c
+lapacke_zsprfs_work.c
+lapacke_zspsv.c
+lapacke_zspsv_work.c
+lapacke_zspsvx.c
+lapacke_zspsvx_work.c
+lapacke_zsptrf.c
+lapacke_zsptrf_work.c
+lapacke_zsptri.c
+lapacke_zsptri_work.c
+lapacke_zsptrs.c
+lapacke_zsptrs_work.c
+lapacke_zstedc.c
+lapacke_zstedc_work.c
+lapacke_zstegr.c
+lapacke_zstegr_work.c
+lapacke_zstein.c
+lapacke_zstein_work.c
+lapacke_zstemr.c
+lapacke_zstemr_work.c
+lapacke_zsteqr.c
+lapacke_zsteqr_work.c
+lapacke_zsycon.c
+lapacke_zsycon_work.c
+lapacke_zsyconv.c
+lapacke_zsyconv_work.c
+lapacke_zsyequb.c
+lapacke_zsyequb_work.c
+lapacke_zsyrfs.c
+lapacke_zsyrfs_work.c
+lapacke_zsysv.c
+lapacke_zsysv_rook.c
+lapacke_zsysv_rook_work.c
+lapacke_zsysv_work.c
+lapacke_zsysvx.c
+lapacke_zsysvx_work.c
+lapacke_zsyswapr.c
+lapacke_zsyswapr_work.c
+lapacke_zsytrf.c
+lapacke_zsytrf_work.c
+lapacke_zsytri.c
+lapacke_zsytri2.c
+lapacke_zsytri2_work.c
+lapacke_zsytri2x.c
+lapacke_zsytri2x_work.c
+lapacke_zsytri_work.c
+lapacke_zsytrs.c
+lapacke_zsytrs2.c
+lapacke_zsytrs2_work.c
+lapacke_zsytrs_work.c
+lapacke_ztbcon.c
+lapacke_ztbcon_work.c
+lapacke_ztbrfs.c
+lapacke_ztbrfs_work.c
+lapacke_ztbtrs.c
+lapacke_ztbtrs_work.c
+lapacke_ztfsm.c
+lapacke_ztfsm_work.c
+lapacke_ztftri.c
+lapacke_ztftri_work.c
+lapacke_ztfttp.c
+lapacke_ztfttp_work.c
+lapacke_ztfttr.c
+lapacke_ztfttr_work.c
+lapacke_ztgevc.c
+lapacke_ztgevc_work.c
+lapacke_ztgexc.c
+lapacke_ztgexc_work.c
+lapacke_ztgsen.c
+lapacke_ztgsen_work.c
+lapacke_ztgsja.c
+lapacke_ztgsja_work.c
+lapacke_ztgsna.c
+lapacke_ztgsna_work.c
+lapacke_ztgsyl.c
+lapacke_ztgsyl_work.c
+lapacke_ztpcon.c
+lapacke_ztpcon_work.c
+lapacke_ztpmqrt.c
+lapacke_ztpmqrt_work.c
+lapacke_ztpqrt.c
+lapacke_ztpqrt2.c
+lapacke_ztpqrt2_work.c
+lapacke_ztpqrt_work.c
+lapacke_ztprfb.c
+lapacke_ztprfb_work.c
+lapacke_ztprfs.c
+lapacke_ztprfs_work.c
+lapacke_ztptri.c
+lapacke_ztptri_work.c
+lapacke_ztptrs.c
+lapacke_ztptrs_work.c
+lapacke_ztpttf.c
+lapacke_ztpttf_work.c
+lapacke_ztpttr.c
+lapacke_ztpttr_work.c
+lapacke_ztrcon.c
+lapacke_ztrcon_work.c
+lapacke_ztrevc.c
+lapacke_ztrevc_work.c
+lapacke_ztrexc.c
+lapacke_ztrexc_work.c
+lapacke_ztrrfs.c
+lapacke_ztrrfs_work.c
+lapacke_ztrsen.c
+lapacke_ztrsen_work.c
+lapacke_ztrsna.c
+lapacke_ztrsna_work.c
+lapacke_ztrsyl.c
+lapacke_ztrsyl_work.c
+lapacke_ztrtri.c
+lapacke_ztrtri_work.c
+lapacke_ztrtrs.c
+lapacke_ztrtrs_work.c
+lapacke_ztrttf.c
+lapacke_ztrttf_work.c
+lapacke_ztrttp.c
+lapacke_ztrttp_work.c
+lapacke_ztzrzf.c
+lapacke_ztzrzf_work.c
+lapacke_zunbdb.c
+lapacke_zunbdb_work.c
+lapacke_zuncsd.c
+lapacke_zuncsd_work.c
+lapacke_zungbr.c
+lapacke_zungbr_work.c
+lapacke_zunghr.c
+lapacke_zunghr_work.c
+lapacke_zunglq.c
+lapacke_zunglq_work.c
+lapacke_zungql.c
+lapacke_zungql_work.c
+lapacke_zungqr.c
+lapacke_zungqr_work.c
+lapacke_zungrq.c
+lapacke_zungrq_work.c
+lapacke_zungtr.c
+lapacke_zungtr_work.c
+lapacke_zunmbr.c
+lapacke_zunmbr_work.c
+lapacke_zunmhr.c
+lapacke_zunmhr_work.c
+lapacke_zunmlq.c
+lapacke_zunmlq_work.c
+lapacke_zunmql.c
+lapacke_zunmql_work.c
+lapacke_zunmqr.c
+lapacke_zunmqr_work.c
+lapacke_zunmrq.c
+lapacke_zunmrq_work.c
+lapacke_zunmrz.c
+lapacke_zunmrz_work.c
+lapacke_zunmtr.c
+lapacke_zunmtr_work.c
+lapacke_zupgtr.c
+lapacke_zupgtr_work.c
+lapacke_zupmtr.c
+lapacke_zupmtr_work.c
+lapacke_zsyr.c
+lapacke_csyr.c
+lapacke_zsyr_work.c
+lapacke_csyr_work.c
+lapacke_ilaver.c
+)
+
+SET(SRCX_OBJ
+lapacke_cgbrfsx.c lapacke_cporfsx.c lapacke_dgerfsx.c lapacke_sgbrfsx.c lapacke_ssyrfsx.c lapacke_zherfsx.c
+lapacke_cgbrfsx_work.c lapacke_cporfsx_work.c lapacke_dgerfsx_work.c lapacke_sgbrfsx_work.c lapacke_ssyrfsx_work.c lapacke_zherfsx_work.c
+lapacke_cgerfsx.c lapacke_csyrfsx.c lapacke_dporfsx.c lapacke_sgerfsx.c lapacke_zgbrfsx.c lapacke_zporfsx.c
+lapacke_cgerfsx_work.c lapacke_csyrfsx_work.c lapacke_dporfsx_work.c lapacke_sgerfsx_work.c lapacke_zgbrfsx_work.c lapacke_zporfsx_work.c
+lapacke_cherfsx.c lapacke_dgbrfsx.c lapacke_dsyrfsx.c lapacke_sporfsx.c lapacke_zgerfsx.c lapacke_zsyrfsx.c
+lapacke_cherfsx_work.c lapacke_dgbrfsx_work.c lapacke_dsyrfsx_work.c lapacke_sporfsx_work.c lapacke_zgerfsx_work.c lapacke_zsyrfsx_work.c
+lapacke_cgbsvxx.c lapacke_cposvxx.c lapacke_dgesvxx.c lapacke_sgbsvxx.c lapacke_ssysvxx.c lapacke_zhesvxx.c
+lapacke_cgbsvxx_work.c lapacke_cposvxx_work.c lapacke_dgesvxx_work.c lapacke_sgbsvxx_work.c lapacke_ssysvxx_work.c lapacke_zhesvxx_work.c
+lapacke_cgesvxx.c lapacke_csysvxx.c lapacke_dposvxx.c lapacke_sgesvxx.c lapacke_zgbsvxx.c lapacke_zposvxx.c
+lapacke_cgesvxx_work.c lapacke_csysvxx_work.c lapacke_dposvxx_work.c lapacke_sgesvxx_work.c lapacke_zgbsvxx_work.c lapacke_zposvxx_work.c
+lapacke_chesvxx.c lapacke_dgbsvxx.c lapacke_dsysvxx.c lapacke_sposvxx.c lapacke_zgesvxx.c lapacke_zsysvxx.c
+lapacke_chesvxx_work.c lapacke_dgbsvxx_work.c lapacke_dsysvxx_work.c lapacke_sposvxx_work.c lapacke_zgesvxx_work.c lapacke_zsysvxx_work.c
+)
+
+# FILE PARTS OF TMGLIB
+SET (MATGEN_OBJ
+lapacke_clatms.c
+lapacke_clatms_work.c
+lapacke_dlatms.c
+lapacke_dlatms_work.c
+lapacke_slatms.c
+lapacke_slatms_work.c
+lapacke_zlatms.c
+lapacke_zlatms_work.c
+lapacke_clagge.c
+lapacke_clagge_work.c
+lapacke_dlagge.c
+lapacke_dlagge_work.c
+lapacke_slagge.c
+lapacke_slagge_work.c
+lapacke_zlagge.c
+lapacke_zlagge_work.c
+lapacke_claghe.c
+lapacke_claghe_work.c
+lapacke_zlaghe.c
+lapacke_zlaghe_work.c
+lapacke_clagsy.c
+lapacke_clagsy_work.c
+lapacke_dlagsy.c
+lapacke_dlagsy_work.c
+lapacke_slagsy.c
+lapacke_slagsy_work.c
+lapacke_zlagsy.c
+lapacke_zlagsy_work.c
+)
diff --git a/LAPACKE/src/Makefile b/LAPACKE/src/Makefile
new file mode 100644
index 00000000..df57ddaf
--- /dev/null
+++ b/LAPACKE/src/Makefile
@@ -0,0 +1,2085 @@
+##############################################################################
+# Copyright (c) 2014, Intel Corp.
+# 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 C interface to LAPACK
+# Author: Intel Corporation
+# September, 2010
+##############################################################################
+# makefile for LAPACKE, used to build lapacke binary.
+#
+include ../../make.inc
+
+SRC_OBJ = \
+lapacke_cbbcsd.o \
+lapacke_cbbcsd_work.o \
+lapacke_cbdsqr.o \
+lapacke_cbdsqr_work.o \
+lapacke_cgbbrd.o \
+lapacke_cgbbrd_work.o \
+lapacke_cgbcon.o \
+lapacke_cgbcon_work.o \
+lapacke_cgbequ.o \
+lapacke_cgbequ_work.o \
+lapacke_cgbequb.o \
+lapacke_cgbequb_work.o \
+lapacke_cgbrfs.o \
+lapacke_cgbrfs_work.o \
+lapacke_cgbsv.o \
+lapacke_cgbsv_work.o \
+lapacke_cgbsvx.o \
+lapacke_cgbsvx_work.o \
+lapacke_cgbtrf.o \
+lapacke_cgbtrf_work.o \
+lapacke_cgbtrs.o \
+lapacke_cgbtrs_work.o \
+lapacke_cgebak.o \
+lapacke_cgebak_work.o \
+lapacke_cgebal.o \
+lapacke_cgebal_work.o \
+lapacke_cgebrd.o \
+lapacke_cgebrd_work.o \
+lapacke_cgecon.o \
+lapacke_cgecon_work.o \
+lapacke_cgeequ.o \
+lapacke_cgeequ_work.o \
+lapacke_cgeequb.o \
+lapacke_cgeequb_work.o \
+lapacke_cgees.o \
+lapacke_cgees_work.o \
+lapacke_cgeesx.o \
+lapacke_cgeesx_work.o \
+lapacke_cgeev.o \
+lapacke_cgeev_work.o \
+lapacke_cgeevx.o \
+lapacke_cgeevx_work.o \
+lapacke_cgehrd.o \
+lapacke_cgehrd_work.o \
+lapacke_cgelq2.o \
+lapacke_cgelq2_work.o \
+lapacke_cgelqf.o \
+lapacke_cgelqf_work.o \
+lapacke_cgels.o \
+lapacke_cgels_work.o \
+lapacke_cgelsd.o \
+lapacke_cgelsd_work.o \
+lapacke_cgelss.o \
+lapacke_cgelss_work.o \
+lapacke_cgelsy.o \
+lapacke_cgelsy_work.o \
+lapacke_cgemqrt.o \
+lapacke_cgemqrt_work.o \
+lapacke_cgeqlf.o \
+lapacke_cgeqlf_work.o \
+lapacke_cgeqp3.o \
+lapacke_cgeqp3_work.o \
+lapacke_cgeqpf.o \
+lapacke_cgeqpf_work.o \
+lapacke_cgeqr2.o \
+lapacke_cgeqr2_work.o \
+lapacke_cgeqrf.o \
+lapacke_cgeqrf_work.o \
+lapacke_cgeqrfp.o \
+lapacke_cgeqrfp_work.o \
+lapacke_cgeqrt.o \
+lapacke_cgeqrt2.o \
+lapacke_cgeqrt2_work.o \
+lapacke_cgeqrt3.o \
+lapacke_cgeqrt3_work.o \
+lapacke_cgeqrt_work.o \
+lapacke_cgerfs.o \
+lapacke_cgerfs_work.o \
+lapacke_cgerqf.o \
+lapacke_cgerqf_work.o \
+lapacke_cgesdd.o \
+lapacke_cgesdd_work.o \
+lapacke_cgesv.o \
+lapacke_cgesv_work.o \
+lapacke_cgesvd.o \
+lapacke_cgesvd_work.o \
+lapacke_cgesvx.o \
+lapacke_cgesvx_work.o \
+lapacke_cgetf2.o \
+lapacke_cgetf2_work.o \
+lapacke_cgetrf.o \
+lapacke_cgetrf_work.o \
+lapacke_cgetri.o \
+lapacke_cgetri_work.o \
+lapacke_cgetrs.o \
+lapacke_cgetrs_work.o \
+lapacke_cggbak.o \
+lapacke_cggbak_work.o \
+lapacke_cggbal.o \
+lapacke_cggbal_work.o \
+lapacke_cgges.o \
+lapacke_cgges_work.o \
+lapacke_cggesx.o \
+lapacke_cggesx_work.o \
+lapacke_cggev.o \
+lapacke_cggev_work.o \
+lapacke_cggevx.o \
+lapacke_cggevx_work.o \
+lapacke_cggglm.o \
+lapacke_cggglm_work.o \
+lapacke_cgghrd.o \
+lapacke_cgghrd_work.o \
+lapacke_cgglse.o \
+lapacke_cgglse_work.o \
+lapacke_cggqrf.o \
+lapacke_cggqrf_work.o \
+lapacke_cggrqf.o \
+lapacke_cggrqf_work.o \
+lapacke_cggsvd.o \
+lapacke_cggsvd_work.o \
+lapacke_cggsvp.o \
+lapacke_cggsvp_work.o \
+lapacke_cgtcon.o \
+lapacke_cgtcon_work.o \
+lapacke_cgtrfs.o \
+lapacke_cgtrfs_work.o \
+lapacke_cgtsv.o \
+lapacke_cgtsv_work.o \
+lapacke_cgtsvx.o \
+lapacke_cgtsvx_work.o \
+lapacke_cgttrf.o \
+lapacke_cgttrf_work.o \
+lapacke_cgttrs.o \
+lapacke_cgttrs_work.o \
+lapacke_chbev.o \
+lapacke_chbev_work.o \
+lapacke_chbevd.o \
+lapacke_chbevd_work.o \
+lapacke_chbevx.o \
+lapacke_chbevx_work.o \
+lapacke_chbgst.o \
+lapacke_chbgst_work.o \
+lapacke_chbgv.o \
+lapacke_chbgv_work.o \
+lapacke_chbgvd.o \
+lapacke_chbgvd_work.o \
+lapacke_chbgvx.o \
+lapacke_chbgvx_work.o \
+lapacke_chbtrd.o \
+lapacke_chbtrd_work.o \
+lapacke_checon.o \
+lapacke_checon_work.o \
+lapacke_cheequb.o \
+lapacke_cheequb_work.o \
+lapacke_cheev.o \
+lapacke_cheev_work.o \
+lapacke_cheevd.o \
+lapacke_cheevd_work.o \
+lapacke_cheevr.o \
+lapacke_cheevr_work.o \
+lapacke_cheevx.o \
+lapacke_cheevx_work.o \
+lapacke_chegst.o \
+lapacke_chegst_work.o \
+lapacke_chegv.o \
+lapacke_chegv_work.o \
+lapacke_chegvd.o \
+lapacke_chegvd_work.o \
+lapacke_chegvx.o \
+lapacke_chegvx_work.o \
+lapacke_cherfs.o \
+lapacke_cherfs_work.o \
+lapacke_chesv.o \
+lapacke_chesv_work.o \
+lapacke_chesvx.o \
+lapacke_chesvx_work.o \
+lapacke_cheswapr.o \
+lapacke_cheswapr_work.o \
+lapacke_chetrd.o \
+lapacke_chetrd_work.o \
+lapacke_chetrf.o \
+lapacke_chetrf_work.o \
+lapacke_chetri.o \
+lapacke_chetri2.o \
+lapacke_chetri2_work.o \
+lapacke_chetri2x.o \
+lapacke_chetri2x_work.o \
+lapacke_chetri_work.o \
+lapacke_chetrs.o \
+lapacke_chetrs2.o \
+lapacke_chetrs2_work.o \
+lapacke_chetrs_work.o \
+lapacke_chfrk.o \
+lapacke_chfrk_work.o \
+lapacke_chgeqz.o \
+lapacke_chgeqz_work.o \
+lapacke_chpcon.o \
+lapacke_chpcon_work.o \
+lapacke_chpev.o \
+lapacke_chpev_work.o \
+lapacke_chpevd.o \
+lapacke_chpevd_work.o \
+lapacke_chpevx.o \
+lapacke_chpevx_work.o \
+lapacke_chpgst.o \
+lapacke_chpgst_work.o \
+lapacke_chpgv.o \
+lapacke_chpgv_work.o \
+lapacke_chpgvd.o \
+lapacke_chpgvd_work.o \
+lapacke_chpgvx.o \
+lapacke_chpgvx_work.o \
+lapacke_chprfs.o \
+lapacke_chprfs_work.o \
+lapacke_chpsv.o \
+lapacke_chpsv_work.o \
+lapacke_chpsvx.o \
+lapacke_chpsvx_work.o \
+lapacke_chptrd.o \
+lapacke_chptrd_work.o \
+lapacke_chptrf.o \
+lapacke_chptrf_work.o \
+lapacke_chptri.o \
+lapacke_chptri_work.o \
+lapacke_chptrs.o \
+lapacke_chptrs_work.o \
+lapacke_chsein.o \
+lapacke_chsein_work.o \
+lapacke_chseqr.o \
+lapacke_chseqr_work.o \
+lapacke_clacgv.o \
+lapacke_clacgv_work.o \
+lapacke_clacn2.o \
+lapacke_clacn2_work.o \
+lapacke_clacp2.o \
+lapacke_clacp2_work.o \
+lapacke_clacpy.o \
+lapacke_clacpy_work.o \
+lapacke_clag2z.o \
+lapacke_clag2z_work.o \
+lapacke_clange.o \
+lapacke_clange_work.o \
+lapacke_clanhe.o \
+lapacke_clanhe_work.o \
+lapacke_clansy.o \
+lapacke_clansy_work.o \
+lapacke_clantr.o \
+lapacke_clantr_work.o \
+lapacke_clapmr.o \
+lapacke_clapmr_work.o \
+lapacke_clarfb.o \
+lapacke_clarfb_work.o \
+lapacke_clarfg.o \
+lapacke_clarfg_work.o \
+lapacke_clarft.o \
+lapacke_clarft_work.o \
+lapacke_clarfx.o \
+lapacke_clarfx_work.o \
+lapacke_clarnv.o \
+lapacke_clarnv_work.o \
+lapacke_claset.o \
+lapacke_claset_work.o \
+lapacke_claswp.o \
+lapacke_claswp_work.o \
+lapacke_clauum.o \
+lapacke_clauum_work.o \
+lapacke_cpbcon.o \
+lapacke_cpbcon_work.o \
+lapacke_cpbequ.o \
+lapacke_cpbequ_work.o \
+lapacke_cpbrfs.o \
+lapacke_cpbrfs_work.o \
+lapacke_cpbstf.o \
+lapacke_cpbstf_work.o \
+lapacke_cpbsv.o \
+lapacke_cpbsv_work.o \
+lapacke_cpbsvx.o \
+lapacke_cpbsvx_work.o \
+lapacke_cpbtrf.o \
+lapacke_cpbtrf_work.o \
+lapacke_cpbtrs.o \
+lapacke_cpbtrs_work.o \
+lapacke_cpftrf.o \
+lapacke_cpftrf_work.o \
+lapacke_cpftri.o \
+lapacke_cpftri_work.o \
+lapacke_cpftrs.o \
+lapacke_cpftrs_work.o \
+lapacke_cpocon.o \
+lapacke_cpocon_work.o \
+lapacke_cpoequ.o \
+lapacke_cpoequ_work.o \
+lapacke_cpoequb.o \
+lapacke_cpoequb_work.o \
+lapacke_cporfs.o \
+lapacke_cporfs_work.o \
+lapacke_cposv.o \
+lapacke_cposv_work.o \
+lapacke_cposvx.o \
+lapacke_cposvx_work.o \
+lapacke_cpotrf.o \
+lapacke_cpotrf_work.o \
+lapacke_cpotri.o \
+lapacke_cpotri_work.o \
+lapacke_cpotrs.o \
+lapacke_cpotrs_work.o \
+lapacke_cppcon.o \
+lapacke_cppcon_work.o \
+lapacke_cppequ.o \
+lapacke_cppequ_work.o \
+lapacke_cpprfs.o \
+lapacke_cpprfs_work.o \
+lapacke_cppsv.o \
+lapacke_cppsv_work.o \
+lapacke_cppsvx.o \
+lapacke_cppsvx_work.o \
+lapacke_cpptrf.o \
+lapacke_cpptrf_work.o \
+lapacke_cpptri.o \
+lapacke_cpptri_work.o \
+lapacke_cpptrs.o \
+lapacke_cpptrs_work.o \
+lapacke_cpstrf.o \
+lapacke_cpstrf_work.o \
+lapacke_cptcon.o \
+lapacke_cptcon_work.o \
+lapacke_cpteqr.o \
+lapacke_cpteqr_work.o \
+lapacke_cptrfs.o \
+lapacke_cptrfs_work.o \
+lapacke_cptsv.o \
+lapacke_cptsv_work.o \
+lapacke_cptsvx.o \
+lapacke_cptsvx_work.o \
+lapacke_cpttrf.o \
+lapacke_cpttrf_work.o \
+lapacke_cpttrs.o \
+lapacke_cpttrs_work.o \
+lapacke_cspcon.o \
+lapacke_cspcon_work.o \
+lapacke_csprfs.o \
+lapacke_csprfs_work.o \
+lapacke_cspsv.o \
+lapacke_cspsv_work.o \
+lapacke_cspsvx.o \
+lapacke_cspsvx_work.o \
+lapacke_csptrf.o \
+lapacke_csptrf_work.o \
+lapacke_csptri.o \
+lapacke_csptri_work.o \
+lapacke_csptrs.o \
+lapacke_csptrs_work.o \
+lapacke_cstedc.o \
+lapacke_cstedc_work.o \
+lapacke_cstegr.o \
+lapacke_cstegr_work.o \
+lapacke_cstein.o \
+lapacke_cstein_work.o \
+lapacke_cstemr.o \
+lapacke_cstemr_work.o \
+lapacke_csteqr.o \
+lapacke_csteqr_work.o \
+lapacke_csycon.o \
+lapacke_csycon_work.o \
+lapacke_csyconv.o \
+lapacke_csyconv_work.o \
+lapacke_csyequb.o \
+lapacke_csyequb_work.o \
+lapacke_csyrfs.o \
+lapacke_csyrfs_work.o \
+lapacke_csysv.o \
+lapacke_csysv_rook.o \
+lapacke_csysv_rook_work.o \
+lapacke_csysv_work.o \
+lapacke_csysvx.o \
+lapacke_csysvx_work.o \
+lapacke_csyswapr.o \
+lapacke_csyswapr_work.o \
+lapacke_csytrf.o \
+lapacke_csytrf_work.o \
+lapacke_csytri.o \
+lapacke_csytri2.o \
+lapacke_csytri2_work.o \
+lapacke_csytri2x.o \
+lapacke_csytri2x_work.o \
+lapacke_csytri_work.o \
+lapacke_csytrs.o \
+lapacke_csytrs2.o \
+lapacke_csytrs2_work.o \
+lapacke_csytrs_work.o \
+lapacke_ctbcon.o \
+lapacke_ctbcon_work.o \
+lapacke_ctbrfs.o \
+lapacke_ctbrfs_work.o \
+lapacke_ctbtrs.o \
+lapacke_ctbtrs_work.o \
+lapacke_ctfsm.o \
+lapacke_ctfsm_work.o \
+lapacke_ctftri.o \
+lapacke_ctftri_work.o \
+lapacke_ctfttp.o \
+lapacke_ctfttp_work.o \
+lapacke_ctfttr.o \
+lapacke_ctfttr_work.o \
+lapacke_ctgevc.o \
+lapacke_ctgevc_work.o \
+lapacke_ctgexc.o \
+lapacke_ctgexc_work.o \
+lapacke_ctgsen.o \
+lapacke_ctgsen_work.o \
+lapacke_ctgsja.o \
+lapacke_ctgsja_work.o \
+lapacke_ctgsna.o \
+lapacke_ctgsna_work.o \
+lapacke_ctgsyl.o \
+lapacke_ctgsyl_work.o \
+lapacke_ctpcon.o \
+lapacke_ctpcon_work.o \
+lapacke_ctpmqrt.o \
+lapacke_ctpmqrt_work.o \
+lapacke_ctpqrt.o \
+lapacke_ctpqrt2.o \
+lapacke_ctpqrt2_work.o \
+lapacke_ctpqrt_work.o \
+lapacke_ctprfb.o \
+lapacke_ctprfb_work.o \
+lapacke_ctprfs.o \
+lapacke_ctprfs_work.o \
+lapacke_ctptri.o \
+lapacke_ctptri_work.o \
+lapacke_ctptrs.o \
+lapacke_ctptrs_work.o \
+lapacke_ctpttf.o \
+lapacke_ctpttf_work.o \
+lapacke_ctpttr.o \
+lapacke_ctpttr_work.o \
+lapacke_ctrcon.o \
+lapacke_ctrcon_work.o \
+lapacke_ctrevc.o \
+lapacke_ctrevc_work.o \
+lapacke_ctrexc.o \
+lapacke_ctrexc_work.o \
+lapacke_ctrrfs.o \
+lapacke_ctrrfs_work.o \
+lapacke_ctrsen.o \
+lapacke_ctrsen_work.o \
+lapacke_ctrsna.o \
+lapacke_ctrsna_work.o \
+lapacke_ctrsyl.o \
+lapacke_ctrsyl_work.o \
+lapacke_ctrtri.o \
+lapacke_ctrtri_work.o \
+lapacke_ctrtrs.o \
+lapacke_ctrtrs_work.o \
+lapacke_ctrttf.o \
+lapacke_ctrttf_work.o \
+lapacke_ctrttp.o \
+lapacke_ctrttp_work.o \
+lapacke_ctzrzf.o \
+lapacke_ctzrzf_work.o \
+lapacke_cunbdb.o \
+lapacke_cunbdb_work.o \
+lapacke_cuncsd.o \
+lapacke_cuncsd_work.o \
+lapacke_cungbr.o \
+lapacke_cungbr_work.o \
+lapacke_cunghr.o \
+lapacke_cunghr_work.o \
+lapacke_cunglq.o \
+lapacke_cunglq_work.o \
+lapacke_cungql.o \
+lapacke_cungql_work.o \
+lapacke_cungqr.o \
+lapacke_cungqr_work.o \
+lapacke_cungrq.o \
+lapacke_cungrq_work.o \
+lapacke_cungtr.o \
+lapacke_cungtr_work.o \
+lapacke_cunmbr.o \
+lapacke_cunmbr_work.o \
+lapacke_cunmhr.o \
+lapacke_cunmhr_work.o \
+lapacke_cunmlq.o \
+lapacke_cunmlq_work.o \
+lapacke_cunmql.o \
+lapacke_cunmql_work.o \
+lapacke_cunmqr.o \
+lapacke_cunmqr_work.o \
+lapacke_cunmrq.o \
+lapacke_cunmrq_work.o \
+lapacke_cunmrz.o \
+lapacke_cunmrz_work.o \
+lapacke_cunmtr.o \
+lapacke_cunmtr_work.o \
+lapacke_cupgtr.o \
+lapacke_cupgtr_work.o \
+lapacke_cupmtr.o \
+lapacke_cupmtr_work.o \
+lapacke_dbbcsd.o \
+lapacke_dbbcsd_work.o \
+lapacke_dbdsdc.o \
+lapacke_dbdsdc_work.o \
+lapacke_dbdsqr.o \
+lapacke_dbdsqr_work.o \
+lapacke_ddisna.o \
+lapacke_ddisna_work.o \
+lapacke_dgbbrd.o \
+lapacke_dgbbrd_work.o \
+lapacke_dgbcon.o \
+lapacke_dgbcon_work.o \
+lapacke_dgbequ.o \
+lapacke_dgbequ_work.o \
+lapacke_dgbequb.o \
+lapacke_dgbequb_work.o \
+lapacke_dgbrfs.o \
+lapacke_dgbrfs_work.o \
+lapacke_dgbsv.o \
+lapacke_dgbsv_work.o \
+lapacke_dgbsvx.o \
+lapacke_dgbsvx_work.o \
+lapacke_dgbtrf.o \
+lapacke_dgbtrf_work.o \
+lapacke_dgbtrs.o \
+lapacke_dgbtrs_work.o \
+lapacke_dgebak.o \
+lapacke_dgebak_work.o \
+lapacke_dgebal.o \
+lapacke_dgebal_work.o \
+lapacke_dgebrd.o \
+lapacke_dgebrd_work.o \
+lapacke_dgecon.o \
+lapacke_dgecon_work.o \
+lapacke_dgeequ.o \
+lapacke_dgeequ_work.o \
+lapacke_dgeequb.o \
+lapacke_dgeequb_work.o \
+lapacke_dgees.o \
+lapacke_dgees_work.o \
+lapacke_dgeesx.o \
+lapacke_dgeesx_work.o \
+lapacke_dgeev.o \
+lapacke_dgeev_work.o \
+lapacke_dgeevx.o \
+lapacke_dgeevx_work.o \
+lapacke_dgehrd.o \
+lapacke_dgehrd_work.o \
+lapacke_dgejsv.o \
+lapacke_dgejsv_work.o \
+lapacke_dgelq2.o \
+lapacke_dgelq2_work.o \
+lapacke_dgelqf.o \
+lapacke_dgelqf_work.o \
+lapacke_dgels.o \
+lapacke_dgels_work.o \
+lapacke_dgelsd.o \
+lapacke_dgelsd_work.o \
+lapacke_dgelss.o \
+lapacke_dgelss_work.o \
+lapacke_dgelsy.o \
+lapacke_dgelsy_work.o \
+lapacke_dgemqrt.o \
+lapacke_dgemqrt_work.o \
+lapacke_dgeqlf.o \
+lapacke_dgeqlf_work.o \
+lapacke_dgeqp3.o \
+lapacke_dgeqp3_work.o \
+lapacke_dgeqpf.o \
+lapacke_dgeqpf_work.o \
+lapacke_dgeqr2.o \
+lapacke_dgeqr2_work.o \
+lapacke_dgeqrf.o \
+lapacke_dgeqrf_work.o \
+lapacke_dgeqrfp.o \
+lapacke_dgeqrfp_work.o \
+lapacke_dgeqrt.o \
+lapacke_dgeqrt2.o \
+lapacke_dgeqrt2_work.o \
+lapacke_dgeqrt3.o \
+lapacke_dgeqrt3_work.o \
+lapacke_dgeqrt_work.o \
+lapacke_dgerfs.o \
+lapacke_dgerfs_work.o \
+lapacke_dgerqf.o \
+lapacke_dgerqf_work.o \
+lapacke_dgesdd.o \
+lapacke_dgesdd_work.o \
+lapacke_dgesv.o \
+lapacke_dgesv_work.o \
+lapacke_dgesvd.o \
+lapacke_dgesvd_work.o \
+lapacke_dgesvj.o \
+lapacke_dgesvj_work.o \
+lapacke_dgesvx.o \
+lapacke_dgesvx_work.o \
+lapacke_dgetf2.o \
+lapacke_dgetf2_work.o \
+lapacke_dgetrf.o \
+lapacke_dgetrf_work.o \
+lapacke_dgetri.o \
+lapacke_dgetri_work.o \
+lapacke_dgetrs.o \
+lapacke_dgetrs_work.o \
+lapacke_dggbak.o \
+lapacke_dggbak_work.o \
+lapacke_dggbal.o \
+lapacke_dggbal_work.o \
+lapacke_dgges.o \
+lapacke_dgges_work.o \
+lapacke_dggesx.o \
+lapacke_dggesx_work.o \
+lapacke_dggev.o \
+lapacke_dggev_work.o \
+lapacke_dggevx.o \
+lapacke_dggevx_work.o \
+lapacke_dggglm.o \
+lapacke_dggglm_work.o \
+lapacke_dgghrd.o \
+lapacke_dgghrd_work.o \
+lapacke_dgglse.o \
+lapacke_dgglse_work.o \
+lapacke_dggqrf.o \
+lapacke_dggqrf_work.o \
+lapacke_dggrqf.o \
+lapacke_dggrqf_work.o \
+lapacke_dggsvd.o \
+lapacke_dggsvd_work.o \
+lapacke_dggsvp.o \
+lapacke_dggsvp_work.o \
+lapacke_dgtcon.o \
+lapacke_dgtcon_work.o \
+lapacke_dgtrfs.o \
+lapacke_dgtrfs_work.o \
+lapacke_dgtsv.o \
+lapacke_dgtsv_work.o \
+lapacke_dgtsvx.o \
+lapacke_dgtsvx_work.o \
+lapacke_dgttrf.o \
+lapacke_dgttrf_work.o \
+lapacke_dgttrs.o \
+lapacke_dgttrs_work.o \
+lapacke_dhgeqz.o \
+lapacke_dhgeqz_work.o \
+lapacke_dhsein.o \
+lapacke_dhsein_work.o \
+lapacke_dhseqr.o \
+lapacke_dhseqr_work.o \
+lapacke_dlacn2.o \
+lapacke_dlacn2_work.o \
+lapacke_dlacpy.o \
+lapacke_dlacpy_work.o \
+lapacke_dlag2s.o \
+lapacke_dlag2s_work.o \
+lapacke_dlamch.o \
+lapacke_dlamch_work.o \
+lapacke_dlange.o \
+lapacke_dlange_work.o \
+lapacke_dlansy.o \
+lapacke_dlansy_work.o \
+lapacke_dlantr.o \
+lapacke_dlantr_work.o \
+lapacke_dlapmr.o \
+lapacke_dlapmr_work.o \
+lapacke_dlapy2.o \
+lapacke_dlapy2_work.o \
+lapacke_dlapy3.o \
+lapacke_dlapy3_work.o \
+lapacke_dlarfb.o \
+lapacke_dlarfb_work.o \
+lapacke_dlarfg.o \
+lapacke_dlarfg_work.o \
+lapacke_dlarft.o \
+lapacke_dlarft_work.o \
+lapacke_dlarfx.o \
+lapacke_dlarfx_work.o \
+lapacke_dlarnv.o \
+lapacke_dlarnv_work.o \
+lapacke_dlartgp.o \
+lapacke_dlartgp_work.o \
+lapacke_dlartgs.o \
+lapacke_dlartgs_work.o \
+lapacke_dlaset.o \
+lapacke_dlaset_work.o \
+lapacke_dlasrt.o \
+lapacke_dlasrt_work.o \
+lapacke_dlaswp.o \
+lapacke_dlaswp_work.o \
+lapacke_dlauum.o \
+lapacke_dlauum_work.o \
+lapacke_dopgtr.o \
+lapacke_dopgtr_work.o \
+lapacke_dopmtr.o \
+lapacke_dopmtr_work.o \
+lapacke_dorbdb.o \
+lapacke_dorbdb_work.o \
+lapacke_dorcsd.o \
+lapacke_dorcsd_work.o \
+lapacke_dorgbr.o \
+lapacke_dorgbr_work.o \
+lapacke_dorghr.o \
+lapacke_dorghr_work.o \
+lapacke_dorglq.o \
+lapacke_dorglq_work.o \
+lapacke_dorgql.o \
+lapacke_dorgql_work.o \
+lapacke_dorgqr.o \
+lapacke_dorgqr_work.o \
+lapacke_dorgrq.o \
+lapacke_dorgrq_work.o \
+lapacke_dorgtr.o \
+lapacke_dorgtr_work.o \
+lapacke_dormbr.o \
+lapacke_dormbr_work.o \
+lapacke_dormhr.o \
+lapacke_dormhr_work.o \
+lapacke_dormlq.o \
+lapacke_dormlq_work.o \
+lapacke_dormql.o \
+lapacke_dormql_work.o \
+lapacke_dormqr.o \
+lapacke_dormqr_work.o \
+lapacke_dormrq.o \
+lapacke_dormrq_work.o \
+lapacke_dormrz.o \
+lapacke_dormrz_work.o \
+lapacke_dormtr.o \
+lapacke_dormtr_work.o \
+lapacke_dpbcon.o \
+lapacke_dpbcon_work.o \
+lapacke_dpbequ.o \
+lapacke_dpbequ_work.o \
+lapacke_dpbrfs.o \
+lapacke_dpbrfs_work.o \
+lapacke_dpbstf.o \
+lapacke_dpbstf_work.o \
+lapacke_dpbsv.o \
+lapacke_dpbsv_work.o \
+lapacke_dpbsvx.o \
+lapacke_dpbsvx_work.o \
+lapacke_dpbtrf.o \
+lapacke_dpbtrf_work.o \
+lapacke_dpbtrs.o \
+lapacke_dpbtrs_work.o \
+lapacke_dpftrf.o \
+lapacke_dpftrf_work.o \
+lapacke_dpftri.o \
+lapacke_dpftri_work.o \
+lapacke_dpftrs.o \
+lapacke_dpftrs_work.o \
+lapacke_dpocon.o \
+lapacke_dpocon_work.o \
+lapacke_dpoequ.o \
+lapacke_dpoequ_work.o \
+lapacke_dpoequb.o \
+lapacke_dpoequb_work.o \
+lapacke_dporfs.o \
+lapacke_dporfs_work.o \
+lapacke_dposv.o \
+lapacke_dposv_work.o \
+lapacke_dposvx.o \
+lapacke_dposvx_work.o \
+lapacke_dpotrf.o \
+lapacke_dpotrf_work.o \
+lapacke_dpotri.o \
+lapacke_dpotri_work.o \
+lapacke_dpotrs.o \
+lapacke_dpotrs_work.o \
+lapacke_dppcon.o \
+lapacke_dppcon_work.o \
+lapacke_dppequ.o \
+lapacke_dppequ_work.o \
+lapacke_dpprfs.o \
+lapacke_dpprfs_work.o \
+lapacke_dppsv.o \
+lapacke_dppsv_work.o \
+lapacke_dppsvx.o \
+lapacke_dppsvx_work.o \
+lapacke_dpptrf.o \
+lapacke_dpptrf_work.o \
+lapacke_dpptri.o \
+lapacke_dpptri_work.o \
+lapacke_dpptrs.o \
+lapacke_dpptrs_work.o \
+lapacke_dpstrf.o \
+lapacke_dpstrf_work.o \
+lapacke_dptcon.o \
+lapacke_dptcon_work.o \
+lapacke_dpteqr.o \
+lapacke_dpteqr_work.o \
+lapacke_dptrfs.o \
+lapacke_dptrfs_work.o \
+lapacke_dptsv.o \
+lapacke_dptsv_work.o \
+lapacke_dptsvx.o \
+lapacke_dptsvx_work.o \
+lapacke_dpttrf.o \
+lapacke_dpttrf_work.o \
+lapacke_dpttrs.o \
+lapacke_dpttrs_work.o \
+lapacke_dsbev.o \
+lapacke_dsbev_work.o \
+lapacke_dsbevd.o \
+lapacke_dsbevd_work.o \
+lapacke_dsbevx.o \
+lapacke_dsbevx_work.o \
+lapacke_dsbgst.o \
+lapacke_dsbgst_work.o \
+lapacke_dsbgv.o \
+lapacke_dsbgv_work.o \
+lapacke_dsbgvd.o \
+lapacke_dsbgvd_work.o \
+lapacke_dsbgvx.o \
+lapacke_dsbgvx_work.o \
+lapacke_dsbtrd.o \
+lapacke_dsbtrd_work.o \
+lapacke_dsfrk.o \
+lapacke_dsfrk_work.o \
+lapacke_dsgesv.o \
+lapacke_dsgesv_work.o \
+lapacke_dspcon.o \
+lapacke_dspcon_work.o \
+lapacke_dspev.o \
+lapacke_dspev_work.o \
+lapacke_dspevd.o \
+lapacke_dspevd_work.o \
+lapacke_dspevx.o \
+lapacke_dspevx_work.o \
+lapacke_dspgst.o \
+lapacke_dspgst_work.o \
+lapacke_dspgv.o \
+lapacke_dspgv_work.o \
+lapacke_dspgvd.o \
+lapacke_dspgvd_work.o \
+lapacke_dspgvx.o \
+lapacke_dspgvx_work.o \
+lapacke_dsposv.o \
+lapacke_dsposv_work.o \
+lapacke_dsprfs.o \
+lapacke_dsprfs_work.o \
+lapacke_dspsv.o \
+lapacke_dspsv_work.o \
+lapacke_dspsvx.o \
+lapacke_dspsvx_work.o \
+lapacke_dsptrd.o \
+lapacke_dsptrd_work.o \
+lapacke_dsptrf.o \
+lapacke_dsptrf_work.o \
+lapacke_dsptri.o \
+lapacke_dsptri_work.o \
+lapacke_dsptrs.o \
+lapacke_dsptrs_work.o \
+lapacke_dstebz.o \
+lapacke_dstebz_work.o \
+lapacke_dstedc.o \
+lapacke_dstedc_work.o \
+lapacke_dstegr.o \
+lapacke_dstegr_work.o \
+lapacke_dstein.o \
+lapacke_dstein_work.o \
+lapacke_dstemr.o \
+lapacke_dstemr_work.o \
+lapacke_dsteqr.o \
+lapacke_dsteqr_work.o \
+lapacke_dsterf.o \
+lapacke_dsterf_work.o \
+lapacke_dstev.o \
+lapacke_dstev_work.o \
+lapacke_dstevd.o \
+lapacke_dstevd_work.o \
+lapacke_dstevr.o \
+lapacke_dstevr_work.o \
+lapacke_dstevx.o \
+lapacke_dstevx_work.o \
+lapacke_dsycon.o \
+lapacke_dsycon_work.o \
+lapacke_dsyconv.o \
+lapacke_dsyconv_work.o \
+lapacke_dsyequb.o \
+lapacke_dsyequb_work.o \
+lapacke_dsyev.o \
+lapacke_dsyev_work.o \
+lapacke_dsyevd.o \
+lapacke_dsyevd_work.o \
+lapacke_dsyevr.o \
+lapacke_dsyevr_work.o \
+lapacke_dsyevx.o \
+lapacke_dsyevx_work.o \
+lapacke_dsygst.o \
+lapacke_dsygst_work.o \
+lapacke_dsygv.o \
+lapacke_dsygv_work.o \
+lapacke_dsygvd.o \
+lapacke_dsygvd_work.o \
+lapacke_dsygvx.o \
+lapacke_dsygvx_work.o \
+lapacke_dsyrfs.o \
+lapacke_dsyrfs_work.o \
+lapacke_dsysv.o \
+lapacke_dsysv_rook.o \
+lapacke_dsysv_rook_work.o \
+lapacke_dsysv_work.o \
+lapacke_dsysvx.o \
+lapacke_dsysvx_work.o \
+lapacke_dsyswapr.o \
+lapacke_dsyswapr_work.o \
+lapacke_dsytrd.o \
+lapacke_dsytrd_work.o \
+lapacke_dsytrf.o \
+lapacke_dsytrf_work.o \
+lapacke_dsytri.o \
+lapacke_dsytri2.o \
+lapacke_dsytri2_work.o \
+lapacke_dsytri2x.o \
+lapacke_dsytri2x_work.o \
+lapacke_dsytri_work.o \
+lapacke_dsytrs.o \
+lapacke_dsytrs2.o \
+lapacke_dsytrs2_work.o \
+lapacke_dsytrs_work.o \
+lapacke_dtbcon.o \
+lapacke_dtbcon_work.o \
+lapacke_dtbrfs.o \
+lapacke_dtbrfs_work.o \
+lapacke_dtbtrs.o \
+lapacke_dtbtrs_work.o \
+lapacke_dtfsm.o \
+lapacke_dtfsm_work.o \
+lapacke_dtftri.o \
+lapacke_dtftri_work.o \
+lapacke_dtfttp.o \
+lapacke_dtfttp_work.o \
+lapacke_dtfttr.o \
+lapacke_dtfttr_work.o \
+lapacke_dtgevc.o \
+lapacke_dtgevc_work.o \
+lapacke_dtgexc.o \
+lapacke_dtgexc_work.o \
+lapacke_dtgsen.o \
+lapacke_dtgsen_work.o \
+lapacke_dtgsja.o \
+lapacke_dtgsja_work.o \
+lapacke_dtgsna.o \
+lapacke_dtgsna_work.o \
+lapacke_dtgsyl.o \
+lapacke_dtgsyl_work.o \
+lapacke_dtpcon.o \
+lapacke_dtpcon_work.o \
+lapacke_dtpmqrt.o \
+lapacke_dtpmqrt_work.o \
+lapacke_dtpqrt.o \
+lapacke_dtpqrt2.o \
+lapacke_dtpqrt2_work.o \
+lapacke_dtpqrt_work.o \
+lapacke_dtprfb.o \
+lapacke_dtprfb_work.o \
+lapacke_dtprfs.o \
+lapacke_dtprfs_work.o \
+lapacke_dtptri.o \
+lapacke_dtptri_work.o \
+lapacke_dtptrs.o \
+lapacke_dtptrs_work.o \
+lapacke_dtpttf.o \
+lapacke_dtpttf_work.o \
+lapacke_dtpttr.o \
+lapacke_dtpttr_work.o \
+lapacke_dtrcon.o \
+lapacke_dtrcon_work.o \
+lapacke_dtrevc.o \
+lapacke_dtrevc_work.o \
+lapacke_dtrexc.o \
+lapacke_dtrexc_work.o \
+lapacke_dtrrfs.o \
+lapacke_dtrrfs_work.o \
+lapacke_dtrsen.o \
+lapacke_dtrsen_work.o \
+lapacke_dtrsna.o \
+lapacke_dtrsna_work.o \
+lapacke_dtrsyl.o \
+lapacke_dtrsyl_work.o \
+lapacke_dtrtri.o \
+lapacke_dtrtri_work.o \
+lapacke_dtrtrs.o \
+lapacke_dtrtrs_work.o \
+lapacke_dtrttf.o \
+lapacke_dtrttf_work.o \
+lapacke_dtrttp.o \
+lapacke_dtrttp_work.o \
+lapacke_dtzrzf.o \
+lapacke_dtzrzf_work.o \
+lapacke_sbbcsd.o \
+lapacke_sbbcsd_work.o \
+lapacke_sbdsdc.o \
+lapacke_sbdsdc_work.o \
+lapacke_sbdsqr.o \
+lapacke_sbdsqr_work.o \
+lapacke_sdisna.o \
+lapacke_sdisna_work.o \
+lapacke_sgbbrd.o \
+lapacke_sgbbrd_work.o \
+lapacke_sgbcon.o \
+lapacke_sgbcon_work.o \
+lapacke_sgbequ.o \
+lapacke_sgbequ_work.o \
+lapacke_sgbequb.o \
+lapacke_sgbequb_work.o \
+lapacke_sgbrfs.o \
+lapacke_sgbrfs_work.o \
+lapacke_sgbsv.o \
+lapacke_sgbsv_work.o \
+lapacke_sgbsvx.o \
+lapacke_sgbsvx_work.o \
+lapacke_sgbtrf.o \
+lapacke_sgbtrf_work.o \
+lapacke_sgbtrs.o \
+lapacke_sgbtrs_work.o \
+lapacke_sgebak.o \
+lapacke_sgebak_work.o \
+lapacke_sgebal.o \
+lapacke_sgebal_work.o \
+lapacke_sgebrd.o \
+lapacke_sgebrd_work.o \
+lapacke_sgecon.o \
+lapacke_sgecon_work.o \
+lapacke_sgeequ.o \
+lapacke_sgeequ_work.o \
+lapacke_sgeequb.o \
+lapacke_sgeequb_work.o \
+lapacke_sgees.o \
+lapacke_sgees_work.o \
+lapacke_sgeesx.o \
+lapacke_sgeesx_work.o \
+lapacke_sgeev.o \
+lapacke_sgeev_work.o \
+lapacke_sgeevx.o \
+lapacke_sgeevx_work.o \
+lapacke_sgehrd.o \
+lapacke_sgehrd_work.o \
+lapacke_sgejsv.o \
+lapacke_sgejsv_work.o \
+lapacke_sgelq2.o \
+lapacke_sgelq2_work.o \
+lapacke_sgelqf.o \
+lapacke_sgelqf_work.o \
+lapacke_sgels.o \
+lapacke_sgels_work.o \
+lapacke_sgelsd.o \
+lapacke_sgelsd_work.o \
+lapacke_sgelss.o \
+lapacke_sgelss_work.o \
+lapacke_sgelsy.o \
+lapacke_sgelsy_work.o \
+lapacke_sgemqrt.o \
+lapacke_sgemqrt_work.o \
+lapacke_sgeqlf.o \
+lapacke_sgeqlf_work.o \
+lapacke_sgeqp3.o \
+lapacke_sgeqp3_work.o \
+lapacke_sgeqpf.o \
+lapacke_sgeqpf_work.o \
+lapacke_sgeqr2.o \
+lapacke_sgeqr2_work.o \
+lapacke_sgeqrf.o \
+lapacke_sgeqrf_work.o \
+lapacke_sgeqrfp.o \
+lapacke_sgeqrfp_work.o \
+lapacke_sgeqrt.o \
+lapacke_sgeqrt2.o \
+lapacke_sgeqrt2_work.o \
+lapacke_sgeqrt3.o \
+lapacke_sgeqrt3_work.o \
+lapacke_sgeqrt_work.o \
+lapacke_sgerfs.o \
+lapacke_sgerfs_work.o \
+lapacke_sgerqf.o \
+lapacke_sgerqf_work.o \
+lapacke_sgesdd.o \
+lapacke_sgesdd_work.o \
+lapacke_sgesv.o \
+lapacke_sgesv_work.o \
+lapacke_sgesvd.o \
+lapacke_sgesvd_work.o \
+lapacke_sgesvj.o \
+lapacke_sgesvj_work.o \
+lapacke_sgesvx.o \
+lapacke_sgesvx_work.o \
+lapacke_sgetf2.o \
+lapacke_sgetf2_work.o \
+lapacke_sgetrf.o \
+lapacke_sgetrf_work.o \
+lapacke_sgetri.o \
+lapacke_sgetri_work.o \
+lapacke_sgetrs.o \
+lapacke_sgetrs_work.o \
+lapacke_sggbak.o \
+lapacke_sggbak_work.o \
+lapacke_sggbal.o \
+lapacke_sggbal_work.o \
+lapacke_sgges.o \
+lapacke_sgges_work.o \
+lapacke_sggesx.o \
+lapacke_sggesx_work.o \
+lapacke_sggev.o \
+lapacke_sggev_work.o \
+lapacke_sggevx.o \
+lapacke_sggevx_work.o \
+lapacke_sggglm.o \
+lapacke_sggglm_work.o \
+lapacke_sgghrd.o \
+lapacke_sgghrd_work.o \
+lapacke_sgglse.o \
+lapacke_sgglse_work.o \
+lapacke_sggqrf.o \
+lapacke_sggqrf_work.o \
+lapacke_sggrqf.o \
+lapacke_sggrqf_work.o \
+lapacke_sggsvd.o \
+lapacke_sggsvd_work.o \
+lapacke_sggsvp.o \
+lapacke_sggsvp_work.o \
+lapacke_sgtcon.o \
+lapacke_sgtcon_work.o \
+lapacke_sgtrfs.o \
+lapacke_sgtrfs_work.o \
+lapacke_sgtsv.o \
+lapacke_sgtsv_work.o \
+lapacke_sgtsvx.o \
+lapacke_sgtsvx_work.o \
+lapacke_sgttrf.o \
+lapacke_sgttrf_work.o \
+lapacke_sgttrs.o \
+lapacke_sgttrs_work.o \
+lapacke_shgeqz.o \
+lapacke_shgeqz_work.o \
+lapacke_shsein.o \
+lapacke_shsein_work.o \
+lapacke_shseqr.o \
+lapacke_shseqr_work.o \
+lapacke_slacn2.o \
+lapacke_slacn2_work.o \
+lapacke_slacpy.o \
+lapacke_slacpy_work.o \
+lapacke_slag2d.o \
+lapacke_slag2d_work.o \
+lapacke_slamch.o \
+lapacke_slamch_work.o \
+lapacke_slange.o \
+lapacke_slange_work.o \
+lapacke_slansy.o \
+lapacke_slansy_work.o \
+lapacke_slantr.o \
+lapacke_slantr_work.o \
+lapacke_slapmr.o \
+lapacke_slapmr_work.o \
+lapacke_slapy2.o \
+lapacke_slapy2_work.o \
+lapacke_slapy3.o \
+lapacke_slapy3_work.o \
+lapacke_slarfb.o \
+lapacke_slarfb_work.o \
+lapacke_slarfg.o \
+lapacke_slarfg_work.o \
+lapacke_slarft.o \
+lapacke_slarft_work.o \
+lapacke_slarfx.o \
+lapacke_slarfx_work.o \
+lapacke_slarnv.o \
+lapacke_slarnv_work.o \
+lapacke_slartgp.o \
+lapacke_slartgp_work.o \
+lapacke_slartgs.o \
+lapacke_slartgs_work.o \
+lapacke_slaset.o \
+lapacke_slaset_work.o \
+lapacke_slasrt.o \
+lapacke_slasrt_work.o \
+lapacke_slaswp.o \
+lapacke_slaswp_work.o \
+lapacke_slauum.o \
+lapacke_slauum_work.o \
+lapacke_sopgtr.o \
+lapacke_sopgtr_work.o \
+lapacke_sopmtr.o \
+lapacke_sopmtr_work.o \
+lapacke_sorbdb.o \
+lapacke_sorbdb_work.o \
+lapacke_sorcsd.o \
+lapacke_sorcsd_work.o \
+lapacke_sorgbr.o \
+lapacke_sorgbr_work.o \
+lapacke_sorghr.o \
+lapacke_sorghr_work.o \
+lapacke_sorglq.o \
+lapacke_sorglq_work.o \
+lapacke_sorgql.o \
+lapacke_sorgql_work.o \
+lapacke_sorgqr.o \
+lapacke_sorgqr_work.o \
+lapacke_sorgrq.o \
+lapacke_sorgrq_work.o \
+lapacke_sorgtr.o \
+lapacke_sorgtr_work.o \
+lapacke_sormbr.o \
+lapacke_sormbr_work.o \
+lapacke_sormhr.o \
+lapacke_sormhr_work.o \
+lapacke_sormlq.o \
+lapacke_sormlq_work.o \
+lapacke_sormql.o \
+lapacke_sormql_work.o \
+lapacke_sormqr.o \
+lapacke_sormqr_work.o \
+lapacke_sormrq.o \
+lapacke_sormrq_work.o \
+lapacke_sormrz.o \
+lapacke_sormrz_work.o \
+lapacke_sormtr.o \
+lapacke_sormtr_work.o \
+lapacke_spbcon.o \
+lapacke_spbcon_work.o \
+lapacke_spbequ.o \
+lapacke_spbequ_work.o \
+lapacke_spbrfs.o \
+lapacke_spbrfs_work.o \
+lapacke_spbstf.o \
+lapacke_spbstf_work.o \
+lapacke_spbsv.o \
+lapacke_spbsv_work.o \
+lapacke_spbsvx.o \
+lapacke_spbsvx_work.o \
+lapacke_spbtrf.o \
+lapacke_spbtrf_work.o \
+lapacke_spbtrs.o \
+lapacke_spbtrs_work.o \
+lapacke_spftrf.o \
+lapacke_spftrf_work.o \
+lapacke_spftri.o \
+lapacke_spftri_work.o \
+lapacke_spftrs.o \
+lapacke_spftrs_work.o \
+lapacke_spocon.o \
+lapacke_spocon_work.o \
+lapacke_spoequ.o \
+lapacke_spoequ_work.o \
+lapacke_spoequb.o \
+lapacke_spoequb_work.o \
+lapacke_sporfs.o \
+lapacke_sporfs_work.o \
+lapacke_sposv.o \
+lapacke_sposv_work.o \
+lapacke_sposvx.o \
+lapacke_sposvx_work.o \
+lapacke_spotrf.o \
+lapacke_spotrf_work.o \
+lapacke_spotri.o \
+lapacke_spotri_work.o \
+lapacke_spotrs.o \
+lapacke_spotrs_work.o \
+lapacke_sppcon.o \
+lapacke_sppcon_work.o \
+lapacke_sppequ.o \
+lapacke_sppequ_work.o \
+lapacke_spprfs.o \
+lapacke_spprfs_work.o \
+lapacke_sppsv.o \
+lapacke_sppsv_work.o \
+lapacke_sppsvx.o \
+lapacke_sppsvx_work.o \
+lapacke_spptrf.o \
+lapacke_spptrf_work.o \
+lapacke_spptri.o \
+lapacke_spptri_work.o \
+lapacke_spptrs.o \
+lapacke_spptrs_work.o \
+lapacke_spstrf.o \
+lapacke_spstrf_work.o \
+lapacke_sptcon.o \
+lapacke_sptcon_work.o \
+lapacke_spteqr.o \
+lapacke_spteqr_work.o \
+lapacke_sptrfs.o \
+lapacke_sptrfs_work.o \
+lapacke_sptsv.o \
+lapacke_sptsv_work.o \
+lapacke_sptsvx.o \
+lapacke_sptsvx_work.o \
+lapacke_spttrf.o \
+lapacke_spttrf_work.o \
+lapacke_spttrs.o \
+lapacke_spttrs_work.o \
+lapacke_ssbev.o \
+lapacke_ssbev_work.o \
+lapacke_ssbevd.o \
+lapacke_ssbevd_work.o \
+lapacke_ssbevx.o \
+lapacke_ssbevx_work.o \
+lapacke_ssbgst.o \
+lapacke_ssbgst_work.o \
+lapacke_ssbgv.o \
+lapacke_ssbgv_work.o \
+lapacke_ssbgvd.o \
+lapacke_ssbgvd_work.o \
+lapacke_ssbgvx.o \
+lapacke_ssbgvx_work.o \
+lapacke_ssbtrd.o \
+lapacke_ssbtrd_work.o \
+lapacke_ssfrk.o \
+lapacke_ssfrk_work.o \
+lapacke_sspcon.o \
+lapacke_sspcon_work.o \
+lapacke_sspev.o \
+lapacke_sspev_work.o \
+lapacke_sspevd.o \
+lapacke_sspevd_work.o \
+lapacke_sspevx.o \
+lapacke_sspevx_work.o \
+lapacke_sspgst.o \
+lapacke_sspgst_work.o \
+lapacke_sspgv.o \
+lapacke_sspgv_work.o \
+lapacke_sspgvd.o \
+lapacke_sspgvd_work.o \
+lapacke_sspgvx.o \
+lapacke_sspgvx_work.o \
+lapacke_ssprfs.o \
+lapacke_ssprfs_work.o \
+lapacke_sspsv.o \
+lapacke_sspsv_work.o \
+lapacke_sspsvx.o \
+lapacke_sspsvx_work.o \
+lapacke_ssptrd.o \
+lapacke_ssptrd_work.o \
+lapacke_ssptrf.o \
+lapacke_ssptrf_work.o \
+lapacke_ssptri.o \
+lapacke_ssptri_work.o \
+lapacke_ssptrs.o \
+lapacke_ssptrs_work.o \
+lapacke_sstebz.o \
+lapacke_sstebz_work.o \
+lapacke_sstedc.o \
+lapacke_sstedc_work.o \
+lapacke_sstegr.o \
+lapacke_sstegr_work.o \
+lapacke_sstein.o \
+lapacke_sstein_work.o \
+lapacke_sstemr.o \
+lapacke_sstemr_work.o \
+lapacke_ssteqr.o \
+lapacke_ssteqr_work.o \
+lapacke_ssterf.o \
+lapacke_ssterf_work.o \
+lapacke_sstev.o \
+lapacke_sstev_work.o \
+lapacke_sstevd.o \
+lapacke_sstevd_work.o \
+lapacke_sstevr.o \
+lapacke_sstevr_work.o \
+lapacke_sstevx.o \
+lapacke_sstevx_work.o \
+lapacke_ssycon.o \
+lapacke_ssycon_work.o \
+lapacke_ssyconv.o \
+lapacke_ssyconv_work.o \
+lapacke_ssyequb.o \
+lapacke_ssyequb_work.o \
+lapacke_ssyev.o \
+lapacke_ssyev_work.o \
+lapacke_ssyevd.o \
+lapacke_ssyevd_work.o \
+lapacke_ssyevr.o \
+lapacke_ssyevr_work.o \
+lapacke_ssyevx.o \
+lapacke_ssyevx_work.o \
+lapacke_ssygst.o \
+lapacke_ssygst_work.o \
+lapacke_ssygv.o \
+lapacke_ssygv_work.o \
+lapacke_ssygvd.o \
+lapacke_ssygvd_work.o \
+lapacke_ssygvx.o \
+lapacke_ssygvx_work.o \
+lapacke_ssyrfs.o \
+lapacke_ssyrfs_work.o \
+lapacke_ssysv.o \
+lapacke_ssysv_rook.o \
+lapacke_ssysv_rook_work.o \
+lapacke_ssysv_work.o \
+lapacke_ssysvx.o \
+lapacke_ssysvx_work.o \
+lapacke_ssyswapr.o \
+lapacke_ssyswapr_work.o \
+lapacke_ssytrd.o \
+lapacke_ssytrd_work.o \
+lapacke_ssytrf.o \
+lapacke_ssytrf_work.o \
+lapacke_ssytri.o \
+lapacke_ssytri2.o \
+lapacke_ssytri2_work.o \
+lapacke_ssytri2x.o \
+lapacke_ssytri2x_work.o \
+lapacke_ssytri_work.o \
+lapacke_ssytrs.o \
+lapacke_ssytrs2.o \
+lapacke_ssytrs2_work.o \
+lapacke_ssytrs_work.o \
+lapacke_stbcon.o \
+lapacke_stbcon_work.o \
+lapacke_stbrfs.o \
+lapacke_stbrfs_work.o \
+lapacke_stbtrs.o \
+lapacke_stbtrs_work.o \
+lapacke_stfsm.o \
+lapacke_stfsm_work.o \
+lapacke_stftri.o \
+lapacke_stftri_work.o \
+lapacke_stfttp.o \
+lapacke_stfttp_work.o \
+lapacke_stfttr.o \
+lapacke_stfttr_work.o \
+lapacke_stgevc.o \
+lapacke_stgevc_work.o \
+lapacke_stgexc.o \
+lapacke_stgexc_work.o \
+lapacke_stgsen.o \
+lapacke_stgsen_work.o \
+lapacke_stgsja.o \
+lapacke_stgsja_work.o \
+lapacke_stgsna.o \
+lapacke_stgsna_work.o \
+lapacke_stgsyl.o \
+lapacke_stgsyl_work.o \
+lapacke_stpcon.o \
+lapacke_stpcon_work.o \
+lapacke_stpmqrt.o \
+lapacke_stpmqrt_work.o \
+lapacke_stpqrt.o \
+lapacke_stpqrt_work.o \
+lapacke_stpqrt2.o \
+lapacke_stpqrt2_work.o \
+lapacke_stprfb.o \
+lapacke_stprfb_work.o \
+lapacke_stprfs.o \
+lapacke_stprfs_work.o \
+lapacke_stptri.o \
+lapacke_stptri_work.o \
+lapacke_stptrs.o \
+lapacke_stptrs_work.o \
+lapacke_stpttf.o \
+lapacke_stpttf_work.o \
+lapacke_stpttr.o \
+lapacke_stpttr_work.o \
+lapacke_strcon.o \
+lapacke_strcon_work.o \
+lapacke_strevc.o \
+lapacke_strevc_work.o \
+lapacke_strexc.o \
+lapacke_strexc_work.o \
+lapacke_strrfs.o \
+lapacke_strrfs_work.o \
+lapacke_strsen.o \
+lapacke_strsen_work.o \
+lapacke_strsna.o \
+lapacke_strsna_work.o \
+lapacke_strsyl.o \
+lapacke_strsyl_work.o \
+lapacke_strtri.o \
+lapacke_strtri_work.o \
+lapacke_strtrs.o \
+lapacke_strtrs_work.o \
+lapacke_strttf.o \
+lapacke_strttf_work.o \
+lapacke_strttp.o \
+lapacke_strttp_work.o \
+lapacke_stzrzf.o \
+lapacke_stzrzf_work.o \
+lapacke_zbbcsd.o \
+lapacke_zbbcsd_work.o \
+lapacke_zbdsqr.o \
+lapacke_zbdsqr_work.o \
+lapacke_zcgesv.o \
+lapacke_zcgesv_work.o \
+lapacke_zcposv.o \
+lapacke_zcposv_work.o \
+lapacke_zgbbrd.o \
+lapacke_zgbbrd_work.o \
+lapacke_zgbcon.o \
+lapacke_zgbcon_work.o \
+lapacke_zgbequ.o \
+lapacke_zgbequ_work.o \
+lapacke_zgbequb.o \
+lapacke_zgbequb_work.o \
+lapacke_zgbrfs.o \
+lapacke_zgbrfs_work.o \
+lapacke_zgbsv.o \
+lapacke_zgbsv_work.o \
+lapacke_zgbsvx.o \
+lapacke_zgbsvx_work.o \
+lapacke_zgbtrf.o \
+lapacke_zgbtrf_work.o \
+lapacke_zgbtrs.o \
+lapacke_zgbtrs_work.o \
+lapacke_zgebak.o \
+lapacke_zgebak_work.o \
+lapacke_zgebal.o \
+lapacke_zgebal_work.o \
+lapacke_zgebrd.o \
+lapacke_zgebrd_work.o \
+lapacke_zgecon.o \
+lapacke_zgecon_work.o \
+lapacke_zgeequ.o \
+lapacke_zgeequ_work.o \
+lapacke_zgeequb.o \
+lapacke_zgeequb_work.o \
+lapacke_zgees.o \
+lapacke_zgees_work.o \
+lapacke_zgeesx.o \
+lapacke_zgeesx_work.o \
+lapacke_zgeev.o \
+lapacke_zgeev_work.o \
+lapacke_zgeevx.o \
+lapacke_zgeevx_work.o \
+lapacke_zgehrd.o \
+lapacke_zgehrd_work.o \
+lapacke_zgelq2.o \
+lapacke_zgelq2_work.o \
+lapacke_zgelqf.o \
+lapacke_zgelqf_work.o \
+lapacke_zgels.o \
+lapacke_zgels_work.o \
+lapacke_zgelsd.o \
+lapacke_zgelsd_work.o \
+lapacke_zgelss.o \
+lapacke_zgelss_work.o \
+lapacke_zgelsy.o \
+lapacke_zgelsy_work.o \
+lapacke_zgemqrt.o \
+lapacke_zgemqrt_work.o \
+lapacke_zgeqlf.o \
+lapacke_zgeqlf_work.o \
+lapacke_zgeqp3.o \
+lapacke_zgeqp3_work.o \
+lapacke_zgeqpf.o \
+lapacke_zgeqpf_work.o \
+lapacke_zgeqr2.o \
+lapacke_zgeqr2_work.o \
+lapacke_zgeqrf.o \
+lapacke_zgeqrf_work.o \
+lapacke_zgeqrfp.o \
+lapacke_zgeqrfp_work.o \
+lapacke_zgeqrt.o \
+lapacke_zgeqrt2.o \
+lapacke_zgeqrt2_work.o \
+lapacke_zgeqrt3.o \
+lapacke_zgeqrt3_work.o \
+lapacke_zgeqrt_work.o \
+lapacke_zgerfs.o \
+lapacke_zgerfs_work.o \
+lapacke_zgerqf.o \
+lapacke_zgerqf_work.o \
+lapacke_zgesdd.o \
+lapacke_zgesdd_work.o \
+lapacke_zgesv.o \
+lapacke_zgesv_work.o \
+lapacke_zgesvd.o \
+lapacke_zgesvd_work.o \
+lapacke_zgesvx.o \
+lapacke_zgesvx_work.o \
+lapacke_zgetf2.o \
+lapacke_zgetf2_work.o \
+lapacke_zgetrf.o \
+lapacke_zgetrf_work.o \
+lapacke_zgetri.o \
+lapacke_zgetri_work.o \
+lapacke_zgetrs.o \
+lapacke_zgetrs_work.o \
+lapacke_zggbak.o \
+lapacke_zggbak_work.o \
+lapacke_zggbal.o \
+lapacke_zggbal_work.o \
+lapacke_zgges.o \
+lapacke_zgges_work.o \
+lapacke_zggesx.o \
+lapacke_zggesx_work.o \
+lapacke_zggev.o \
+lapacke_zggev_work.o \
+lapacke_zggevx.o \
+lapacke_zggevx_work.o \
+lapacke_zggglm.o \
+lapacke_zggglm_work.o \
+lapacke_zgghrd.o \
+lapacke_zgghrd_work.o \
+lapacke_zgglse.o \
+lapacke_zgglse_work.o \
+lapacke_zggqrf.o \
+lapacke_zggqrf_work.o \
+lapacke_zggrqf.o \
+lapacke_zggrqf_work.o \
+lapacke_zggsvd.o \
+lapacke_zggsvd_work.o \
+lapacke_zggsvp.o \
+lapacke_zggsvp_work.o \
+lapacke_zgtcon.o \
+lapacke_zgtcon_work.o \
+lapacke_zgtrfs.o \
+lapacke_zgtrfs_work.o \
+lapacke_zgtsv.o \
+lapacke_zgtsv_work.o \
+lapacke_zgtsvx.o \
+lapacke_zgtsvx_work.o \
+lapacke_zgttrf.o \
+lapacke_zgttrf_work.o \
+lapacke_zgttrs.o \
+lapacke_zgttrs_work.o \
+lapacke_zhbev.o \
+lapacke_zhbev_work.o \
+lapacke_zhbevd.o \
+lapacke_zhbevd_work.o \
+lapacke_zhbevx.o \
+lapacke_zhbevx_work.o \
+lapacke_zhbgst.o \
+lapacke_zhbgst_work.o \
+lapacke_zhbgv.o \
+lapacke_zhbgv_work.o \
+lapacke_zhbgvd.o \
+lapacke_zhbgvd_work.o \
+lapacke_zhbgvx.o \
+lapacke_zhbgvx_work.o \
+lapacke_zhbtrd.o \
+lapacke_zhbtrd_work.o \
+lapacke_zhecon.o \
+lapacke_zhecon_work.o \
+lapacke_zheequb.o \
+lapacke_zheequb_work.o \
+lapacke_zheev.o \
+lapacke_zheev_work.o \
+lapacke_zheevd.o \
+lapacke_zheevd_work.o \
+lapacke_zheevr.o \
+lapacke_zheevr_work.o \
+lapacke_zheevx.o \
+lapacke_zheevx_work.o \
+lapacke_zhegst.o \
+lapacke_zhegst_work.o \
+lapacke_zhegv.o \
+lapacke_zhegv_work.o \
+lapacke_zhegvd.o \
+lapacke_zhegvd_work.o \
+lapacke_zhegvx.o \
+lapacke_zhegvx_work.o \
+lapacke_zherfs.o \
+lapacke_zherfs_work.o \
+lapacke_zhesv.o \
+lapacke_zhesv_work.o \
+lapacke_zhesvx.o \
+lapacke_zhesvx_work.o \
+lapacke_zheswapr.o \
+lapacke_zheswapr_work.o \
+lapacke_zhetrd.o \
+lapacke_zhetrd_work.o \
+lapacke_zhetrf.o \
+lapacke_zhetrf_work.o \
+lapacke_zhetri.o \
+lapacke_zhetri2.o \
+lapacke_zhetri2_work.o \
+lapacke_zhetri2x.o \
+lapacke_zhetri2x_work.o \
+lapacke_zhetri_work.o \
+lapacke_zhetrs.o \
+lapacke_zhetrs2.o \
+lapacke_zhetrs2_work.o \
+lapacke_zhetrs_work.o \
+lapacke_zhfrk.o \
+lapacke_zhfrk_work.o \
+lapacke_zhgeqz.o \
+lapacke_zhgeqz_work.o \
+lapacke_zhpcon.o \
+lapacke_zhpcon_work.o \
+lapacke_zhpev.o \
+lapacke_zhpev_work.o \
+lapacke_zhpevd.o \
+lapacke_zhpevd_work.o \
+lapacke_zhpevx.o \
+lapacke_zhpevx_work.o \
+lapacke_zhpgst.o \
+lapacke_zhpgst_work.o \
+lapacke_zhpgv.o \
+lapacke_zhpgv_work.o \
+lapacke_zhpgvd.o \
+lapacke_zhpgvd_work.o \
+lapacke_zhpgvx.o \
+lapacke_zhpgvx_work.o \
+lapacke_zhprfs.o \
+lapacke_zhprfs_work.o \
+lapacke_zhpsv.o \
+lapacke_zhpsv_work.o \
+lapacke_zhpsvx.o \
+lapacke_zhpsvx_work.o \
+lapacke_zhptrd.o \
+lapacke_zhptrd_work.o \
+lapacke_zhptrf.o \
+lapacke_zhptrf_work.o \
+lapacke_zhptri.o \
+lapacke_zhptri_work.o \
+lapacke_zhptrs.o \
+lapacke_zhptrs_work.o \
+lapacke_zhsein.o \
+lapacke_zhsein_work.o \
+lapacke_zhseqr.o \
+lapacke_zhseqr_work.o \
+lapacke_zlacgv.o \
+lapacke_zlacgv_work.o \
+lapacke_zlacn2.o \
+lapacke_zlacn2_work.o \
+lapacke_zlacp2.o \
+lapacke_zlacp2_work.o \
+lapacke_zlacpy.o \
+lapacke_zlacpy_work.o \
+lapacke_zlag2c.o \
+lapacke_zlag2c_work.o \
+lapacke_zlange.o \
+lapacke_zlange_work.o \
+lapacke_zlanhe.o \
+lapacke_zlanhe_work.o \
+lapacke_zlansy.o \
+lapacke_zlansy_work.o \
+lapacke_zlantr.o \
+lapacke_zlantr_work.o \
+lapacke_zlapmr.o \
+lapacke_zlapmr_work.o \
+lapacke_zlarfb.o \
+lapacke_zlarfb_work.o \
+lapacke_zlarfg.o \
+lapacke_zlarfg_work.o \
+lapacke_zlarft.o \
+lapacke_zlarft_work.o \
+lapacke_zlarfx.o \
+lapacke_zlarfx_work.o \
+lapacke_zlarnv.o \
+lapacke_zlarnv_work.o \
+lapacke_zlaset.o \
+lapacke_zlaset_work.o \
+lapacke_zlaswp.o \
+lapacke_zlaswp_work.o \
+lapacke_zlauum.o \
+lapacke_zlauum_work.o \
+lapacke_zpbcon.o \
+lapacke_zpbcon_work.o \
+lapacke_zpbequ.o \
+lapacke_zpbequ_work.o \
+lapacke_zpbrfs.o \
+lapacke_zpbrfs_work.o \
+lapacke_zpbstf.o \
+lapacke_zpbstf_work.o \
+lapacke_zpbsv.o \
+lapacke_zpbsv_work.o \
+lapacke_zpbsvx.o \
+lapacke_zpbsvx_work.o \
+lapacke_zpbtrf.o \
+lapacke_zpbtrf_work.o \
+lapacke_zpbtrs.o \
+lapacke_zpbtrs_work.o \
+lapacke_zpftrf.o \
+lapacke_zpftrf_work.o \
+lapacke_zpftri.o \
+lapacke_zpftri_work.o \
+lapacke_zpftrs.o \
+lapacke_zpftrs_work.o \
+lapacke_zpocon.o \
+lapacke_zpocon_work.o \
+lapacke_zpoequ.o \
+lapacke_zpoequ_work.o \
+lapacke_zpoequb.o \
+lapacke_zpoequb_work.o \
+lapacke_zporfs.o \
+lapacke_zporfs_work.o \
+lapacke_zposv.o \
+lapacke_zposv_work.o \
+lapacke_zposvx.o \
+lapacke_zposvx_work.o \
+lapacke_zpotrf.o \
+lapacke_zpotrf_work.o \
+lapacke_zpotri.o \
+lapacke_zpotri_work.o \
+lapacke_zpotrs.o \
+lapacke_zpotrs_work.o \
+lapacke_zppcon.o \
+lapacke_zppcon_work.o \
+lapacke_zppequ.o \
+lapacke_zppequ_work.o \
+lapacke_zpprfs.o \
+lapacke_zpprfs_work.o \
+lapacke_zppsv.o \
+lapacke_zppsv_work.o \
+lapacke_zppsvx.o \
+lapacke_zppsvx_work.o \
+lapacke_zpptrf.o \
+lapacke_zpptrf_work.o \
+lapacke_zpptri.o \
+lapacke_zpptri_work.o \
+lapacke_zpptrs.o \
+lapacke_zpptrs_work.o \
+lapacke_zpstrf.o \
+lapacke_zpstrf_work.o \
+lapacke_zptcon.o \
+lapacke_zptcon_work.o \
+lapacke_zpteqr.o \
+lapacke_zpteqr_work.o \
+lapacke_zptrfs.o \
+lapacke_zptrfs_work.o \
+lapacke_zptsv.o \
+lapacke_zptsv_work.o \
+lapacke_zptsvx.o \
+lapacke_zptsvx_work.o \
+lapacke_zpttrf.o \
+lapacke_zpttrf_work.o \
+lapacke_zpttrs.o \
+lapacke_zpttrs_work.o \
+lapacke_zspcon.o \
+lapacke_zspcon_work.o \
+lapacke_zsprfs.o \
+lapacke_zsprfs_work.o \
+lapacke_zspsv.o \
+lapacke_zspsv_work.o \
+lapacke_zspsvx.o \
+lapacke_zspsvx_work.o \
+lapacke_zsptrf.o \
+lapacke_zsptrf_work.o \
+lapacke_zsptri.o \
+lapacke_zsptri_work.o \
+lapacke_zsptrs.o \
+lapacke_zsptrs_work.o \
+lapacke_zstedc.o \
+lapacke_zstedc_work.o \
+lapacke_zstegr.o \
+lapacke_zstegr_work.o \
+lapacke_zstein.o \
+lapacke_zstein_work.o \
+lapacke_zstemr.o \
+lapacke_zstemr_work.o \
+lapacke_zsteqr.o \
+lapacke_zsteqr_work.o \
+lapacke_zsycon.o \
+lapacke_zsycon_work.o \
+lapacke_zsyconv.o \
+lapacke_zsyconv_work.o \
+lapacke_zsyequb.o \
+lapacke_zsyequb_work.o \
+lapacke_zsyrfs.o \
+lapacke_zsyrfs_work.o \
+lapacke_zsysv.o \
+lapacke_zsysv_rook.o \
+lapacke_zsysv_rook_work.o \
+lapacke_zsysv_work.o \
+lapacke_zsysvx.o \
+lapacke_zsysvx_work.o \
+lapacke_zsyswapr.o \
+lapacke_zsyswapr_work.o \
+lapacke_zsytrf.o \
+lapacke_zsytrf_work.o \
+lapacke_zsytri.o \
+lapacke_zsytri2.o \
+lapacke_zsytri2_work.o \
+lapacke_zsytri2x.o \
+lapacke_zsytri2x_work.o \
+lapacke_zsytri_work.o \
+lapacke_zsytrs.o \
+lapacke_zsytrs2.o \
+lapacke_zsytrs2_work.o \
+lapacke_zsytrs_work.o \
+lapacke_ztbcon.o \
+lapacke_ztbcon_work.o \
+lapacke_ztbrfs.o \
+lapacke_ztbrfs_work.o \
+lapacke_ztbtrs.o \
+lapacke_ztbtrs_work.o \
+lapacke_ztfsm.o \
+lapacke_ztfsm_work.o \
+lapacke_ztftri.o \
+lapacke_ztftri_work.o \
+lapacke_ztfttp.o \
+lapacke_ztfttp_work.o \
+lapacke_ztfttr.o \
+lapacke_ztfttr_work.o \
+lapacke_ztgevc.o \
+lapacke_ztgevc_work.o \
+lapacke_ztgexc.o \
+lapacke_ztgexc_work.o \
+lapacke_ztgsen.o \
+lapacke_ztgsen_work.o \
+lapacke_ztgsja.o \
+lapacke_ztgsja_work.o \
+lapacke_ztgsna.o \
+lapacke_ztgsna_work.o \
+lapacke_ztgsyl.o \
+lapacke_ztgsyl_work.o \
+lapacke_ztpcon.o \
+lapacke_ztpcon_work.o \
+lapacke_ztpmqrt.o \
+lapacke_ztpmqrt_work.o \
+lapacke_ztpqrt.o \
+lapacke_ztpqrt2.o \
+lapacke_ztpqrt2_work.o \
+lapacke_ztpqrt_work.o \
+lapacke_ztprfb.o \
+lapacke_ztprfb_work.o \
+lapacke_ztprfs.o \
+lapacke_ztprfs_work.o \
+lapacke_ztptri.o \
+lapacke_ztptri_work.o \
+lapacke_ztptrs.o \
+lapacke_ztptrs_work.o \
+lapacke_ztpttf.o \
+lapacke_ztpttf_work.o \
+lapacke_ztpttr.o \
+lapacke_ztpttr_work.o \
+lapacke_ztrcon.o \
+lapacke_ztrcon_work.o \
+lapacke_ztrevc.o \
+lapacke_ztrevc_work.o \
+lapacke_ztrexc.o \
+lapacke_ztrexc_work.o \
+lapacke_ztrrfs.o \
+lapacke_ztrrfs_work.o \
+lapacke_ztrsen.o \
+lapacke_ztrsen_work.o \
+lapacke_ztrsna.o \
+lapacke_ztrsna_work.o \
+lapacke_ztrsyl.o \
+lapacke_ztrsyl_work.o \
+lapacke_ztrtri.o \
+lapacke_ztrtri_work.o \
+lapacke_ztrtrs.o \
+lapacke_ztrtrs_work.o \
+lapacke_ztrttf.o \
+lapacke_ztrttf_work.o \
+lapacke_ztrttp.o \
+lapacke_ztrttp_work.o \
+lapacke_ztzrzf.o \
+lapacke_ztzrzf_work.o \
+lapacke_zunbdb.o \
+lapacke_zunbdb_work.o \
+lapacke_zuncsd.o \
+lapacke_zuncsd_work.o \
+lapacke_zungbr.o \
+lapacke_zungbr_work.o \
+lapacke_zunghr.o \
+lapacke_zunghr_work.o \
+lapacke_zunglq.o \
+lapacke_zunglq_work.o \
+lapacke_zungql.o \
+lapacke_zungql_work.o \
+lapacke_zungqr.o \
+lapacke_zungqr_work.o \
+lapacke_zungrq.o \
+lapacke_zungrq_work.o \
+lapacke_zungtr.o \
+lapacke_zungtr_work.o \
+lapacke_zunmbr.o \
+lapacke_zunmbr_work.o \
+lapacke_zunmhr.o \
+lapacke_zunmhr_work.o \
+lapacke_zunmlq.o \
+lapacke_zunmlq_work.o \
+lapacke_zunmql.o \
+lapacke_zunmql_work.o \
+lapacke_zunmqr.o \
+lapacke_zunmqr_work.o \
+lapacke_zunmrq.o \
+lapacke_zunmrq_work.o \
+lapacke_zunmrz.o \
+lapacke_zunmrz_work.o \
+lapacke_zunmtr.o \
+lapacke_zunmtr_work.o \
+lapacke_zupgtr.o \
+lapacke_zupgtr_work.o \
+lapacke_zupmtr.o \
+lapacke_zupmtr_work.o \
+lapacke_zsyr.o \
+lapacke_csyr.o \
+lapacke_zsyr_work.o \
+lapacke_csyr_work.o \
+lapacke_ilaver.o
+
+SRCX_OBJ = \
+lapacke_cgbrfsx.o lapacke_cporfsx.o lapacke_dgerfsx.o lapacke_sgbrfsx.o lapacke_ssyrfsx.o lapacke_zherfsx.o \
+lapacke_cgbrfsx_work.o lapacke_cporfsx_work.o lapacke_dgerfsx_work.o lapacke_sgbrfsx_work.o lapacke_ssyrfsx_work.o lapacke_zherfsx_work.o \
+lapacke_cgerfsx.o lapacke_csyrfsx.o lapacke_dporfsx.o lapacke_sgerfsx.o lapacke_zgbrfsx.o lapacke_zporfsx.o \
+lapacke_cgerfsx_work.o lapacke_csyrfsx_work.o lapacke_dporfsx_work.o lapacke_sgerfsx_work.o lapacke_zgbrfsx_work.o lapacke_zporfsx_work.o \
+lapacke_cherfsx.o lapacke_dgbrfsx.o lapacke_dsyrfsx.o lapacke_sporfsx.o lapacke_zgerfsx.o lapacke_zsyrfsx.o \
+lapacke_cherfsx_work.o lapacke_dgbrfsx_work.o lapacke_dsyrfsx_work.o lapacke_sporfsx_work.o lapacke_zgerfsx_work.o lapacke_zsyrfsx_work.o \
+lapacke_cgbsvxx.o lapacke_cposvxx.o lapacke_dgesvxx.o lapacke_sgbsvxx.o lapacke_ssysvxx.o lapacke_zhesvxx.o \
+lapacke_cgbsvxx_work.o lapacke_cposvxx_work.o lapacke_dgesvxx_work.o lapacke_sgbsvxx_work.o lapacke_ssysvxx_work.o lapacke_zhesvxx_work.o \
+lapacke_cgesvxx.o lapacke_csysvxx.o lapacke_dposvxx.o lapacke_sgesvxx.o lapacke_zgbsvxx.o lapacke_zposvxx.o \
+lapacke_cgesvxx_work.o lapacke_csysvxx_work.o lapacke_dposvxx_work.o lapacke_sgesvxx_work.o lapacke_zgbsvxx_work.o lapacke_zposvxx_work.o \
+lapacke_chesvxx.o lapacke_dgbsvxx.o lapacke_dsysvxx.o lapacke_sposvxx.o lapacke_zgesvxx.o lapacke_zsysvxx.o \
+lapacke_chesvxx_work.o lapacke_dgbsvxx_work.o lapacke_dsysvxx_work.o lapacke_sposvxx_work.o lapacke_zgesvxx_work.o lapacke_zsysvxx_work.o
+
+
+# FILE PARTS OF TMGLIB
+MATGEN_OBJ = \
+lapacke_clatms.o \
+lapacke_clatms_work.o \
+lapacke_dlatms.o \
+lapacke_dlatms_work.o \
+lapacke_slatms.o \
+lapacke_slatms_work.o \
+lapacke_zlatms.o \
+lapacke_zlatms_work.o \
+lapacke_clagge.o \
+lapacke_clagge_work.o \
+lapacke_dlagge.o \
+lapacke_dlagge_work.o \
+lapacke_slagge.o \
+lapacke_slagge_work.o \
+lapacke_zlagge.o \
+lapacke_zlagge_work.o \
+lapacke_claghe.o \
+lapacke_claghe_work.o \
+lapacke_zlaghe.o \
+lapacke_zlaghe_work.o \
+lapacke_clagsy.o \
+lapacke_clagsy_work.o \
+lapacke_dlagsy.o \
+lapacke_dlagsy_work.o \
+lapacke_slagsy.o \
+lapacke_slagsy_work.o \
+lapacke_zlagsy.o \
+lapacke_zlagsy_work.o
+
+ALLOBJ = $(SRC_OBJ) $(MATGEN_OBJ)
+
+ifdef USEXBLAS
+ALLXOBJ = $(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC)
+endif
+
+
+OBJ_FILES := $(C_FILES:.o=.o)
+
+all: ../../$(LAPACKELIB)
+
+../../$(LAPACKELIB): $(ALLOBJ) $(ALLXOBJ)
+ $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(ALLOBJ) $(ALLXOBJ)
+ $(RANLIB) ../../$(LAPACKELIB)
+
+.c.o:
+ $(CC) -c $(CFLAGS) -I ../include -o $@ $<
+
+clean:
+ rm -f *.o
diff --git a/LAPACKE/src/lapacke_cbbcsd.c b/LAPACKE/src/lapacke_cbbcsd.c
new file mode 100644
index 00000000..1b077663
--- /dev/null
+++ b/LAPACKE/src/lapacke_cbbcsd.c
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cbbcsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cbbcsd( int matrix_layout, char jobu1, char jobu2,
+ char jobv1t, char jobv2t, char trans, lapack_int m,
+ lapack_int p, lapack_int q, float* theta, float* phi,
+ lapack_complex_float* u1, lapack_int ldu1,
+ lapack_complex_float* u2, lapack_int ldu2,
+ lapack_complex_float* v1t, lapack_int ldv1t,
+ lapack_complex_float* v2t, lapack_int ldv2t,
+ float* b11d, float* b11e, float* b12d, float* b12e,
+ float* b21d, float* b21e, float* b22d, float* b22e )
+{
+ lapack_int info = 0;
+ lapack_int lrwork = -1;
+ float* rwork = NULL;
+ float rwork_query;
+ lapack_int nrows_u1, nrows_u2, nrows_v1t, nrows_v2t;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cbbcsd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
+ nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
+ nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
+ nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
+ if( LAPACKE_s_nancheck( q-1, phi, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_s_nancheck( q, theta, 1 ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_u1, p, u1, ldu1 ) ) {
+ return -12;
+ }
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_u2, m-p, u2, ldu2 ) ) {
+ return -14;
+ }
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_v1t, q, v1t, ldv1t ) ) {
+ return -16;
+ }
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_v2t, m-q, v2t, ldv2t ) ) {
+ return -18;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cbbcsd_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 );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lrwork = (lapack_int)rwork_query;
+ /* Allocate memory for work arrays */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cbbcsd_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 );
+ /* Release memory and exit */
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cbbcsd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cbbcsd_work.c b/LAPACKE/src/lapacke_cbbcsd_work.c
new file mode 100644
index 00000000..98f3d1b8
--- /dev/null
+++ b/LAPACKE/src/lapacke_cbbcsd_work.c
@@ -0,0 +1,205 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cbbcsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cbbcsd_work( int matrix_layout, char jobu1, char jobu2,
+ char jobv1t, char jobv2t, char trans,
+ lapack_int m, lapack_int p, lapack_int q,
+ float* theta, float* phi,
+ lapack_complex_float* u1, lapack_int ldu1,
+ lapack_complex_float* u2, lapack_int ldu2,
+ lapack_complex_float* v1t, lapack_int ldv1t,
+ lapack_complex_float* v2t, lapack_int ldv2t,
+ float* b11d, float* b11e, float* b12d,
+ float* b12e, float* b21d, float* b21e,
+ float* b22d, float* b22e, float* rwork,
+ lapack_int lrwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cbbcsd( &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, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
+ lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
+ lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
+ lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
+ lapack_int ldu1_t = MAX(1,nrows_u1);
+ lapack_int ldu2_t = MAX(1,nrows_u2);
+ lapack_int ldv1t_t = MAX(1,nrows_v1t);
+ lapack_int ldv2t_t = MAX(1,nrows_v2t);
+ lapack_complex_float* u1_t = NULL;
+ lapack_complex_float* u2_t = NULL;
+ lapack_complex_float* v1t_t = NULL;
+ lapack_complex_float* v2t_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldu1 < p ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info );
+ return info;
+ }
+ if( ldu2 < m-p ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info );
+ return info;
+ }
+ if( ldv1t < q ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info );
+ return info;
+ }
+ if( ldv2t < m-q ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lrwork == -1 ) {
+ LAPACK_cbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
+ theta, phi, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t,
+ v2t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d, b21e,
+ b22d, b22e, rwork, &lrwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ u1_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldu1_t * MAX(1,p) );
+ if( u1_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ u2_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldu2_t * MAX(1,m-p) );
+ if( u2_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ v1t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldv1t_t * MAX(1,q) );
+ if( v1t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ v2t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldv2t_t * MAX(1,m-q) );
+ if( v2t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_cge_trans( matrix_layout, nrows_u1, p, u1, ldu1, u1_t,
+ ldu1_t );
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_cge_trans( matrix_layout, nrows_u2, m-p, u2, ldu2, u2_t,
+ ldu2_t );
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_cge_trans( matrix_layout, nrows_v1t, q, v1t, ldv1t, v1t_t,
+ ldv1t_t );
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_cge_trans( matrix_layout, nrows_v2t, m-q, v2t, ldv2t, v2t_t,
+ ldv2t_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_cbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
+ theta, phi, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t,
+ &ldv1t_t, v2t_t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d,
+ b21e, b22d, b22e, rwork, &lrwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1,
+ ldu1 );
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t,
+ u2, ldu2 );
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t,
+ v1t, ldv1t );
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t,
+ v2t, ldv2t );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_free( v2t_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_free( v1t_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_free( u2_t );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_free( u1_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cbdsqr.c b/LAPACKE/src/lapacke_cbdsqr.c
new file mode 100644
index 00000000..05fd4729
--- /dev/null
+++ b/LAPACKE/src/lapacke_cbdsqr.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cbdsqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cbdsqr( int matrix_layout, char uplo, lapack_int n,
+ lapack_int ncvt, lapack_int nru, lapack_int ncc,
+ float* d, float* e, lapack_complex_float* vt,
+ lapack_int ldvt, lapack_complex_float* u,
+ lapack_int ldu, lapack_complex_float* c,
+ lapack_int ldc )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cbdsqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( ncc != 0 ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, ncc, c, ldc ) ) {
+ return -13;
+ }
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+ return -8;
+ }
+ if( nru != 0 ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, nru, n, u, ldu ) ) {
+ return -11;
+ }
+ }
+ if( ncvt != 0 ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, ncvt, vt, ldvt ) ) {
+ return -9;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cbdsqr_work( matrix_layout, uplo, n, ncvt, nru, ncc, d, e, vt,
+ ldvt, u, ldu, c, ldc, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cbdsqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cbdsqr_work.c b/LAPACKE/src/lapacke_cbdsqr_work.c
new file mode 100644
index 00000000..6e4c9ec8
--- /dev/null
+++ b/LAPACKE/src/lapacke_cbdsqr_work.c
@@ -0,0 +1,150 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cbdsqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cbdsqr_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int ncvt, lapack_int nru, lapack_int ncc,
+ float* d, float* e, lapack_complex_float* vt,
+ lapack_int ldvt, lapack_complex_float* u,
+ lapack_int ldu, lapack_complex_float* c,
+ lapack_int ldc, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cbdsqr( &uplo, &n, &ncvt, &nru, &ncc, d, e, vt, &ldvt, u, &ldu,
+ c, &ldc, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldc_t = MAX(1,n);
+ lapack_int ldu_t = MAX(1,nru);
+ lapack_int ldvt_t = MAX(1,n);
+ lapack_complex_float* vt_t = NULL;
+ lapack_complex_float* u_t = NULL;
+ lapack_complex_float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldc < ncc ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_cbdsqr_work", info );
+ return info;
+ }
+ if( ldu < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_cbdsqr_work", info );
+ return info;
+ }
+ if( ldvt < ncvt ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_cbdsqr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( ncvt != 0 ) {
+ vt_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvt_t * MAX(1,ncvt) );
+ if( vt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( nru != 0 ) {
+ u_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldu_t * MAX(1,n) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( ncc != 0 ) {
+ c_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldc_t * MAX(1,ncc) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ if( ncvt != 0 ) {
+ LAPACKE_cge_trans( matrix_layout, n, ncvt, vt, ldvt, vt_t, ldvt_t );
+ }
+ if( nru != 0 ) {
+ LAPACKE_cge_trans( matrix_layout, nru, n, u, ldu, u_t, ldu_t );
+ }
+ if( ncc != 0 ) {
+ LAPACKE_cge_trans( matrix_layout, n, ncc, c, ldc, c_t, ldc_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_cbdsqr( &uplo, &n, &ncvt, &nru, &ncc, d, e, vt_t, &ldvt_t, u_t,
+ &ldu_t, c_t, &ldc_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( ncvt != 0 ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, ncvt, vt_t, ldvt_t, vt,
+ ldvt );
+ }
+ if( nru != 0 ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nru, n, u_t, ldu_t, u, ldu );
+ }
+ if( ncc != 0 ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, ncc, c_t, ldc_t, c, ldc );
+ }
+ /* Release memory and exit */
+ if( ncc != 0 ) {
+ LAPACKE_free( c_t );
+ }
+exit_level_2:
+ if( nru != 0 ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_1:
+ if( ncvt != 0 ) {
+ LAPACKE_free( vt_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cbdsqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cbdsqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgbbrd.c b/LAPACKE/src/lapacke_cgbbrd.c
new file mode 100644
index 00000000..e4586a90
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbbrd.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbbrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbbrd( int matrix_layout, char vect, lapack_int m,
+ lapack_int n, lapack_int ncc, lapack_int kl,
+ lapack_int ku, lapack_complex_float* ab,
+ lapack_int ldab, float* d, float* e,
+ lapack_complex_float* q, lapack_int ldq,
+ lapack_complex_float* pt, lapack_int ldpt,
+ lapack_complex_float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbbrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+ return -8;
+ }
+ if( ncc != 0 ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, m, ncc, c, ldc ) ) {
+ return -16;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,MAX(m,n)) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,MAX(m,n)) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgbbrd_work( matrix_layout, vect, m, n, ncc, kl, ku, ab, ldab,
+ d, e, q, ldq, pt, ldpt, c, ldc, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbbrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgbbrd_work.c b/LAPACKE/src/lapacke_cgbbrd_work.c
new file mode 100644
index 00000000..ae41793f
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbbrd_work.c
@@ -0,0 +1,163 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbbrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbbrd_work( int matrix_layout, char vect, lapack_int m,
+ lapack_int n, lapack_int ncc, lapack_int kl,
+ lapack_int ku, lapack_complex_float* ab,
+ lapack_int ldab, float* d, float* e,
+ lapack_complex_float* q, lapack_int ldq,
+ lapack_complex_float* pt, lapack_int ldpt,
+ lapack_complex_float* c, lapack_int ldc,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbbrd( &vect, &m, &n, &ncc, &kl, &ku, ab, &ldab, d, e, q, &ldq,
+ pt, &ldpt, c, &ldc, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_int ldpt_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,m);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* q_t = NULL;
+ lapack_complex_float* pt_t = NULL;
+ lapack_complex_float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cgbbrd_work", info );
+ return info;
+ }
+ if( ldc < ncc ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_cgbbrd_work", info );
+ return info;
+ }
+ if( ldpt < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_cgbbrd_work", info );
+ return info;
+ }
+ if( ldq < m ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_cgbbrd_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'q' ) ) {
+ q_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldq_t * MAX(1,m) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'p' ) ) {
+ pt_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldpt_t * MAX(1,n) );
+ if( pt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( ncc != 0 ) {
+ c_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldc_t * MAX(1,ncc) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cgb_trans( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ if( ncc != 0 ) {
+ LAPACKE_cge_trans( matrix_layout, m, ncc, c, ldc, c_t, ldc_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbbrd( &vect, &m, &n, &ncc, &kl, &ku, ab_t, &ldab_t, d, e, q_t,
+ &ldq_t, pt_t, &ldpt_t, c_t, &ldc_t, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cgb_trans( LAPACK_COL_MAJOR, m, n, kl, ku, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'q' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, m, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'p' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, pt_t, ldpt_t, pt, ldpt );
+ }
+ if( ncc != 0 ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, ncc, c_t, ldc_t, c, ldc );
+ }
+ /* Release memory and exit */
+ if( ncc != 0 ) {
+ LAPACKE_free( c_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'p' ) ) {
+ LAPACKE_free( pt_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'q' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbbrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgbbrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgbcon.c b/LAPACKE/src/lapacke_cgbcon.c
new file mode 100644
index 00000000..209eee99
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbcon.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbcon( int matrix_layout, char norm, lapack_int n,
+ lapack_int kl, lapack_int ku,
+ const lapack_complex_float* ab, lapack_int ldab,
+ const lapack_int* ipiv, float anorm, float* rcond )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgbcon_work( matrix_layout, norm, n, kl, ku, ab, ldab, ipiv,
+ anorm, rcond, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgbcon_work.c b/LAPACKE/src/lapacke_cgbcon_work.c
new file mode 100644
index 00000000..d7e277ff
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbcon_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbcon_work( int matrix_layout, char norm, lapack_int n,
+ lapack_int kl, lapack_int ku,
+ const lapack_complex_float* ab, lapack_int ldab,
+ const lapack_int* ipiv, float anorm,
+ float* rcond, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbcon( &norm, &n, &kl, &ku, ab, &ldab, ipiv, &anorm, rcond,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,2*kl+ku+1);
+ lapack_complex_float* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cgbcon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cgb_trans( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
+ ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbcon( &norm, &n, &kl, &ku, ab_t, &ldab_t, ipiv, &anorm, rcond,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgbcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgbequ.c b/LAPACKE/src/lapacke_cgbequ.c
new file mode 100644
index 00000000..fccc12f5
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbequ.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbequ( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku,
+ const lapack_complex_float* ab, lapack_int ldab,
+ float* r, float* c, float* rowcnd, float* colcnd,
+ float* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_cgbequ_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
+ rowcnd, colcnd, amax );
+}
diff --git a/LAPACKE/src/lapacke_cgbequ_work.c b/LAPACKE/src/lapacke_cgbequ_work.c
new file mode 100644
index 00000000..2b26e29f
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbequ_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbequ_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku,
+ const lapack_complex_float* ab, lapack_int ldab,
+ float* r, float* c, float* rowcnd,
+ float* colcnd, float* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbequ( &m, &n, &kl, &ku, ab, &ldab, r, c, rowcnd, colcnd, amax,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_complex_float* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cgbequ_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cgb_trans( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbequ( &m, &n, &kl, &ku, ab_t, &ldab_t, r, c, rowcnd, colcnd,
+ amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgbequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgbequb.c b/LAPACKE/src/lapacke_cgbequb.c
new file mode 100644
index 00000000..df5d1d76
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbequb.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbequb( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku,
+ const lapack_complex_float* ab, lapack_int ldab,
+ float* r, float* c, float* rowcnd, float* colcnd,
+ float* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_cgbequb_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
+ rowcnd, colcnd, amax );
+}
diff --git a/LAPACKE/src/lapacke_cgbequb_work.c b/LAPACKE/src/lapacke_cgbequb_work.c
new file mode 100644
index 00000000..d2b66082
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbequb_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbequb_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku,
+ const lapack_complex_float* ab,
+ lapack_int ldab, float* r, float* c,
+ float* rowcnd, float* colcnd, float* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbequb( &m, &n, &kl, &ku, ab, &ldab, r, c, rowcnd, colcnd, amax,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_complex_float* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cgbequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cgb_trans( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbequb( &m, &n, &kl, &ku, ab_t, &ldab_t, r, c, rowcnd, colcnd,
+ amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgbequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgbrfs.c b/LAPACKE/src/lapacke_cgbrfs.c
new file mode 100644
index 00000000..0eee684f
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbrfs.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbrfs( int matrix_layout, char trans, lapack_int n,
+ lapack_int kl, lapack_int ku, lapack_int nrhs,
+ const lapack_complex_float* ab, lapack_int ldab,
+ const lapack_complex_float* afb, lapack_int ldafb,
+ const lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
+ return -9;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -14;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgbrfs_work( matrix_layout, trans, n, kl, ku, nrhs, ab, ldab,
+ afb, ldafb, ipiv, b, ldb, x, ldx, ferr, berr,
+ work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgbrfs_work.c b/LAPACKE/src/lapacke_cgbrfs_work.c
new file mode 100644
index 00000000..f8d6853e
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbrfs_work.c
@@ -0,0 +1,143 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbrfs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int kl, lapack_int ku, lapack_int nrhs,
+ const lapack_complex_float* ab, lapack_int ldab,
+ const lapack_complex_float* afb,
+ lapack_int ldafb, const lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbrfs( &trans, &n, &kl, &ku, &nrhs, ab, &ldab, afb, &ldafb,
+ ipiv, b, &ldb, x, &ldx, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldafb_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* afb_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cgbrfs_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_cgbrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_cgbrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_cgbrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ LAPACKE_cgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
+ ldafb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbrfs( &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t, afb_t,
+ &ldafb_t, ipiv, b_t, &ldb_t, x_t, &ldx_t, ferr, berr,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgbrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgbrfsx.c b/LAPACKE/src/lapacke_cgbrfsx.c
new file mode 100644
index 00000000..715b5434
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbrfsx.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbrfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbrfsx( int matrix_layout, char trans, char equed,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, const lapack_complex_float* ab,
+ lapack_int ldab, const lapack_complex_float* afb,
+ lapack_int ldafb, const lapack_int* ipiv,
+ const float* r, const float* c,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* berr, lapack_int n_err_bnds,
+ float* err_bnds_norm, float* err_bnds_comp,
+ lapack_int nparams, float* params )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbrfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
+ return -10;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -15;
+ }
+ if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
+ if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+ return -14;
+ }
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -25;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
+ if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+ return -13;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -17;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgbrfsx_work( matrix_layout, trans, equed, n, kl, ku, nrhs,
+ ab, ldab, afb, ldafb, ipiv, r, c, b, ldb, x,
+ ldx, rcond, berr, n_err_bnds, err_bnds_norm,
+ err_bnds_comp, nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbrfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgbrfsx_work.c b/LAPACKE/src/lapacke_cgbrfsx_work.c
new file mode 100644
index 00000000..a8a6e2f2
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbrfsx_work.c
@@ -0,0 +1,174 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbrfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbrfsx_work( int matrix_layout, char trans, char equed,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs,
+ const lapack_complex_float* ab,
+ lapack_int ldab,
+ const lapack_complex_float* afb,
+ lapack_int ldafb, const lapack_int* ipiv,
+ const float* r, const float* c,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbrfsx( &trans, &equed, &n, &kl, &ku, &nrhs, ab, &ldab, afb,
+ &ldafb, ipiv, r, c, b, &ldb, x, &ldx, rcond, berr,
+ &n_err_bnds, err_bnds_norm, err_bnds_comp, &nparams,
+ params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldafb_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* afb_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cgbrfsx_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cgbrfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_cgbrfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -18;
+ LAPACKE_xerbla( "LAPACKE_cgbrfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ LAPACKE_cgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
+ ldafb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbrfsx( &trans, &equed, &n, &kl, &ku, &nrhs, ab_t, &ldab_t,
+ afb_t, &ldafb_t, ipiv, r, c, b_t, &ldb_t, x_t, &ldx_t,
+ rcond, berr, &n_err_bnds, err_bnds_norm_t,
+ err_bnds_comp_t, &nparams, params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbrfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgbrfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgbsv.c b/LAPACKE/src/lapacke_cgbsv.c
new file mode 100644
index 00000000..84f54fd4
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbsv.c
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbsv( int matrix_layout, lapack_int n, lapack_int kl,
+ lapack_int ku, lapack_int nrhs,
+ lapack_complex_float* ab, lapack_int ldab,
+ lapack_int* ipiv, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ return LAPACKE_cgbsv_work( matrix_layout, n, kl, ku, nrhs, ab, ldab, ipiv, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_cgbsv_work.c b/LAPACKE/src/lapacke_cgbsv_work.c
new file mode 100644
index 00000000..a8573d20
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbsv_work.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbsv_work( int matrix_layout, lapack_int n, lapack_int kl,
+ lapack_int ku, lapack_int nrhs,
+ lapack_complex_float* ab, lapack_int ldab,
+ lapack_int* ipiv, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbsv( &n, &kl, &ku, &nrhs, ab, &ldab, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cgbsv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_cgbsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cgb_trans( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
+ ldab_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbsv( &n, &kl, &ku, &nrhs, ab_t, &ldab_t, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cgb_trans( LAPACK_COL_MAJOR, n, n, kl, kl+ku, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgbsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgbsvx.c b/LAPACKE/src/lapacke_cgbsvx.c
new file mode 100644
index 00000000..c54a41aa
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbsvx.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbsvx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, lapack_complex_float* ab,
+ lapack_int ldab, lapack_complex_float* afb,
+ lapack_int ldafb, lapack_int* ipiv, char* equed,
+ float* r, float* c, lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* ferr,
+ float* berr, float* rpivot )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
+ ldafb ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -16;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) ) ) {
+ if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+ return -15;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'r' ) ) ) {
+ if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+ return -14;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgbsvx_work( matrix_layout, fact, trans, n, kl, ku, nrhs, ab,
+ ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x,
+ ldx, rcond, ferr, berr, work, rwork );
+ /* Backup significant data from working array(s) */
+ *rpivot = rwork[0];
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgbsvx_work.c b/LAPACKE/src/lapacke_cgbsvx_work.c
new file mode 100644
index 00000000..35c4927b
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbsvx_work.c
@@ -0,0 +1,159 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbsvx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, lapack_complex_float* ab,
+ lapack_int ldab, lapack_complex_float* afb,
+ lapack_int ldafb, lapack_int* ipiv, char* equed,
+ float* r, float* c, lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* ferr,
+ float* berr, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbsvx( &fact, &trans, &n, &kl, &ku, &nrhs, ab, &ldab, afb,
+ &ldafb, ipiv, equed, r, c, b, &ldb, x, &ldx, rcond, ferr,
+ berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldafb_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* afb_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cgbsvx_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cgbsvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_cgbsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_cgbsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_cgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
+ ldafb_t );
+ }
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbsvx( &fact, &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t, afb_t,
+ &ldafb_t, ipiv, equed, r, c, b_t, &ldb_t, x_t, &ldx_t,
+ rcond, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_cgb_trans( LAPACK_COL_MAJOR, n, n, kl, ku, ab_t, ldab_t, ab,
+ ldab );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_cgb_trans( LAPACK_COL_MAJOR, n, n, kl, kl+ku, afb_t,
+ ldafb_t, afb, ldafb );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgbsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgbsvxx.c b/LAPACKE/src/lapacke_cgbsvxx.c
new file mode 100644
index 00000000..07410c7d
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbsvxx.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbsvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbsvxx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, lapack_complex_float* ab,
+ lapack_int ldab, lapack_complex_float* afb,
+ lapack_int ldafb, lapack_int* ipiv, char* equed,
+ float* r, float* c, lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* rpvgrw,
+ float* berr, lapack_int n_err_bnds,
+ float* err_bnds_norm, float* err_bnds_comp,
+ lapack_int nparams, float* params )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbsvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
+ ldafb ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -16;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) ) ) {
+ if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+ return -15;
+ }
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -27;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'r' ) ) ) {
+ if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+ return -14;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgbsvxx_work( matrix_layout, fact, trans, n, kl, ku, nrhs, ab,
+ ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x,
+ ldx, rcond, rpvgrw, berr, n_err_bnds,
+ err_bnds_norm, err_bnds_comp, nparams, params,
+ work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbsvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgbsvxx_work.c b/LAPACKE/src/lapacke_cgbsvxx_work.c
new file mode 100644
index 00000000..a9d66da0
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbsvxx_work.c
@@ -0,0 +1,187 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbsvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbsvxx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, lapack_complex_float* ab,
+ lapack_int ldab, lapack_complex_float* afb,
+ lapack_int ldafb, lapack_int* ipiv,
+ char* equed, float* r, float* c,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* rpvgrw, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbsvxx( &fact, &trans, &n, &kl, &ku, &nrhs, ab, &ldab, afb,
+ &ldafb, ipiv, equed, r, c, b, &ldb, x, &ldx, rcond,
+ rpvgrw, berr, &n_err_bnds, err_bnds_norm, err_bnds_comp,
+ &nparams, params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldafb_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* afb_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cgbsvxx_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cgbsvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_cgbsvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_cgbsvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_cgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
+ ldafb_t );
+ }
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbsvxx( &fact, &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t,
+ afb_t, &ldafb_t, ipiv, equed, r, c, b_t, &ldb_t, x_t,
+ &ldx_t, rcond, rpvgrw, berr, &n_err_bnds,
+ err_bnds_norm_t, err_bnds_comp_t, &nparams, params,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_cgb_trans( LAPACK_COL_MAJOR, n, n, kl, ku, ab_t, ldab_t, ab,
+ ldab );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_cgb_trans( LAPACK_COL_MAJOR, n, n, kl, kl+ku, afb_t,
+ ldafb_t, afb, ldafb );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbsvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgbsvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgbtrf.c b/LAPACKE/src/lapacke_cgbtrf.c
new file mode 100644
index 00000000..5475f019
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbtrf.c
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbtrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbtrf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku,
+ lapack_complex_float* ab, lapack_int ldab,
+ lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbtrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, kl+ku, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_cgbtrf_work( matrix_layout, m, n, kl, ku, ab, ldab, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_cgbtrf_work.c b/LAPACKE/src/lapacke_cgbtrf_work.c
new file mode 100644
index 00000000..c2ff5017
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbtrf_work.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbtrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbtrf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku,
+ lapack_complex_float* ab, lapack_int ldab,
+ lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbtrf( &m, &n, &kl, &ku, ab, &ldab, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,2*kl+ku+1);
+ lapack_complex_float* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cgbtrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cgb_trans( matrix_layout, m, n, kl, kl+ku, ab, ldab, ab_t,
+ ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbtrf( &m, &n, &kl, &ku, ab_t, &ldab_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cgb_trans( LAPACK_COL_MAJOR, m, n, kl, kl+ku, ab_t, ldab_t, ab,
+ ldab );
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbtrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgbtrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgbtrs.c b/LAPACKE/src/lapacke_cgbtrs.c
new file mode 100644
index 00000000..321f6154
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbtrs.c
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbtrs( int matrix_layout, char trans, lapack_int n,
+ lapack_int kl, lapack_int ku, lapack_int nrhs,
+ const lapack_complex_float* ab, lapack_int ldab,
+ const lapack_int* ipiv, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbtrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+#endif
+ return LAPACKE_cgbtrs_work( matrix_layout, trans, n, kl, ku, nrhs, ab, ldab,
+ ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_cgbtrs_work.c b/LAPACKE/src/lapacke_cgbtrs_work.c
new file mode 100644
index 00000000..179ee57a
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgbtrs_work.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgbtrs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int kl, lapack_int ku, lapack_int nrhs,
+ const lapack_complex_float* ab, lapack_int ldab,
+ const lapack_int* ipiv, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbtrs( &trans, &n, &kl, &ku, &nrhs, ab, &ldab, ipiv, b, &ldb,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cgbtrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cgbtrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cgb_trans( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
+ ldab_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgbtrs( &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t, ipiv, b_t,
+ &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgbtrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgbtrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgebak.c b/LAPACKE/src/lapacke_cgebak.c
new file mode 100644
index 00000000..57c0f683
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgebak.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgebak
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgebak( int matrix_layout, char job, char side, lapack_int n,
+ lapack_int ilo, lapack_int ihi, const float* scale,
+ lapack_int m, lapack_complex_float* v,
+ lapack_int ldv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgebak", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, scale, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, m, v, ldv ) ) {
+ return -9;
+ }
+#endif
+ return LAPACKE_cgebak_work( matrix_layout, job, side, n, ilo, ihi, scale, m,
+ v, ldv );
+}
diff --git a/LAPACKE/src/lapacke_cgebak_work.c b/LAPACKE/src/lapacke_cgebak_work.c
new file mode 100644
index 00000000..54a8c272
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgebak_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgebak
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgebak_work( int matrix_layout, char job, char side,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ const float* scale, lapack_int m,
+ lapack_complex_float* v, lapack_int ldv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgebak( &job, &side, &n, &ilo, &ihi, scale, &m, v, &ldv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldv_t = MAX(1,n);
+ lapack_complex_float* v_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldv < m ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_cgebak_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldv_t * MAX(1,m) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, m, v, ldv, v_t, ldv_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgebak( &job, &side, &n, &ilo, &ihi, scale, &m, v_t, &ldv_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, m, v_t, ldv_t, v, ldv );
+ /* Release memory and exit */
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgebak_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgebak_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgebal.c b/LAPACKE/src/lapacke_cgebal.c
new file mode 100644
index 00000000..17b43e5a
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgebal.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgebal
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgebal( int matrix_layout, char job, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* ilo, lapack_int* ihi, float* scale )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgebal", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ }
+#endif
+ return LAPACKE_cgebal_work( matrix_layout, job, n, a, lda, ilo, ihi, scale );
+}
diff --git a/LAPACKE/src/lapacke_cgebal_work.c b/LAPACKE/src/lapacke_cgebal_work.c
new file mode 100644
index 00000000..3ddb042a
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgebal_work.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgebal
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgebal_work( int matrix_layout, char job, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* ilo, lapack_int* ihi, float* scale )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgebal( &job, &n, a, &lda, ilo, ihi, scale, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgebal_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgebal( &job, &n, a_t, &lda_t, ilo, ihi, scale, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ LAPACKE_free( a_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgebal_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgebal_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgebrd.c b/LAPACKE/src/lapacke_cgebrd.c
new file mode 100644
index 00000000..8cbe2f8c
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgebrd.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgebrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgebrd( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda, float* d,
+ float* e, lapack_complex_float* tauq,
+ lapack_complex_float* taup )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgebrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgebrd_work( matrix_layout, m, n, a, lda, d, e, tauq, taup,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgebrd_work( matrix_layout, m, n, a, lda, d, e, tauq, taup,
+ work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgebrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgebrd_work.c b/LAPACKE/src/lapacke_cgebrd_work.c
new file mode 100644
index 00000000..f4a58abb
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgebrd_work.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgebrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgebrd_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ float* d, float* e, lapack_complex_float* tauq,
+ lapack_complex_float* taup,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgebrd( &m, &n, a, &lda, d, e, tauq, taup, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgebrd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgebrd( &m, &n, a, &lda_t, d, e, tauq, taup, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgebrd( &m, &n, a_t, &lda_t, d, e, tauq, taup, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgebrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgebrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgecon.c b/LAPACKE/src/lapacke_cgecon.c
new file mode 100644
index 00000000..f0707d05
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgecon.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgecon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgecon( int matrix_layout, char norm, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float anorm, float* rcond )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgecon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgecon_work( matrix_layout, norm, n, a, lda, anorm, rcond,
+ work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgecon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgecon_work.c b/LAPACKE/src/lapacke_cgecon_work.c
new file mode 100644
index 00000000..0738b322
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgecon_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgecon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgecon_work( int matrix_layout, char norm, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float anorm, float* rcond,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgecon( &norm, &n, a, &lda, &anorm, rcond, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgecon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgecon( &norm, &n, a_t, &lda_t, &anorm, rcond, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgecon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgecon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeequ.c b/LAPACKE/src/lapacke_cgeequ.c
new file mode 100644
index 00000000..2c6ac8e1
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeequ.c
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeequ( int matrix_layout, lapack_int m, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float* r, float* c, float* rowcnd, float* colcnd,
+ float* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_cgeequ_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
+ colcnd, amax );
+}
diff --git a/LAPACKE/src/lapacke_cgeequ_work.c b/LAPACKE/src/lapacke_cgeequ_work.c
new file mode 100644
index 00000000..4d6c695c
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeequ_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeequ_work( int matrix_layout, lapack_int m, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float* r, float* c, float* rowcnd,
+ float* colcnd, float* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeequ( &m, &n, a, &lda, r, c, rowcnd, colcnd, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgeequ_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeequ( &m, &n, a_t, &lda_t, r, c, rowcnd, colcnd, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgeequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeequb.c b/LAPACKE/src/lapacke_cgeequb.c
new file mode 100644
index 00000000..0daf9fc6
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeequb.c
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeequb( int matrix_layout, lapack_int m, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float* r, float* c, float* rowcnd, float* colcnd,
+ float* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_cgeequb_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
+ colcnd, amax );
+}
diff --git a/LAPACKE/src/lapacke_cgeequb_work.c b/LAPACKE/src/lapacke_cgeequb_work.c
new file mode 100644
index 00000000..32d4389d
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeequb_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeequb_work( int matrix_layout, lapack_int m, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float* r, float* c, float* rowcnd,
+ float* colcnd, float* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeequb( &m, &n, a, &lda, r, c, rowcnd, colcnd, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgeequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeequb( &m, &n, a_t, &lda_t, r, c, rowcnd, colcnd, amax,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgeequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgees.c b/LAPACKE/src/lapacke_cgees.c
new file mode 100644
index 00000000..55314bb3
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgees.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgees
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgees( int matrix_layout, char jobvs, char sort,
+ LAPACK_C_SELECT1 select, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* sdim, lapack_complex_float* w,
+ lapack_complex_float* vs, lapack_int ldvs )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgees", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgees_work( matrix_layout, jobvs, sort, select, n, a, lda,
+ sdim, w, vs, ldvs, &work_query, lwork, rwork,
+ bwork );
+ if( info != 0 ) {
+ goto exit_level_2;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgees_work( matrix_layout, jobvs, sort, select, n, a, lda,
+ sdim, w, vs, ldvs, work, lwork, rwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgees", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgees_work.c b/LAPACKE/src/lapacke_cgees_work.c
new file mode 100644
index 00000000..6fb70e4f
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgees_work.c
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgees
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgees_work( int matrix_layout, char jobvs, char sort,
+ LAPACK_C_SELECT1 select, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* sdim, lapack_complex_float* w,
+ lapack_complex_float* vs, lapack_int ldvs,
+ lapack_complex_float* work, lapack_int lwork,
+ float* rwork, lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgees( &jobvs, &sort, select, &n, a, &lda, sdim, w, vs, &ldvs,
+ work, &lwork, rwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldvs_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* vs_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cgees_work", info );
+ return info;
+ }
+ if( ldvs < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cgees_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgees( &jobvs, &sort, select, &n, a, &lda_t, sdim, w, vs,
+ &ldvs_t, work, &lwork, rwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ vs_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvs_t * MAX(1,n) );
+ if( vs_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgees( &jobvs, &sort, select, &n, a_t, &lda_t, sdim, w, vs_t,
+ &ldvs_t, work, &lwork, rwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vs_t, ldvs_t, vs, ldvs );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ LAPACKE_free( vs_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgees_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgees_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeesx.c b/LAPACKE/src/lapacke_cgeesx.c
new file mode 100644
index 00000000..0e61a580
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeesx.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeesx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeesx( int matrix_layout, char jobvs, char sort,
+ LAPACK_C_SELECT1 select, char sense, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* sdim, lapack_complex_float* w,
+ lapack_complex_float* vs, lapack_int ldvs,
+ float* rconde, float* rcondv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeesx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgeesx_work( matrix_layout, jobvs, sort, select, sense, n, a,
+ lda, sdim, w, vs, ldvs, rconde, rcondv,
+ &work_query, lwork, rwork, bwork );
+ if( info != 0 ) {
+ goto exit_level_2;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgeesx_work( matrix_layout, jobvs, sort, select, sense, n, a,
+ lda, sdim, w, vs, ldvs, rconde, rcondv, work,
+ lwork, rwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeesx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeesx_work.c b/LAPACKE/src/lapacke_cgeesx_work.c
new file mode 100644
index 00000000..969cf2a9
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeesx_work.c
@@ -0,0 +1,123 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeesx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeesx_work( int matrix_layout, char jobvs, char sort,
+ LAPACK_C_SELECT1 select, char sense,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda, lapack_int* sdim,
+ lapack_complex_float* w,
+ lapack_complex_float* vs, lapack_int ldvs,
+ float* rconde, float* rcondv,
+ lapack_complex_float* work, lapack_int lwork,
+ float* rwork, lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeesx( &jobvs, &sort, select, &sense, &n, a, &lda, sdim, w, vs,
+ &ldvs, rconde, rcondv, work, &lwork, rwork, bwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldvs_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* vs_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cgeesx_work", info );
+ return info;
+ }
+ if( ldvs < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_cgeesx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgeesx( &jobvs, &sort, select, &sense, &n, a, &lda_t, sdim,
+ w, vs, &ldvs_t, rconde, rcondv, work, &lwork, rwork,
+ bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ vs_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvs_t * MAX(1,n) );
+ if( vs_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeesx( &jobvs, &sort, select, &sense, &n, a_t, &lda_t, sdim, w,
+ vs_t, &ldvs_t, rconde, rcondv, work, &lwork, rwork,
+ bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vs_t, ldvs_t, vs, ldvs );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ LAPACKE_free( vs_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeesx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgeesx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeev.c b/LAPACKE/src/lapacke_cgeev.c
new file mode 100644
index 00000000..75084a20
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeev.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeev( int matrix_layout, char jobvl, char jobvr,
+ lapack_int n, lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* w, lapack_complex_float* vl,
+ lapack_int ldvl, lapack_complex_float* vr,
+ lapack_int ldvr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgeev_work( matrix_layout, jobvl, jobvr, n, a, lda, w, vl,
+ ldvl, vr, ldvr, &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgeev_work( matrix_layout, jobvl, jobvr, n, a, lda, w, vl,
+ ldvl, vr, ldvr, work, lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeev_work.c b/LAPACKE/src/lapacke_cgeev_work.c
new file mode 100644
index 00000000..a9728de6
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeev_work.c
@@ -0,0 +1,141 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeev_work( int matrix_layout, char jobvl, char jobvr,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* w,
+ lapack_complex_float* vl, lapack_int ldvl,
+ lapack_complex_float* vr, lapack_int ldvr,
+ lapack_complex_float* work, lapack_int lwork,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeev( &jobvl, &jobvr, &n, a, &lda, w, vl, &ldvl, vr, &ldvr,
+ work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* vl_t = NULL;
+ lapack_complex_float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cgeev_work", info );
+ return info;
+ }
+ if( ldvl < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cgeev_work", info );
+ return info;
+ }
+ if( ldvr < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cgeev_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgeev( &jobvl, &jobvr, &n, a, &lda_t, w, vl, &ldvl_t, vr,
+ &ldvr_t, work, &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ vl_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvl_t * MAX(1,n) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ vr_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvr_t * MAX(1,n) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeev( &jobvl, &jobvr, &n, a_t, &lda_t, w, vl_t, &ldvl_t, vr_t,
+ &ldvr_t, work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vl_t, ldvl_t, vl, ldvl );
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vr_t, ldvr_t, vr, ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgeev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeevx.c b/LAPACKE/src/lapacke_cgeevx.c
new file mode 100644
index 00000000..c3f62ccb
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeevx.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeevx( int matrix_layout, char balanc, char jobvl,
+ char jobvr, char sense, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* w, lapack_complex_float* vl,
+ lapack_int ldvl, lapack_complex_float* vr,
+ lapack_int ldvr, lapack_int* ilo, lapack_int* ihi,
+ float* scale, float* abnrm, float* rconde,
+ float* rcondv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgeevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
+ lda, w, vl, ldvl, vr, ldvr, ilo, ihi, scale,
+ abnrm, rconde, rcondv, &work_query, lwork,
+ rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgeevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
+ lda, w, vl, ldvl, vr, ldvr, ilo, ihi, scale,
+ abnrm, rconde, rcondv, work, lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeevx_work.c b/LAPACKE/src/lapacke_cgeevx_work.c
new file mode 100644
index 00000000..25cd2ac0
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeevx_work.c
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeevx_work( int matrix_layout, char balanc, char jobvl,
+ char jobvr, char sense, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* w,
+ lapack_complex_float* vl, lapack_int ldvl,
+ lapack_complex_float* vr, lapack_int ldvr,
+ lapack_int* ilo, lapack_int* ihi, float* scale,
+ float* abnrm, float* rconde, float* rcondv,
+ lapack_complex_float* work, lapack_int lwork,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeevx( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda, w, vl,
+ &ldvl, vr, &ldvr, ilo, ihi, scale, abnrm, rconde, rcondv,
+ work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* vl_t = NULL;
+ lapack_complex_float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cgeevx_work", info );
+ return info;
+ }
+ if( ldvl < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cgeevx_work", info );
+ return info;
+ }
+ if( ldvr < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_cgeevx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgeevx( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda_t, w,
+ vl, &ldvl_t, vr, &ldvr_t, ilo, ihi, scale, abnrm,
+ rconde, rcondv, work, &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ vl_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvl_t * MAX(1,n) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ vr_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvr_t * MAX(1,n) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeevx( &balanc, &jobvl, &jobvr, &sense, &n, a_t, &lda_t, w,
+ vl_t, &ldvl_t, vr_t, &ldvr_t, ilo, ihi, scale, abnrm,
+ rconde, rcondv, work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vl_t, ldvl_t, vl, ldvl );
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vr_t, ldvr_t, vr, ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgeevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgehrd.c b/LAPACKE/src/lapacke_cgehrd.c
new file mode 100644
index 00000000..1c3b3c05
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgehrd.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgehrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgehrd( int matrix_layout, lapack_int n, lapack_int ilo,
+ lapack_int ihi, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgehrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgehrd_work( matrix_layout, n, ilo, ihi, a, lda, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgehrd_work( matrix_layout, n, ilo, ihi, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgehrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgehrd_work.c b/LAPACKE/src/lapacke_cgehrd_work.c
new file mode 100644
index 00000000..9dab47e1
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgehrd_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgehrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgehrd_work( int matrix_layout, lapack_int n, lapack_int ilo,
+ lapack_int ihi, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* tau,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgehrd( &n, &ilo, &ihi, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cgehrd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgehrd( &n, &ilo, &ihi, a, &lda_t, tau, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgehrd( &n, &ilo, &ihi, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgehrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgehrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgelq2.c b/LAPACKE/src/lapacke_cgelq2.c
new file mode 100644
index 00000000..52eebf61
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgelq2.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgelq2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgelq2( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgelq2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,m) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgelq2_work( matrix_layout, m, n, a, lda, tau, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgelq2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgelq2_work.c b/LAPACKE/src/lapacke_cgelq2_work.c
new file mode 100644
index 00000000..de5a8e45
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgelq2_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgelq2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgelq2_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* tau,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgelq2( &m, &n, a, &lda, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgelq2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgelq2( &m, &n, a_t, &lda_t, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgelq2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgelq2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgelqf.c b/LAPACKE/src/lapacke_cgelqf.c
new file mode 100644
index 00000000..f35b664d
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgelqf.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgelqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgelqf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgelqf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgelqf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgelqf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgelqf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgelqf_work.c b/LAPACKE/src/lapacke_cgelqf_work.c
new file mode 100644
index 00000000..ae7eb9bc
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgelqf_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgelqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgelqf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* tau,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgelqf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgelqf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgelqf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgelqf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgelqf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgelqf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgels.c b/LAPACKE/src/lapacke_cgels.c
new file mode 100644
index 00000000..18a5126f
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgels.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgels
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgels( int matrix_layout, char trans, lapack_int m,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgels", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgels_work( matrix_layout, trans, m, n, nrhs, a, lda, b, ldb,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgels_work( matrix_layout, trans, m, n, nrhs, a, lda, b, ldb,
+ work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgels", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgels_work.c b/LAPACKE/src/lapacke_cgels_work.c
new file mode 100644
index 00000000..c041f843
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgels_work.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgels
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgels_work( int matrix_layout, char trans, lapack_int m,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgels( &trans, &m, &n, &nrhs, a, &lda, b, &ldb, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,MAX(m,n));
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cgels_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cgels_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgels( &trans, &m, &n, &nrhs, a, &lda_t, b, &ldb_t, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgels( &trans, &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
+ ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgels_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgels_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgelsd.c b/LAPACKE/src/lapacke_cgelsd.c
new file mode 100644
index 00000000..77d2e430
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgelsd.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgelsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgelsd( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, float* s, float rcond,
+ lapack_int* rank )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ /* Additional scalars declarations for work arrays */
+ lapack_int liwork;
+ lapack_int lrwork;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_int iwork_query;
+ float rwork_query;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgelsd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgelsd_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
+ rcond, rank, &work_query, lwork, &rwork_query,
+ &iwork_query );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_C2INT( 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;
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgelsd_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
+ rcond, rank, work, lwork, rwork, iwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgelsd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgelsd_work.c b/LAPACKE/src/lapacke_cgelsd_work.c
new file mode 100644
index 00000000..16894672
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgelsd_work.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgelsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgelsd_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, float* s, float rcond,
+ lapack_int* rank, lapack_complex_float* work,
+ lapack_int lwork, float* rwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgelsd( &m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, rank, work,
+ &lwork, rwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,MAX(m,n));
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cgelsd_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cgelsd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgelsd( &m, &n, &nrhs, a, &lda_t, b, &ldb_t, s, &rcond, rank,
+ work, &lwork, rwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgelsd( &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, s, &rcond, rank,
+ work, &lwork, rwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
+ ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgelsd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgelsd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgelss.c b/LAPACKE/src/lapacke_cgelss.c
new file mode 100644
index 00000000..f03a62f7
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgelss.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgelss
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgelss( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, float* s, float rcond,
+ lapack_int* rank )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgelss", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,5*MIN(m,n)) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgelss_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
+ rcond, rank, &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgelss_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
+ rcond, rank, work, lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgelss", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgelss_work.c b/LAPACKE/src/lapacke_cgelss_work.c
new file mode 100644
index 00000000..13edc376
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgelss_work.c
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgelss
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgelss_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, float* s, float rcond,
+ lapack_int* rank, lapack_complex_float* work,
+ lapack_int lwork, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgelss( &m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, rank, work,
+ &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,MAX(m,n));
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cgelss_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cgelss_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgelss( &m, &n, &nrhs, a, &lda_t, b, &ldb_t, s, &rcond, rank,
+ work, &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgelss( &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, s, &rcond, rank,
+ work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
+ ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgelss_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgelss_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgelsy.c b/LAPACKE/src/lapacke_cgelsy.c
new file mode 100644
index 00000000..447e94c8
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgelsy.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgelsy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgelsy( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, lapack_int* jpvt, float rcond,
+ lapack_int* rank )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgelsy", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgelsy_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, jpvt,
+ rcond, rank, &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgelsy_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, jpvt,
+ rcond, rank, work, lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgelsy", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgelsy_work.c b/LAPACKE/src/lapacke_cgelsy_work.c
new file mode 100644
index 00000000..fa4e42ba
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgelsy_work.c
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgelsy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgelsy_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, lapack_int* jpvt, float rcond,
+ lapack_int* rank, lapack_complex_float* work,
+ lapack_int lwork, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgelsy( &m, &n, &nrhs, a, &lda, b, &ldb, jpvt, &rcond, rank,
+ work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,MAX(m,n));
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cgelsy_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cgelsy_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgelsy( &m, &n, &nrhs, a, &lda_t, b, &ldb_t, jpvt, &rcond,
+ rank, work, &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgelsy( &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, jpvt, &rcond,
+ rank, work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
+ ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgelsy_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgelsy_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgemqrt.c b/LAPACKE/src/lapacke_cgemqrt.c
new file mode 100644
index 00000000..8d12a474
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgemqrt.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgemqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgemqrt( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int nb, const lapack_complex_float* v,
+ lapack_int ldv, const lapack_complex_float* t,
+ lapack_int ldt, lapack_complex_float* c,
+ lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgemqrt", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -12;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) {
+ return -10;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,m) * MAX(1,nb) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgemqrt_work( matrix_layout, side, trans, m, n, k, nb, v, ldv,
+ t, ldt, c, ldc, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgemqrt", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgemqrt_work.c b/LAPACKE/src/lapacke_cgemqrt_work.c
new file mode 100644
index 00000000..de161333
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgemqrt_work.c
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgemqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgemqrt_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int nb, const lapack_complex_float* v,
+ lapack_int ldv, const lapack_complex_float* t,
+ lapack_int ldt, lapack_complex_float* c,
+ lapack_int ldc, lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgemqrt( &side, &trans, &m, &n, &k, &nb, v, &ldv, t, &ldt, c,
+ &ldc, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldc_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,ldt);
+ lapack_int ldv_t = MAX(1,ldv);
+ lapack_complex_float* v_t = NULL;
+ lapack_complex_float* t_t = NULL;
+ lapack_complex_float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldc < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_cgemqrt_work", info );
+ return info;
+ }
+ if( ldt < nb ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cgemqrt_work", info );
+ return info;
+ }
+ if( ldv < k ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cgemqrt_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldv_t * MAX(1,k) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldt_t * MAX(1,nb) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ c_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, ldv, k, v, ldv, v_t, ldv_t );
+ LAPACKE_cge_trans( matrix_layout, ldt, nb, t, ldt, t_t, ldt_t );
+ LAPACKE_cge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgemqrt( &side, &trans, &m, &n, &k, &nb, v_t, &ldv_t, t_t,
+ &ldt_t, c_t, &ldc_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgemqrt_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgemqrt_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeqlf.c b/LAPACKE/src/lapacke_cgeqlf.c
new file mode 100644
index 00000000..ab4524b3
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqlf.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqlf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqlf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqlf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgeqlf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgeqlf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqlf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeqlf_work.c b/LAPACKE/src/lapacke_cgeqlf_work.c
new file mode 100644
index 00000000..0f873ca0
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqlf_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqlf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqlf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* tau,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqlf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgeqlf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgeqlf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqlf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqlf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgeqlf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeqp3.c b/LAPACKE/src/lapacke_cgeqp3.c
new file mode 100644
index 00000000..fd787a67
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqp3.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqp3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqp3( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* jpvt, lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqp3", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgeqp3_work( matrix_layout, m, n, a, lda, jpvt, tau,
+ &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgeqp3_work( matrix_layout, m, n, a, lda, jpvt, tau, work,
+ lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqp3", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeqp3_work.c b/LAPACKE/src/lapacke_cgeqp3_work.c
new file mode 100644
index 00000000..40a99f45
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqp3_work.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqp3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqp3_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* jpvt, lapack_complex_float* tau,
+ lapack_complex_float* work, lapack_int lwork,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqp3( &m, &n, a, &lda, jpvt, tau, work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgeqp3_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgeqp3( &m, &n, a, &lda_t, jpvt, tau, work, &lwork, rwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqp3( &m, &n, a_t, &lda_t, jpvt, tau, work, &lwork, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqp3_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgeqp3_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeqpf.c b/LAPACKE/src/lapacke_cgeqpf.c
new file mode 100644
index 00000000..80ebcbbe
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqpf.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqpf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqpf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* jpvt, lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqpf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgeqpf_work( matrix_layout, m, n, a, lda, jpvt, tau, work,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqpf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeqpf_work.c b/LAPACKE/src/lapacke_cgeqpf_work.c
new file mode 100644
index 00000000..7f523c51
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqpf_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqpf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqpf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* jpvt, lapack_complex_float* tau,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqpf( &m, &n, a, &lda, jpvt, tau, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgeqpf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqpf( &m, &n, a_t, &lda_t, jpvt, tau, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqpf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgeqpf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeqr2.c b/LAPACKE/src/lapacke_cgeqr2.c
new file mode 100644
index 00000000..a8fceead
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqr2.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqr2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqr2( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqr2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgeqr2_work( matrix_layout, m, n, a, lda, tau, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqr2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeqr2_work.c b/LAPACKE/src/lapacke_cgeqr2_work.c
new file mode 100644
index 00000000..845f0e33
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqr2_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqr2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqr2_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* tau,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqr2( &m, &n, a, &lda, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgeqr2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqr2( &m, &n, a_t, &lda_t, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqr2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgeqr2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeqrf.c b/LAPACKE/src/lapacke_cgeqrf.c
new file mode 100644
index 00000000..b0afad10
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqrf.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqrf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgeqrf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgeqrf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeqrf_work.c b/LAPACKE/src/lapacke_cgeqrf_work.c
new file mode 100644
index 00000000..8f6f15b7
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqrf_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqrf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* tau,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqrf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgeqrf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgeqrf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqrf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgeqrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeqrfp.c b/LAPACKE/src/lapacke_cgeqrfp.c
new file mode 100644
index 00000000..f7af174b
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqrfp.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqrfp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqrfp( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqrfp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgeqrfp_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgeqrfp_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqrfp", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeqrfp_work.c b/LAPACKE/src/lapacke_cgeqrfp_work.c
new file mode 100644
index 00000000..65974fbc
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqrfp_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqrfp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqrfp_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* tau,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqrfp( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgeqrfp_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgeqrfp( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqrfp( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqrfp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgeqrfp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeqrt.c b/LAPACKE/src/lapacke_cgeqrt.c
new file mode 100644
index 00000000..9aec4f6c
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqrt.c
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqrt( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nb, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* t,
+ lapack_int ldt )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqrt", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,nb) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgeqrt_work( matrix_layout, m, n, nb, a, lda, t, ldt, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqrt", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeqrt2.c b/LAPACKE/src/lapacke_cgeqrt2.c
new file mode 100644
index 00000000..30cd71dd
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqrt2.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqrt2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqrt2( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* t, lapack_int ldt )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqrt2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_cgeqrt2_work( matrix_layout, m, n, a, lda, t, ldt );
+}
diff --git a/LAPACKE/src/lapacke_cgeqrt2_work.c b/LAPACKE/src/lapacke_cgeqrt2_work.c
new file mode 100644
index 00000000..098ffae3
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqrt2_work.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqrt2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqrt2_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* t, lapack_int ldt )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqrt2( &m, &n, a, &lda, t, &ldt, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgeqrt2_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cgeqrt2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqrt2( &m, &n, a_t, &lda_t, t_t, &ldt_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqrt2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgeqrt2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeqrt3.c b/LAPACKE/src/lapacke_cgeqrt3.c
new file mode 100644
index 00000000..d2baaf5a
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqrt3.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqrt3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqrt3( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* t, lapack_int ldt )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqrt3", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_cgeqrt3_work( matrix_layout, m, n, a, lda, t, ldt );
+}
diff --git a/LAPACKE/src/lapacke_cgeqrt3_work.c b/LAPACKE/src/lapacke_cgeqrt3_work.c
new file mode 100644
index 00000000..eb2ac229
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqrt3_work.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqrt3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqrt3_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* t, lapack_int ldt )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqrt3( &m, &n, a, &lda, t, &ldt, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgeqrt3_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cgeqrt3_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqrt3( &m, &n, a_t, &lda_t, t_t, &ldt_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqrt3_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgeqrt3_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgeqrt_work.c b/LAPACKE/src/lapacke_cgeqrt_work.c
new file mode 100644
index 00000000..e4f03bfd
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgeqrt_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgeqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgeqrt_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nb, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* t,
+ lapack_int ldt, lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqrt( &m, &n, &nb, a, &lda, t, &ldt, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,ldt);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cgeqrt_work", info );
+ return info;
+ }
+ if( ldt < MIN(m,n) ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cgeqrt_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldt_t * MAX(1,MIN(m,n)) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgeqrt( &m, &n, &nb, a_t, &lda_t, t_t, &ldt_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, ldt, MIN(m,n), t_t, ldt_t, t,
+ ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgeqrt_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgeqrt_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgerfs.c b/LAPACKE/src/lapacke_cgerfs.c
new file mode 100644
index 00000000..92a2e729
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgerfs.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgerfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgerfs( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgerfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgerfs_work( matrix_layout, trans, n, nrhs, a, lda, af, ldaf,
+ ipiv, b, ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgerfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgerfs_work.c b/LAPACKE/src/lapacke_cgerfs_work.c
new file mode 100644
index 00000000..f003839d
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgerfs_work.c
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgerfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgerfs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgerfs( &trans, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b, &ldb, x,
+ &ldx, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* af_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cgerfs_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cgerfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cgerfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_cgerfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgerfs( &trans, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, ipiv, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgerfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgerfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgerfsx.c b/LAPACKE/src/lapacke_cgerfsx.c
new file mode 100644
index 00000000..7f896722
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgerfsx.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgerfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgerfsx( int matrix_layout, char trans, char equed,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* af, lapack_int ldaf,
+ const lapack_int* ipiv, const float* r,
+ const float* c, const lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgerfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
+ if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+ return -12;
+ }
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -23;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
+ if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -15;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgerfsx_work( matrix_layout, trans, equed, n, nrhs, a, lda,
+ af, ldaf, ipiv, r, c, b, ldb, x, ldx, rcond,
+ berr, n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgerfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgerfsx_work.c b/LAPACKE/src/lapacke_cgerfsx_work.c
new file mode 100644
index 00000000..35b8a2b6
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgerfsx_work.c
@@ -0,0 +1,171 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgerfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgerfsx_work( int matrix_layout, char trans, char equed,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const float* r, const float* c,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgerfsx( &trans, &equed, &n, &nrhs, a, &lda, af, &ldaf, ipiv, r,
+ c, b, &ldb, x, &ldx, rcond, berr, &n_err_bnds,
+ err_bnds_norm, err_bnds_comp, &nparams, params, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* af_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cgerfsx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cgerfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_cgerfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_cgerfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgerfsx( &trans, &equed, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, r, c, b_t, &ldb_t, x_t, &ldx_t, rcond, berr,
+ &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t, &nparams,
+ params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgerfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgerfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgerqf.c b/LAPACKE/src/lapacke_cgerqf.c
new file mode 100644
index 00000000..870523af
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgerqf.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgerqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgerqf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgerqf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgerqf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgerqf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgerqf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgerqf_work.c b/LAPACKE/src/lapacke_cgerqf_work.c
new file mode 100644
index 00000000..b6856401
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgerqf_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgerqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgerqf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* tau,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgerqf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgerqf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgerqf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgerqf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgerqf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgerqf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgesdd.c b/LAPACKE/src/lapacke_cgesdd.c
new file mode 100644
index 00000000..b42bad2b
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgesdd.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgesdd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgesdd( int matrix_layout, char jobz, lapack_int m,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda, float* s, lapack_complex_float* u,
+ lapack_int ldu, lapack_complex_float* vt,
+ lapack_int ldvt )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ /* Additional scalars declarations for work arrays */
+ size_t lrwork;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgesdd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( jobz, 'n' ) ) {
+ lrwork = MAX(1,5*MIN(m,n));
+ } else {
+ lrwork = (size_t)5*MAX(1,MIN(m,n))*MAX(1,MIN(m,n))+7*MIN(m,n);
+ }
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)
+ LAPACKE_malloc( sizeof(lapack_int) * MAX(1,8*MIN(m,n)) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgesdd_work( matrix_layout, jobz, m, n, a, lda, s, u, ldu, vt,
+ ldvt, &work_query, lwork, rwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_2;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgesdd_work( matrix_layout, jobz, m, n, a, lda, s, u, ldu, vt,
+ ldvt, work, lwork, rwork, iwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgesdd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgesdd_work.c b/LAPACKE/src/lapacke_cgesdd_work.c
new file mode 100644
index 00000000..7a4b3d2a
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgesdd_work.c
@@ -0,0 +1,158 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgesdd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgesdd_work( int matrix_layout, char jobz, lapack_int m,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda, float* s,
+ lapack_complex_float* u, lapack_int ldu,
+ lapack_complex_float* vt, lapack_int ldvt,
+ lapack_complex_float* work, lapack_int lwork,
+ float* rwork, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgesdd( &jobz, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt, work,
+ &lwork, rwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_u = ( LAPACKE_lsame( jobz, 'a' ) ||
+ LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && m<n) ) ? m : 1;
+ lapack_int ncols_u = ( LAPACKE_lsame( jobz, 'a' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && m<n) ) ? m :
+ ( LAPACKE_lsame( jobz, 's' ) ? MIN(m,n) : 1);
+ lapack_int nrows_vt = ( LAPACKE_lsame( jobz, 'a' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && m>=n) ) ? n :
+ ( LAPACKE_lsame( jobz, 's' ) ? MIN(m,n) : 1);
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldu_t = MAX(1,nrows_u);
+ lapack_int ldvt_t = MAX(1,nrows_vt);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* u_t = NULL;
+ lapack_complex_float* vt_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cgesdd_work", info );
+ return info;
+ }
+ if( ldu < ncols_u ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cgesdd_work", info );
+ return info;
+ }
+ if( ldvt < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cgesdd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgesdd( &jobz, &m, &n, a, &lda_t, s, u, &ldu_t, vt, &ldvt_t,
+ work, &lwork, rwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m<n) ) ) {
+ u_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldu_t * MAX(1,ncols_u) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m>=n) ) ) {
+ vt_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvt_t * MAX(1,n) );
+ if( vt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgesdd( &jobz, &m, &n, a_t, &lda_t, s, u_t, &ldu_t, vt_t,
+ &ldvt_t, work, &lwork, rwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m<n) ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t,
+ u, ldu );
+ }
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m>=n) ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt,
+ ldvt );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m>=n) ) ) {
+ LAPACKE_free( vt_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m<n) ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgesdd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgesdd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgesv.c b/LAPACKE/src/lapacke_cgesv.c
new file mode 100644
index 00000000..b67856e4
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgesv.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgesv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgesv( int matrix_layout, lapack_int n, lapack_int nrhs,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* ipiv, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgesv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_cgesv_work( matrix_layout, n, nrhs, a, lda, ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_cgesv_work.c b/LAPACKE/src/lapacke_cgesv_work.c
new file mode 100644
index 00000000..2b387b50
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgesv_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgesv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgesv_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* ipiv, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgesv( &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgesv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cgesv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgesv( &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgesv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgesv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgesvd.c b/LAPACKE/src/lapacke_cgesvd.c
new file mode 100644
index 00000000..252044c9
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgesvd.c
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgesvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgesvd( int matrix_layout, char jobu, char jobvt,
+ lapack_int m, lapack_int n, lapack_complex_float* a,
+ lapack_int lda, float* s, lapack_complex_float* u,
+ lapack_int ldu, lapack_complex_float* vt,
+ lapack_int ldvt, float* superb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ lapack_int i;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgesvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,5*MIN(m,n)) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgesvd_work( matrix_layout, jobu, jobvt, m, n, a, lda, s, u,
+ ldu, vt, ldvt, &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgesvd_work( matrix_layout, jobu, jobvt, m, n, a, lda, s, u,
+ ldu, vt, ldvt, work, lwork, rwork );
+ /* Backup significant data from working array(s) */
+ for( i=0; i<MIN(m,n)-1; i++ ) {
+ superb[i] = rwork[i];
+ }
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgesvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgesvd_work.c b/LAPACKE/src/lapacke_cgesvd_work.c
new file mode 100644
index 00000000..c963bbb7
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgesvd_work.c
@@ -0,0 +1,149 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgesvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgesvd_work( int matrix_layout, char jobu, char jobvt,
+ lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ float* s, lapack_complex_float* u,
+ lapack_int ldu, lapack_complex_float* vt,
+ lapack_int ldvt, lapack_complex_float* work,
+ lapack_int lwork, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgesvd( &jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt,
+ work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_u = ( LAPACKE_lsame( jobu, 'a' ) ||
+ LAPACKE_lsame( jobu, 's' ) ) ? m : 1;
+ lapack_int ncols_u = LAPACKE_lsame( jobu, 'a' ) ? m :
+ ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1);
+ lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n :
+ ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1);
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldu_t = MAX(1,nrows_u);
+ lapack_int ldvt_t = MAX(1,nrows_vt);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* u_t = NULL;
+ lapack_complex_float* vt_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cgesvd_work", info );
+ return info;
+ }
+ if( ldu < ncols_u ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_cgesvd_work", info );
+ return info;
+ }
+ if( ldvt < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_cgesvd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgesvd( &jobu, &jobvt, &m, &n, a, &lda_t, s, u, &ldu_t, vt,
+ &ldvt_t, work, &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ u_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldu_t * MAX(1,ncols_u) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ vt_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvt_t * MAX(1,n) );
+ if( vt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgesvd( &jobu, &jobvt, &m, &n, a_t, &lda_t, s, u_t, &ldu_t, vt_t,
+ &ldvt_t, work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t,
+ u, ldu );
+ }
+ if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt,
+ ldvt );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ LAPACKE_free( vt_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgesvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgesvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgesvx.c b/LAPACKE/src/lapacke_cgesvx.c
new file mode 100644
index 00000000..0088309d
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgesvx.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgesvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgesvx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, float* r, float* c,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr,
+ float* rpivot )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgesvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -14;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) ) ) {
+ if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+ return -13;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'r' ) ) ) {
+ if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgesvx_work( matrix_layout, fact, trans, n, nrhs, a, lda, af,
+ ldaf, ipiv, equed, r, c, b, ldb, x, ldx, rcond,
+ ferr, berr, work, rwork );
+ /* Backup significant data from working array(s) */
+ *rpivot = rwork[0];
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgesvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgesvx_work.c b/LAPACKE/src/lapacke_cgesvx_work.c
new file mode 100644
index 00000000..dbd694d9
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgesvx_work.c
@@ -0,0 +1,156 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgesvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgesvx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, float* r,
+ float* c, lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* ferr,
+ float* berr, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgesvx( &fact, &trans, &n, &nrhs, a, &lda, af, &ldaf, ipiv,
+ equed, r, c, b, &ldb, x, &ldx, rcond, ferr, berr, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* af_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cgesvx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cgesvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_cgesvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_cgesvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgesvx( &fact, &trans, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, equed, r, c, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr,
+ berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, af_t, ldaf_t, af, ldaf );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgesvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgesvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgesvxx.c b/LAPACKE/src/lapacke_cgesvxx.c
new file mode 100644
index 00000000..93fd35b0
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgesvxx.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgesvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgesvxx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, float* r, float* c,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* rpvgrw, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgesvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -14;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) ) ) {
+ if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+ return -13;
+ }
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -25;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'r' ) ) ) {
+ if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgesvxx_work( matrix_layout, fact, trans, n, nrhs, a, lda, af,
+ ldaf, ipiv, equed, r, c, b, ldb, x, ldx, rcond,
+ rpvgrw, berr, n_err_bnds, err_bnds_norm,
+ err_bnds_comp, nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgesvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgesvxx_work.c b/LAPACKE/src/lapacke_cgesvxx_work.c
new file mode 100644
index 00000000..a3eb2b7f
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgesvxx_work.c
@@ -0,0 +1,182 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgesvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgesvxx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, float* r,
+ float* c, lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* rpvgrw,
+ float* berr, lapack_int n_err_bnds,
+ float* err_bnds_norm, float* err_bnds_comp,
+ lapack_int nparams, float* params,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgesvxx( &fact, &trans, &n, &nrhs, a, &lda, af, &ldaf, ipiv,
+ equed, r, c, b, &ldb, x, &ldx, rcond, rpvgrw, berr,
+ &n_err_bnds, err_bnds_norm, err_bnds_comp, &nparams,
+ params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* af_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cgesvxx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cgesvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_cgesvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_cgesvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgesvxx( &fact, &trans, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, equed, r, c, b_t, &ldb_t, x_t, &ldx_t, rcond,
+ rpvgrw, berr, &n_err_bnds, err_bnds_norm_t,
+ err_bnds_comp_t, &nparams, params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, af_t, ldaf_t, af, ldaf );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgesvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgesvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgetf2.c b/LAPACKE/src/lapacke_cgetf2.c
new file mode 100644
index 00000000..bf2a29c5
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgetf2.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgetf2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgetf2( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgetf2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_cgetf2_work( matrix_layout, m, n, a, lda, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_cgetf2_work.c b/LAPACKE/src/lapacke_cgetf2_work.c
new file mode 100644
index 00000000..eb0f95f1
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgetf2_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgetf2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgetf2_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgetf2( &m, &n, a, &lda, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgetf2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgetf2( &m, &n, a_t, &lda_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgetf2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgetf2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgetrf.c b/LAPACKE/src/lapacke_cgetrf.c
new file mode 100644
index 00000000..0ab95525
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgetrf.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgetrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgetrf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgetrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_cgetrf_work( matrix_layout, m, n, a, lda, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_cgetrf_work.c b/LAPACKE/src/lapacke_cgetrf_work.c
new file mode 100644
index 00000000..865d6205
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgetrf_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgetrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgetrf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgetrf( &m, &n, a, &lda, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cgetrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgetrf( &m, &n, a_t, &lda_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgetrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgetrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgetri.c b/LAPACKE/src/lapacke_cgetri.c
new file mode 100644
index 00000000..94a47a29
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgetri.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgetri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgetri( int matrix_layout, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgetri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -3;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgetri_work( matrix_layout, n, a, lda, ipiv, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgetri_work( matrix_layout, n, a, lda, ipiv, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgetri", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgetri_work.c b/LAPACKE/src/lapacke_cgetri_work.c
new file mode 100644
index 00000000..1226ddc2
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgetri_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgetri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgetri_work( int matrix_layout, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgetri( &n, a, &lda, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -4;
+ LAPACKE_xerbla( "LAPACKE_cgetri_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgetri( &n, a, &lda_t, ipiv, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgetri( &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgetri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgetri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgetrs.c b/LAPACKE/src/lapacke_cgetrs.c
new file mode 100644
index 00000000..c61d9518
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgetrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgetrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgetrs( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgetrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_cgetrs_work( matrix_layout, trans, n, nrhs, a, lda, ipiv, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_cgetrs_work.c b/LAPACKE/src/lapacke_cgetrs_work.c
new file mode 100644
index 00000000..9dc331f7
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgetrs_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgetrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgetrs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgetrs( &trans, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cgetrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cgetrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgetrs( &trans, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgetrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgetrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggbak.c b/LAPACKE/src/lapacke_cggbak.c
new file mode 100644
index 00000000..2720964b
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggbak.c
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggbak
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggbak( int matrix_layout, char job, char side, lapack_int n,
+ lapack_int ilo, lapack_int ihi, const float* lscale,
+ const float* rscale, lapack_int m,
+ lapack_complex_float* v, lapack_int ldv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cggbak", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, lscale, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( n, rscale, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, m, v, ldv ) ) {
+ return -10;
+ }
+#endif
+ return LAPACKE_cggbak_work( matrix_layout, job, side, n, ilo, ihi, lscale,
+ rscale, m, v, ldv );
+}
diff --git a/LAPACKE/src/lapacke_cggbak_work.c b/LAPACKE/src/lapacke_cggbak_work.c
new file mode 100644
index 00000000..920d6871
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggbak_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggbak
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggbak_work( int matrix_layout, char job, char side,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ const float* lscale, const float* rscale,
+ lapack_int m, lapack_complex_float* v,
+ lapack_int ldv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggbak( &job, &side, &n, &ilo, &ihi, lscale, rscale, &m, v, &ldv,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldv_t = MAX(1,n);
+ lapack_complex_float* v_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldv < m ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cggbak_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldv_t * MAX(1,m) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, m, v, ldv, v_t, ldv_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggbak( &job, &side, &n, &ilo, &ihi, lscale, rscale, &m, v_t,
+ &ldv_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, m, v_t, ldv_t, v, ldv );
+ /* Release memory and exit */
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggbak_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cggbak_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggbal.c b/LAPACKE/src/lapacke_cggbal.c
new file mode 100644
index 00000000..73650e41
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggbal.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggbal
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggbal( int matrix_layout, char job, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_int* ilo, lapack_int* ihi, float* lscale,
+ float* rscale )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lwork;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cggbal", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ }
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -6;
+ }
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( job, 's' ) || LAPACKE_lsame( job, 'b' ) ) {
+ lwork = MAX(1,6*n);
+ } else {
+ lwork = 1;
+ }
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cggbal_work( matrix_layout, job, n, a, lda, b, ldb, ilo, ihi,
+ lscale, rscale, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggbal", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggbal_work.c b/LAPACKE/src/lapacke_cggbal_work.c
new file mode 100644
index 00000000..441bc9a2
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggbal_work.c
@@ -0,0 +1,130 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggbal
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggbal_work( int matrix_layout, char job, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_int* ilo, lapack_int* ihi, float* lscale,
+ float* rscale, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggbal( &job, &n, a, &lda, b, &ldb, ilo, ihi, lscale, rscale,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cggbal_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cggbal_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ }
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggbal( &job, &n, a_t, &lda_t, b_t, &ldb_t, ilo, ihi, lscale,
+ rscale, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_free( b_t );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_free( a_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggbal_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cggbal_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgges.c b/LAPACKE/src/lapacke_cgges.c
new file mode 100644
index 00000000..297d1566
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgges.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgges
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgges( int matrix_layout, char jobvsl, char jobvsr, char sort,
+ LAPACK_C_SELECT2 selctg, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_int* sdim, lapack_complex_float* alpha,
+ lapack_complex_float* beta, lapack_complex_float* vsl,
+ lapack_int ldvsl, lapack_complex_float* vsr,
+ lapack_int ldvsr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgges", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,8*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgges_work( matrix_layout, jobvsl, jobvsr, sort, selctg, n, a,
+ lda, b, ldb, sdim, alpha, beta, vsl, ldvsl, vsr,
+ ldvsr, &work_query, lwork, rwork, bwork );
+ if( info != 0 ) {
+ goto exit_level_2;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgges_work( matrix_layout, jobvsl, jobvsr, sort, selctg, n, a,
+ lda, b, ldb, sdim, alpha, beta, vsl, ldvsl, vsr,
+ ldvsr, work, lwork, rwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgges", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgges_work.c b/LAPACKE/src/lapacke_cgges_work.c
new file mode 100644
index 00000000..341a386d
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgges_work.c
@@ -0,0 +1,166 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgges
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgges_work( int matrix_layout, char jobvsl, char jobvsr,
+ char sort, LAPACK_C_SELECT2 selctg, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_int* sdim, lapack_complex_float* alpha,
+ lapack_complex_float* beta,
+ lapack_complex_float* vsl, lapack_int ldvsl,
+ lapack_complex_float* vsr, lapack_int ldvsr,
+ lapack_complex_float* work, lapack_int lwork,
+ float* rwork, lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgges( &jobvsl, &jobvsr, &sort, selctg, &n, a, &lda, b, &ldb,
+ sdim, alpha, beta, vsl, &ldvsl, vsr, &ldvsr, work, &lwork,
+ rwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvsl_t = MAX(1,n);
+ lapack_int ldvsr_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* vsl_t = NULL;
+ lapack_complex_float* vsr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cgges_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_cgges_work", info );
+ return info;
+ }
+ if( ldvsl < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_cgges_work", info );
+ return info;
+ }
+ if( ldvsr < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_cgges_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgges( &jobvsl, &jobvsr, &sort, selctg, &n, a, &lda_t, b,
+ &ldb_t, sdim, alpha, beta, vsl, &ldvsl_t, vsr,
+ &ldvsr_t, work, &lwork, rwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ vsl_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvsl_t * MAX(1,n) );
+ if( vsl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ vsr_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvsr_t * MAX(1,n) );
+ if( vsr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgges( &jobvsl, &jobvsr, &sort, selctg, &n, a_t, &lda_t, b_t,
+ &ldb_t, sdim, alpha, beta, vsl_t, &ldvsl_t, vsr_t,
+ &ldvsr_t, work, &lwork, rwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vsl_t, ldvsl_t, vsl,
+ ldvsl );
+ }
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vsr_t, ldvsr_t, vsr,
+ ldvsr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ LAPACKE_free( vsr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ LAPACKE_free( vsl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgges_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgges_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggesx.c b/LAPACKE/src/lapacke_cggesx.c
new file mode 100644
index 00000000..81683ebb
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggesx.c
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggesx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggesx( int matrix_layout, char jobvsl, char jobvsr,
+ char sort, LAPACK_C_SELECT2 selctg, char sense,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, lapack_int* sdim,
+ lapack_complex_float* alpha,
+ lapack_complex_float* beta,
+ lapack_complex_float* vsl, lapack_int ldvsl,
+ lapack_complex_float* vsr, lapack_int ldvsr,
+ float* rconde, float* rcondv )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_int iwork_query;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cggesx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,8*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cggesx_work( matrix_layout, jobvsl, jobvsr, sort, selctg,
+ sense, n, a, lda, b, ldb, sdim, alpha, beta,
+ vsl, ldvsl, vsr, ldvsr, rconde, rcondv,
+ &work_query, lwork, rwork, &iwork_query, liwork,
+ bwork );
+ if( info != 0 ) {
+ goto exit_level_2;
+ }
+ liwork = (lapack_int)iwork_query;
+ lwork = LAPACK_C2INT( 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_2;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cggesx_work( matrix_layout, jobvsl, jobvsr, sort, selctg,
+ sense, n, a, lda, b, ldb, sdim, alpha, beta,
+ vsl, ldvsl, vsr, ldvsr, rconde, rcondv, work,
+ lwork, rwork, iwork, liwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_3:
+ LAPACKE_free( iwork );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggesx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggesx_work.c b/LAPACKE/src/lapacke_cggesx_work.c
new file mode 100644
index 00000000..c9ac4a38
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggesx_work.c
@@ -0,0 +1,172 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggesx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggesx_work( int matrix_layout, char jobvsl, char jobvsr,
+ char sort, LAPACK_C_SELECT2 selctg, char sense,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, lapack_int* sdim,
+ lapack_complex_float* alpha,
+ lapack_complex_float* beta,
+ lapack_complex_float* vsl, lapack_int ldvsl,
+ lapack_complex_float* vsr, lapack_int ldvsr,
+ float* rconde, float* rcondv,
+ lapack_complex_float* work, lapack_int lwork,
+ float* rwork, lapack_int* iwork,
+ lapack_int liwork, lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggesx( &jobvsl, &jobvsr, &sort, selctg, &sense, &n, a, &lda, b,
+ &ldb, sdim, alpha, beta, vsl, &ldvsl, vsr, &ldvsr,
+ rconde, rcondv, work, &lwork, rwork, iwork, &liwork,
+ bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvsl_t = MAX(1,n);
+ lapack_int ldvsr_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* vsl_t = NULL;
+ lapack_complex_float* vsr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cggesx_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cggesx_work", info );
+ return info;
+ }
+ if( ldvsl < n ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_cggesx_work", info );
+ return info;
+ }
+ if( ldvsr < n ) {
+ info = -18;
+ LAPACKE_xerbla( "LAPACKE_cggesx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_cggesx( &jobvsl, &jobvsr, &sort, selctg, &sense, &n, a,
+ &lda_t, b, &ldb_t, sdim, alpha, beta, vsl, &ldvsl_t,
+ vsr, &ldvsr_t, rconde, rcondv, work, &lwork, rwork,
+ iwork, &liwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ vsl_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvsl_t * MAX(1,n) );
+ if( vsl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ vsr_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvsr_t * MAX(1,n) );
+ if( vsr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggesx( &jobvsl, &jobvsr, &sort, selctg, &sense, &n, a_t, &lda_t,
+ b_t, &ldb_t, sdim, alpha, beta, vsl_t, &ldvsl_t, vsr_t,
+ &ldvsr_t, rconde, rcondv, work, &lwork, rwork, iwork,
+ &liwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vsl_t, ldvsl_t, vsl,
+ ldvsl );
+ }
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vsr_t, ldvsr_t, vsr,
+ ldvsr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ LAPACKE_free( vsr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ LAPACKE_free( vsl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggesx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cggesx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggev.c b/LAPACKE/src/lapacke_cggev.c
new file mode 100644
index 00000000..227a0c08
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggev.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggev( int matrix_layout, char jobvl, char jobvr,
+ lapack_int n, lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* alpha,
+ lapack_complex_float* beta, lapack_complex_float* vl,
+ lapack_int ldvl, lapack_complex_float* vr,
+ lapack_int ldvr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cggev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,8*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cggev_work( matrix_layout, jobvl, jobvr, n, a, lda, b, ldb,
+ alpha, beta, vl, ldvl, vr, ldvr, &work_query,
+ lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cggev_work( matrix_layout, jobvl, jobvr, n, a, lda, b, ldb,
+ alpha, beta, vl, ldvl, vr, ldvr, work, lwork,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggev_work.c b/LAPACKE/src/lapacke_cggev_work.c
new file mode 100644
index 00000000..62e13d31
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggev_work.c
@@ -0,0 +1,168 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggev_work( int matrix_layout, char jobvl, char jobvr,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* alpha,
+ lapack_complex_float* beta,
+ lapack_complex_float* vl, lapack_int ldvl,
+ lapack_complex_float* vr, lapack_int ldvr,
+ lapack_complex_float* work, lapack_int lwork,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggev( &jobvl, &jobvr, &n, a, &lda, b, &ldb, alpha, beta, vl,
+ &ldvl, vr, &ldvr, work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_vl = LAPACKE_lsame( jobvl, 'v' ) ? n : 1;
+ lapack_int ncols_vl = LAPACKE_lsame( jobvl, 'v' ) ? n : 1;
+ lapack_int nrows_vr = LAPACKE_lsame( jobvr, 'v' ) ? n : 1;
+ lapack_int ncols_vr = LAPACKE_lsame( jobvr, 'v' ) ? n : 1;
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,nrows_vl);
+ lapack_int ldvr_t = MAX(1,nrows_vr);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* vl_t = NULL;
+ lapack_complex_float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cggev_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cggev_work", info );
+ return info;
+ }
+ if( ldvl < ncols_vl ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_cggev_work", info );
+ return info;
+ }
+ if( ldvr < ncols_vr ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_cggev_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cggev( &jobvl, &jobvr, &n, a, &lda_t, b, &ldb_t, alpha, beta,
+ vl, &ldvl_t, vr, &ldvr_t, work, &lwork, rwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ vl_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvl_t * MAX(1,ncols_vl) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ vr_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvr_t * MAX(1,ncols_vr) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggev( &jobvl, &jobvr, &n, a_t, &lda_t, b_t, &ldb_t, alpha, beta,
+ vl_t, &ldvl_t, vr_t, &ldvr_t, work, &lwork, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_vl, ncols_vl, vl_t,
+ ldvl_t, vl, ldvl );
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_vr, ncols_vr, vr_t,
+ ldvr_t, vr, ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cggev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggevx.c b/LAPACKE/src/lapacke_cggevx.c
new file mode 100644
index 00000000..5df7c990
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggevx.c
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggevx( int matrix_layout, char balanc, char jobvl,
+ char jobvr, char sense, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* alpha,
+ lapack_complex_float* beta, lapack_complex_float* vl,
+ lapack_int ldvl, lapack_complex_float* vr,
+ lapack_int ldvr, lapack_int* ilo, lapack_int* ihi,
+ float* lscale, float* rscale, float* abnrm,
+ float* bbnrm, float* rconde, float* rcondv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lrwork;
+ lapack_logical* bwork = NULL;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cggevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( balanc, 's' ) || LAPACKE_lsame( balanc, 'b' ) ) {
+ lrwork = MAX(1,6*n);
+ } else {
+ lrwork = MAX(1,2*n);
+ }
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'e' ) ||
+ LAPACKE_lsame( sense, 'v' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'n' ) ||
+ LAPACKE_lsame( sense, 'v' ) ) {
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n+2) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cggevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
+ lda, b, ldb, alpha, beta, vl, ldvl, vr, ldvr,
+ ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde,
+ rcondv, &work_query, lwork, rwork, iwork,
+ bwork );
+ if( info != 0 ) {
+ goto exit_level_3;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cggevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
+ lda, b, ldb, alpha, beta, vl, ldvl, vr, ldvr,
+ ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde,
+ rcondv, work, lwork, rwork, iwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_3:
+ LAPACKE_free( rwork );
+exit_level_2:
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'n' ) ||
+ LAPACKE_lsame( sense, 'v' ) ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'e' ) ||
+ LAPACKE_lsame( sense, 'v' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggevx_work.c b/LAPACKE/src/lapacke_cggevx_work.c
new file mode 100644
index 00000000..e63497f1
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggevx_work.c
@@ -0,0 +1,171 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggevx_work( int matrix_layout, char balanc, char jobvl,
+ char jobvr, char sense, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* alpha,
+ lapack_complex_float* beta,
+ lapack_complex_float* vl, lapack_int ldvl,
+ lapack_complex_float* vr, lapack_int ldvr,
+ lapack_int* ilo, lapack_int* ihi, float* lscale,
+ float* rscale, float* abnrm, float* bbnrm,
+ float* rconde, float* rcondv,
+ lapack_complex_float* work, lapack_int lwork,
+ float* rwork, lapack_int* iwork,
+ lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggevx( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda, b, &ldb,
+ alpha, beta, vl, &ldvl, vr, &ldvr, ilo, ihi, lscale,
+ rscale, abnrm, bbnrm, rconde, rcondv, work, &lwork,
+ rwork, iwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* vl_t = NULL;
+ lapack_complex_float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cggevx_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_cggevx_work", info );
+ return info;
+ }
+ if( ldvl < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_cggevx_work", info );
+ return info;
+ }
+ if( ldvr < n ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_cggevx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cggevx( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda_t, b,
+ &ldb_t, alpha, beta, vl, &ldvl_t, vr, &ldvr_t, ilo,
+ ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv,
+ work, &lwork, rwork, iwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ vl_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvl_t * MAX(1,n) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ vr_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvr_t * MAX(1,n) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggevx( &balanc, &jobvl, &jobvr, &sense, &n, a_t, &lda_t, b_t,
+ &ldb_t, alpha, beta, vl_t, &ldvl_t, vr_t, &ldvr_t, ilo,
+ ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv, work,
+ &lwork, rwork, iwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vl_t, ldvl_t, vl, ldvl );
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vr_t, ldvr_t, vr, ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cggevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggglm.c b/LAPACKE/src/lapacke_cggglm.c
new file mode 100644
index 00000000..7b47ad99
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggglm.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggglm
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggglm( int matrix_layout, lapack_int n, lapack_int m,
+ lapack_int p, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* d,
+ lapack_complex_float* x, lapack_complex_float* y )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cggglm", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, m, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, p, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_c_nancheck( n, d, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cggglm_work( matrix_layout, n, m, p, a, lda, b, ldb, d, x, y,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cggglm_work( matrix_layout, n, m, p, a, lda, b, ldb, d, x, y,
+ work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggglm", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggglm_work.c b/LAPACKE/src/lapacke_cggglm_work.c
new file mode 100644
index 00000000..79a036b8
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggglm_work.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggglm
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggglm_work( int matrix_layout, lapack_int n, lapack_int m,
+ lapack_int p, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* d,
+ lapack_complex_float* x,
+ lapack_complex_float* y,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggglm( &n, &m, &p, a, &lda, b, &ldb, d, x, y, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cggglm_work", info );
+ return info;
+ }
+ if( ldb < p ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cggglm_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cggglm( &n, &m, &p, a, &lda_t, b, &ldb_t, d, x, y, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,p) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, m, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, p, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggglm( &n, &m, &p, a_t, &lda_t, b_t, &ldb_t, d, x, y, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, m, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, p, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggglm_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cggglm_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgghrd.c b/LAPACKE/src/lapacke_cgghrd.c
new file mode 100644
index 00000000..c89a0388
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgghrd.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgghrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgghrd( int matrix_layout, char compq, char compz,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* q, lapack_int ldq,
+ lapack_complex_float* z, lapack_int ldz )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgghrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -13;
+ }
+ }
+#endif
+ return LAPACKE_cgghrd_work( matrix_layout, compq, compz, n, ilo, ihi, a, lda,
+ b, ldb, q, ldq, z, ldz );
+}
diff --git a/LAPACKE/src/lapacke_cgghrd_work.c b/LAPACKE/src/lapacke_cgghrd_work.c
new file mode 100644
index 00000000..3a3009a4
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgghrd_work.c
@@ -0,0 +1,157 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgghrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgghrd_work( int matrix_layout, char compq, char compz,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* q, lapack_int ldq,
+ lapack_complex_float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgghrd( &compq, &compz, &n, &ilo, &ihi, a, &lda, b, &ldb, q,
+ &ldq, z, &ldz, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* q_t = NULL;
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cgghrd_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_cgghrd_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_cgghrd_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_cgghrd_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ q_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgghrd( &compq, &compz, &n, &ilo, &ihi, a_t, &lda_t, b_t, &ldb_t,
+ q_t, &ldq_t, z_t, &ldz_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgghrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgghrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgglse.c b/LAPACKE/src/lapacke_cgglse.c
new file mode 100644
index 00000000..0f37bebc
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgglse.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgglse
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgglse( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int p, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* c,
+ lapack_complex_float* d, lapack_complex_float* x )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgglse", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_c_nancheck( m, c, 1 ) ) {
+ return -9;
+ }
+ if( LAPACKE_c_nancheck( p, d, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cgglse_work( matrix_layout, m, n, p, a, lda, b, ldb, c, d, x,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgglse_work( matrix_layout, m, n, p, a, lda, b, ldb, c, d, x,
+ work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgglse", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgglse_work.c b/LAPACKE/src/lapacke_cgglse_work.c
new file mode 100644
index 00000000..86bc160d
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgglse_work.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgglse
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgglse_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int p, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* c,
+ lapack_complex_float* d,
+ lapack_complex_float* x,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgglse( &m, &n, &p, a, &lda, b, &ldb, c, d, x, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cgglse_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cgglse_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cgglse( &m, &n, &p, a, &lda_t, b, &ldb_t, c, d, x, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgglse( &m, &n, &p, a_t, &lda_t, b_t, &ldb_t, c, d, x, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgglse_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgglse_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggqrf.c b/LAPACKE/src/lapacke_cggqrf.c
new file mode 100644
index 00000000..2167cd7b
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggqrf.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggqrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggqrf( int matrix_layout, lapack_int n, lapack_int m,
+ lapack_int p, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* taua,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* taub )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cggqrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, m, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, p, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cggqrf_work( matrix_layout, n, m, p, a, lda, taua, b, ldb,
+ taub, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cggqrf_work( matrix_layout, n, m, p, a, lda, taua, b, ldb,
+ taub, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggqrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggqrf_work.c b/LAPACKE/src/lapacke_cggqrf_work.c
new file mode 100644
index 00000000..00e5623e
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggqrf_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggqrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggqrf_work( int matrix_layout, lapack_int n, lapack_int m,
+ lapack_int p, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* taua,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* taub,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggqrf( &n, &m, &p, a, &lda, taua, b, &ldb, taub, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cggqrf_work", info );
+ return info;
+ }
+ if( ldb < p ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cggqrf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cggqrf( &n, &m, &p, a, &lda_t, taua, b, &ldb_t, taub, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,p) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, m, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, p, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggqrf( &n, &m, &p, a_t, &lda_t, taua, b_t, &ldb_t, taub, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, m, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, p, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggqrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cggqrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggrqf.c b/LAPACKE/src/lapacke_cggrqf.c
new file mode 100644
index 00000000..5117f955
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggrqf.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggrqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggrqf( int matrix_layout, lapack_int m, lapack_int p,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* taua,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* taub )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cggrqf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cggrqf_work( matrix_layout, m, p, n, a, lda, taua, b, ldb,
+ taub, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cggrqf_work( matrix_layout, m, p, n, a, lda, taua, b, ldb,
+ taub, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggrqf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggrqf_work.c b/LAPACKE/src/lapacke_cggrqf_work.c
new file mode 100644
index 00000000..a4af10be
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggrqf_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggrqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggrqf_work( int matrix_layout, lapack_int m, lapack_int p,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* taua,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* taub,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggrqf( &m, &p, &n, a, &lda, taua, b, &ldb, taub, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cggrqf_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cggrqf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cggrqf( &m, &p, &n, a, &lda_t, taua, b, &ldb_t, taub, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggrqf( &m, &p, &n, a_t, &lda_t, taua, b_t, &ldb_t, taub, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggrqf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cggrqf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggsvd.c b/LAPACKE/src/lapacke_cggsvd.c
new file mode 100644
index 00000000..446d8a59
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggsvd.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggsvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggsvd( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int n, lapack_int p,
+ lapack_int* k, lapack_int* l,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ float* alpha, float* beta, lapack_complex_float* u,
+ lapack_int ldu, lapack_complex_float* v,
+ lapack_int ldv, lapack_complex_float* q,
+ lapack_int ldq, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cggsvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -10;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,MAX3(3*n,m,p)+n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cggsvd_work( matrix_layout, jobu, jobv, jobq, m, n, p, k, l,
+ a, lda, b, ldb, alpha, beta, u, ldu, v, ldv, q,
+ ldq, work, rwork, iwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggsvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggsvd_work.c b/LAPACKE/src/lapacke_cggsvd_work.c
new file mode 100644
index 00000000..6f621b10
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggsvd_work.c
@@ -0,0 +1,181 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggsvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggsvd_work( int matrix_layout, char jobu, char jobv,
+ char jobq, lapack_int m, lapack_int n,
+ lapack_int p, lapack_int* k, lapack_int* l,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ float* alpha, float* beta,
+ lapack_complex_float* u, lapack_int ldu,
+ lapack_complex_float* v, lapack_int ldv,
+ lapack_complex_float* q, lapack_int ldq,
+ lapack_complex_float* work, float* rwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggsvd( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a, &lda, b, &ldb,
+ alpha, beta, u, &ldu, v, &ldv, q, &ldq, work, rwork,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldu_t = MAX(1,m);
+ lapack_int ldv_t = MAX(1,p);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* u_t = NULL;
+ lapack_complex_float* v_t = NULL;
+ lapack_complex_float* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cggsvd_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_cggsvd_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -21;
+ LAPACKE_xerbla( "LAPACKE_cggsvd_work", info );
+ return info;
+ }
+ if( ldu < m ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_cggsvd_work", info );
+ return info;
+ }
+ if( ldv < p ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_cggsvd_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ u_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldu_t * MAX(1,m) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ v_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldv_t * MAX(1,p) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ q_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggsvd( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a_t, &lda_t, b_t,
+ &ldb_t, alpha, beta, u_t, &ldu_t, v_t, &ldv_t, q_t,
+ &ldq_t, work, rwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, p, p, v_t, ldv_t, v, ldv );
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_4:
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_free( v_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggsvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cggsvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggsvp.c b/LAPACKE/src/lapacke_cggsvp.c
new file mode 100644
index 00000000..d62fc19a
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggsvp.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggsvp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggsvp( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int p, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb, float tola,
+ float tolb, lapack_int* k, lapack_int* l,
+ lapack_complex_float* u, lapack_int ldu,
+ lapack_complex_float* v, lapack_int ldv,
+ lapack_complex_float* q, lapack_int ldq )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* tau = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cggsvp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
+ return -12;
+ }
+ if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
+ return -13;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ tau = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n) );
+ if( tau == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,MAX3(3*n,m,p)) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cggsvp_work( matrix_layout, jobu, jobv, jobq, m, p, n, a, lda,
+ b, ldb, tola, tolb, k, l, u, ldu, v, ldv, q,
+ ldq, iwork, rwork, tau, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_3:
+ LAPACKE_free( tau );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggsvp", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cggsvp_work.c b/LAPACKE/src/lapacke_cggsvp_work.c
new file mode 100644
index 00000000..22a50cae
--- /dev/null
+++ b/LAPACKE/src/lapacke_cggsvp_work.c
@@ -0,0 +1,182 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cggsvp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cggsvp_work( int matrix_layout, char jobu, char jobv,
+ char jobq, lapack_int m, lapack_int p,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, float tola, float tolb,
+ lapack_int* k, lapack_int* l,
+ lapack_complex_float* u, lapack_int ldu,
+ lapack_complex_float* v, lapack_int ldv,
+ lapack_complex_float* q, lapack_int ldq,
+ lapack_int* iwork, float* rwork,
+ lapack_complex_float* tau,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggsvp( &jobu, &jobv, &jobq, &m, &p, &n, a, &lda, b, &ldb, &tola,
+ &tolb, k, l, u, &ldu, v, &ldv, q, &ldq, iwork, rwork,
+ tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldu_t = MAX(1,m);
+ lapack_int ldv_t = MAX(1,p);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* u_t = NULL;
+ lapack_complex_float* v_t = NULL;
+ lapack_complex_float* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cggsvp_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cggsvp_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -21;
+ LAPACKE_xerbla( "LAPACKE_cggsvp_work", info );
+ return info;
+ }
+ if( ldu < m ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_cggsvp_work", info );
+ return info;
+ }
+ if( ldv < m ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_cggsvp_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ u_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldu_t * MAX(1,m) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ v_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldv_t * MAX(1,m) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ q_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cggsvp( &jobu, &jobv, &jobq, &m, &p, &n, a_t, &lda_t, b_t,
+ &ldb_t, &tola, &tolb, k, l, u_t, &ldu_t, v_t, &ldv_t,
+ q_t, &ldq_t, iwork, rwork, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, p, m, v_t, ldv_t, v, ldv );
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_4:
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_free( v_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cggsvp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cggsvp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgtcon.c b/LAPACKE/src/lapacke_cgtcon.c
new file mode 100644
index 00000000..17c7813c
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgtcon.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 cgtcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgtcon( char norm, lapack_int n,
+ const lapack_complex_float* dl,
+ const lapack_complex_float* d,
+ const lapack_complex_float* du,
+ const lapack_complex_float* du2,
+ const lapack_int* ipiv, float anorm, float* rcond )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_c_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
+ return -3;
+ }
+ if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_c_nancheck( n-2, du2, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgtcon_work( norm, n, dl, d, du, du2, ipiv, anorm, rcond,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgtcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgtcon_work.c b/LAPACKE/src/lapacke_cgtcon_work.c
new file mode 100644
index 00000000..d9a44d27
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgtcon_work.c
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 cgtcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgtcon_work( char norm, lapack_int n,
+ const lapack_complex_float* dl,
+ const lapack_complex_float* d,
+ const lapack_complex_float* du,
+ const lapack_complex_float* du2,
+ const lapack_int* ipiv, float anorm,
+ float* rcond, lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgtcon( &norm, &n, dl, d, du, du2, ipiv, &anorm, rcond, work,
+ &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgtrfs.c b/LAPACKE/src/lapacke_cgtrfs.c
new file mode 100644
index 00000000..cdec726f
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgtrfs.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgtrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgtrfs( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* dl,
+ const lapack_complex_float* d,
+ const lapack_complex_float* du,
+ const lapack_complex_float* dlf,
+ const lapack_complex_float* df,
+ const lapack_complex_float* duf,
+ const lapack_complex_float* du2,
+ const lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgtrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( LAPACKE_c_nancheck( n, d, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_c_nancheck( n, df, 1 ) ) {
+ return -9;
+ }
+ if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_c_nancheck( n-1, dlf, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_c_nancheck( n-2, du2, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_c_nancheck( n-1, duf, 1 ) ) {
+ return -10;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -15;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgtrfs_work( matrix_layout, trans, n, nrhs, dl, d, du, dlf,
+ df, duf, du2, ipiv, b, ldb, x, ldx, ferr, berr,
+ work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgtrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgtrfs_work.c b/LAPACKE/src/lapacke_cgtrfs_work.c
new file mode 100644
index 00000000..709d86b3
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgtrfs_work.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgtrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgtrfs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* dl,
+ const lapack_complex_float* d,
+ const lapack_complex_float* du,
+ const lapack_complex_float* dlf,
+ const lapack_complex_float* df,
+ const lapack_complex_float* duf,
+ const lapack_complex_float* du2,
+ const lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgtrfs( &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b,
+ &ldb, x, &ldx, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_cgtrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_cgtrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgtrfs( &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2, ipiv,
+ b_t, &ldb_t, x_t, &ldx_t, ferr, berr, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgtrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgtrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgtsv.c b/LAPACKE/src/lapacke_cgtsv.c
new file mode 100644
index 00000000..3e5c4595
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgtsv.c
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgtsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgtsv( int matrix_layout, lapack_int n, lapack_int nrhs,
+ lapack_complex_float* dl, lapack_complex_float* d,
+ lapack_complex_float* du, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgtsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_c_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_cgtsv_work( matrix_layout, n, nrhs, dl, d, du, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_cgtsv_work.c b/LAPACKE/src/lapacke_cgtsv_work.c
new file mode 100644
index 00000000..36941892
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgtsv_work.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgtsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgtsv_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ lapack_complex_float* dl,
+ lapack_complex_float* d,
+ lapack_complex_float* du,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgtsv( &n, &nrhs, dl, d, du, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cgtsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgtsv( &n, &nrhs, dl, d, du, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgtsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgtsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgtsvx.c b/LAPACKE/src/lapacke_cgtsvx.c
new file mode 100644
index 00000000..c2926f43
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgtsvx.c
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgtsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgtsvx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* dl,
+ const lapack_complex_float* d,
+ const lapack_complex_float* du,
+ lapack_complex_float* dlf, lapack_complex_float* df,
+ lapack_complex_float* duf, lapack_complex_float* du2,
+ lapack_int* ipiv, const lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgtsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -14;
+ }
+ if( LAPACKE_c_nancheck( n, d, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_c_nancheck( n, df, 1 ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_c_nancheck( n-1, dlf, 1 ) ) {
+ return -9;
+ }
+ }
+ if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_c_nancheck( n-2, du2, 1 ) ) {
+ return -12;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_c_nancheck( n-1, duf, 1 ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cgtsvx_work( matrix_layout, fact, trans, n, nrhs, dl, d, du,
+ dlf, df, duf, du2, ipiv, b, ldb, x, ldx, rcond,
+ ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgtsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgtsvx_work.c b/LAPACKE/src/lapacke_cgtsvx_work.c
new file mode 100644
index 00000000..cfdac513
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgtsvx_work.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgtsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgtsvx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* dl,
+ const lapack_complex_float* d,
+ const lapack_complex_float* du,
+ lapack_complex_float* dlf,
+ lapack_complex_float* df,
+ lapack_complex_float* duf,
+ lapack_complex_float* du2, lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgtsvx( &fact, &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2,
+ ipiv, b, &ldb, x, &ldx, rcond, ferr, berr, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_cgtsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_cgtsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgtsvx( &fact, &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2,
+ ipiv, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr, berr, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgtsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgtsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgttrf.c b/LAPACKE/src/lapacke_cgttrf.c
new file mode 100644
index 00000000..e660399d
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgttrf.c
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 cgttrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgttrf( lapack_int n, lapack_complex_float* dl,
+ lapack_complex_float* d, lapack_complex_float* du,
+ lapack_complex_float* du2, lapack_int* ipiv )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_c_nancheck( n, d, 1 ) ) {
+ return -3;
+ }
+ if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
+ return -2;
+ }
+ if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_cgttrf_work( n, dl, d, du, du2, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_cgttrf_work.c b/LAPACKE/src/lapacke_cgttrf_work.c
new file mode 100644
index 00000000..502e1c6a
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgttrf_work.c
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 cgttrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgttrf_work( lapack_int n, lapack_complex_float* dl,
+ lapack_complex_float* d,
+ lapack_complex_float* du,
+ lapack_complex_float* du2, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgttrf( &n, dl, d, du, du2, ipiv, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cgttrs.c b/LAPACKE/src/lapacke_cgttrs.c
new file mode 100644
index 00000000..6dc9e10f
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgttrs.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgttrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgttrs( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* dl,
+ const lapack_complex_float* d,
+ const lapack_complex_float* du,
+ const lapack_complex_float* du2,
+ const lapack_int* ipiv, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cgttrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_c_nancheck( n, d, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_c_nancheck( n-2, du2, 1 ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_cgttrs_work( matrix_layout, trans, n, nrhs, dl, d, du, du2,
+ ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_cgttrs_work.c b/LAPACKE/src/lapacke_cgttrs_work.c
new file mode 100644
index 00000000..be3ae84a
--- /dev/null
+++ b/LAPACKE/src/lapacke_cgttrs_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cgttrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cgttrs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* dl,
+ const lapack_complex_float* d,
+ const lapack_complex_float* du,
+ const lapack_complex_float* du2,
+ const lapack_int* ipiv, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgttrs( &trans, &n, &nrhs, dl, d, du, du2, ipiv, b, &ldb,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cgttrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cgttrs( &trans, &n, &nrhs, dl, d, du, du2, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cgttrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cgttrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chbev.c b/LAPACKE/src/lapacke_chbev.c
new file mode 100644
index 00000000..573bf627
--- /dev/null
+++ b/LAPACKE/src/lapacke_chbev.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chbev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chbev( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_int kd, lapack_complex_float* ab,
+ lapack_int ldab, float* w, lapack_complex_float* z,
+ lapack_int ldz )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chbev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n-2) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chbev_work( matrix_layout, jobz, uplo, n, kd, ab, ldab, w, z,
+ ldz, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chbev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chbev_work.c b/LAPACKE/src/lapacke_chbev_work.c
new file mode 100644
index 00000000..b59f59a6
--- /dev/null
+++ b/LAPACKE/src/lapacke_chbev_work.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chbev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chbev_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_int kd,
+ lapack_complex_float* ab, lapack_int ldab,
+ float* w, lapack_complex_float* z,
+ lapack_int ldz, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chbev( &jobz, &uplo, &n, &kd, ab, &ldab, w, z, &ldz, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_chbev_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_chbev_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_chb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chbev( &jobz, &uplo, &n, &kd, ab_t, &ldab_t, w, z_t, &ldz_t,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_chb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chbev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chbev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chbevd.c b/LAPACKE/src/lapacke_chbevd.c
new file mode 100644
index 00000000..e33162b2
--- /dev/null
+++ b/LAPACKE/src/lapacke_chbevd.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chbevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chbevd( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_int kd, lapack_complex_float* ab,
+ lapack_int ldab, float* w, lapack_complex_float* z,
+ lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_int iwork_query;
+ float rwork_query;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chbevd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_chbevd_work( matrix_layout, jobz, uplo, n, kd, ab, ldab, w, z,
+ ldz, &work_query, lwork, &rwork_query, lrwork,
+ &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_C2INT( 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;
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chbevd_work( matrix_layout, jobz, uplo, n, kd, ab, ldab, w, z,
+ ldz, work, lwork, rwork, lrwork, iwork,
+ liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chbevd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chbevd_work.c b/LAPACKE/src/lapacke_chbevd_work.c
new file mode 100644
index 00000000..04976d77
--- /dev/null
+++ b/LAPACKE/src/lapacke_chbevd_work.c
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chbevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chbevd_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_int kd,
+ lapack_complex_float* ab, lapack_int ldab,
+ float* w, lapack_complex_float* z,
+ lapack_int ldz, lapack_complex_float* work,
+ lapack_int lwork, float* rwork,
+ lapack_int lrwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chbevd( &jobz, &uplo, &n, &kd, ab, &ldab, w, z, &ldz, work,
+ &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_chbevd_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_chbevd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lrwork == -1 || lwork == -1 ) {
+ LAPACK_chbevd( &jobz, &uplo, &n, &kd, ab, &ldab_t, w, z, &ldz_t,
+ work, &lwork, rwork, &lrwork, iwork, &liwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_chb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chbevd( &jobz, &uplo, &n, &kd, ab_t, &ldab_t, w, z_t, &ldz_t,
+ work, &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_chb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chbevd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chbevd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chbevx.c b/LAPACKE/src/lapacke_chbevx.c
new file mode 100644
index 00000000..0886977f
--- /dev/null
+++ b/LAPACKE/src/lapacke_chbevx.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chbevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chbevx( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, lapack_int kd,
+ lapack_complex_float* ab, lapack_int ldab,
+ lapack_complex_float* q, lapack_int ldq, float vl,
+ float vu, lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, lapack_complex_float* z,
+ lapack_int ldz, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chbevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -15;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,7*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chbevx_work( matrix_layout, jobz, range, uplo, n, kd, ab,
+ ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z,
+ ldz, work, rwork, iwork, ifail );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chbevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chbevx_work.c b/LAPACKE/src/lapacke_chbevx_work.c
new file mode 100644
index 00000000..d4ca05f2
--- /dev/null
+++ b/LAPACKE/src/lapacke_chbevx_work.c
@@ -0,0 +1,145 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chbevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chbevx_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n, lapack_int kd,
+ lapack_complex_float* ab, lapack_int ldab,
+ lapack_complex_float* q, lapack_int ldq,
+ float vl, float vu, lapack_int il,
+ lapack_int iu, float abstol, lapack_int* m,
+ float* w, lapack_complex_float* z,
+ lapack_int ldz, lapack_complex_float* work,
+ float* rwork, lapack_int* iwork,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chbevx( &jobz, &range, &uplo, &n, &kd, ab, &ldab, q, &ldq, &vl,
+ &vu, &il, &iu, &abstol, m, w, z, &ldz, work, rwork,
+ iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* q_t = NULL;
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_chbevx_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_chbevx_work", info );
+ return info;
+ }
+ if( ldz < ncols_z ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_chbevx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ q_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_chb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chbevx( &jobz, &range, &uplo, &n, &kd, ab_t, &ldab_t, q_t,
+ &ldq_t, &vl, &vu, &il, &iu, &abstol, m, w, z_t, &ldz_t,
+ work, rwork, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_chb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chbevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chbevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chbgst.c b/LAPACKE/src/lapacke_chbgst.c
new file mode 100644
index 00000000..ee42e5f1
--- /dev/null
+++ b/LAPACKE/src/lapacke_chbgst.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chbgst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chbgst( int matrix_layout, char vect, char uplo, lapack_int n,
+ lapack_int ka, lapack_int kb,
+ lapack_complex_float* ab, lapack_int ldab,
+ const lapack_complex_float* bb, lapack_int ldbb,
+ lapack_complex_float* x, lapack_int ldx )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chbgst", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chbgst_work( matrix_layout, vect, uplo, n, ka, kb, ab, ldab,
+ bb, ldbb, x, ldx, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chbgst", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chbgst_work.c b/LAPACKE/src/lapacke_chbgst_work.c
new file mode 100644
index 00000000..c149d170
--- /dev/null
+++ b/LAPACKE/src/lapacke_chbgst_work.c
@@ -0,0 +1,128 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chbgst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chbgst_work( int matrix_layout, char vect, char uplo,
+ lapack_int n, lapack_int ka, lapack_int kb,
+ lapack_complex_float* ab, lapack_int ldab,
+ const lapack_complex_float* bb, lapack_int ldbb,
+ lapack_complex_float* x, lapack_int ldx,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chbgst( &vect, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, x,
+ &ldx, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,ka+1);
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* bb_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_chbgst_work", info );
+ return info;
+ }
+ if( ldbb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_chbgst_work", info );
+ return info;
+ }
+ if( ldx < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_chbgst_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bb_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( vect, 'v' ) ) {
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,n) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_chb_trans( matrix_layout, uplo, n, ka, ab, ldab, ab_t, ldab_t );
+ LAPACKE_chb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chbgst( &vect, &uplo, &n, &ka, &kb, ab_t, &ldab_t, bb_t, &ldbb_t,
+ x_t, &ldx_t, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_chb_trans( LAPACK_COL_MAJOR, uplo, n, ka, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, x_t, ldx_t, x, ldx );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_free( x_t );
+ }
+exit_level_2:
+ LAPACKE_free( bb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chbgst_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chbgst_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chbgv.c b/LAPACKE/src/lapacke_chbgv.c
new file mode 100644
index 00000000..c8a47a28
--- /dev/null
+++ b/LAPACKE/src/lapacke_chbgv.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chbgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chbgv( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_int ka, lapack_int kb,
+ lapack_complex_float* ab, lapack_int ldab,
+ lapack_complex_float* bb, lapack_int ldbb, float* w,
+ lapack_complex_float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chbgv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chbgv_work( matrix_layout, jobz, uplo, n, ka, kb, ab, ldab,
+ bb, ldbb, w, z, ldz, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chbgv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chbgv_work.c b/LAPACKE/src/lapacke_chbgv_work.c
new file mode 100644
index 00000000..1a124cc2
--- /dev/null
+++ b/LAPACKE/src/lapacke_chbgv_work.c
@@ -0,0 +1,131 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chbgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chbgv_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_int ka, lapack_int kb,
+ lapack_complex_float* ab, lapack_int ldab,
+ lapack_complex_float* bb, lapack_int ldbb,
+ float* w, lapack_complex_float* z,
+ lapack_int ldz, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chbgv( &jobz, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, w, z,
+ &ldz, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,ka+1);
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* bb_t = NULL;
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_chbgv_work", info );
+ return info;
+ }
+ if( ldbb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_chbgv_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_chbgv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bb_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_chb_trans( matrix_layout, uplo, n, ka, ab, ldab, ab_t, ldab_t );
+ LAPACKE_chb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chbgv( &jobz, &uplo, &n, &ka, &kb, ab_t, &ldab_t, bb_t, &ldbb_t,
+ w, z_t, &ldz_t, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_chb_trans( LAPACK_COL_MAJOR, uplo, n, ka, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_chb_trans( LAPACK_COL_MAJOR, uplo, n, kb, bb_t, ldbb_t, bb,
+ ldbb );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_2:
+ LAPACKE_free( bb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chbgv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chbgv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chbgvd.c b/LAPACKE/src/lapacke_chbgvd.c
new file mode 100644
index 00000000..117a3249
--- /dev/null
+++ b/LAPACKE/src/lapacke_chbgvd.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chbgvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chbgvd( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_int ka, lapack_int kb,
+ lapack_complex_float* ab, lapack_int ldab,
+ lapack_complex_float* bb, lapack_int ldbb, float* w,
+ lapack_complex_float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_int iwork_query;
+ float rwork_query;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chbgvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_chbgvd_work( matrix_layout, jobz, uplo, n, ka, kb, ab, ldab,
+ bb, ldbb, w, z, ldz, &work_query, lwork,
+ &rwork_query, lrwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_C2INT( 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;
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chbgvd_work( matrix_layout, jobz, uplo, n, ka, kb, ab, ldab,
+ bb, ldbb, w, z, ldz, work, lwork, rwork, lrwork,
+ iwork, liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chbgvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chbgvd_work.c b/LAPACKE/src/lapacke_chbgvd_work.c
new file mode 100644
index 00000000..f8166627
--- /dev/null
+++ b/LAPACKE/src/lapacke_chbgvd_work.c
@@ -0,0 +1,142 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chbgvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chbgvd_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_int ka, lapack_int kb,
+ lapack_complex_float* ab, lapack_int ldab,
+ lapack_complex_float* bb, lapack_int ldbb,
+ float* w, lapack_complex_float* z,
+ lapack_int ldz, lapack_complex_float* work,
+ lapack_int lwork, float* rwork,
+ lapack_int lrwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chbgvd( &jobz, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, w, z,
+ &ldz, work, &lwork, rwork, &lrwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,ka+1);
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* bb_t = NULL;
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_chbgvd_work", info );
+ return info;
+ }
+ if( ldbb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_chbgvd_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_chbgvd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lrwork == -1 || lwork == -1 ) {
+ LAPACK_chbgvd( &jobz, &uplo, &n, &ka, &kb, ab, &ldab_t, bb, &ldbb_t,
+ w, z, &ldz_t, work, &lwork, rwork, &lrwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bb_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_chb_trans( matrix_layout, uplo, n, ka, ab, ldab, ab_t, ldab_t );
+ LAPACKE_chb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chbgvd( &jobz, &uplo, &n, &ka, &kb, ab_t, &ldab_t, bb_t, &ldbb_t,
+ w, z_t, &ldz_t, work, &lwork, rwork, &lrwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_chb_trans( LAPACK_COL_MAJOR, uplo, n, ka, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_chb_trans( LAPACK_COL_MAJOR, uplo, n, kb, bb_t, ldbb_t, bb,
+ ldbb );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_2:
+ LAPACKE_free( bb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chbgvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chbgvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chbgvx.c b/LAPACKE/src/lapacke_chbgvx.c
new file mode 100644
index 00000000..57fdb89a
--- /dev/null
+++ b/LAPACKE/src/lapacke_chbgvx.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chbgvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chbgvx( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, lapack_int ka, lapack_int kb,
+ lapack_complex_float* ab, lapack_int ldab,
+ lapack_complex_float* bb, lapack_int ldbb,
+ lapack_complex_float* q, lapack_int ldq, float vl,
+ float vu, lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, lapack_complex_float* z,
+ lapack_int ldz, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chbgvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -18;
+ }
+ if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -14;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -15;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,7*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chbgvx_work( matrix_layout, jobz, range, uplo, n, ka, kb, ab,
+ ldab, bb, ldbb, q, ldq, vl, vu, il, iu, abstol,
+ m, w, z, ldz, work, rwork, iwork, ifail );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chbgvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chbgvx_work.c b/LAPACKE/src/lapacke_chbgvx_work.c
new file mode 100644
index 00000000..24a413f1
--- /dev/null
+++ b/LAPACKE/src/lapacke_chbgvx_work.c
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chbgvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chbgvx_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n, lapack_int ka,
+ lapack_int kb, lapack_complex_float* ab,
+ lapack_int ldab, lapack_complex_float* bb,
+ lapack_int ldbb, lapack_complex_float* q,
+ lapack_int ldq, float vl, float vu,
+ lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w,
+ lapack_complex_float* z, lapack_int ldz,
+ lapack_complex_float* work, float* rwork,
+ lapack_int* iwork, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chbgvx( &jobz, &range, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb,
+ q, &ldq, &vl, &vu, &il, &iu, &abstol, m, w, z, &ldz,
+ work, rwork, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,ka+1);
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* bb_t = NULL;
+ lapack_complex_float* q_t = NULL;
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_chbgvx_work", info );
+ return info;
+ }
+ if( ldbb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_chbgvx_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_chbgvx_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -22;
+ LAPACKE_xerbla( "LAPACKE_chbgvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bb_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ q_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_chb_trans( matrix_layout, uplo, n, ka, ab, ldab, ab_t, ldab_t );
+ LAPACKE_chb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chbgvx( &jobz, &range, &uplo, &n, &ka, &kb, ab_t, &ldab_t, bb_t,
+ &ldbb_t, q_t, &ldq_t, &vl, &vu, &il, &iu, &abstol, m, w,
+ z_t, &ldz_t, work, rwork, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_chb_trans( LAPACK_COL_MAJOR, uplo, n, ka, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_chb_trans( LAPACK_COL_MAJOR, uplo, n, kb, bb_t, ldbb_t, bb,
+ ldbb );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( bb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chbgvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chbgvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chbtrd.c b/LAPACKE/src/lapacke_chbtrd.c
new file mode 100644
index 00000000..3786c586
--- /dev/null
+++ b/LAPACKE/src/lapacke_chbtrd.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chbtrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chbtrd( int matrix_layout, char vect, char uplo, lapack_int n,
+ lapack_int kd, lapack_complex_float* ab,
+ lapack_int ldab, float* d, float* e,
+ lapack_complex_float* q, lapack_int ldq )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chbtrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chbtrd_work( matrix_layout, vect, uplo, n, kd, ab, ldab, d, e,
+ q, ldq, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chbtrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chbtrd_work.c b/LAPACKE/src/lapacke_chbtrd_work.c
new file mode 100644
index 00000000..9a2cef24
--- /dev/null
+++ b/LAPACKE/src/lapacke_chbtrd_work.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chbtrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chbtrd_work( int matrix_layout, char vect, char uplo,
+ lapack_int n, lapack_int kd,
+ lapack_complex_float* ab, lapack_int ldab,
+ float* d, float* e, lapack_complex_float* q,
+ lapack_int ldq, lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chbtrd( &vect, &uplo, &n, &kd, ab, &ldab, d, e, q, &ldq, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_chbtrd_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_chbtrd_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ q_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_chb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_chbtrd( &vect, &uplo, &n, &kd, ab_t, &ldab_t, d, e, q_t, &ldq_t,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_chb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chbtrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chbtrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_checon.c b/LAPACKE/src/lapacke_checon.c
new file mode 100644
index 00000000..f95b6f41
--- /dev/null
+++ b/LAPACKE/src/lapacke_checon.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 checon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_checon( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv, float anorm, float* rcond )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_checon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_checon_work( matrix_layout, uplo, n, a, lda, ipiv, anorm,
+ rcond, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_checon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_checon_work.c b/LAPACKE/src/lapacke_checon_work.c
new file mode 100644
index 00000000..a1a6dfe3
--- /dev/null
+++ b/LAPACKE/src/lapacke_checon_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 checon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_checon_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv, float anorm,
+ float* rcond, lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_checon( &uplo, &n, a, &lda, ipiv, &anorm, rcond, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_checon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_checon( &uplo, &n, a_t, &lda_t, ipiv, &anorm, rcond, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_checon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_checon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cheequb.c b/LAPACKE/src/lapacke_cheequb.c
new file mode 100644
index 00000000..4cd0c4db
--- /dev/null
+++ b/LAPACKE/src/lapacke_cheequb.c
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cheequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cheequb( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float* s, float* scond, float* amax )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cheequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cheequb_work( matrix_layout, uplo, n, a, lda, s, scond, amax,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cheequb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cheequb_work.c b/LAPACKE/src/lapacke_cheequb_work.c
new file mode 100644
index 00000000..cd5e18d7
--- /dev/null
+++ b/LAPACKE/src/lapacke_cheequb_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cheequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cheequb_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float* s, float* scond, float* amax,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cheequb( &uplo, &n, a, &lda, s, scond, amax, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cheequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cheequb( &uplo, &n, a_t, &lda_t, s, scond, amax, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cheequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cheequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cheev.c b/LAPACKE/src/lapacke_cheev.c
new file mode 100644
index 00000000..d2158904
--- /dev/null
+++ b/LAPACKE/src/lapacke_cheev.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cheev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cheev( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda, float* w )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cheev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n-2) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cheev_work( matrix_layout, jobz, uplo, n, a, lda, w,
+ &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cheev_work( matrix_layout, jobz, uplo, n, a, lda, w, work,
+ lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cheev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cheev_work.c b/LAPACKE/src/lapacke_cheev_work.c
new file mode 100644
index 00000000..dbaa7566
--- /dev/null
+++ b/LAPACKE/src/lapacke_cheev_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cheev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cheev_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda, float* w,
+ lapack_complex_float* work, lapack_int lwork,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cheev( &jobz, &uplo, &n, a, &lda, w, work, &lwork, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cheev_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cheev( &jobz, &uplo, &n, a, &lda_t, w, work, &lwork, rwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cheev( &jobz, &uplo, &n, a_t, &lda_t, w, work, &lwork, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cheev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cheev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cheevd.c b/LAPACKE/src/lapacke_cheevd.c
new file mode 100644
index 00000000..9a3ff8f0
--- /dev/null
+++ b/LAPACKE/src/lapacke_cheevd.c
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cheevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cheevd( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda, float* w )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_int iwork_query;
+ float rwork_query;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cheevd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cheevd_work( matrix_layout, jobz, uplo, n, a, lda, w,
+ &work_query, lwork, &rwork_query, lrwork,
+ &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_C2INT( 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;
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cheevd_work( matrix_layout, jobz, uplo, n, a, lda, w, work,
+ lwork, rwork, lrwork, iwork, liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cheevd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cheevd_work.c b/LAPACKE/src/lapacke_cheevd_work.c
new file mode 100644
index 00000000..d9c4197b
--- /dev/null
+++ b/LAPACKE/src/lapacke_cheevd_work.c
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cheevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cheevd_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda, float* w,
+ lapack_complex_float* work, lapack_int lwork,
+ float* rwork, lapack_int lrwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cheevd( &jobz, &uplo, &n, a, &lda, w, work, &lwork, rwork,
+ &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cheevd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lrwork == -1 || lwork == -1 ) {
+ LAPACK_cheevd( &jobz, &uplo, &n, a, &lda_t, w, work, &lwork, rwork,
+ &lrwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cheevd( &jobz, &uplo, &n, a_t, &lda_t, w, work, &lwork, rwork,
+ &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cheevd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cheevd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cheevr.c b/LAPACKE/src/lapacke_cheevr.c
new file mode 100644
index 00000000..3bdd8685
--- /dev/null
+++ b/LAPACKE/src/lapacke_cheevr.c
@@ -0,0 +1,119 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cheevr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cheevr( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda, float vl, float vu, lapack_int il,
+ lapack_int iu, float abstol, lapack_int* m, float* w,
+ lapack_complex_float* z, lapack_int ldz,
+ lapack_int* isuppz )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_int iwork_query;
+ float rwork_query;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cheevr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -12;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -9;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cheevr_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
+ vu, il, iu, abstol, m, w, z, ldz, isuppz,
+ &work_query, lwork, &rwork_query, lrwork,
+ &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_C2INT( 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;
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cheevr_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
+ vu, il, iu, abstol, m, w, z, ldz, isuppz, work,
+ lwork, rwork, lrwork, iwork, liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cheevr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cheevr_work.c b/LAPACKE/src/lapacke_cheevr_work.c
new file mode 100644
index 00000000..31fde53b
--- /dev/null
+++ b/LAPACKE/src/lapacke_cheevr_work.c
@@ -0,0 +1,128 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cheevr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cheevr_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ float vl, float vu, lapack_int il,
+ lapack_int iu, float abstol, lapack_int* m,
+ float* w, lapack_complex_float* z,
+ lapack_int ldz, lapack_int* isuppz,
+ lapack_complex_float* work, lapack_int lwork,
+ float* rwork, lapack_int lrwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cheevr( &jobz, &range, &uplo, &n, a, &lda, &vl, &vu, &il, &iu,
+ &abstol, m, w, z, &ldz, isuppz, work, &lwork, rwork,
+ &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cheevr_work", info );
+ return info;
+ }
+ if( ldz < ncols_z ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_cheevr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lrwork == -1 || lwork == -1 ) {
+ LAPACK_cheevr( &jobz, &range, &uplo, &n, a, &lda_t, &vl, &vu, &il,
+ &iu, &abstol, m, w, z, &ldz_t, isuppz, work, &lwork,
+ rwork, &lrwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cheevr( &jobz, &range, &uplo, &n, a_t, &lda_t, &vl, &vu, &il,
+ &iu, &abstol, m, w, z_t, &ldz_t, isuppz, work, &lwork,
+ rwork, &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cheevr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cheevr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cheevx.c b/LAPACKE/src/lapacke_cheevx.c
new file mode 100644
index 00000000..b75c2d63
--- /dev/null
+++ b/LAPACKE/src/lapacke_cheevx.c
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cheevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cheevx( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda, float vl, float vu, lapack_int il,
+ lapack_int iu, float abstol, lapack_int* m, float* w,
+ lapack_complex_float* z, lapack_int ldz,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cheevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -12;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -9;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,7*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cheevx_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
+ vu, il, iu, abstol, m, w, z, ldz, &work_query,
+ lwork, rwork, iwork, ifail );
+ if( info != 0 ) {
+ goto exit_level_2;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cheevx_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
+ vu, il, iu, abstol, m, w, z, ldz, work, lwork,
+ rwork, iwork, ifail );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cheevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cheevx_work.c b/LAPACKE/src/lapacke_cheevx_work.c
new file mode 100644
index 00000000..00a19149
--- /dev/null
+++ b/LAPACKE/src/lapacke_cheevx_work.c
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cheevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cheevx_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ float vl, float vu, lapack_int il,
+ lapack_int iu, float abstol, lapack_int* m,
+ float* w, lapack_complex_float* z,
+ lapack_int ldz, lapack_complex_float* work,
+ lapack_int lwork, float* rwork,
+ lapack_int* iwork, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cheevx( &jobz, &range, &uplo, &n, a, &lda, &vl, &vu, &il, &iu,
+ &abstol, m, w, z, &ldz, work, &lwork, rwork, iwork,
+ ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cheevx_work", info );
+ return info;
+ }
+ if( ldz < ncols_z ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_cheevx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cheevx( &jobz, &range, &uplo, &n, a, &lda_t, &vl, &vu, &il,
+ &iu, &abstol, m, w, z, &ldz_t, work, &lwork, rwork,
+ iwork, ifail, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cheevx( &jobz, &range, &uplo, &n, a_t, &lda_t, &vl, &vu, &il,
+ &iu, &abstol, m, w, z_t, &ldz_t, work, &lwork, rwork,
+ iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cheevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cheevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chegst.c b/LAPACKE/src/lapacke_chegst.c
new file mode 100644
index 00000000..e15e260e
--- /dev/null
+++ b/LAPACKE/src/lapacke_chegst.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chegst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chegst( int matrix_layout, lapack_int itype, char uplo,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chegst", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_chegst_work( matrix_layout, itype, uplo, n, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_chegst_work.c b/LAPACKE/src/lapacke_chegst_work.c
new file mode 100644
index 00000000..09cefb99
--- /dev/null
+++ b/LAPACKE/src/lapacke_chegst_work.c
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chegst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chegst_work( int matrix_layout, lapack_int itype, char uplo,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chegst( &itype, &uplo, &n, a, &lda, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_chegst_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_chegst_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chegst( &itype, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chegst_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chegst_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chegv.c b/LAPACKE/src/lapacke_chegv.c
new file mode 100644
index 00000000..1f89d14c
--- /dev/null
+++ b/LAPACKE/src/lapacke_chegv.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chegv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chegv( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, float* w )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chegv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n-2) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_chegv_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
+ ldb, w, &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chegv_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
+ ldb, w, work, lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chegv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chegv_work.c b/LAPACKE/src/lapacke_chegv_work.c
new file mode 100644
index 00000000..2ebdebb9
--- /dev/null
+++ b/LAPACKE/src/lapacke_chegv_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chegv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chegv_work( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, float* w,
+ lapack_complex_float* work, lapack_int lwork,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chegv( &itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work,
+ &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_chegv_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_chegv_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_chegv( &itype, &jobz, &uplo, &n, a, &lda_t, b, &ldb_t, w,
+ work, &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chegv( &itype, &jobz, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, w,
+ work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chegv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chegv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chegvd.c b/LAPACKE/src/lapacke_chegvd.c
new file mode 100644
index 00000000..6f4380ef
--- /dev/null
+++ b/LAPACKE/src/lapacke_chegvd.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chegvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chegvd( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, float* w )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_int iwork_query;
+ float rwork_query;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chegvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_chegvd_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
+ ldb, w, &work_query, lwork, &rwork_query,
+ lrwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_C2INT( 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;
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chegvd_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
+ ldb, w, work, lwork, rwork, lrwork, iwork,
+ liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chegvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chegvd_work.c b/LAPACKE/src/lapacke_chegvd_work.c
new file mode 100644
index 00000000..2e442481
--- /dev/null
+++ b/LAPACKE/src/lapacke_chegvd_work.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chegvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chegvd_work( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ float* w, lapack_complex_float* work,
+ lapack_int lwork, float* rwork,
+ lapack_int lrwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chegvd( &itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work,
+ &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_chegvd_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_chegvd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lrwork == -1 || lwork == -1 ) {
+ LAPACK_chegvd( &itype, &jobz, &uplo, &n, a, &lda_t, b, &ldb_t, w,
+ work, &lwork, rwork, &lrwork, iwork, &liwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chegvd( &itype, &jobz, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, w,
+ work, &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chegvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chegvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chegvx.c b/LAPACKE/src/lapacke_chegvx.c
new file mode 100644
index 00000000..fda7f510
--- /dev/null
+++ b/LAPACKE/src/lapacke_chegvx.c
@@ -0,0 +1,117 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chegvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chegvx( int matrix_layout, lapack_int itype, char jobz,
+ char range, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb, float vl,
+ float vu, lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, lapack_complex_float* z,
+ lapack_int ldz, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chegvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -15;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,7*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_chegvx_work( matrix_layout, itype, jobz, range, uplo, n, a,
+ lda, b, ldb, vl, vu, il, iu, abstol, m, w, z,
+ ldz, &work_query, lwork, rwork, iwork, ifail );
+ if( info != 0 ) {
+ goto exit_level_2;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chegvx_work( matrix_layout, itype, jobz, range, uplo, n, a,
+ lda, b, ldb, vl, vu, il, iu, abstol, m, w, z,
+ ldz, work, lwork, rwork, iwork, ifail );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chegvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chegvx_work.c b/LAPACKE/src/lapacke_chegvx_work.c
new file mode 100644
index 00000000..46c2ebff
--- /dev/null
+++ b/LAPACKE/src/lapacke_chegvx_work.c
@@ -0,0 +1,145 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chegvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chegvx_work( int matrix_layout, lapack_int itype, char jobz,
+ char range, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ float vl, float vu, lapack_int il,
+ lapack_int iu, float abstol, lapack_int* m,
+ float* w, lapack_complex_float* z,
+ lapack_int ldz, lapack_complex_float* work,
+ lapack_int lwork, float* rwork,
+ lapack_int* iwork, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chegvx( &itype, &jobz, &range, &uplo, &n, a, &lda, b, &ldb, &vl,
+ &vu, &il, &iu, &abstol, m, w, z, &ldz, work, &lwork,
+ rwork, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_chegvx_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_chegvx_work", info );
+ return info;
+ }
+ if( ldz < ncols_z ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_chegvx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_chegvx( &itype, &jobz, &range, &uplo, &n, a, &lda_t, b,
+ &ldb_t, &vl, &vu, &il, &iu, &abstol, m, w, z, &ldz_t,
+ work, &lwork, rwork, iwork, ifail, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chegvx( &itype, &jobz, &range, &uplo, &n, a_t, &lda_t, b_t,
+ &ldb_t, &vl, &vu, &il, &iu, &abstol, m, w, z_t, &ldz_t,
+ work, &lwork, rwork, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chegvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chegvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cherfs.c b/LAPACKE/src/lapacke_cherfs.c
new file mode 100644
index 00000000..d1ad1dc2
--- /dev/null
+++ b/LAPACKE/src/lapacke_cherfs.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cherfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cherfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cherfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cherfs_work( matrix_layout, uplo, n, nrhs, a, lda, af, ldaf,
+ ipiv, b, ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cherfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cherfs_work.c b/LAPACKE/src/lapacke_cherfs_work.c
new file mode 100644
index 00000000..ef66bc51
--- /dev/null
+++ b/LAPACKE/src/lapacke_cherfs_work.c
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cherfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cherfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cherfs( &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b, &ldb, x,
+ &ldx, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* af_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cherfs_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cherfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cherfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_cherfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_che_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cherfs( &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, ipiv, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cherfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cherfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cherfsx.c b/LAPACKE/src/lapacke_cherfsx.c
new file mode 100644
index 00000000..589f66e6
--- /dev/null
+++ b/LAPACKE/src/lapacke_cherfsx.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cherfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cherfsx( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* af, lapack_int ldaf,
+ const lapack_int* ipiv, const float* s,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* berr, lapack_int n_err_bnds,
+ float* err_bnds_norm, float* err_bnds_comp,
+ lapack_int nparams, float* params )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cherfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -22;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'y' ) ) {
+ if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -14;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cherfsx_work( matrix_layout, uplo, equed, n, nrhs, a, lda, af,
+ ldaf, ipiv, s, b, ldb, x, ldx, rcond, berr,
+ n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cherfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cherfsx_work.c b/LAPACKE/src/lapacke_cherfsx_work.c
new file mode 100644
index 00000000..ef3bc14b
--- /dev/null
+++ b/LAPACKE/src/lapacke_cherfsx_work.c
@@ -0,0 +1,170 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cherfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cherfsx_work( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const float* s, const lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cherfsx( &uplo, &equed, &n, &nrhs, a, &lda, af, &ldaf, ipiv, s,
+ b, &ldb, x, &ldx, rcond, berr, &n_err_bnds,
+ err_bnds_norm, err_bnds_comp, &nparams, params, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* af_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cherfsx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cherfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_cherfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_cherfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_che_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cherfsx( &uplo, &equed, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, s, b_t, &ldb_t, x_t, &ldx_t, rcond, berr,
+ &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t, &nparams,
+ params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cherfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cherfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chesv.c b/LAPACKE/src/lapacke_chesv.c
new file mode 100644
index 00000000..dc4e25d6
--- /dev/null
+++ b/LAPACKE/src/lapacke_chesv.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chesv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chesv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* a,
+ lapack_int lda, lapack_int* ipiv,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chesv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_chesv_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chesv_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chesv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chesv_work.c b/LAPACKE/src/lapacke_chesv_work.c
new file mode 100644
index 00000000..dbcdef40
--- /dev/null
+++ b/LAPACKE/src/lapacke_chesv_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chesv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chesv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* a,
+ lapack_int lda, lapack_int* ipiv,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chesv( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_chesv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_chesv_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_chesv( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chesv( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chesv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chesv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chesvx.c b/LAPACKE/src/lapacke_chesvx.c
new file mode 100644
index 00000000..78af8fdd
--- /dev/null
+++ b/LAPACKE/src/lapacke_chesvx.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chesvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chesvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* af,
+ lapack_int ldaf, lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chesvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -11;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_chesvx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr,
+ &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chesvx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr,
+ work, lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chesvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chesvx_work.c b/LAPACKE/src/lapacke_chesvx_work.c
new file mode 100644
index 00000000..7744ed42
--- /dev/null
+++ b/LAPACKE/src/lapacke_chesvx_work.c
@@ -0,0 +1,155 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chesvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chesvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* af, lapack_int ldaf,
+ lapack_int* ipiv, const lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* ferr,
+ float* berr, lapack_complex_float* work,
+ lapack_int lwork, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chesvx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b,
+ &ldb, x, &ldx, rcond, ferr, berr, work, &lwork, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* af_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_chesvx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_chesvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_chesvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_chesvx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_chesvx( &fact, &uplo, &n, &nrhs, a, &lda_t, af, &ldaf_t,
+ ipiv, b, &ldb_t, x, &ldx_t, rcond, ferr, berr, work,
+ &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_che_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chesvx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr, berr, work,
+ &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chesvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chesvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chesvxx.c b/LAPACKE/src/lapacke_chesvxx.c
new file mode 100644
index 00000000..f88131d9
--- /dev/null
+++ b/LAPACKE/src/lapacke_chesvxx.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chesvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chesvxx( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, float* s,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* rpvgrw, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chesvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -24;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chesvxx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, equed, s, b, ldb, x, ldx, rcond,
+ rpvgrw, berr, n_err_bnds, err_bnds_norm,
+ err_bnds_comp, nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chesvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chesvxx_work.c b/LAPACKE/src/lapacke_chesvxx_work.c
new file mode 100644
index 00000000..52bcd71a
--- /dev/null
+++ b/LAPACKE/src/lapacke_chesvxx_work.c
@@ -0,0 +1,181 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chesvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chesvxx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, float* s,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* rpvgrw, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chesvxx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv,
+ equed, s, b, &ldb, x, &ldx, rcond, rpvgrw, berr,
+ &n_err_bnds, err_bnds_norm, err_bnds_comp, &nparams,
+ params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* af_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_chesvxx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_chesvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_chesvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_chesvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_che_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chesvxx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond, rpvgrw,
+ berr, &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t,
+ &nparams, params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chesvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chesvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cheswapr.c b/LAPACKE/src/lapacke_cheswapr.c
new file mode 100644
index 00000000..cceacba1
--- /dev/null
+++ b/LAPACKE/src/lapacke_cheswapr.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cheswapr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cheswapr( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int i1,
+ lapack_int i2 )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cheswapr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, n ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_cheswapr_work( matrix_layout, uplo, n, a, i1, i2 );
+}
diff --git a/LAPACKE/src/lapacke_cheswapr_work.c b/LAPACKE/src/lapacke_cheswapr_work.c
new file mode 100644
index 00000000..ce4eae5d
--- /dev/null
+++ b/LAPACKE/src/lapacke_cheswapr_work.c
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cheswapr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cheswapr_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int i1,
+ lapack_int i2 )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cheswapr( &uplo, &n, a, &i1, &i2 );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * n * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, n, a_t, n );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cheswapr( &uplo, &n, a_t, &i1, &i2 );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, n, a, n );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cheswapr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cheswapr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chetrd.c b/LAPACKE/src/lapacke_chetrd.c
new file mode 100644
index 00000000..6f9cf1ce
--- /dev/null
+++ b/LAPACKE/src/lapacke_chetrd.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chetrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetrd( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda, float* d,
+ float* e, lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chetrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_chetrd_work( matrix_layout, uplo, n, a, lda, d, e, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chetrd_work( matrix_layout, uplo, n, a, lda, d, e, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chetrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chetrd_work.c b/LAPACKE/src/lapacke_chetrd_work.c
new file mode 100644
index 00000000..3d4b4763
--- /dev/null
+++ b/LAPACKE/src/lapacke_chetrd_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chetrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetrd_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ float* d, float* e, lapack_complex_float* tau,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chetrd( &uplo, &n, a, &lda, d, e, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_chetrd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_chetrd( &uplo, &n, a, &lda_t, d, e, tau, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chetrd( &uplo, &n, a_t, &lda_t, d, e, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chetrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chetrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chetrf.c b/LAPACKE/src/lapacke_chetrf.c
new file mode 100644
index 00000000..763b0a26
--- /dev/null
+++ b/LAPACKE/src/lapacke_chetrf.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chetrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chetrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_chetrf_work( matrix_layout, uplo, n, a, lda, ipiv,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chetrf_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chetrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chetrf_work.c b/LAPACKE/src/lapacke_chetrf_work.c
new file mode 100644
index 00000000..402ae16e
--- /dev/null
+++ b/LAPACKE/src/lapacke_chetrf_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chetrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* ipiv, lapack_complex_float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chetrf( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_chetrf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_chetrf( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chetrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chetrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chetrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chetri.c b/LAPACKE/src/lapacke_chetri.c
new file mode 100644
index 00000000..1384bf72
--- /dev/null
+++ b/LAPACKE/src/lapacke_chetri.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chetri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetri( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chetri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chetri_work( matrix_layout, uplo, n, a, lda, ipiv, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chetri", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chetri2.c b/LAPACKE/src/lapacke_chetri2.c
new file mode 100644
index 00000000..69408572
--- /dev/null
+++ b/LAPACKE/src/lapacke_chetri2.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chetri2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetri2( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chetri2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_chetri2_work( matrix_layout, uplo, n, a, lda, ipiv,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chetri2_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chetri2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chetri2_work.c b/LAPACKE/src/lapacke_chetri2_work.c
new file mode 100644
index 00000000..4a9cbe0c
--- /dev/null
+++ b/LAPACKE/src/lapacke_chetri2_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chetri2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetri2_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chetri2( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_chetri2_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_chetri2( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chetri2( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chetri2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chetri2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chetri2x.c b/LAPACKE/src/lapacke_chetri2x.c
new file mode 100644
index 00000000..5f7316c0
--- /dev/null
+++ b/LAPACKE/src/lapacke_chetri2x.c
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chetri2x
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetri2x( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv, lapack_int nb )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chetri2x", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, lda, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n+nb+1)*(+1) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chetri2x_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ nb );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chetri2x", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chetri2x_work.c b/LAPACKE/src/lapacke_chetri2x_work.c
new file mode 100644
index 00000000..410e665d
--- /dev/null
+++ b/LAPACKE/src/lapacke_chetri2x_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chetri2x
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetri2x_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_float* work, lapack_int nb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chetri2x( &uplo, &n, a, &lda, ipiv, work, &nb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,lda);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_chetri2x_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chetri2x( &uplo, &n, a_t, &lda_t, ipiv, work, &nb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chetri2x_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chetri2x_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chetri_work.c b/LAPACKE/src/lapacke_chetri_work.c
new file mode 100644
index 00000000..48c339b2
--- /dev/null
+++ b/LAPACKE/src/lapacke_chetri_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chetri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetri_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chetri( &uplo, &n, a, &lda, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_chetri_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chetri( &uplo, &n, a_t, &lda_t, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chetri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chetri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chetrs.c b/LAPACKE/src/lapacke_chetrs.c
new file mode 100644
index 00000000..c2fa3a91
--- /dev/null
+++ b/LAPACKE/src/lapacke_chetrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chetrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chetrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_chetrs_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_chetrs2.c b/LAPACKE/src/lapacke_chetrs2.c
new file mode 100644
index 00000000..13a6c1dd
--- /dev/null
+++ b/LAPACKE/src/lapacke_chetrs2.c
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chetrs2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetrs2( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chetrs2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chetrs2_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chetrs2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chetrs2_work.c b/LAPACKE/src/lapacke_chetrs2_work.c
new file mode 100644
index 00000000..7e6359ac
--- /dev/null
+++ b/LAPACKE/src/lapacke_chetrs2_work.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chetrs2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetrs2_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chetrs2( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_chetrs2_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_chetrs2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chetrs2( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chetrs2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chetrs2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chetrs_work.c b/LAPACKE/src/lapacke_chetrs_work.c
new file mode 100644
index 00000000..76a9cf63
--- /dev/null
+++ b/LAPACKE/src/lapacke_chetrs_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chetrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chetrs( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_chetrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_chetrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chetrs( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chetrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chetrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chfrk.c b/LAPACKE/src/lapacke_chfrk.c
new file mode 100644
index 00000000..a86c66ea
--- /dev/null
+++ b/LAPACKE/src/lapacke_chfrk.c
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chfrk
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chfrk( int matrix_layout, char transr, char uplo, char trans,
+ lapack_int n, lapack_int k, float alpha,
+ const lapack_complex_float* a, lapack_int lda,
+ float beta, lapack_complex_float* c )
+{
+ lapack_int ka, na;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chfrk", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ ka = LAPACKE_lsame( trans, 'n' ) ? k : n;
+ na = LAPACKE_lsame( trans, 'n' ) ? n : k;
+ if( LAPACKE_cge_nancheck( matrix_layout, na, ka, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_s_nancheck( 1, &alpha, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &beta, 1 ) ) {
+ return -10;
+ }
+ if( LAPACKE_cpf_nancheck( n, c ) ) {
+ return -11;
+ }
+#endif
+ return LAPACKE_chfrk_work( matrix_layout, transr, uplo, trans, n, k, alpha,
+ a, lda, beta, c );
+}
diff --git a/LAPACKE/src/lapacke_chfrk_work.c b/LAPACKE/src/lapacke_chfrk_work.c
new file mode 100644
index 00000000..cdb7a00b
--- /dev/null
+++ b/LAPACKE/src/lapacke_chfrk_work.c
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chfrk
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chfrk_work( int matrix_layout, char transr, char uplo,
+ char trans, lapack_int n, lapack_int k,
+ float alpha, const lapack_complex_float* a,
+ lapack_int lda, float beta,
+ lapack_complex_float* c )
+{
+ lapack_int info = 0;
+ lapack_int na, ka, lda_t;
+ lapack_complex_float *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chfrk( &transr, &uplo, &trans, &n, &k, &alpha, a, &lda, &beta,
+ c );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ na = LAPACKE_lsame( trans, 'n' ) ? n : k;
+ ka = LAPACKE_lsame( trans, 'n' ) ? k : n;
+ lda_t = MAX(1,na);
+ /* Check leading dimension(s) */
+ if( lda < ka ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_chfrk_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,ka) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, na, ka, a, lda, a_t, lda_t );
+ LAPACKE_cpf_trans( matrix_layout, transr, uplo, n, c, c_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chfrk( &transr, &uplo, &trans, &n, &k, &alpha, a_t, &lda_t,
+ &beta, c_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_cpf_trans( LAPACK_COL_MAJOR, transr, uplo, n, c_t, c );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chfrk_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chfrk_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chgeqz.c b/LAPACKE/src/lapacke_chgeqz.c
new file mode 100644
index 00000000..8541c771
--- /dev/null
+++ b/LAPACKE/src/lapacke_chgeqz.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chgeqz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chgeqz( int matrix_layout, char job, char compq, char compz,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ lapack_complex_float* h, lapack_int ldh,
+ lapack_complex_float* t, lapack_int ldt,
+ lapack_complex_float* alpha,
+ lapack_complex_float* beta, lapack_complex_float* q,
+ lapack_int ldq, lapack_complex_float* z,
+ lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chgeqz", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -14;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -16;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_chgeqz_work( matrix_layout, job, compq, compz, n, ilo, ihi, h,
+ ldh, t, ldt, alpha, beta, q, ldq, z, ldz,
+ &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chgeqz_work( matrix_layout, job, compq, compz, n, ilo, ihi, h,
+ ldh, t, ldt, alpha, beta, q, ldq, z, ldz, work,
+ lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chgeqz", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chgeqz_work.c b/LAPACKE/src/lapacke_chgeqz_work.c
new file mode 100644
index 00000000..e445a6b9
--- /dev/null
+++ b/LAPACKE/src/lapacke_chgeqz_work.c
@@ -0,0 +1,170 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chgeqz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chgeqz_work( int matrix_layout, char job, char compq,
+ char compz, lapack_int n, lapack_int ilo,
+ lapack_int ihi, lapack_complex_float* h,
+ lapack_int ldh, lapack_complex_float* t,
+ lapack_int ldt, lapack_complex_float* alpha,
+ lapack_complex_float* beta,
+ lapack_complex_float* q, lapack_int ldq,
+ lapack_complex_float* z, lapack_int ldz,
+ lapack_complex_float* work, lapack_int lwork,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chgeqz( &job, &compq, &compz, &n, &ilo, &ihi, h, &ldh, t, &ldt,
+ alpha, beta, q, &ldq, z, &ldz, work, &lwork, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldh_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldt_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* h_t = NULL;
+ lapack_complex_float* t_t = NULL;
+ lapack_complex_float* q_t = NULL;
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldh < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_chgeqz_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_chgeqz_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_chgeqz_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_chgeqz_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_chgeqz( &job, &compq, &compz, &n, &ilo, &ihi, h, &ldh_t, t,
+ &ldt_t, alpha, beta, q, &ldq_t, z, &ldz_t, work,
+ &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ h_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldh_t * MAX(1,n) );
+ if( h_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ q_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, h, ldh, h_t, ldh_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_chgeqz( &job, &compq, &compz, &n, &ilo, &ihi, h_t, &ldh_t, t_t,
+ &ldt_t, alpha, beta, q_t, &ldq_t, z_t, &ldz_t, work,
+ &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, h_t, ldh_t, h, ldh );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( h_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chgeqz_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chgeqz_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpcon.c b/LAPACKE/src/lapacke_chpcon.c
new file mode 100644
index 00000000..798752dc
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpcon.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpcon( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* ap,
+ const lapack_int* ipiv, float anorm, float* rcond )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chpcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_chp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chpcon_work( matrix_layout, uplo, n, ap, ipiv, anorm, rcond,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpcon_work.c b/LAPACKE/src/lapacke_chpcon_work.c
new file mode 100644
index 00000000..302430d4
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpcon_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpcon_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* ap,
+ const lapack_int* ipiv, float anorm,
+ float* rcond, lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpcon( &uplo, &n, ap, ipiv, &anorm, rcond, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_chp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpcon( &uplo, &n, ap_t, ipiv, &anorm, rcond, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chpcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpev.c b/LAPACKE/src/lapacke_chpev.c
new file mode 100644
index 00000000..c5bfdb6b
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpev.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpev( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_complex_float* ap, float* w,
+ lapack_complex_float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chpev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chp_nancheck( n, ap ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n-2) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n-1) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chpev_work( matrix_layout, jobz, uplo, n, ap, w, z, ldz, work,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpev_work.c b/LAPACKE/src/lapacke_chpev_work.c
new file mode 100644
index 00000000..f3eeb53f
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpev_work.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpev_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_complex_float* ap, float* w,
+ lapack_complex_float* z, lapack_int ldz,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpev( &jobz, &uplo, &n, ap, w, z, &ldz, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* z_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_chpev_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_chp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpev( &jobz, &uplo, &n, ap_t, w, z_t, &ldz_t, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ LAPACKE_chp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chpev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpevd.c b/LAPACKE/src/lapacke_chpevd.c
new file mode 100644
index 00000000..90c380b4
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpevd.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpevd( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_complex_float* ap, float* w,
+ lapack_complex_float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_int iwork_query;
+ float rwork_query;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chpevd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chp_nancheck( n, ap ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_chpevd_work( matrix_layout, jobz, uplo, n, ap, w, z, ldz,
+ &work_query, lwork, &rwork_query, lrwork,
+ &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_C2INT( 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;
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chpevd_work( matrix_layout, jobz, uplo, n, ap, w, z, ldz,
+ work, lwork, rwork, lrwork, iwork, liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpevd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpevd_work.c b/LAPACKE/src/lapacke_chpevd_work.c
new file mode 100644
index 00000000..d601a66f
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpevd_work.c
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpevd_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_complex_float* ap,
+ float* w, lapack_complex_float* z,
+ lapack_int ldz, lapack_complex_float* work,
+ lapack_int lwork, float* rwork,
+ lapack_int lrwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpevd( &jobz, &uplo, &n, ap, w, z, &ldz, work, &lwork, rwork,
+ &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* z_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_chpevd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lrwork == -1 || lwork == -1 ) {
+ LAPACK_chpevd( &jobz, &uplo, &n, ap, w, z, &ldz_t, work, &lwork,
+ rwork, &lrwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_chp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpevd( &jobz, &uplo, &n, ap_t, w, z_t, &ldz_t, work, &lwork,
+ rwork, &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ LAPACKE_chp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpevd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chpevd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpevx.c b/LAPACKE/src/lapacke_chpevx.c
new file mode 100644
index 00000000..8a8c1cf1
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpevx.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpevx( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, lapack_complex_float* ap, float vl,
+ float vu, lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, lapack_complex_float* z,
+ lapack_int ldz, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chpevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_chp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -8;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,7*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chpevx_work( matrix_layout, jobz, range, uplo, n, ap, vl, vu,
+ il, iu, abstol, m, w, z, ldz, work, rwork,
+ iwork, ifail );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpevx_work.c b/LAPACKE/src/lapacke_chpevx_work.c
new file mode 100644
index 00000000..00d70f82
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpevx_work.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpevx_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n,
+ lapack_complex_float* ap, float vl, float vu,
+ lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w,
+ lapack_complex_float* z, lapack_int ldz,
+ lapack_complex_float* work, float* rwork,
+ lapack_int* iwork, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpevx( &jobz, &range, &uplo, &n, ap, &vl, &vu, &il, &iu,
+ &abstol, m, w, z, &ldz, work, rwork, iwork, ifail,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* z_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < ncols_z ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_chpevx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_chp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpevx( &jobz, &range, &uplo, &n, ap_t, &vl, &vu, &il, &iu,
+ &abstol, m, w, z_t, &ldz_t, work, rwork, iwork, ifail,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ LAPACKE_chp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chpevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpgst.c b/LAPACKE/src/lapacke_chpgst.c
new file mode 100644
index 00000000..a74b215e
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpgst.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpgst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpgst( int matrix_layout, lapack_int itype, char uplo,
+ lapack_int n, lapack_complex_float* ap,
+ const lapack_complex_float* bp )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chpgst", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_chp_nancheck( n, bp ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_chpgst_work( matrix_layout, itype, uplo, n, ap, bp );
+}
diff --git a/LAPACKE/src/lapacke_chpgst_work.c b/LAPACKE/src/lapacke_chpgst_work.c
new file mode 100644
index 00000000..43389f67
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpgst_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpgst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpgst_work( int matrix_layout, lapack_int itype, char uplo,
+ lapack_int n, lapack_complex_float* ap,
+ const lapack_complex_float* bp )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpgst( &itype, &uplo, &n, ap, bp, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* ap_t = NULL;
+ lapack_complex_float* bp_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bp_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( bp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_chp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_chp_trans( matrix_layout, uplo, n, bp, bp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpgst( &itype, &uplo, &n, ap_t, bp_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_chp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( bp_t );
+exit_level_1:
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpgst_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chpgst_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpgv.c b/LAPACKE/src/lapacke_chpgv.c
new file mode 100644
index 00000000..a809f9c8
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpgv.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpgv( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, lapack_complex_float* ap,
+ lapack_complex_float* bp, float* w,
+ lapack_complex_float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chpgv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_chp_nancheck( n, bp ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n-2) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n-1) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chpgv_work( matrix_layout, itype, jobz, uplo, n, ap, bp, w, z,
+ ldz, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpgv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpgv_work.c b/LAPACKE/src/lapacke_chpgv_work.c
new file mode 100644
index 00000000..2c74af48
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpgv_work.c
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpgv_work( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n,
+ lapack_complex_float* ap,
+ lapack_complex_float* bp, float* w,
+ lapack_complex_float* z, lapack_int ldz,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpgv( &itype, &jobz, &uplo, &n, ap, bp, w, z, &ldz, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* z_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ lapack_complex_float* bp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_chpgv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ bp_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( bp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_chp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_chp_trans( matrix_layout, uplo, n, bp, bp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpgv( &itype, &jobz, &uplo, &n, ap_t, bp_t, w, z_t, &ldz_t,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ LAPACKE_chp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ LAPACKE_chp_trans( LAPACK_COL_MAJOR, uplo, n, bp_t, bp );
+ /* Release memory and exit */
+ LAPACKE_free( bp_t );
+exit_level_2:
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpgv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chpgv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpgvd.c b/LAPACKE/src/lapacke_chpgvd.c
new file mode 100644
index 00000000..f825466c
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpgvd.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpgvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpgvd( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, lapack_complex_float* ap,
+ lapack_complex_float* bp, float* w,
+ lapack_complex_float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_int iwork_query;
+ float rwork_query;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chpgvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_chp_nancheck( n, bp ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_chpgvd_work( matrix_layout, itype, jobz, uplo, n, ap, bp, w,
+ z, ldz, &work_query, lwork, &rwork_query,
+ lrwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_C2INT( 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;
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chpgvd_work( matrix_layout, itype, jobz, uplo, n, ap, bp, w,
+ z, ldz, work, lwork, rwork, lrwork, iwork,
+ liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpgvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpgvd_work.c b/LAPACKE/src/lapacke_chpgvd_work.c
new file mode 100644
index 00000000..3b3833e5
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpgvd_work.c
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpgvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpgvd_work( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n,
+ lapack_complex_float* ap,
+ lapack_complex_float* bp, float* w,
+ lapack_complex_float* z, lapack_int ldz,
+ lapack_complex_float* work, lapack_int lwork,
+ float* rwork, lapack_int lrwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpgvd( &itype, &jobz, &uplo, &n, ap, bp, w, z, &ldz, work,
+ &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* z_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ lapack_complex_float* bp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_chpgvd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lrwork == -1 || lwork == -1 ) {
+ LAPACK_chpgvd( &itype, &jobz, &uplo, &n, ap, bp, w, z, &ldz_t, work,
+ &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ bp_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( bp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_chp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_chp_trans( matrix_layout, uplo, n, bp, bp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpgvd( &itype, &jobz, &uplo, &n, ap_t, bp_t, w, z_t, &ldz_t,
+ work, &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ LAPACKE_chp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ LAPACKE_chp_trans( LAPACK_COL_MAJOR, uplo, n, bp_t, bp );
+ /* Release memory and exit */
+ LAPACKE_free( bp_t );
+exit_level_2:
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpgvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chpgvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpgvx.c b/LAPACKE/src/lapacke_chpgvx.c
new file mode 100644
index 00000000..8f39f81b
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpgvx.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpgvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpgvx( int matrix_layout, lapack_int itype, char jobz,
+ char range, char uplo, lapack_int n,
+ lapack_complex_float* ap, lapack_complex_float* bp,
+ float vl, float vu, lapack_int il, lapack_int iu,
+ float abstol, lapack_int* m, float* w,
+ lapack_complex_float* z, lapack_int ldz,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chpgvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -13;
+ }
+ if( LAPACKE_chp_nancheck( n, ap ) ) {
+ return -7;
+ }
+ if( LAPACKE_chp_nancheck( n, bp ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -9;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,7*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chpgvx_work( matrix_layout, itype, jobz, range, uplo, n, ap,
+ bp, vl, vu, il, iu, abstol, m, w, z, ldz, work,
+ rwork, iwork, ifail );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpgvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpgvx_work.c b/LAPACKE/src/lapacke_chpgvx_work.c
new file mode 100644
index 00000000..7ada7820
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpgvx_work.c
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpgvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpgvx_work( int matrix_layout, lapack_int itype, char jobz,
+ char range, char uplo, lapack_int n,
+ lapack_complex_float* ap,
+ lapack_complex_float* bp, float vl, float vu,
+ lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w,
+ lapack_complex_float* z, lapack_int ldz,
+ lapack_complex_float* work, float* rwork,
+ lapack_int* iwork, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpgvx( &itype, &jobz, &range, &uplo, &n, ap, bp, &vl, &vu, &il,
+ &iu, &abstol, m, w, z, &ldz, work, rwork, iwork, ifail,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* z_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ lapack_complex_float* bp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < ncols_z ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_chpgvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ bp_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( bp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_chp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_chp_trans( matrix_layout, uplo, n, bp, bp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpgvx( &itype, &jobz, &range, &uplo, &n, ap_t, bp_t, &vl, &vu,
+ &il, &iu, &abstol, m, w, z_t, &ldz_t, work, rwork, iwork,
+ ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ LAPACKE_chp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ LAPACKE_chp_trans( LAPACK_COL_MAJOR, uplo, n, bp_t, bp );
+ /* Release memory and exit */
+ LAPACKE_free( bp_t );
+exit_level_2:
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpgvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chpgvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chprfs.c b/LAPACKE/src/lapacke_chprfs.c
new file mode 100644
index 00000000..4d43361f
--- /dev/null
+++ b/LAPACKE/src/lapacke_chprfs.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chprfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* ap,
+ const lapack_complex_float* afp,
+ const lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chprfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chp_nancheck( n, afp ) ) {
+ return -6;
+ }
+ if( LAPACKE_chp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chprfs_work( matrix_layout, uplo, n, nrhs, ap, afp, ipiv, b,
+ ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chprfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chprfs_work.c b/LAPACKE/src/lapacke_chprfs_work.c
new file mode 100644
index 00000000..8b3f77d2
--- /dev/null
+++ b/LAPACKE/src/lapacke_chprfs_work.c
@@ -0,0 +1,130 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chprfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* ap,
+ const lapack_complex_float* afp,
+ const lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chprfs( &uplo, &n, &nrhs, ap, afp, ipiv, b, &ldb, x, &ldx, ferr,
+ berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ lapack_complex_float* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_chprfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_chprfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ LAPACKE_chp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_chp_trans( matrix_layout, uplo, n, afp, afp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chprfs( &uplo, &n, &nrhs, ap_t, afp_t, ipiv, b_t, &ldb_t, x_t,
+ &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chprfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chprfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpsv.c b/LAPACKE/src/lapacke_chpsv.c
new file mode 100644
index 00000000..2aa98e4c
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpsv.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpsv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* ap,
+ lapack_int* ipiv, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chpsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_chpsv_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_chpsv_work.c b/LAPACKE/src/lapacke_chpsv_work.c
new file mode 100644
index 00000000..1952b438
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpsv_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpsv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* ap,
+ lapack_int* ipiv, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpsv( &uplo, &n, &nrhs, ap, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_chpsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_chp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpsv( &uplo, &n, &nrhs, ap_t, ipiv, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_chp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chpsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpsvx.c b/LAPACKE/src/lapacke_chpsvx.c
new file mode 100644
index 00000000..c63293e5
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpsvx.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpsvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* ap,
+ lapack_complex_float* afp, lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chpsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_chp_nancheck( n, afp ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_chp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chpsvx_work( matrix_layout, fact, uplo, n, nrhs, ap, afp,
+ ipiv, b, ldb, x, ldx, rcond, ferr, berr, work,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chpsvx_work.c b/LAPACKE/src/lapacke_chpsvx_work.c
new file mode 100644
index 00000000..4fcde4b3
--- /dev/null
+++ b/LAPACKE/src/lapacke_chpsvx_work.c
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chpsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chpsvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* ap,
+ lapack_complex_float* afp, lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpsvx( &fact, &uplo, &n, &nrhs, ap, afp, ipiv, b, &ldb, x, &ldx,
+ rcond, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ lapack_complex_float* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_chpsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_chpsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_chp_trans( matrix_layout, uplo, n, ap, ap_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_chp_trans( matrix_layout, uplo, n, afp, afp_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_chpsvx( &fact, &uplo, &n, &nrhs, ap_t, afp_t, ipiv, b_t, &ldb_t,
+ x_t, &ldx_t, rcond, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ if( LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_chp_trans( LAPACK_COL_MAJOR, uplo, n, afp_t, afp );
+ }
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chpsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chpsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chptrd.c b/LAPACKE/src/lapacke_chptrd.c
new file mode 100644
index 00000000..a09f3240
--- /dev/null
+++ b/LAPACKE/src/lapacke_chptrd.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chptrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chptrd( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* ap, float* d, float* e,
+ lapack_complex_float* tau )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chptrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_chptrd_work( matrix_layout, uplo, n, ap, d, e, tau );
+}
diff --git a/LAPACKE/src/lapacke_chptrd_work.c b/LAPACKE/src/lapacke_chptrd_work.c
new file mode 100644
index 00000000..13489995
--- /dev/null
+++ b/LAPACKE/src/lapacke_chptrd_work.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chptrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chptrd_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* ap, float* d, float* e,
+ lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chptrd( &uplo, &n, ap, d, e, tau, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_chp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chptrd( &uplo, &n, ap_t, d, e, tau, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_chp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chptrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chptrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chptrf.c b/LAPACKE/src/lapacke_chptrf.c
new file mode 100644
index 00000000..f51b1105
--- /dev/null
+++ b/LAPACKE/src/lapacke_chptrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chptrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* ap, lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chptrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_chptrf_work( matrix_layout, uplo, n, ap, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_chptrf_work.c b/LAPACKE/src/lapacke_chptrf_work.c
new file mode 100644
index 00000000..9899fc59
--- /dev/null
+++ b/LAPACKE/src/lapacke_chptrf_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chptrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* ap, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chptrf( &uplo, &n, ap, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_chp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chptrf( &uplo, &n, ap_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_chp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chptrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chptrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chptri.c b/LAPACKE/src/lapacke_chptri.c
new file mode 100644
index 00000000..9e39f29e
--- /dev/null
+++ b/LAPACKE/src/lapacke_chptri.c
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chptri( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* ap, const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chptri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chptri_work( matrix_layout, uplo, n, ap, ipiv, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chptri", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chptri_work.c b/LAPACKE/src/lapacke_chptri_work.c
new file mode 100644
index 00000000..7394a1b1
--- /dev/null
+++ b/LAPACKE/src/lapacke_chptri_work.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chptri_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* ap,
+ const lapack_int* ipiv,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chptri( &uplo, &n, ap, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_chp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chptri( &uplo, &n, ap_t, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_chp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chptri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chptri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chptrs.c b/LAPACKE/src/lapacke_chptrs.c
new file mode 100644
index 00000000..447d85a7
--- /dev/null
+++ b/LAPACKE/src/lapacke_chptrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chptrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* ap,
+ const lapack_int* ipiv, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chptrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_chp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_chptrs_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_chptrs_work.c b/LAPACKE/src/lapacke_chptrs_work.c
new file mode 100644
index 00000000..56eeecc3
--- /dev/null
+++ b/LAPACKE/src/lapacke_chptrs_work.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chptrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* ap,
+ const lapack_int* ipiv, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chptrs( &uplo, &n, &nrhs, ap, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_chptrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_chp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_chptrs( &uplo, &n, &nrhs, ap_t, ipiv, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chptrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chptrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chsein.c b/LAPACKE/src/lapacke_chsein.c
new file mode 100644
index 00000000..0e6eb773
--- /dev/null
+++ b/LAPACKE/src/lapacke_chsein.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chsein
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chsein( int matrix_layout, char job, char eigsrc, char initv,
+ const lapack_logical* select, lapack_int n,
+ const lapack_complex_float* h, lapack_int ldh,
+ lapack_complex_float* w, lapack_complex_float* vl,
+ lapack_int ldvl, lapack_complex_float* vr,
+ lapack_int ldvr, lapack_int mm, lapack_int* m,
+ lapack_int* ifaill, lapack_int* ifailr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chsein", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -12;
+ }
+ }
+ if( LAPACKE_c_nancheck( n, w, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chsein_work( matrix_layout, job, eigsrc, initv, select, n, h,
+ ldh, w, vl, ldvl, vr, ldvr, mm, m, work, rwork,
+ ifaill, ifailr );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chsein", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chsein_work.c b/LAPACKE/src/lapacke_chsein_work.c
new file mode 100644
index 00000000..0d38a6af
--- /dev/null
+++ b/LAPACKE/src/lapacke_chsein_work.c
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chsein
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chsein_work( int matrix_layout, char job, char eigsrc,
+ char initv, const lapack_logical* select,
+ lapack_int n, const lapack_complex_float* h,
+ lapack_int ldh, lapack_complex_float* w,
+ lapack_complex_float* vl, lapack_int ldvl,
+ lapack_complex_float* vr, lapack_int ldvr,
+ lapack_int mm, lapack_int* m,
+ lapack_complex_float* work, float* rwork,
+ lapack_int* ifaill, lapack_int* ifailr )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chsein( &job, &eigsrc, &initv, select, &n, h, &ldh, w, vl, &ldvl,
+ vr, &ldvr, &mm, m, work, rwork, ifaill, ifailr, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldh_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ lapack_complex_float* h_t = NULL;
+ lapack_complex_float* vl_t = NULL;
+ lapack_complex_float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldh < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_chsein_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_chsein_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_chsein_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ h_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldh_t * MAX(1,n) );
+ if( h_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+ vl_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+ vr_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, h, ldh, h_t, ldh_t );
+ if( ( LAPACKE_lsame( job, 'l' ) || LAPACKE_lsame( job, 'b' ) ) &&
+ LAPACKE_lsame( initv, 'v' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( ( LAPACKE_lsame( job, 'r' ) || LAPACKE_lsame( job, 'b' ) ) &&
+ LAPACKE_lsame( initv, 'v' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_chsein( &job, &eigsrc, &initv, select, &n, h_t, &ldh_t, w, vl_t,
+ &ldvl_t, vr_t, &ldvr_t, &mm, m, work, rwork, ifaill,
+ ifailr, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, mm, vl_t, ldvl_t, vl,
+ ldvl );
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, mm, vr_t, ldvr_t, vr,
+ ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( h_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chsein_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chsein_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chseqr.c b/LAPACKE/src/lapacke_chseqr.c
new file mode 100644
index 00000000..bed01087
--- /dev/null
+++ b/LAPACKE/src/lapacke_chseqr.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chseqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chseqr( int matrix_layout, char job, char compz, lapack_int n,
+ lapack_int ilo, lapack_int ihi,
+ lapack_complex_float* h, lapack_int ldh,
+ lapack_complex_float* w, lapack_complex_float* z,
+ lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_chseqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_chseqr_work( matrix_layout, job, compz, n, ilo, ihi, h, ldh,
+ w, z, ldz, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_chseqr_work( matrix_layout, job, compz, n, ilo, ihi, h, ldh,
+ w, z, ldz, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chseqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_chseqr_work.c b/LAPACKE/src/lapacke_chseqr_work.c
new file mode 100644
index 00000000..e5c33b4f
--- /dev/null
+++ b/LAPACKE/src/lapacke_chseqr_work.c
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 chseqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chseqr_work( int matrix_layout, char job, char compz,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ lapack_complex_float* h, lapack_int ldh,
+ lapack_complex_float* w,
+ lapack_complex_float* z, lapack_int ldz,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_chseqr( &job, &compz, &n, &ilo, &ihi, h, &ldh, w, z, &ldz, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldh_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* h_t = NULL;
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldh < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_chseqr_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_chseqr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_chseqr( &job, &compz, &n, &ilo, &ihi, h, &ldh_t, w, z,
+ &ldz_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ h_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldh_t * MAX(1,n) );
+ if( h_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, h, ldh, h_t, ldh_t );
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_chseqr( &job, &compz, &n, &ilo, &ihi, h_t, &ldh_t, w, z_t,
+ &ldz_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, h_t, ldh_t, h, ldh );
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( h_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_chseqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_chseqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clacgv.c b/LAPACKE/src/lapacke_clacgv.c
new file mode 100644
index 00000000..4e62f4fa
--- /dev/null
+++ b/LAPACKE/src/lapacke_clacgv.c
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 clacgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clacgv( lapack_int n, lapack_complex_float* x,
+ lapack_int incx )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_c_nancheck( 1+(n-1)*ABS(incx), x, incx ) ) {
+ return -2;
+ }
+#endif
+ return LAPACKE_clacgv_work( n, x, incx );
+}
diff --git a/LAPACKE/src/lapacke_clacgv_work.c b/LAPACKE/src/lapacke_clacgv_work.c
new file mode 100644
index 00000000..eb61e840
--- /dev/null
+++ b/LAPACKE/src/lapacke_clacgv_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 clacgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clacgv_work( lapack_int n, lapack_complex_float* x,
+ lapack_int incx )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_clacgv( &n, x, &incx );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clacn2.c b/LAPACKE/src/lapacke_clacn2.c
new file mode 100644
index 00000000..890c486f
--- /dev/null
+++ b/LAPACKE/src/lapacke_clacn2.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2010, Intel Corp.
+ 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 clacn2
+* Author: Intel Corporation
+* Generated October, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clacn2( lapack_int n, lapack_complex_float* v,
+ lapack_complex_float* x,
+ float* est, lapack_int* kase, lapack_int* isave )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, est, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_c_nancheck( n, x, 1 ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_clacn2_work( n, v, x, est, kase, isave );
+}
diff --git a/LAPACKE/src/lapacke_clacn2_work.c b/LAPACKE/src/lapacke_clacn2_work.c
new file mode 100644
index 00000000..970b7d7d
--- /dev/null
+++ b/LAPACKE/src/lapacke_clacn2_work.c
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ Copyright (c) 2010, Intel Corp.
+ 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 clacn2
+* Author: Intel Corporation
+* Generated October, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clacn2_work( lapack_int n, lapack_complex_float* v,
+ lapack_complex_float* x,
+ float* est, lapack_int* kase,
+ lapack_int* isave )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_clacn2( &n, v, x, est, kase, isave );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clacp2.c b/LAPACKE/src/lapacke_clacp2.c
new file mode 100644
index 00000000..0878e624
--- /dev/null
+++ b/LAPACKE/src/lapacke_clacp2.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clacp2
+* Author: Intel Corporation
+* Generated January, 2013
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clacp2( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, const float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_clacp2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_clacp2_work( matrix_layout, uplo, m, n, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_clacp2_work.c b/LAPACKE/src/lapacke_clacp2_work.c
new file mode 100644
index 00000000..69ba290a
--- /dev/null
+++ b/LAPACKE/src/lapacke_clacp2_work.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clacp2
+* Author: Intel Corporation
+* Generated January, 2013
+*****************************************************************************/
+
+#include "lapacke.h"
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clacp2_work( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, const float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_clacp2( &uplo, &m, &n, a, &lda, b, &ldb );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,m);
+ float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_clacp2_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_clacp2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_clacp2( &uplo, &m, &n, a_t, &lda_t, b_t, &ldb_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clacp2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_clacp2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clacpy.c b/LAPACKE/src/lapacke_clacpy.c
new file mode 100644
index 00000000..bfc34dfa
--- /dev/null
+++ b/LAPACKE/src/lapacke_clacpy.c
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clacpy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clacpy( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, const lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_clacpy", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_clacpy_work( matrix_layout, uplo, m, n, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_clacpy_work.c b/LAPACKE/src/lapacke_clacpy_work.c
new file mode 100644
index 00000000..f5e58984
--- /dev/null
+++ b/LAPACKE/src/lapacke_clacpy_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clacpy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clacpy_work( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, const lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_clacpy( &uplo, &m, &n, a, &lda, b, &ldb );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_clacpy_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_clacpy_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_clacpy( &uplo, &m, &n, a_t, &lda_t, b_t, &ldb_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clacpy_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_clacpy_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clag2z.c b/LAPACKE/src/lapacke_clag2z.c
new file mode 100644
index 00000000..05961868
--- /dev/null
+++ b/LAPACKE/src/lapacke_clag2z.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clag2z
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clag2z( int matrix_layout, lapack_int m, lapack_int n,
+ const lapack_complex_float* sa, lapack_int ldsa,
+ lapack_complex_double* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_clag2z", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, sa, ldsa ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_clag2z_work( matrix_layout, m, n, sa, ldsa, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_clag2z_work.c b/LAPACKE/src/lapacke_clag2z_work.c
new file mode 100644
index 00000000..1a95d285
--- /dev/null
+++ b/LAPACKE/src/lapacke_clag2z_work.c
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clag2z
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clag2z_work( int matrix_layout, lapack_int m, lapack_int n,
+ const lapack_complex_float* sa, lapack_int ldsa,
+ lapack_complex_double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_clag2z( &m, &n, sa, &ldsa, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldsa_t = MAX(1,m);
+ lapack_complex_float* sa_t = NULL;
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_clag2z_work", info );
+ return info;
+ }
+ if( ldsa < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_clag2z_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ sa_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldsa_t * MAX(1,n) );
+ if( sa_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, sa, ldsa, sa_t, ldsa_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_clag2z( &m, &n, sa_t, &ldsa_t, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_1:
+ LAPACKE_free( sa_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clag2z_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_clag2z_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clagge.c b/LAPACKE/src/lapacke_clagge.c
new file mode 100644
index 00000000..ee12cad7
--- /dev/null
+++ b/LAPACKE/src/lapacke_clagge.c
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clagge
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clagge( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, const float* d,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* iseed )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_clagge", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( MIN(m,n), d, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,m+n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_clagge_work( matrix_layout, m, n, kl, ku, d, a, lda, iseed,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clagge", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clagge_work.c b/LAPACKE/src/lapacke_clagge_work.c
new file mode 100644
index 00000000..3ed58872
--- /dev/null
+++ b/LAPACKE/src/lapacke_clagge_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clagge
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clagge_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, const float* d,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* iseed, lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_clagge( &m, &n, &kl, &ku, d, a, &lda, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_clagge_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_clagge( &m, &n, &kl, &ku, d, a_t, &lda_t, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clagge_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_clagge_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_claghe.c b/LAPACKE/src/lapacke_claghe.c
new file mode 100644
index 00000000..10241125
--- /dev/null
+++ b/LAPACKE/src/lapacke_claghe.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 claghe
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_claghe( int matrix_layout, lapack_int n, lapack_int k,
+ const float* d, lapack_complex_float* a,
+ lapack_int lda, lapack_int* iseed )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_claghe", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_claghe_work( matrix_layout, n, k, d, a, lda, iseed, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_claghe", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_claghe_work.c b/LAPACKE/src/lapacke_claghe_work.c
new file mode 100644
index 00000000..1de49fc1
--- /dev/null
+++ b/LAPACKE/src/lapacke_claghe_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 claghe
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_claghe_work( int matrix_layout, lapack_int n, lapack_int k,
+ const float* d, lapack_complex_float* a,
+ lapack_int lda, lapack_int* iseed,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_claghe( &n, &k, d, a, &lda, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_claghe_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_claghe( &n, &k, d, a_t, &lda_t, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_claghe_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_claghe_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clagsy.c b/LAPACKE/src/lapacke_clagsy.c
new file mode 100644
index 00000000..0260f10f
--- /dev/null
+++ b/LAPACKE/src/lapacke_clagsy.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clagsy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clagsy( int matrix_layout, lapack_int n, lapack_int k,
+ const float* d, lapack_complex_float* a,
+ lapack_int lda, lapack_int* iseed )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_clagsy", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_clagsy_work( matrix_layout, n, k, d, a, lda, iseed, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clagsy", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clagsy_work.c b/LAPACKE/src/lapacke_clagsy_work.c
new file mode 100644
index 00000000..6e730d6b
--- /dev/null
+++ b/LAPACKE/src/lapacke_clagsy_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clagsy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clagsy_work( int matrix_layout, lapack_int n, lapack_int k,
+ const float* d, lapack_complex_float* a,
+ lapack_int lda, lapack_int* iseed,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_clagsy( &n, &k, d, a, &lda, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_clagsy_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_clagsy( &n, &k, d, a_t, &lda_t, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clagsy_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_clagsy_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clange.c b/LAPACKE/src/lapacke_clange.c
new file mode 100644
index 00000000..0bc3c968
--- /dev/null
+++ b/LAPACKE/src/lapacke_clange.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clange
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_clange( int matrix_layout, char norm, lapack_int m,
+ lapack_int n, const lapack_complex_float* a,
+ lapack_int lda )
+{
+ lapack_int info = 0;
+ float res = 0.;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_clange", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) ) {
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,m) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call middle-level interface */
+ res = LAPACKE_clange_work( matrix_layout, norm, m, n, a, lda, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clange", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_clange_work.c b/LAPACKE/src/lapacke_clange_work.c
new file mode 100644
index 00000000..2133d6da
--- /dev/null
+++ b/LAPACKE/src/lapacke_clange_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clange
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_clange_work( int matrix_layout, char norm, lapack_int m,
+ lapack_int n, const lapack_complex_float* a,
+ lapack_int lda, float* work )
+{
+ lapack_int info = 0;
+ float res = 0.;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_clange( &norm, &m, &n, a, &lda, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_clange_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_clange( &norm, &m, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clange_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_clange_work", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_clanhe.c b/LAPACKE/src/lapacke_clanhe.c
new file mode 100644
index 00000000..fdbbf40c
--- /dev/null
+++ b/LAPACKE/src/lapacke_clanhe.c
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clanhe
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_clanhe( int matrix_layout, char norm, char uplo, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ float res = 0.;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_clanhe", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call middle-level interface */
+ res = LAPACKE_clanhe_work( matrix_layout, norm, uplo, n, a, lda, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clanhe", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_clanhe_work.c b/LAPACKE/src/lapacke_clanhe_work.c
new file mode 100644
index 00000000..588d8395
--- /dev/null
+++ b/LAPACKE/src/lapacke_clanhe_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clanhe
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_clanhe_work( int matrix_layout, char norm, char uplo,
+ lapack_int n, const lapack_complex_float* a,
+ lapack_int lda, float* work )
+{
+ lapack_int info = 0;
+ float res = 0.;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_clanhe( &norm, &uplo, &n, a, &lda, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_clanhe_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_clanhe( &norm, &uplo, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clanhe_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_clanhe_work", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_clansy.c b/LAPACKE/src/lapacke_clansy.c
new file mode 100644
index 00000000..da31363f
--- /dev/null
+++ b/LAPACKE/src/lapacke_clansy.c
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clansy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_clansy( int matrix_layout, char norm, char uplo, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ float res = 0.;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_clansy", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call middle-level interface */
+ res = LAPACKE_clansy_work( matrix_layout, norm, uplo, n, a, lda, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clansy", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_clansy_work.c b/LAPACKE/src/lapacke_clansy_work.c
new file mode 100644
index 00000000..5e7acead
--- /dev/null
+++ b/LAPACKE/src/lapacke_clansy_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clansy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_clansy_work( int matrix_layout, char norm, char uplo,
+ lapack_int n, const lapack_complex_float* a,
+ lapack_int lda, float* work )
+{
+ lapack_int info = 0;
+ float res = 0.;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_clansy( &norm, &uplo, &n, a, &lda, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_clansy_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_clansy( &norm, &uplo, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clansy_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_clansy_work", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_clantr.c b/LAPACKE/src/lapacke_clantr.c
new file mode 100644
index 00000000..185bfe25
--- /dev/null
+++ b/LAPACKE/src/lapacke_clantr.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clantr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_clantr( int matrix_layout, char norm, char uplo, char diag,
+ lapack_int m, lapack_int n, const lapack_complex_float* a,
+ lapack_int lda )
+{
+ lapack_int info = 0;
+ float res = 0.;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_clantr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ctr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,m) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call middle-level interface */
+ res = LAPACKE_clantr_work( matrix_layout, norm, uplo, diag, m, n, a, lda,
+ work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clantr", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_clantr_work.c b/LAPACKE/src/lapacke_clantr_work.c
new file mode 100644
index 00000000..2ac7e88c
--- /dev/null
+++ b/LAPACKE/src/lapacke_clantr_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clantr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_clantr_work( int matrix_layout, char norm, char uplo,
+ char diag, lapack_int m, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float* work )
+{
+ lapack_int info = 0;
+ float res = 0.;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_clantr( &norm, &uplo, &diag, &m, &n, a, &lda, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_clantr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ctr_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_clantr( &norm, &uplo, &diag, &m, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clantr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_clantr_work", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_clapmr.c b/LAPACKE/src/lapacke_clapmr.c
new file mode 100644
index 00000000..9f7fad4d
--- /dev/null
+++ b/LAPACKE/src/lapacke_clapmr.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clapmr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clapmr( int matrix_layout, lapack_logical forwrd,
+ lapack_int m, lapack_int n, lapack_complex_float* x,
+ lapack_int ldx, lapack_int* k )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_clapmr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, x, ldx ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_clapmr_work( matrix_layout, forwrd, m, n, x, ldx, k );
+}
diff --git a/LAPACKE/src/lapacke_clapmr_work.c b/LAPACKE/src/lapacke_clapmr_work.c
new file mode 100644
index 00000000..565a1abb
--- /dev/null
+++ b/LAPACKE/src/lapacke_clapmr_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clapmr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clapmr_work( int matrix_layout, lapack_logical forwrd,
+ lapack_int m, lapack_int n,
+ lapack_complex_float* x, lapack_int ldx,
+ lapack_int* k )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_clapmr( &forwrd, &m, &n, x, &ldx, k );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldx_t = MAX(1,m);
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldx < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_clapmr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldx_t * MAX(1,n) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_clapmr( &forwrd, &m, &n, x_t, &ldx_t, k );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clapmr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_clapmr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clarfb.c b/LAPACKE/src/lapacke_clarfb.c
new file mode 100644
index 00000000..e0bc5f69
--- /dev/null
+++ b/LAPACKE/src/lapacke_clarfb.c
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clarfb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clarfb( int matrix_layout, char side, char trans, char direct,
+ char storev, lapack_int m, lapack_int n,
+ lapack_int k, const lapack_complex_float* v,
+ lapack_int ldv, const lapack_complex_float* t,
+ lapack_int ldt, lapack_complex_float* c,
+ lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int ldwork = ( side=='l')?n:(( side=='r')?m:1);
+ lapack_complex_float* work = NULL;
+ lapack_int ncols_v, nrows_v;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_clarfb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+ ( ( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( side, 'l' ) ) ? m :
+ ( ( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( side, 'r' ) ) ? n : 1) );
+ nrows_v = ( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( side, 'l' ) ) ? m :
+ ( ( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( side, 'r' ) ) ? n :
+ ( LAPACKE_lsame( storev, 'r' ) ? k : 1) );
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -13;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, k, k, t, ldt ) ) {
+ return -11;
+ }
+ if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'f' ) ) {
+ if( LAPACKE_ctr_nancheck( matrix_layout, 'l', 'u', k, v, ldv ) )
+ return -9;
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_v-k, ncols_v, &v[k*ldv],
+ ldv ) )
+ return -9;
+ } else if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'b' ) ) {
+ if( k > nrows_v ) {
+ LAPACKE_xerbla( "LAPACKE_clarfb", -8 );
+ return -8;
+ }
+ if( LAPACKE_ctr_nancheck( matrix_layout, 'u', 'u', k,
+ &v[(nrows_v-k)*ldv], ldv ) )
+ return -9;
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_v-k, ncols_v, v, ldv ) )
+ return -9;
+ } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
+ if( LAPACKE_ctr_nancheck( matrix_layout, 'u', 'u', k, v, ldv ) )
+ return -9;
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, ncols_v-k, &v[k],
+ ldv ) )
+ return -9;
+ } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
+ if( k > ncols_v ) {
+ LAPACKE_xerbla( "LAPACKE_clarfb", -8 );
+ return -8;
+ }
+ if( LAPACKE_ctr_nancheck( matrix_layout, 'l', 'u', k, &v[ncols_v-k],
+ ldv ) )
+ return -9;
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, ncols_v-k, v, ldv ) )
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldwork * MAX(1,k) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_clarfb_work( matrix_layout, side, trans, direct, storev, m, n,
+ k, v, ldv, t, ldt, c, ldc, work, ldwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clarfb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clarfb_work.c b/LAPACKE/src/lapacke_clarfb_work.c
new file mode 100644
index 00000000..193337d1
--- /dev/null
+++ b/LAPACKE/src/lapacke_clarfb_work.c
@@ -0,0 +1,159 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clarfb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clarfb_work( int matrix_layout, char side, char trans,
+ char direct, char storev, lapack_int m,
+ lapack_int n, lapack_int k,
+ const lapack_complex_float* v, lapack_int ldv,
+ const lapack_complex_float* t, lapack_int ldt,
+ lapack_complex_float* c, lapack_int ldc,
+ lapack_complex_float* work, lapack_int ldwork )
+{
+ lapack_int info = 0;
+ lapack_int nrows_v, ncols_v;
+ lapack_int ldc_t, ldt_t, ldv_t;
+ lapack_complex_float *v_t = NULL, *t_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_clarfb( &side, &trans, &direct, &storev, &m, &n, &k, v, &ldv, t,
+ &ldt, c, &ldc, work, &ldwork );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ nrows_v = ( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( side, 'l' ) ) ? m :
+ ( ( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( side, 'r' ) ) ? n :
+ ( LAPACKE_lsame( storev, 'r' ) ? k : 1) );
+ ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+ ( ( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( side, 'l' ) ) ? m :
+ ( ( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( side, 'r' ) ) ? n : 1) );
+ ldc_t = MAX(1,m);
+ ldt_t = MAX(1,k);
+ ldv_t = MAX(1,nrows_v);
+ /* Check leading dimension(s) */
+ if( ldc < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_clarfb_work", info );
+ return info;
+ }
+ if( ldt < k ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_clarfb_work", info );
+ return info;
+ }
+ if( ldv < ncols_v ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_clarfb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldv_t * MAX(1,ncols_v) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldt_t * MAX(1,k) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ c_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'f' ) ) {
+ LAPACKE_ctr_trans( matrix_layout, 'l', 'u', k, v, ldv, v_t, ldv_t );
+ LAPACKE_cge_trans( matrix_layout, nrows_v-k, ncols_v, &v[k*ldv], ldv,
+ &v_t[k], ldv_t );
+ } else if( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( direct, 'b' ) ) {
+ if( k > nrows_v ) {
+ LAPACKE_xerbla( "LAPACKE_clarfb_work", -8 );
+ return -8;
+ }
+ LAPACKE_ctr_trans( matrix_layout, 'u', 'u', k, &v[(nrows_v-k)*ldv],
+ ldv, &v_t[nrows_v-k], ldv_t );
+ LAPACKE_cge_trans( matrix_layout, nrows_v-k, ncols_v, v, ldv, v_t,
+ ldv_t );
+ } else if( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( direct, 'f' ) ) {
+ LAPACKE_ctr_trans( matrix_layout, 'u', 'u', k, v, ldv, v_t, ldv_t );
+ LAPACKE_cge_trans( matrix_layout, nrows_v, ncols_v-k, &v[k], ldv,
+ &v_t[k*ldv_t], ldv_t );
+ } else if( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( direct, 'f' ) ) {
+ if( k > ncols_v ) {
+ LAPACKE_xerbla( "LAPACKE_clarfb_work", -8 );
+ return -8;
+ }
+ LAPACKE_ctr_trans( matrix_layout, 'l', 'u', k, &v[ncols_v-k], ldv,
+ &v_t[(ncols_v-k)*ldv_t], ldv_t );
+ LAPACKE_cge_trans( matrix_layout, nrows_v, ncols_v-k, v, ldv, v_t,
+ ldv_t );
+ }
+ LAPACKE_cge_trans( matrix_layout, k, k, t, ldt, t_t, ldt_t );
+ LAPACKE_cge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_clarfb( &side, &trans, &direct, &storev, &m, &n, &k, v_t, &ldv_t,
+ t_t, &ldt_t, c_t, &ldc_t, work, &ldwork );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clarfb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_clarfb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clarfg.c b/LAPACKE/src/lapacke_clarfg.c
new file mode 100644
index 00000000..945b799d
--- /dev/null
+++ b/LAPACKE/src/lapacke_clarfg.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 clarfg
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clarfg( lapack_int n, lapack_complex_float* alpha,
+ lapack_complex_float* x, lapack_int incx,
+ lapack_complex_float* tau )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_c_nancheck( 1, alpha, 1 ) ) {
+ return -2;
+ }
+ if( LAPACKE_c_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_clarfg_work( n, alpha, x, incx, tau );
+}
diff --git a/LAPACKE/src/lapacke_clarfg_work.c b/LAPACKE/src/lapacke_clarfg_work.c
new file mode 100644
index 00000000..aa8546d9
--- /dev/null
+++ b/LAPACKE/src/lapacke_clarfg_work.c
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 clarfg
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clarfg_work( lapack_int n, lapack_complex_float* alpha,
+ lapack_complex_float* x, lapack_int incx,
+ lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_clarfg( &n, alpha, x, &incx, tau );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clarft.c b/LAPACKE/src/lapacke_clarft.c
new file mode 100644
index 00000000..e84f9f31
--- /dev/null
+++ b/LAPACKE/src/lapacke_clarft.c
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clarft
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clarft( int matrix_layout, char direct, char storev,
+ lapack_int n, lapack_int k,
+ const lapack_complex_float* v, lapack_int ldv,
+ const lapack_complex_float* tau,
+ lapack_complex_float* t, lapack_int ldt )
+{
+ lapack_int ncols_v, nrows_v;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_clarft", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+ ( LAPACKE_lsame( storev, 'r' ) ? n : 1);
+ nrows_v = LAPACKE_lsame( storev, 'c' ) ? n :
+ ( LAPACKE_lsame( storev, 'r' ) ? k : 1);
+ if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_clarft_work( matrix_layout, direct, storev, n, k, v, ldv, tau,
+ t, ldt );
+}
diff --git a/LAPACKE/src/lapacke_clarft_work.c b/LAPACKE/src/lapacke_clarft_work.c
new file mode 100644
index 00000000..975b90b6
--- /dev/null
+++ b/LAPACKE/src/lapacke_clarft_work.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clarft
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clarft_work( int matrix_layout, char direct, char storev,
+ lapack_int n, lapack_int k,
+ const lapack_complex_float* v, lapack_int ldv,
+ const lapack_complex_float* tau,
+ lapack_complex_float* t, lapack_int ldt )
+{
+ lapack_int info = 0;
+ lapack_int nrows_v, ncols_v;
+ lapack_int ldt_t, ldv_t;
+ lapack_complex_float *v_t= NULL, *t_t= NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_clarft( &direct, &storev, &n, &k, v, &ldv, tau, t, &ldt );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ nrows_v = LAPACKE_lsame( storev, 'c' ) ? n :
+ ( LAPACKE_lsame( storev, 'r' ) ? k : 1);
+ ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+ ( LAPACKE_lsame( storev, 'r' ) ? n : 1);
+ ldt_t = MAX(1,k);
+ ldv_t = MAX(1,nrows_v);
+ /* Check leading dimension(s) */
+ if( ldt < k ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_clarft_work", info );
+ return info;
+ }
+ if( ldv < ncols_v ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_clarft_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldv_t * MAX(1,ncols_v) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldt_t * MAX(1,k) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, nrows_v, ncols_v, v, ldv, v_t, ldv_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_clarft( &direct, &storev, &n, &k, v_t, &ldv_t, tau, t_t,
+ &ldt_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, k, k, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clarft_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_clarft_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clarfx.c b/LAPACKE/src/lapacke_clarfx.c
new file mode 100644
index 00000000..bf6e887d
--- /dev/null
+++ b/LAPACKE/src/lapacke_clarfx.c
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clarfx
+* Author: Intel Corporation
+* Generated April, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clarfx( int matrix_layout, char side, lapack_int m,
+ lapack_int n, const lapack_complex_float* v,
+ lapack_complex_float tau, lapack_complex_float* c,
+ lapack_int ldc, lapack_complex_float* work )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_clarfx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -7;
+ }
+ if( LAPACKE_c_nancheck( 1, &tau, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_c_nancheck( m, v, 1 ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_clarfx_work( matrix_layout, side, m, n, v, tau, c, ldc,
+ work );
+}
diff --git a/LAPACKE/src/lapacke_clarfx_work.c b/LAPACKE/src/lapacke_clarfx_work.c
new file mode 100644
index 00000000..3bf74346
--- /dev/null
+++ b/LAPACKE/src/lapacke_clarfx_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clarfx
+* Author: Intel Corporation
+* Generated April, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clarfx_work( int matrix_layout, char side, lapack_int m,
+ lapack_int n, const lapack_complex_float* v,
+ lapack_complex_float tau,
+ lapack_complex_float* c, lapack_int ldc,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_clarfx( &side, &m, &n, v, &tau, c, &ldc, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldc < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_clarfx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ c_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_clarfx( &side, &m, &n, v, &tau, c_t, &ldc_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clarfx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_clarfx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clarnv.c b/LAPACKE/src/lapacke_clarnv.c
new file mode 100644
index 00000000..7a995005
--- /dev/null
+++ b/LAPACKE/src/lapacke_clarnv.c
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 clarnv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clarnv( lapack_int idist, lapack_int* iseed, lapack_int n,
+ lapack_complex_float* x )
+{
+ return LAPACKE_clarnv_work( idist, iseed, n, x );
+}
diff --git a/LAPACKE/src/lapacke_clarnv_work.c b/LAPACKE/src/lapacke_clarnv_work.c
new file mode 100644
index 00000000..324d5e10
--- /dev/null
+++ b/LAPACKE/src/lapacke_clarnv_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 clarnv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clarnv_work( lapack_int idist, lapack_int* iseed,
+ lapack_int n, lapack_complex_float* x )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_clarnv( &idist, iseed, &n, x );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_claset.c b/LAPACKE/src/lapacke_claset.c
new file mode 100644
index 00000000..2dfaf671
--- /dev/null
+++ b/LAPACKE/src/lapacke_claset.c
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 claset
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_claset( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, lapack_complex_float alpha,
+ lapack_complex_float beta, lapack_complex_float* a,
+ lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_claset", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_c_nancheck( 1, &alpha, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_c_nancheck( 1, &beta, 1 ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_claset_work( matrix_layout, uplo, m, n, alpha, beta, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_claset_work.c b/LAPACKE/src/lapacke_claset_work.c
new file mode 100644
index 00000000..8d75fc5b
--- /dev/null
+++ b/LAPACKE/src/lapacke_claset_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 claset
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_claset_work( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, lapack_complex_float alpha,
+ lapack_complex_float beta,
+ lapack_complex_float* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_claset( &uplo, &m, &n, &alpha, &beta, a, &lda );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_claset_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_claset( &uplo, &m, &n, &alpha, &beta, a_t, &lda_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_claset_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_claset_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_claswp.c b/LAPACKE/src/lapacke_claswp.c
new file mode 100644
index 00000000..173a7bf2
--- /dev/null
+++ b/LAPACKE/src/lapacke_claswp.c
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 claswp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_claswp( int matrix_layout, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int k1, lapack_int k2, const lapack_int* ipiv,
+ lapack_int incx )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_claswp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, lda, n, a, lda ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_claswp_work( matrix_layout, n, a, lda, k1, k2, ipiv, incx );
+}
diff --git a/LAPACKE/src/lapacke_claswp_work.c b/LAPACKE/src/lapacke_claswp_work.c
new file mode 100644
index 00000000..b02753f3
--- /dev/null
+++ b/LAPACKE/src/lapacke_claswp_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 claswp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_claswp_work( int matrix_layout, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int k1, lapack_int k2,
+ const lapack_int* ipiv, lapack_int incx )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_claswp( &n, a, &lda, &k1, &k2, ipiv, &incx );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,lda);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -4;
+ LAPACKE_xerbla( "LAPACKE_claswp_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_claswp( &n, a_t, &lda_t, &k1, &k2, ipiv, &incx );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_claswp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_claswp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clatms.c b/LAPACKE/src/lapacke_clatms.c
new file mode 100644
index 00000000..96415ca0
--- /dev/null
+++ b/LAPACKE/src/lapacke_clatms.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clatms
+* Author: Intel Corporation
+* Generated April, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clatms( int matrix_layout, lapack_int m, lapack_int n,
+ char dist, lapack_int* iseed, char sym, float* d,
+ lapack_int mode, float cond, float dmax,
+ lapack_int kl, lapack_int ku, char pack,
+ lapack_complex_float* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_clatms", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -14;
+ }
+ if( LAPACKE_s_nancheck( 1, &cond, 1 ) ) {
+ return -9;
+ }
+ if( LAPACKE_s_nancheck( MIN(n,m), d, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &dmax, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,3*(MAX(n,m))) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_clatms_work( matrix_layout, m, n, dist, iseed, sym, d, mode,
+ cond, dmax, kl, ku, pack, a, lda, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clatms", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clatms_work.c b/LAPACKE/src/lapacke_clatms_work.c
new file mode 100644
index 00000000..1ee0c130
--- /dev/null
+++ b/LAPACKE/src/lapacke_clatms_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clatms
+* Author: Intel Corporation
+* Generated April, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clatms_work( int matrix_layout, lapack_int m, lapack_int n,
+ char dist, lapack_int* iseed, char sym,
+ float* d, lapack_int mode, float cond,
+ float dmax, lapack_int kl, lapack_int ku,
+ char pack, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_clatms( &m, &n, &dist, iseed, &sym, d, &mode, &cond, &dmax, &kl,
+ &ku, &pack, a, &lda, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_clatms_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_clatms( &m, &n, &dist, iseed, &sym, d, &mode, &cond, &dmax, &kl,
+ &ku, &pack, a_t, &lda_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clatms_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_clatms_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_clauum.c b/LAPACKE/src/lapacke_clauum.c
new file mode 100644
index 00000000..6fdf192c
--- /dev/null
+++ b/LAPACKE/src/lapacke_clauum.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clauum
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clauum( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_clauum", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_clauum_work( matrix_layout, uplo, n, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_clauum_work.c b/LAPACKE/src/lapacke_clauum_work.c
new file mode 100644
index 00000000..ba837afd
--- /dev/null
+++ b/LAPACKE/src/lapacke_clauum_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 clauum
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clauum_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_clauum( &uplo, &n, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_clauum_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_clauum( &uplo, &n, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_clauum_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_clauum_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpbcon.c b/LAPACKE/src/lapacke_cpbcon.c
new file mode 100644
index 00000000..70ad234e
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpbcon.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpbcon( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, const lapack_complex_float* ab,
+ lapack_int ldab, float anorm, float* rcond )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cpbcon_work( matrix_layout, uplo, n, kd, ab, ldab, anorm,
+ rcond, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpbcon_work.c b/LAPACKE/src/lapacke_cpbcon_work.c
new file mode 100644
index 00000000..6c749a3a
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpbcon_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpbcon_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, const lapack_complex_float* ab,
+ lapack_int ldab, float anorm, float* rcond,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpbcon( &uplo, &n, &kd, ab, &ldab, &anorm, rcond, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_complex_float* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cpbcon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpbcon( &uplo, &n, &kd, ab_t, &ldab_t, &anorm, rcond, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpbcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpbequ.c b/LAPACKE/src/lapacke_cpbequ.c
new file mode 100644
index 00000000..33231d66
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpbequ.c
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpbequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpbequ( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, const lapack_complex_float* ab,
+ lapack_int ldab, float* s, float* scond,
+ float* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_cpbequ_work( matrix_layout, uplo, n, kd, ab, ldab, s, scond,
+ amax );
+}
diff --git a/LAPACKE/src/lapacke_cpbequ_work.c b/LAPACKE/src/lapacke_cpbequ_work.c
new file mode 100644
index 00000000..49229c7d
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpbequ_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpbequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpbequ_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, const lapack_complex_float* ab,
+ lapack_int ldab, float* s, float* scond,
+ float* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpbequ( &uplo, &n, &kd, ab, &ldab, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_complex_float* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cpbequ_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpbequ( &uplo, &n, &kd, ab_t, &ldab_t, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpbequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpbrfs.c b/LAPACKE/src/lapacke_cpbrfs.c
new file mode 100644
index 00000000..51e2c80b
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpbrfs.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpbrfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs,
+ const lapack_complex_float* ab, lapack_int ldab,
+ const lapack_complex_float* afb, lapack_int ldafb,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cpbrfs_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, afb,
+ ldafb, b, ldb, x, ldx, ferr, berr, work,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpbrfs_work.c b/LAPACKE/src/lapacke_cpbrfs_work.c
new file mode 100644
index 00000000..6c25ecb0
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpbrfs_work.c
@@ -0,0 +1,142 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpbrfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs,
+ const lapack_complex_float* ab, lapack_int ldab,
+ const lapack_complex_float* afb,
+ lapack_int ldafb, const lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpbrfs( &uplo, &n, &kd, &nrhs, ab, &ldab, afb, &ldafb, b, &ldb,
+ x, &ldx, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldafb_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* afb_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cpbrfs_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cpbrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cpbrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_cpbrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ LAPACKE_cpb_trans( matrix_layout, uplo, n, kd, afb, ldafb, afb_t,
+ ldafb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpbrfs( &uplo, &n, &kd, &nrhs, ab_t, &ldab_t, afb_t, &ldafb_t,
+ b_t, &ldb_t, x_t, &ldx_t, ferr, berr, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpbrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpbstf.c b/LAPACKE/src/lapacke_cpbstf.c
new file mode 100644
index 00000000..d4de2de6
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpbstf.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpbstf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpbstf( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kb, lapack_complex_float* bb,
+ lapack_int ldbb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbstf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_cpbstf_work( matrix_layout, uplo, n, kb, bb, ldbb );
+}
diff --git a/LAPACKE/src/lapacke_cpbstf_work.c b/LAPACKE/src/lapacke_cpbstf_work.c
new file mode 100644
index 00000000..bcc700b5
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpbstf_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpbstf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpbstf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kb, lapack_complex_float* bb,
+ lapack_int ldbb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpbstf( &uplo, &n, &kb, bb, &ldbb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_complex_float* bb_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldbb < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cpbstf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ bb_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpbstf( &uplo, &n, &kb, bb_t, &ldbb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cpb_trans( LAPACK_COL_MAJOR, uplo, n, kb, bb_t, ldbb_t, bb,
+ ldbb );
+ /* Release memory and exit */
+ LAPACKE_free( bb_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbstf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpbstf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpbsv.c b/LAPACKE/src/lapacke_cpbsv.c
new file mode 100644
index 00000000..2a9ff4eb
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpbsv.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpbsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpbsv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs,
+ lapack_complex_float* ab, lapack_int ldab,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_cpbsv_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_cpbsv_work.c b/LAPACKE/src/lapacke_cpbsv_work.c
new file mode 100644
index 00000000..5800b759
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpbsv_work.c
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpbsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpbsv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs,
+ lapack_complex_float* ab, lapack_int ldab,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpbsv( &uplo, &n, &kd, &nrhs, ab, &ldab, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cpbsv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cpbsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpbsv( &uplo, &n, &kd, &nrhs, ab_t, &ldab_t, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cpb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpbsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpbsvx.c b/LAPACKE/src/lapacke_cpbsvx.c
new file mode 100644
index 00000000..15e7934f
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpbsvx.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpbsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpbsvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs,
+ lapack_complex_float* ab, lapack_int ldab,
+ lapack_complex_float* afb, lapack_int ldafb,
+ char* equed, float* s, lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
+ return -9;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cpbsvx_work( matrix_layout, fact, uplo, n, kd, nrhs, ab, ldab,
+ afb, ldafb, equed, s, b, ldb, x, ldx, rcond,
+ ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpbsvx_work.c b/LAPACKE/src/lapacke_cpbsvx_work.c
new file mode 100644
index 00000000..6cdb4cba
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpbsvx_work.c
@@ -0,0 +1,154 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpbsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpbsvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int kd, lapack_int nrhs,
+ lapack_complex_float* ab, lapack_int ldab,
+ lapack_complex_float* afb, lapack_int ldafb,
+ char* equed, float* s, lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* ferr,
+ float* berr, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpbsvx( &fact, &uplo, &n, &kd, &nrhs, ab, &ldab, afb, &ldafb,
+ equed, s, b, &ldb, x, &ldx, rcond, ferr, berr, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldafb_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* afb_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cpbsvx_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_cpbsvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_cpbsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_cpbsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_cpb_trans( matrix_layout, uplo, n, kd, afb, ldafb, afb_t,
+ ldafb_t );
+ }
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpbsvx( &fact, &uplo, &n, &kd, &nrhs, ab_t, &ldab_t, afb_t,
+ &ldafb_t, equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond,
+ ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_cpb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_cpb_trans( LAPACK_COL_MAJOR, uplo, n, kd, afb_t, ldafb_t,
+ afb, ldafb );
+ }
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpbsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpbtrf.c b/LAPACKE/src/lapacke_cpbtrf.c
new file mode 100644
index 00000000..a70e897b
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpbtrf.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpbtrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpbtrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_complex_float* ab,
+ lapack_int ldab )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbtrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_cpbtrf_work( matrix_layout, uplo, n, kd, ab, ldab );
+}
diff --git a/LAPACKE/src/lapacke_cpbtrf_work.c b/LAPACKE/src/lapacke_cpbtrf_work.c
new file mode 100644
index 00000000..0332c6ac
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpbtrf_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpbtrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpbtrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_complex_float* ab,
+ lapack_int ldab )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpbtrf( &uplo, &n, &kd, ab, &ldab, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_complex_float* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cpbtrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpbtrf( &uplo, &n, &kd, ab_t, &ldab_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cpb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbtrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpbtrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpbtrs.c b/LAPACKE/src/lapacke_cpbtrs.c
new file mode 100644
index 00000000..41e14703
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpbtrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpbtrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs,
+ const lapack_complex_float* ab, lapack_int ldab,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbtrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_cpbtrs_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_cpbtrs_work.c b/LAPACKE/src/lapacke_cpbtrs_work.c
new file mode 100644
index 00000000..78c61d8f
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpbtrs_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpbtrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs,
+ const lapack_complex_float* ab, lapack_int ldab,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpbtrs( &uplo, &n, &kd, &nrhs, ab, &ldab, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cpbtrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cpbtrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpbtrs( &uplo, &n, &kd, &nrhs, ab_t, &ldab_t, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpbtrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpbtrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpftrf.c b/LAPACKE/src/lapacke_cpftrf.c
new file mode 100644
index 00000000..fae7c220
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpftrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpftrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpftrf( int matrix_layout, char transr, char uplo,
+ lapack_int n, lapack_complex_float* a )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpftrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpf_nancheck( n, a ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_cpftrf_work( matrix_layout, transr, uplo, n, a );
+}
diff --git a/LAPACKE/src/lapacke_cpftrf_work.c b/LAPACKE/src/lapacke_cpftrf_work.c
new file mode 100644
index 00000000..c98f541e
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpftrf_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpftrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpftrf_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, lapack_complex_float* a )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpftrf( &transr, &uplo, &n, a, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpf_trans( matrix_layout, transr, uplo, n, a, a_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpftrf( &transr, &uplo, &n, a_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cpf_trans( LAPACK_COL_MAJOR, transr, uplo, n, a_t, a );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpftrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpftrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpftri.c b/LAPACKE/src/lapacke_cpftri.c
new file mode 100644
index 00000000..b58f95c0
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpftri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpftri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpftri( int matrix_layout, char transr, char uplo,
+ lapack_int n, lapack_complex_float* a )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpftri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpf_nancheck( n, a ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_cpftri_work( matrix_layout, transr, uplo, n, a );
+}
diff --git a/LAPACKE/src/lapacke_cpftri_work.c b/LAPACKE/src/lapacke_cpftri_work.c
new file mode 100644
index 00000000..b0578253
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpftri_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpftri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpftri_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, lapack_complex_float* a )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpftri( &transr, &uplo, &n, a, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpf_trans( matrix_layout, transr, uplo, n, a, a_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpftri( &transr, &uplo, &n, a_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cpf_trans( LAPACK_COL_MAJOR, transr, uplo, n, a_t, a );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpftri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpftri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpftrs.c b/LAPACKE/src/lapacke_cpftrs.c
new file mode 100644
index 00000000..e0b672b3
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpftrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpftrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpftrs( int matrix_layout, char transr, char uplo,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* a,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpftrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpf_nancheck( n, a ) ) {
+ return -6;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_cpftrs_work( matrix_layout, transr, uplo, n, nrhs, a, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_cpftrs_work.c b/LAPACKE/src/lapacke_cpftrs_work.c
new file mode 100644
index 00000000..7a5f299b
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpftrs_work.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpftrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpftrs_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* a,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpftrs( &transr, &uplo, &n, &nrhs, a, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cpftrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cpf_trans( matrix_layout, transr, uplo, n, a, a_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpftrs( &transr, &uplo, &n, &nrhs, a_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpftrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpftrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpocon.c b/LAPACKE/src/lapacke_cpocon.c
new file mode 100644
index 00000000..725947db
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpocon.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpocon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpocon( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float anorm, float* rcond )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpocon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cpocon_work( matrix_layout, uplo, n, a, lda, anorm, rcond,
+ work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpocon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpocon_work.c b/LAPACKE/src/lapacke_cpocon_work.c
new file mode 100644
index 00000000..9e12c53f
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpocon_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpocon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpocon_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float anorm, float* rcond,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpocon( &uplo, &n, a, &lda, &anorm, rcond, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cpocon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpocon( &uplo, &n, a_t, &lda_t, &anorm, rcond, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpocon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpocon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpoequ.c b/LAPACKE/src/lapacke_cpoequ.c
new file mode 100644
index 00000000..1309572b
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpoequ.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpoequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpoequ( int matrix_layout, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float* s, float* scond, float* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpoequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_cpoequ_work( matrix_layout, n, a, lda, s, scond, amax );
+}
diff --git a/LAPACKE/src/lapacke_cpoequ_work.c b/LAPACKE/src/lapacke_cpoequ_work.c
new file mode 100644
index 00000000..e5810182
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpoequ_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpoequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpoequ_work( int matrix_layout, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float* s, float* scond, float* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpoequ( &n, a, &lda, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -4;
+ LAPACKE_xerbla( "LAPACKE_cpoequ_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpoequ( &n, a_t, &lda_t, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpoequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpoequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpoequb.c b/LAPACKE/src/lapacke_cpoequb.c
new file mode 100644
index 00000000..d9778fa5
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpoequb.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpoequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpoequb( int matrix_layout, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float* s, float* scond, float* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpoequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_cpoequb_work( matrix_layout, n, a, lda, s, scond, amax );
+}
diff --git a/LAPACKE/src/lapacke_cpoequb_work.c b/LAPACKE/src/lapacke_cpoequb_work.c
new file mode 100644
index 00000000..e7e3ff42
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpoequb_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpoequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpoequb_work( int matrix_layout, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float* s, float* scond, float* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpoequb( &n, a, &lda, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -4;
+ LAPACKE_xerbla( "LAPACKE_cpoequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpoequb( &n, a_t, &lda_t, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpoequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpoequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cporfs.c b/LAPACKE/src/lapacke_cporfs.c
new file mode 100644
index 00000000..1c8e5824
--- /dev/null
+++ b/LAPACKE/src/lapacke_cporfs.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cporfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cporfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* af,
+ lapack_int ldaf, const lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cporfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -11;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cporfs_work( matrix_layout, uplo, n, nrhs, a, lda, af, ldaf,
+ b, ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cporfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cporfs_work.c b/LAPACKE/src/lapacke_cporfs_work.c
new file mode 100644
index 00000000..2cc186c3
--- /dev/null
+++ b/LAPACKE/src/lapacke_cporfs_work.c
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cporfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cporfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* af,
+ lapack_int ldaf, const lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cporfs( &uplo, &n, &nrhs, a, &lda, af, &ldaf, b, &ldb, x, &ldx,
+ ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* af_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cporfs_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cporfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_cporfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_cporfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_cpo_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cporfs( &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cporfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cporfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cporfsx.c b/LAPACKE/src/lapacke_cporfsx.c
new file mode 100644
index 00000000..bff3543d
--- /dev/null
+++ b/LAPACKE/src/lapacke_cporfsx.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cporfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cporfsx( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* af, lapack_int ldaf,
+ const float* s, const lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cporfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -11;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -21;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'y' ) ) {
+ if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -13;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cporfsx_work( matrix_layout, uplo, equed, n, nrhs, a, lda, af,
+ ldaf, s, b, ldb, x, ldx, rcond, berr,
+ n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cporfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cporfsx_work.c b/LAPACKE/src/lapacke_cporfsx_work.c
new file mode 100644
index 00000000..f48f6f7f
--- /dev/null
+++ b/LAPACKE/src/lapacke_cporfsx_work.c
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cporfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cporfsx_work( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* af,
+ lapack_int ldaf, const float* s,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cporfsx( &uplo, &equed, &n, &nrhs, a, &lda, af, &ldaf, s, b,
+ &ldb, x, &ldx, rcond, berr, &n_err_bnds, err_bnds_norm,
+ err_bnds_comp, &nparams, params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* af_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cporfsx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cporfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_cporfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_cporfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_csy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cporfsx( &uplo, &equed, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, s,
+ b_t, &ldb_t, x_t, &ldx_t, rcond, berr, &n_err_bnds,
+ err_bnds_norm_t, err_bnds_comp_t, &nparams, params,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cporfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cporfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cposv.c b/LAPACKE/src/lapacke_cposv.c
new file mode 100644
index 00000000..afe2b444
--- /dev/null
+++ b/LAPACKE/src/lapacke_cposv.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cposv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cposv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cposv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_cposv_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_cposv_work.c b/LAPACKE/src/lapacke_cposv_work.c
new file mode 100644
index 00000000..885bf4e3
--- /dev/null
+++ b/LAPACKE/src/lapacke_cposv_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cposv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cposv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cposv( &uplo, &n, &nrhs, a, &lda, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cposv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cposv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cposv( &uplo, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cposv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cposv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cposvx.c b/LAPACKE/src/lapacke_cposvx.c
new file mode 100644
index 00000000..157244ca
--- /dev/null
+++ b/LAPACKE/src/lapacke_cposvx.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cposvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cposvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* af,
+ lapack_int ldaf, char* equed, float* s,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cposvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cposvx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, equed, s, b, ldb, x, ldx, rcond, ferr,
+ berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cposvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cposvx_work.c b/LAPACKE/src/lapacke_cposvx_work.c
new file mode 100644
index 00000000..22acef9f
--- /dev/null
+++ b/LAPACKE/src/lapacke_cposvx_work.c
@@ -0,0 +1,151 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cposvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cposvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* af, lapack_int ldaf,
+ char* equed, float* s, lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* ferr,
+ float* berr, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cposvx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, equed, s, b,
+ &ldb, x, &ldx, rcond, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* af_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cposvx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cposvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_cposvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_cposvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_cpo_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cposvx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr, berr,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_cpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_cpo_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cposvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cposvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cposvxx.c b/LAPACKE/src/lapacke_cposvxx.c
new file mode 100644
index 00000000..7e500bd8
--- /dev/null
+++ b/LAPACKE/src/lapacke_cposvxx.c
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cposvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cposvxx( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* af, lapack_int ldaf,
+ char* equed, float* s, lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* rpvgrw,
+ float* berr, lapack_int n_err_bnds,
+ float* err_bnds_norm, float* err_bnds_comp,
+ lapack_int nparams, float* params )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cposvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -23;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cposvxx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, equed, s, b, ldb, x, ldx, rcond, rpvgrw,
+ berr, n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cposvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cposvxx_work.c b/LAPACKE/src/lapacke_cposvxx_work.c
new file mode 100644
index 00000000..9ef5ae92
--- /dev/null
+++ b/LAPACKE/src/lapacke_cposvxx_work.c
@@ -0,0 +1,178 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cposvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cposvxx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* af, lapack_int ldaf,
+ char* equed, float* s, lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* rpvgrw,
+ float* berr, lapack_int n_err_bnds,
+ float* err_bnds_norm, float* err_bnds_comp,
+ lapack_int nparams, float* params,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cposvxx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, equed, s,
+ b, &ldb, x, &ldx, rcond, rpvgrw, berr, &n_err_bnds,
+ err_bnds_norm, err_bnds_comp, &nparams, params, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* af_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cposvxx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cposvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_cposvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_cposvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_cpo_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cposvxx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond, rpvgrw, berr,
+ &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t, &nparams,
+ params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_cpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_cpo_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cposvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cposvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpotrf.c b/LAPACKE/src/lapacke_cpotrf.c
new file mode 100644
index 00000000..a063e940
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpotrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpotrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpotrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpotrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_cpotrf_work( matrix_layout, uplo, n, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_cpotrf_work.c b/LAPACKE/src/lapacke_cpotrf_work.c
new file mode 100644
index 00000000..61b6b071
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpotrf_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpotrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpotrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpotrf( &uplo, &n, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cpotrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpotrf( &uplo, &n, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpotrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpotrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpotri.c b/LAPACKE/src/lapacke_cpotri.c
new file mode 100644
index 00000000..c10500f6
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpotri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpotri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpotri( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpotri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_cpotri_work( matrix_layout, uplo, n, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_cpotri_work.c b/LAPACKE/src/lapacke_cpotri_work.c
new file mode 100644
index 00000000..3eb879b0
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpotri_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpotri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpotri_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpotri( &uplo, &n, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cpotri_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpotri( &uplo, &n, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpotri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpotri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpotrs.c b/LAPACKE/src/lapacke_cpotrs.c
new file mode 100644
index 00000000..3b8a4319
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpotrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpotrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpotrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpotrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_cpotrs_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_cpotrs_work.c b/LAPACKE/src/lapacke_cpotrs_work.c
new file mode 100644
index 00000000..e2567159
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpotrs_work.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpotrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpotrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpotrs( &uplo, &n, &nrhs, a, &lda, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cpotrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cpotrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpotrs( &uplo, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpotrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpotrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cppcon.c b/LAPACKE/src/lapacke_cppcon.c
new file mode 100644
index 00000000..0125c0af
--- /dev/null
+++ b/LAPACKE/src/lapacke_cppcon.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cppcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cppcon( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* ap, float anorm,
+ float* rcond )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cppcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_cpp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cppcon_work( matrix_layout, uplo, n, ap, anorm, rcond, work,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cppcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cppcon_work.c b/LAPACKE/src/lapacke_cppcon_work.c
new file mode 100644
index 00000000..c1b67791
--- /dev/null
+++ b/LAPACKE/src/lapacke_cppcon_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cppcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cppcon_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* ap, float anorm,
+ float* rcond, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cppcon( &uplo, &n, ap, &anorm, rcond, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cppcon( &uplo, &n, ap_t, &anorm, rcond, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cppcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cppcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cppequ.c b/LAPACKE/src/lapacke_cppequ.c
new file mode 100644
index 00000000..1e6e4350
--- /dev/null
+++ b/LAPACKE/src/lapacke_cppequ.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cppequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cppequ( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* ap, float* s,
+ float* scond, float* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cppequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_cppequ_work( matrix_layout, uplo, n, ap, s, scond, amax );
+}
diff --git a/LAPACKE/src/lapacke_cppequ_work.c b/LAPACKE/src/lapacke_cppequ_work.c
new file mode 100644
index 00000000..4ba5ab67
--- /dev/null
+++ b/LAPACKE/src/lapacke_cppequ_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cppequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cppequ_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* ap, float* s,
+ float* scond, float* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cppequ( &uplo, &n, ap, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cppequ( &uplo, &n, ap_t, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cppequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cppequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpprfs.c b/LAPACKE/src/lapacke_cpprfs.c
new file mode 100644
index 00000000..09289815
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpprfs.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpprfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* ap,
+ const lapack_complex_float* afp,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpprfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpp_nancheck( n, afp ) ) {
+ return -6;
+ }
+ if( LAPACKE_cpp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cpprfs_work( matrix_layout, uplo, n, nrhs, ap, afp, b, ldb, x,
+ ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpprfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpprfs_work.c b/LAPACKE/src/lapacke_cpprfs_work.c
new file mode 100644
index 00000000..b2db31f1
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpprfs_work.c
@@ -0,0 +1,129 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpprfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* ap,
+ const lapack_complex_float* afp,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpprfs( &uplo, &n, &nrhs, ap, afp, b, &ldb, x, &ldx, ferr, berr,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ lapack_complex_float* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cpprfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_cpprfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ LAPACKE_cpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_cpp_trans( matrix_layout, uplo, n, afp, afp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpprfs( &uplo, &n, &nrhs, ap_t, afp_t, b_t, &ldb_t, x_t, &ldx_t,
+ ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpprfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpprfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cppsv.c b/LAPACKE/src/lapacke_cppsv.c
new file mode 100644
index 00000000..b0afaba4
--- /dev/null
+++ b/LAPACKE/src/lapacke_cppsv.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cppsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cppsv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* ap,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cppsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_cppsv_work( matrix_layout, uplo, n, nrhs, ap, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_cppsv_work.c b/LAPACKE/src/lapacke_cppsv_work.c
new file mode 100644
index 00000000..a7de8fdc
--- /dev/null
+++ b/LAPACKE/src/lapacke_cppsv_work.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cppsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cppsv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* ap,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cppsv( &uplo, &n, &nrhs, ap, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cppsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cppsv( &uplo, &n, &nrhs, ap_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_cpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cppsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cppsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cppsvx.c b/LAPACKE/src/lapacke_cppsvx.c
new file mode 100644
index 00000000..d72f0194
--- /dev/null
+++ b/LAPACKE/src/lapacke_cppsvx.c
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cppsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cppsvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* ap,
+ lapack_complex_float* afp, char* equed, float* s,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cppsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_cpp_nancheck( n, afp ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_cpp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+ return -9;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cppsvx_work( matrix_layout, fact, uplo, n, nrhs, ap, afp,
+ equed, s, b, ldb, x, ldx, rcond, ferr, berr,
+ work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cppsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cppsvx_work.c b/LAPACKE/src/lapacke_cppsvx_work.c
new file mode 100644
index 00000000..327859e2
--- /dev/null
+++ b/LAPACKE/src/lapacke_cppsvx_work.c
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cppsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cppsvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_float* ap,
+ lapack_complex_float* afp, char* equed,
+ float* s, lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* ferr,
+ float* berr, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cppsvx( &fact, &uplo, &n, &nrhs, ap, afp, equed, s, b, &ldb, x,
+ &ldx, rcond, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ lapack_complex_float* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cppsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_cppsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_cpp_trans( matrix_layout, uplo, n, afp, afp_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_cppsvx( &fact, &uplo, &n, &nrhs, ap_t, afp_t, equed, s, b_t,
+ &ldb_t, x_t, &ldx_t, rcond, ferr, berr, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_cpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_cpp_trans( LAPACK_COL_MAJOR, uplo, n, afp_t, afp );
+ }
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cppsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cppsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpptrf.c b/LAPACKE/src/lapacke_cpptrf.c
new file mode 100644
index 00000000..d2046daf
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpptrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpptrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpptrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_cpptrf_work( matrix_layout, uplo, n, ap );
+}
diff --git a/LAPACKE/src/lapacke_cpptrf_work.c b/LAPACKE/src/lapacke_cpptrf_work.c
new file mode 100644
index 00000000..618aa739
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpptrf_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpptrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpptrf( &uplo, &n, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpptrf( &uplo, &n, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpptrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpptrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpptri.c b/LAPACKE/src/lapacke_cpptri.c
new file mode 100644
index 00000000..114e643f
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpptri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpptri( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpptri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_cpptri_work( matrix_layout, uplo, n, ap );
+}
diff --git a/LAPACKE/src/lapacke_cpptri_work.c b/LAPACKE/src/lapacke_cpptri_work.c
new file mode 100644
index 00000000..77547e74
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpptri_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpptri_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpptri( &uplo, &n, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpptri( &uplo, &n, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpptri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpptri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpptrs.c b/LAPACKE/src/lapacke_cpptrs.c
new file mode 100644
index 00000000..ed710057
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpptrs.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpptrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* ap,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpptrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_cpptrs_work( matrix_layout, uplo, n, nrhs, ap, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_cpptrs_work.c b/LAPACKE/src/lapacke_cpptrs_work.c
new file mode 100644
index 00000000..92860c94
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpptrs_work.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpptrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* ap,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpptrs( &uplo, &n, &nrhs, ap, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cpptrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpptrs( &uplo, &n, &nrhs, ap_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpptrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpptrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpstrf.c b/LAPACKE/src/lapacke_cpstrf.c
new file mode 100644
index 00000000..3a4f5fc8
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpstrf.c
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpstrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpstrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* piv, lapack_int* rank, float tol )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpstrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( 1, &tol, 1 ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cpstrf_work( matrix_layout, uplo, n, a, lda, piv, rank, tol,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpstrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpstrf_work.c b/LAPACKE/src/lapacke_cpstrf_work.c
new file mode 100644
index 00000000..dbb8fd40
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpstrf_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpstrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpstrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* piv, lapack_int* rank, float tol,
+ float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpstrf( &uplo, &n, a, &lda, piv, rank, &tol, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cpstrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpstrf( &uplo, &n, a_t, &lda_t, piv, rank, &tol, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpstrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpstrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cptcon.c b/LAPACKE/src/lapacke_cptcon.c
new file mode 100644
index 00000000..a65da586
--- /dev/null
+++ b/LAPACKE/src/lapacke_cptcon.c
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 cptcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cptcon( lapack_int n, const float* d,
+ const lapack_complex_float* e, float anorm,
+ float* rcond )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -2;
+ }
+ if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
+ return -3;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cptcon_work( n, d, e, anorm, rcond, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cptcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cptcon_work.c b/LAPACKE/src/lapacke_cptcon_work.c
new file mode 100644
index 00000000..d7cc964b
--- /dev/null
+++ b/LAPACKE/src/lapacke_cptcon_work.c
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 cptcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cptcon_work( lapack_int n, const float* d,
+ const lapack_complex_float* e, float anorm,
+ float* rcond, float* work )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_cptcon( &n, d, e, &anorm, rcond, work, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpteqr.c b/LAPACKE/src/lapacke_cpteqr.c
new file mode 100644
index 00000000..8a4b6b13
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpteqr.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpteqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpteqr( int matrix_layout, char compz, lapack_int n, float* d,
+ float* e, lapack_complex_float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lwork;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpteqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -6;
+ }
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( compz, 'n' ) ) {
+ lwork = 1;
+ } else {
+ lwork = MAX(1,4*n-4);
+ }
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cpteqr_work( matrix_layout, compz, n, d, e, z, ldz, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpteqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpteqr_work.c b/LAPACKE/src/lapacke_cpteqr_work.c
new file mode 100644
index 00000000..5cef639f
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpteqr_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpteqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpteqr_work( int matrix_layout, char compz, lapack_int n,
+ float* d, float* e, lapack_complex_float* z,
+ lapack_int ldz, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpteqr( &compz, &n, d, e, z, &ldz, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cpteqr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpteqr( &compz, &n, d, e, z_t, &ldz_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ /* Release memory and exit */
+ LAPACKE_free( z_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpteqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpteqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cptrfs.c b/LAPACKE/src/lapacke_cptrfs.c
new file mode 100644
index 00000000..7b7a1693
--- /dev/null
+++ b/LAPACKE/src/lapacke_cptrfs.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cptrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cptrfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* d,
+ const lapack_complex_float* e, const float* df,
+ const lapack_complex_float* ef,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cptrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( n, df, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_c_nancheck( n-1, ef, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -11;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cptrfs_work( matrix_layout, uplo, n, nrhs, d, e, df, ef, b,
+ ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cptrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cptrfs_work.c b/LAPACKE/src/lapacke_cptrfs_work.c
new file mode 100644
index 00000000..8b76e01d
--- /dev/null
+++ b/LAPACKE/src/lapacke_cptrfs_work.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cptrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cptrfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* d,
+ const lapack_complex_float* e, const float* df,
+ const lapack_complex_float* ef,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cptrfs( &uplo, &n, &nrhs, d, e, df, ef, b, &ldb, x, &ldx, ferr,
+ berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_cptrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_cptrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cptrfs( &uplo, &n, &nrhs, d, e, df, ef, b_t, &ldb_t, x_t, &ldx_t,
+ ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cptrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cptrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cptsv.c b/LAPACKE/src/lapacke_cptsv.c
new file mode 100644
index 00000000..c56f0530
--- /dev/null
+++ b/LAPACKE/src/lapacke_cptsv.c
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cptsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cptsv( int matrix_layout, lapack_int n, lapack_int nrhs,
+ float* d, lapack_complex_float* e,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cptsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -6;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_cptsv_work( matrix_layout, n, nrhs, d, e, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_cptsv_work.c b/LAPACKE/src/lapacke_cptsv_work.c
new file mode 100644
index 00000000..802f509b
--- /dev/null
+++ b/LAPACKE/src/lapacke_cptsv_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cptsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cptsv_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ float* d, lapack_complex_float* e,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cptsv( &n, &nrhs, d, e, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cptsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cptsv( &n, &nrhs, d, e, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cptsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cptsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cptsvx.c b/LAPACKE/src/lapacke_cptsvx.c
new file mode 100644
index 00000000..a4465228
--- /dev/null
+++ b/LAPACKE/src/lapacke_cptsvx.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cptsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cptsvx( int matrix_layout, char fact, lapack_int n,
+ lapack_int nrhs, const float* d,
+ const lapack_complex_float* e, float* df,
+ lapack_complex_float* ef,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cptsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_s_nancheck( n, df, 1 ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_c_nancheck( n-1, ef, 1 ) ) {
+ return -8;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cptsvx_work( matrix_layout, fact, n, nrhs, d, e, df, ef, b,
+ ldb, x, ldx, rcond, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cptsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cptsvx_work.c b/LAPACKE/src/lapacke_cptsvx_work.c
new file mode 100644
index 00000000..5ff8593d
--- /dev/null
+++ b/LAPACKE/src/lapacke_cptsvx_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cptsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cptsvx_work( int matrix_layout, char fact, lapack_int n,
+ lapack_int nrhs, const float* d,
+ const lapack_complex_float* e, float* df,
+ lapack_complex_float* ef,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cptsvx( &fact, &n, &nrhs, d, e, df, ef, b, &ldb, x, &ldx, rcond,
+ ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_cptsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_cptsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cptsvx( &fact, &n, &nrhs, d, e, df, ef, b_t, &ldb_t, x_t, &ldx_t,
+ rcond, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cptsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cptsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpttrf.c b/LAPACKE/src/lapacke_cpttrf.c
new file mode 100644
index 00000000..7c4e052d
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpttrf.c
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 cpttrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpttrf( lapack_int n, float* d, lapack_complex_float* e )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -2;
+ }
+ if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_cpttrf_work( n, d, e );
+}
diff --git a/LAPACKE/src/lapacke_cpttrf_work.c b/LAPACKE/src/lapacke_cpttrf_work.c
new file mode 100644
index 00000000..18ea7115
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpttrf_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 cpttrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpttrf_work( lapack_int n, float* d,
+ lapack_complex_float* e )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpttrf( &n, d, e, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cpttrs.c b/LAPACKE/src/lapacke_cpttrs.c
new file mode 100644
index 00000000..f7ed9aab
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpttrs.c
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpttrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpttrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* d,
+ const lapack_complex_float* e,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cpttrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_cpttrs_work( matrix_layout, uplo, n, nrhs, d, e, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_cpttrs_work.c b/LAPACKE/src/lapacke_cpttrs_work.c
new file mode 100644
index 00000000..9b24d4be
--- /dev/null
+++ b/LAPACKE/src/lapacke_cpttrs_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cpttrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cpttrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* d,
+ const lapack_complex_float* e,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpttrs( &uplo, &n, &nrhs, d, e, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cpttrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cpttrs( &uplo, &n, &nrhs, d, e, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cpttrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cpttrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cspcon.c b/LAPACKE/src/lapacke_cspcon.c
new file mode 100644
index 00000000..7baead51
--- /dev/null
+++ b/LAPACKE/src/lapacke_cspcon.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cspcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cspcon( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* ap,
+ const lapack_int* ipiv, float anorm, float* rcond )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cspcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_csp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cspcon_work( matrix_layout, uplo, n, ap, ipiv, anorm, rcond,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cspcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cspcon_work.c b/LAPACKE/src/lapacke_cspcon_work.c
new file mode 100644
index 00000000..488dfba1
--- /dev/null
+++ b/LAPACKE/src/lapacke_cspcon_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cspcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cspcon_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* ap,
+ const lapack_int* ipiv, float anorm,
+ float* rcond, lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cspcon( &uplo, &n, ap, ipiv, &anorm, rcond, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cspcon( &uplo, &n, ap_t, ipiv, &anorm, rcond, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cspcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cspcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csprfs.c b/LAPACKE/src/lapacke_csprfs.c
new file mode 100644
index 00000000..650ac397
--- /dev/null
+++ b/LAPACKE/src/lapacke_csprfs.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csprfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* ap,
+ const lapack_complex_float* afp,
+ const lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csprfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csp_nancheck( n, afp ) ) {
+ return -6;
+ }
+ if( LAPACKE_csp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_csprfs_work( matrix_layout, uplo, n, nrhs, ap, afp, ipiv, b,
+ ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csprfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csprfs_work.c b/LAPACKE/src/lapacke_csprfs_work.c
new file mode 100644
index 00000000..d84df95e
--- /dev/null
+++ b/LAPACKE/src/lapacke_csprfs_work.c
@@ -0,0 +1,130 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csprfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* ap,
+ const lapack_complex_float* afp,
+ const lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csprfs( &uplo, &n, &nrhs, ap, afp, ipiv, b, &ldb, x, &ldx, ferr,
+ berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ lapack_complex_float* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_csprfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_csprfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ LAPACKE_csp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_csp_trans( matrix_layout, uplo, n, afp, afp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csprfs( &uplo, &n, &nrhs, ap_t, afp_t, ipiv, b_t, &ldb_t, x_t,
+ &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csprfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csprfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cspsv.c b/LAPACKE/src/lapacke_cspsv.c
new file mode 100644
index 00000000..585d53cd
--- /dev/null
+++ b/LAPACKE/src/lapacke_cspsv.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cspsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cspsv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* ap,
+ lapack_int* ipiv, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cspsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_cspsv_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_cspsv_work.c b/LAPACKE/src/lapacke_cspsv_work.c
new file mode 100644
index 00000000..6b82825d
--- /dev/null
+++ b/LAPACKE/src/lapacke_cspsv_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cspsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cspsv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* ap,
+ lapack_int* ipiv, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cspsv( &uplo, &n, &nrhs, ap, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cspsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_csp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cspsv( &uplo, &n, &nrhs, ap_t, ipiv, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_csp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cspsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cspsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cspsvx.c b/LAPACKE/src/lapacke_cspsvx.c
new file mode 100644
index 00000000..07e8efc9
--- /dev/null
+++ b/LAPACKE/src/lapacke_cspsvx.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cspsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cspsvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* ap,
+ lapack_complex_float* afp, lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cspsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_csp_nancheck( n, afp ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_csp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cspsvx_work( matrix_layout, fact, uplo, n, nrhs, ap, afp,
+ ipiv, b, ldb, x, ldx, rcond, ferr, berr, work,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cspsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cspsvx_work.c b/LAPACKE/src/lapacke_cspsvx_work.c
new file mode 100644
index 00000000..cd282416
--- /dev/null
+++ b/LAPACKE/src/lapacke_cspsvx_work.c
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cspsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cspsvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* ap,
+ lapack_complex_float* afp, lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cspsvx( &fact, &uplo, &n, &nrhs, ap, afp, ipiv, b, &ldb, x, &ldx,
+ rcond, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ lapack_complex_float* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_cspsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_cspsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_csp_trans( matrix_layout, uplo, n, ap, ap_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_csp_trans( matrix_layout, uplo, n, afp, afp_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_cspsvx( &fact, &uplo, &n, &nrhs, ap_t, afp_t, ipiv, b_t, &ldb_t,
+ x_t, &ldx_t, rcond, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ if( LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_csp_trans( LAPACK_COL_MAJOR, uplo, n, afp_t, afp );
+ }
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cspsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cspsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csptrf.c b/LAPACKE/src/lapacke_csptrf.c
new file mode 100644
index 00000000..8a2e35ab
--- /dev/null
+++ b/LAPACKE/src/lapacke_csptrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csptrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* ap, lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csptrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_csptrf_work( matrix_layout, uplo, n, ap, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_csptrf_work.c b/LAPACKE/src/lapacke_csptrf_work.c
new file mode 100644
index 00000000..17d71161
--- /dev/null
+++ b/LAPACKE/src/lapacke_csptrf_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csptrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* ap, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csptrf( &uplo, &n, ap, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csptrf( &uplo, &n, ap_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_csp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csptrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csptrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csptri.c b/LAPACKE/src/lapacke_csptri.c
new file mode 100644
index 00000000..0e6bff4c
--- /dev/null
+++ b/LAPACKE/src/lapacke_csptri.c
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csptri( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* ap, const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csptri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_csptri_work( matrix_layout, uplo, n, ap, ipiv, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csptri", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csptri_work.c b/LAPACKE/src/lapacke_csptri_work.c
new file mode 100644
index 00000000..b72d7285
--- /dev/null
+++ b/LAPACKE/src/lapacke_csptri_work.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csptri_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* ap,
+ const lapack_int* ipiv,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csptri( &uplo, &n, ap, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csptri( &uplo, &n, ap_t, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_csp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csptri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csptri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csptrs.c b/LAPACKE/src/lapacke_csptrs.c
new file mode 100644
index 00000000..f87d239e
--- /dev/null
+++ b/LAPACKE/src/lapacke_csptrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csptrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* ap,
+ const lapack_int* ipiv, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csptrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_csptrs_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_csptrs_work.c b/LAPACKE/src/lapacke_csptrs_work.c
new file mode 100644
index 00000000..633c58fc
--- /dev/null
+++ b/LAPACKE/src/lapacke_csptrs_work.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csptrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* ap,
+ const lapack_int* ipiv, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csptrs( &uplo, &n, &nrhs, ap, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_csptrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_csp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csptrs( &uplo, &n, &nrhs, ap_t, ipiv, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csptrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csptrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cstedc.c b/LAPACKE/src/lapacke_cstedc.c
new file mode 100644
index 00000000..aaab04cf
--- /dev/null
+++ b/LAPACKE/src/lapacke_cstedc.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cstedc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cstedc( int matrix_layout, char compz, lapack_int n, float* d,
+ float* e, lapack_complex_float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_int iwork_query;
+ float rwork_query;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cstedc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -6;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cstedc_work( matrix_layout, compz, n, d, e, z, ldz,
+ &work_query, lwork, &rwork_query, lrwork,
+ &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_C2INT( 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;
+ }
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cstedc_work( matrix_layout, compz, n, d, e, z, ldz, work,
+ lwork, rwork, lrwork, iwork, liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cstedc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cstedc_work.c b/LAPACKE/src/lapacke_cstedc_work.c
new file mode 100644
index 00000000..3db2b5a1
--- /dev/null
+++ b/LAPACKE/src/lapacke_cstedc_work.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cstedc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cstedc_work( int matrix_layout, char compz, lapack_int n,
+ float* d, float* e, lapack_complex_float* z,
+ lapack_int ldz, lapack_complex_float* work,
+ lapack_int lwork, float* rwork,
+ lapack_int lrwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cstedc( &compz, &n, d, e, z, &ldz, work, &lwork, rwork, &lrwork,
+ iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cstedc_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lrwork == -1 || lwork == -1 ) {
+ LAPACK_cstedc( &compz, &n, d, e, z, &ldz_t, work, &lwork, rwork,
+ &lrwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_cstedc( &compz, &n, d, e, z_t, &ldz_t, work, &lwork, rwork,
+ &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cstedc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cstedc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cstegr.c b/LAPACKE/src/lapacke_cstegr.c
new file mode 100644
index 00000000..c29f5599
--- /dev/null
+++ b/LAPACKE/src/lapacke_cstegr.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cstegr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cstegr( int matrix_layout, char jobz, char range,
+ lapack_int n, float* d, float* e, float vl, float vu,
+ lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, lapack_complex_float* z,
+ lapack_int ldz, lapack_int* isuppz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cstegr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( n, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -8;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cstegr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, abstol, m, w, z, ldz, isuppz, &work_query,
+ lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_cstegr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, abstol, m, w, z, ldz, isuppz, 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_cstegr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cstegr_work.c b/LAPACKE/src/lapacke_cstegr_work.c
new file mode 100644
index 00000000..82074eba
--- /dev/null
+++ b/LAPACKE/src/lapacke_cstegr_work.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cstegr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cstegr_work( int matrix_layout, char jobz, char range,
+ lapack_int n, float* d, float* e, float vl,
+ float vu, lapack_int il, lapack_int iu,
+ float abstol, lapack_int* m, float* w,
+ lapack_complex_float* z, lapack_int ldz,
+ lapack_int* isuppz, float* work,
+ lapack_int lwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cstegr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol, m,
+ w, z, &ldz, isuppz, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ( LAPACKE_lsame( jobz, 'v' ) && ( ldz < ldz_t ) ) || ( ldz < 1 ) ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_cstegr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_cstegr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol,
+ m, w, z, &ldz_t, isuppz, work, &lwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ /* Let be always 'n' instead of 'm' */
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_cstegr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol, m,
+ w, z_t, &ldz_t, isuppz, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, *m, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cstegr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cstegr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cstein.c b/LAPACKE/src/lapacke_cstein.c
new file mode 100644
index 00000000..fd0eac25
--- /dev/null
+++ b/LAPACKE/src/lapacke_cstein.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cstein
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cstein( int matrix_layout, lapack_int n, const float* d,
+ const float* e, lapack_int m, const float* w,
+ const lapack_int* iblock, const lapack_int* isplit,
+ lapack_complex_float* z, lapack_int ldz,
+ lapack_int* ifailv )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cstein", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -3;
+ }
+ if( LAPACKE_s_nancheck( n, e, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n, w, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,5*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cstein_work( matrix_layout, n, d, e, m, w, iblock, isplit, z,
+ ldz, work, iwork, ifailv );
+ /* 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_cstein", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cstein_work.c b/LAPACKE/src/lapacke_cstein_work.c
new file mode 100644
index 00000000..e5c89752
--- /dev/null
+++ b/LAPACKE/src/lapacke_cstein_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cstein
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cstein_work( int matrix_layout, lapack_int n, const float* d,
+ const float* e, lapack_int m, const float* w,
+ const lapack_int* iblock,
+ const lapack_int* isplit,
+ lapack_complex_float* z, lapack_int ldz,
+ float* work, lapack_int* iwork,
+ lapack_int* ifailv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cstein( &n, d, e, &m, w, iblock, isplit, z, &ldz, work, iwork,
+ ifailv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < m ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_cstein_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldz_t * MAX(1,m) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_cstein( &n, d, e, &m, w, iblock, isplit, z_t, &ldz_t, work,
+ iwork, ifailv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, m, z_t, ldz_t, z, ldz );
+ /* Release memory and exit */
+ LAPACKE_free( z_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cstein_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cstein_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cstemr.c b/LAPACKE/src/lapacke_cstemr.c
new file mode 100644
index 00000000..ff075690
--- /dev/null
+++ b/LAPACKE/src/lapacke_cstemr.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cstemr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cstemr( int matrix_layout, char jobz, char range,
+ lapack_int n, float* d, float* e, float vl, float vu,
+ lapack_int il, lapack_int iu, lapack_int* m,
+ float* w, lapack_complex_float* z, lapack_int ldz,
+ lapack_int nzc, lapack_int* isuppz,
+ lapack_logical* tryrac )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cstemr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cstemr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, m, w, z, ldz, nzc, isuppz, tryrac,
+ &work_query, lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_cstemr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, m, w, z, ldz, nzc, isuppz, tryrac, 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_cstemr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cstemr_work.c b/LAPACKE/src/lapacke_cstemr_work.c
new file mode 100644
index 00000000..e20a551d
--- /dev/null
+++ b/LAPACKE/src/lapacke_cstemr_work.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cstemr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cstemr_work( int matrix_layout, char jobz, char range,
+ lapack_int n, float* d, float* e, float vl,
+ float vu, lapack_int il, lapack_int iu,
+ lapack_int* m, float* w,
+ lapack_complex_float* z, lapack_int ldz,
+ lapack_int nzc, lapack_int* isuppz,
+ lapack_logical* tryrac, float* work,
+ lapack_int lwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cstemr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, m, w, z,
+ &ldz, &nzc, isuppz, tryrac, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_cstemr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_cstemr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, m, w, z,
+ &ldz_t, &nzc, isuppz, tryrac, work, &lwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_cstemr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, m, w, z_t,
+ &ldz_t, &nzc, isuppz, tryrac, work, &lwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cstemr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cstemr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csteqr.c b/LAPACKE/src/lapacke_csteqr.c
new file mode 100644
index 00000000..026f38b6
--- /dev/null
+++ b/LAPACKE/src/lapacke_csteqr.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csteqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csteqr( int matrix_layout, char compz, lapack_int n, float* d,
+ float* e, lapack_complex_float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lwork;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csteqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -6;
+ }
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( compz, 'n' ) ) {
+ lwork = 1;
+ } else {
+ lwork = MAX(1,2*n-2);
+ }
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_csteqr_work( matrix_layout, compz, n, d, e, z, ldz, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csteqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csteqr_work.c b/LAPACKE/src/lapacke_csteqr_work.c
new file mode 100644
index 00000000..6cc3a349
--- /dev/null
+++ b/LAPACKE/src/lapacke_csteqr_work.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csteqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csteqr_work( int matrix_layout, char compz, lapack_int n,
+ float* d, float* e, lapack_complex_float* z,
+ lapack_int ldz, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csteqr( &compz, &n, d, e, z, &ldz, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_csteqr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_csteqr( &compz, &n, d, e, z_t, &ldz_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csteqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csteqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csycon.c b/LAPACKE/src/lapacke_csycon.c
new file mode 100644
index 00000000..094a2b65
--- /dev/null
+++ b/LAPACKE/src/lapacke_csycon.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csycon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csycon( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv, float anorm, float* rcond )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csycon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_csycon_work( matrix_layout, uplo, n, a, lda, ipiv, anorm,
+ rcond, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csycon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csycon_work.c b/LAPACKE/src/lapacke_csycon_work.c
new file mode 100644
index 00000000..c6d924b6
--- /dev/null
+++ b/LAPACKE/src/lapacke_csycon_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csycon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csycon_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv, float anorm,
+ float* rcond, lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csycon( &uplo, &n, a, &lda, ipiv, &anorm, rcond, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_csycon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csycon( &uplo, &n, a_t, &lda_t, ipiv, &anorm, rcond, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csycon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csycon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csyconv.c b/LAPACKE/src/lapacke_csyconv.c
new file mode 100644
index 00000000..d937ef29
--- /dev/null
+++ b/LAPACKE/src/lapacke_csyconv.c
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csyconv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csyconv( int matrix_layout, char uplo, char way, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csyconv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, lda, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_csyconv_work( matrix_layout, uplo, way, n, a, lda, ipiv,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csyconv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csyconv_work.c b/LAPACKE/src/lapacke_csyconv_work.c
new file mode 100644
index 00000000..d02d9b94
--- /dev/null
+++ b/LAPACKE/src/lapacke_csyconv_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csyconv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csyconv_work( int matrix_layout, char uplo, char way,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csyconv( &uplo, &way, &n, a, &lda, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,lda);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_csyconv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csyconv( &uplo, &way, &n, a_t, &lda_t, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csyconv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csyconv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csyequb.c b/LAPACKE/src/lapacke_csyequb.c
new file mode 100644
index 00000000..5a278e7f
--- /dev/null
+++ b/LAPACKE/src/lapacke_csyequb.c
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csyequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csyequb( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float* s, float* scond, float* amax )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csyequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_csyequb_work( matrix_layout, uplo, n, a, lda, s, scond, amax,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csyequb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csyequb_work.c b/LAPACKE/src/lapacke_csyequb_work.c
new file mode 100644
index 00000000..df95e115
--- /dev/null
+++ b/LAPACKE/src/lapacke_csyequb_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csyequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csyequb_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float* s, float* scond, float* amax,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csyequb( &uplo, &n, a, &lda, s, scond, amax, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_csyequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csyequb( &uplo, &n, a_t, &lda_t, s, scond, amax, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csyequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csyequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csyr.c b/LAPACKE/src/lapacke_csyr.c
new file mode 100644
index 00000000..7dbb3328
--- /dev/null
+++ b/LAPACKE/src/lapacke_csyr.c
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csyr
+* Author: Intel Corporation
+* Generated March, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csyr( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float alpha,
+ const lapack_complex_float* x, lapack_int incx,
+ lapack_complex_float* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csyr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_c_nancheck( 1, &alpha, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_c_nancheck( n, x, 1 ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_csyr_work( matrix_layout, uplo, n, alpha, x, incx, a,
+ lda );
+}
diff --git a/LAPACKE/src/lapacke_csyr_work.c b/LAPACKE/src/lapacke_csyr_work.c
new file mode 100644
index 00000000..c988efb0
--- /dev/null
+++ b/LAPACKE/src/lapacke_csyr_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csyr
+* Author: Intel Corporation
+* Generated March, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csyr_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float alpha,
+ const lapack_complex_float* x,
+ lapack_int incx, lapack_complex_float* a,
+ lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csyr( &uplo, &n, &alpha, x, &incx, a, &lda );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_csyr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csyr( &uplo, &n, &alpha, x, &incx, a_t, &lda_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csyr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csyr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csyrfs.c b/LAPACKE/src/lapacke_csyrfs.c
new file mode 100644
index 00000000..8e80cdb7
--- /dev/null
+++ b/LAPACKE/src/lapacke_csyrfs.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csyrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csyrfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csyrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_csyrfs_work( matrix_layout, uplo, n, nrhs, a, lda, af, ldaf,
+ ipiv, b, ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csyrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csyrfs_work.c b/LAPACKE/src/lapacke_csyrfs_work.c
new file mode 100644
index 00000000..7ef06fdc
--- /dev/null
+++ b/LAPACKE/src/lapacke_csyrfs_work.c
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csyrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csyrfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csyrfs( &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b, &ldb, x,
+ &ldx, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* af_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_csyrfs_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_csyrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_csyrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_csyrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_csy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csyrfs( &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, ipiv, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csyrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csyrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csyrfsx.c b/LAPACKE/src/lapacke_csyrfsx.c
new file mode 100644
index 00000000..3cc7a91f
--- /dev/null
+++ b/LAPACKE/src/lapacke_csyrfsx.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csyrfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csyrfsx( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* af, lapack_int ldaf,
+ const lapack_int* ipiv, const float* s,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* berr, lapack_int n_err_bnds,
+ float* err_bnds_norm, float* err_bnds_comp,
+ lapack_int nparams, float* params )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csyrfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -22;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'y' ) ) {
+ if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -14;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_csyrfsx_work( matrix_layout, uplo, equed, n, nrhs, a, lda, af,
+ ldaf, ipiv, s, b, ldb, x, ldx, rcond, berr,
+ n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csyrfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csyrfsx_work.c b/LAPACKE/src/lapacke_csyrfsx_work.c
new file mode 100644
index 00000000..d5beea0b
--- /dev/null
+++ b/LAPACKE/src/lapacke_csyrfsx_work.c
@@ -0,0 +1,170 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csyrfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csyrfsx_work( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const float* s, const lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csyrfsx( &uplo, &equed, &n, &nrhs, a, &lda, af, &ldaf, ipiv, s,
+ b, &ldb, x, &ldx, rcond, berr, &n_err_bnds,
+ err_bnds_norm, err_bnds_comp, &nparams, params, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* af_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_csyrfsx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_csyrfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_csyrfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_csyrfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_csy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csyrfsx( &uplo, &equed, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, s, b_t, &ldb_t, x_t, &ldx_t, rcond, berr,
+ &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t, &nparams,
+ params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csyrfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csyrfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csysv.c b/LAPACKE/src/lapacke_csysv.c
new file mode 100644
index 00000000..cb4e4623
--- /dev/null
+++ b/LAPACKE/src/lapacke_csysv.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csysv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csysv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* a,
+ lapack_int lda, lapack_int* ipiv,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csysv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_csysv_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_csysv_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csysv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csysv_rook.c b/LAPACKE/src/lapacke_csysv_rook.c
new file mode 100644
index 00000000..1038efa2
--- /dev/null
+++ b/LAPACKE/src/lapacke_csysv_rook.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csysv_rook
+* Author: Intel Corporation
+* Generated January, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csysv_rook( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* a,
+ lapack_int lda, lapack_int* ipiv,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csysv_rook", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_csysv_rook_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv,
+ b, ldb, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_csysv_rook_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv,
+ b, ldb, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csysv_rook", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csysv_rook_work.c b/LAPACKE/src/lapacke_csysv_rook_work.c
new file mode 100644
index 00000000..39034a15
--- /dev/null
+++ b/LAPACKE/src/lapacke_csysv_rook_work.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csysv_rook
+* Author: Intel Corporation
+* Generated January, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csysv_rook_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* a,
+ lapack_int lda, lapack_int* ipiv,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csysv_rook( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_csysv_rook_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_csysv_rook_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_csysv_rook( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csysv_rook( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csysv_rook_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csysv_rook_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csysv_work.c b/LAPACKE/src/lapacke_csysv_work.c
new file mode 100644
index 00000000..30aa1d35
--- /dev/null
+++ b/LAPACKE/src/lapacke_csysv_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csysv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csysv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_float* a,
+ lapack_int lda, lapack_int* ipiv,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csysv( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_csysv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_csysv_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_csysv( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csysv( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csysv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csysv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csysvx.c b/LAPACKE/src/lapacke_csysvx.c
new file mode 100644
index 00000000..a96331a6
--- /dev/null
+++ b/LAPACKE/src/lapacke_csysvx.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csysvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csysvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* af,
+ lapack_int ldaf, lapack_int* ipiv,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csysvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -11;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_csysvx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr,
+ &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_csysvx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr,
+ work, lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csysvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csysvx_work.c b/LAPACKE/src/lapacke_csysvx_work.c
new file mode 100644
index 00000000..2319d0fc
--- /dev/null
+++ b/LAPACKE/src/lapacke_csysvx_work.c
@@ -0,0 +1,155 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csysvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csysvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* af, lapack_int ldaf,
+ lapack_int* ipiv, const lapack_complex_float* b,
+ lapack_int ldb, lapack_complex_float* x,
+ lapack_int ldx, float* rcond, float* ferr,
+ float* berr, lapack_complex_float* work,
+ lapack_int lwork, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csysvx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b,
+ &ldb, x, &ldx, rcond, ferr, berr, work, &lwork, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* af_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_csysvx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_csysvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_csysvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_csysvx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_csysvx( &fact, &uplo, &n, &nrhs, a, &lda_t, af, &ldaf_t,
+ ipiv, b, &ldb_t, x, &ldx_t, rcond, ferr, berr, work,
+ &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_csy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csysvx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr, berr, work,
+ &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csysvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csysvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csysvxx.c b/LAPACKE/src/lapacke_csysvxx.c
new file mode 100644
index 00000000..cf885c8e
--- /dev/null
+++ b/LAPACKE/src/lapacke_csysvxx.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csysvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csysvxx( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, float* s,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* rpvgrw, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csysvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -24;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_csysvxx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, equed, s, b, ldb, x, ldx, rcond,
+ rpvgrw, berr, n_err_bnds, err_bnds_norm,
+ err_bnds_comp, nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csysvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csysvxx_work.c b/LAPACKE/src/lapacke_csysvxx_work.c
new file mode 100644
index 00000000..f37925d1
--- /dev/null
+++ b/LAPACKE/src/lapacke_csysvxx_work.c
@@ -0,0 +1,181 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csysvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csysvxx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, float* s,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* x, lapack_int ldx,
+ float* rcond, float* rpvgrw, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csysvxx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv,
+ equed, s, b, &ldb, x, &ldx, rcond, rpvgrw, berr,
+ &n_err_bnds, err_bnds_norm, err_bnds_comp, &nparams,
+ params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* af_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_csysvxx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_csysvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_csysvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_csysvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_csy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csysvxx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond, rpvgrw,
+ berr, &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t,
+ &nparams, params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csysvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csysvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csyswapr.c b/LAPACKE/src/lapacke_csyswapr.c
new file mode 100644
index 00000000..c1486663
--- /dev/null
+++ b/LAPACKE/src/lapacke_csyswapr.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csyswapr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csyswapr( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int i1,
+ lapack_int i2 )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csyswapr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, n ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_csyswapr_work( matrix_layout, uplo, n, a, i1, i2 );
+}
diff --git a/LAPACKE/src/lapacke_csyswapr_work.c b/LAPACKE/src/lapacke_csyswapr_work.c
new file mode 100644
index 00000000..eab18085
--- /dev/null
+++ b/LAPACKE/src/lapacke_csyswapr_work.c
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csyswapr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csyswapr_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int i1,
+ lapack_int i2 )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csyswapr( &uplo, &n, a, &i1, &i2 );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * n * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, n, a_t, n );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csyswapr( &uplo, &n, a_t, &i1, &i2 );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, n, a, n );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csyswapr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csyswapr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csytrf.c b/LAPACKE/src/lapacke_csytrf.c
new file mode 100644
index 00000000..3ee79606
--- /dev/null
+++ b/LAPACKE/src/lapacke_csytrf.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csytrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csytrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_csytrf_work( matrix_layout, uplo, n, a, lda, ipiv,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_csytrf_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csytrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csytrf_work.c b/LAPACKE/src/lapacke_csytrf_work.c
new file mode 100644
index 00000000..53a28da1
--- /dev/null
+++ b/LAPACKE/src/lapacke_csytrf_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csytrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* ipiv, lapack_complex_float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csytrf( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_csytrf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_csytrf( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csytrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csytrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csytrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csytri.c b/LAPACKE/src/lapacke_csytri.c
new file mode 100644
index 00000000..0d002df9
--- /dev/null
+++ b/LAPACKE/src/lapacke_csytri.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csytri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytri( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csytri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_csytri_work( matrix_layout, uplo, n, a, lda, ipiv, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csytri", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csytri2.c b/LAPACKE/src/lapacke_csytri2.c
new file mode 100644
index 00000000..d663a2f2
--- /dev/null
+++ b/LAPACKE/src/lapacke_csytri2.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csytri2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytri2( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csytri2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_csytri2_work( matrix_layout, uplo, n, a, lda, ipiv,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_csytri2_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csytri2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csytri2_work.c b/LAPACKE/src/lapacke_csytri2_work.c
new file mode 100644
index 00000000..3bdc6048
--- /dev/null
+++ b/LAPACKE/src/lapacke_csytri2_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csytri2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytri2_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csytri2( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_csytri2_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_csytri2( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csytri2( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csytri2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csytri2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csytri2x.c b/LAPACKE/src/lapacke_csytri2x.c
new file mode 100644
index 00000000..40c1deed
--- /dev/null
+++ b/LAPACKE/src/lapacke_csytri2x.c
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csytri2x
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytri2x( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv, lapack_int nb )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csytri2x", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n+nb+1)*(+1) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_csytri2x_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ nb );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csytri2x", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csytri2x_work.c b/LAPACKE/src/lapacke_csytri2x_work.c
new file mode 100644
index 00000000..d7b6e667
--- /dev/null
+++ b/LAPACKE/src/lapacke_csytri2x_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csytri2x
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytri2x_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_float* work, lapack_int nb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csytri2x( &uplo, &n, a, &lda, ipiv, work, &nb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_csytri2x_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csytri2x( &uplo, &n, a_t, &lda_t, ipiv, work, &nb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csytri2x_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csytri2x_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csytri_work.c b/LAPACKE/src/lapacke_csytri_work.c
new file mode 100644
index 00000000..36f81d1b
--- /dev/null
+++ b/LAPACKE/src/lapacke_csytri_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csytri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytri_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csytri( &uplo, &n, a, &lda, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_csytri_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csytri( &uplo, &n, a_t, &lda_t, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csytri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csytri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csytrs.c b/LAPACKE/src/lapacke_csytrs.c
new file mode 100644
index 00000000..fe94c11d
--- /dev/null
+++ b/LAPACKE/src/lapacke_csytrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csytrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csytrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_csytrs_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_csytrs2.c b/LAPACKE/src/lapacke_csytrs2.c
new file mode 100644
index 00000000..42a99ed2
--- /dev/null
+++ b/LAPACKE/src/lapacke_csytrs2.c
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csytrs2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytrs2( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_csytrs2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_csytrs2_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csytrs2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csytrs2_work.c b/LAPACKE/src/lapacke_csytrs2_work.c
new file mode 100644
index 00000000..1e5d26c4
--- /dev/null
+++ b/LAPACKE/src/lapacke_csytrs2_work.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csytrs2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytrs2_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csytrs2( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_csytrs2_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_csytrs2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csytrs2( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csytrs2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csytrs2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csytrs_work.c b/LAPACKE/src/lapacke_csytrs_work.c
new file mode 100644
index 00000000..542b70b7
--- /dev/null
+++ b/LAPACKE/src/lapacke_csytrs_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 csytrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_float* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csytrs( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_csytrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_csytrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csytrs( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csytrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csytrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctbcon.c b/LAPACKE/src/lapacke_ctbcon.c
new file mode 100644
index 00000000..43faf5dd
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctbcon.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctbcon( int matrix_layout, char norm, char uplo, char diag,
+ lapack_int n, lapack_int kd,
+ const lapack_complex_float* ab, lapack_int ldab,
+ float* rcond )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctbcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ctb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctbcon_work( matrix_layout, norm, uplo, diag, n, kd, ab, ldab,
+ rcond, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctbcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctbcon_work.c b/LAPACKE/src/lapacke_ctbcon_work.c
new file mode 100644
index 00000000..61d5bf61
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctbcon_work.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctbcon_work( int matrix_layout, char norm, char uplo,
+ char diag, lapack_int n, lapack_int kd,
+ const lapack_complex_float* ab, lapack_int ldab,
+ float* rcond, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctbcon( &norm, &uplo, &diag, &n, &kd, ab, &ldab, rcond, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_complex_float* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ctbcon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ctb_trans( matrix_layout, uplo, diag, n, kd, ab, ldab, ab_t,
+ ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctbcon( &norm, &uplo, &diag, &n, &kd, ab_t, &ldab_t, rcond, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctbcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctbcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctbrfs.c b/LAPACKE/src/lapacke_ctbrfs.c
new file mode 100644
index 00000000..bbecffc7
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctbrfs.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctbrfs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int kd, lapack_int nrhs,
+ const lapack_complex_float* ab, lapack_int ldab,
+ const lapack_complex_float* b, lapack_int ldb,
+ const lapack_complex_float* x, lapack_int ldx,
+ float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctbrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ctb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctbrfs_work( matrix_layout, uplo, trans, diag, n, kd, nrhs,
+ ab, ldab, b, ldb, x, ldx, ferr, berr, work,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctbrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctbrfs_work.c b/LAPACKE/src/lapacke_ctbrfs_work.c
new file mode 100644
index 00000000..801cb795
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctbrfs_work.c
@@ -0,0 +1,122 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctbrfs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int kd,
+ lapack_int nrhs, const lapack_complex_float* ab,
+ lapack_int ldab, const lapack_complex_float* b,
+ lapack_int ldb, const lapack_complex_float* x,
+ lapack_int ldx, float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctbrfs( &uplo, &trans, &diag, &n, &kd, &nrhs, ab, &ldab, b, &ldb,
+ x, &ldx, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ctbrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ctbrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_ctbrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ctb_trans( matrix_layout, uplo, diag, n, kd, ab, ldab, ab_t,
+ ldab_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctbrfs( &uplo, &trans, &diag, &n, &kd, &nrhs, ab_t, &ldab_t, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctbrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctbrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctbtrs.c b/LAPACKE/src/lapacke_ctbtrs.c
new file mode 100644
index 00000000..e5273b80
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctbtrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctbtrs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int kd, lapack_int nrhs,
+ const lapack_complex_float* ab, lapack_int ldab,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctbtrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ctb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+#endif
+ return LAPACKE_ctbtrs_work( matrix_layout, uplo, trans, diag, n, kd, nrhs,
+ ab, ldab, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_ctbtrs_work.c b/LAPACKE/src/lapacke_ctbtrs_work.c
new file mode 100644
index 00000000..c4846278
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctbtrs_work.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctbtrs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int kd,
+ lapack_int nrhs, const lapack_complex_float* ab,
+ lapack_int ldab, lapack_complex_float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctbtrs( &uplo, &trans, &diag, &n, &kd, &nrhs, ab, &ldab, b, &ldb,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* ab_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ctbtrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ctbtrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ctb_trans( matrix_layout, uplo, diag, n, kd, ab, ldab, ab_t,
+ ldab_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctbtrs( &uplo, &trans, &diag, &n, &kd, &nrhs, ab_t, &ldab_t, b_t,
+ &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctbtrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctbtrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctfsm.c b/LAPACKE/src/lapacke_ctfsm.c
new file mode 100644
index 00000000..742fe650
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctfsm.c
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctfsm
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctfsm( int matrix_layout, char transr, char side, char uplo,
+ char trans, char diag, lapack_int m, lapack_int n,
+ lapack_complex_float alpha,
+ const lapack_complex_float* a,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctfsm", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( IS_C_NONZERO(alpha) ) {
+ if( LAPACKE_ctf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_c_nancheck( 1, &alpha, 1 ) ) {
+ return -9;
+ }
+ if( IS_C_NONZERO(alpha) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -11;
+ }
+ }
+#endif
+ return LAPACKE_ctfsm_work( matrix_layout, transr, side, uplo, trans, diag, m,
+ n, alpha, a, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_ctfsm_work.c b/LAPACKE/src/lapacke_ctfsm_work.c
new file mode 100644
index 00000000..88d4b63e
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctfsm_work.c
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctfsm
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctfsm_work( int matrix_layout, char transr, char side,
+ char uplo, char trans, char diag, lapack_int m,
+ lapack_int n, lapack_complex_float alpha,
+ const lapack_complex_float* a,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctfsm( &transr, &side, &uplo, &trans, &diag, &m, &n, &alpha, a,
+ b, &ldb );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,m);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_ctfsm_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( IS_C_NONZERO(alpha) ) {
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ if( IS_C_NONZERO(alpha) ) {
+ LAPACKE_cge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ }
+ if( IS_C_NONZERO(alpha) ) {
+ LAPACKE_ctf_trans( matrix_layout, transr, uplo, diag, n, a, a_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctfsm( &transr, &side, &uplo, &trans, &diag, &m, &n, &alpha, a_t,
+ b_t, &ldb_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ if( IS_C_NONZERO(alpha) ) {
+ LAPACKE_free( a_t );
+ }
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctfsm_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctfsm_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctftri.c b/LAPACKE/src/lapacke_ctftri.c
new file mode 100644
index 00000000..74c3081d
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctftri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctftri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctftri( int matrix_layout, char transr, char uplo, char diag,
+ lapack_int n, lapack_complex_float* a )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctftri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ctf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_ctftri_work( matrix_layout, transr, uplo, diag, n, a );
+}
diff --git a/LAPACKE/src/lapacke_ctftri_work.c b/LAPACKE/src/lapacke_ctftri_work.c
new file mode 100644
index 00000000..bf09c957
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctftri_work.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctftri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctftri_work( int matrix_layout, char transr, char uplo,
+ char diag, lapack_int n,
+ lapack_complex_float* a )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctftri( &transr, &uplo, &diag, &n, a, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ctf_trans( matrix_layout, transr, uplo, diag, n, a, a_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctftri( &transr, &uplo, &diag, &n, a_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ctf_trans( LAPACK_COL_MAJOR, transr, uplo, diag, n, a_t, a );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctftri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctftri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctfttp.c b/LAPACKE/src/lapacke_ctfttp.c
new file mode 100644
index 00000000..e34aef62
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctfttp.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctfttp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctfttp( int matrix_layout, char transr, char uplo,
+ lapack_int n, const lapack_complex_float* arf,
+ lapack_complex_float* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctfttp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpf_nancheck( n, arf ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_ctfttp_work( matrix_layout, transr, uplo, n, arf, ap );
+}
diff --git a/LAPACKE/src/lapacke_ctfttp_work.c b/LAPACKE/src/lapacke_ctfttp_work.c
new file mode 100644
index 00000000..20879757
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctfttp_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctfttp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctfttp_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, const lapack_complex_float* arf,
+ lapack_complex_float* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctfttp( &transr, &uplo, &n, arf, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* ap_t = NULL;
+ lapack_complex_float* arf_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ arf_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( arf_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpf_trans( matrix_layout, transr, uplo, n, arf, arf_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctfttp( &transr, &uplo, &n, arf_t, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( arf_t );
+exit_level_1:
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctfttp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctfttp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctfttr.c b/LAPACKE/src/lapacke_ctfttr.c
new file mode 100644
index 00000000..b2566d1d
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctfttr.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctfttr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctfttr( int matrix_layout, char transr, char uplo,
+ lapack_int n, const lapack_complex_float* arf,
+ lapack_complex_float* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctfttr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpf_nancheck( n, arf ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_ctfttr_work( matrix_layout, transr, uplo, n, arf, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_ctfttr_work.c b/LAPACKE/src/lapacke_ctfttr_work.c
new file mode 100644
index 00000000..cda49c5f
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctfttr_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctfttr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctfttr_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, const lapack_complex_float* arf,
+ lapack_complex_float* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctfttr( &transr, &uplo, &n, arf, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* arf_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ctfttr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ arf_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( arf_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpf_trans( matrix_layout, transr, uplo, n, arf, arf_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctfttr( &transr, &uplo, &n, arf_t, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( arf_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctfttr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctfttr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctgevc.c b/LAPACKE/src/lapacke_ctgevc.c
new file mode 100644
index 00000000..31418e6e
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctgevc.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctgevc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctgevc( int matrix_layout, char side, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const lapack_complex_float* s, lapack_int lds,
+ const lapack_complex_float* p, lapack_int ldp,
+ lapack_complex_float* vl, lapack_int ldvl,
+ lapack_complex_float* vr, lapack_int ldvr,
+ lapack_int mm, lapack_int* m )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctgevc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, p, ldp ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, s, lds ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctgevc_work( matrix_layout, side, howmny, select, n, s, lds,
+ p, ldp, vl, ldvl, vr, ldvr, mm, m, work,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctgevc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctgevc_work.c b/LAPACKE/src/lapacke_ctgevc_work.c
new file mode 100644
index 00000000..012cede7
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctgevc_work.c
@@ -0,0 +1,162 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctgevc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctgevc_work( int matrix_layout, char side, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const lapack_complex_float* s, lapack_int lds,
+ const lapack_complex_float* p, lapack_int ldp,
+ lapack_complex_float* vl, lapack_int ldvl,
+ lapack_complex_float* vr, lapack_int ldvr,
+ lapack_int mm, lapack_int* m,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctgevc( &side, &howmny, select, &n, s, &lds, p, &ldp, vl, &ldvl,
+ vr, &ldvr, &mm, m, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldp_t = MAX(1,n);
+ lapack_int lds_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ lapack_complex_float* s_t = NULL;
+ lapack_complex_float* p_t = NULL;
+ lapack_complex_float* vl_t = NULL;
+ lapack_complex_float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldp < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ctgevc_work", info );
+ return info;
+ }
+ if( lds < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ctgevc_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ctgevc_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_ctgevc_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ s_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lds_t * MAX(1,n) );
+ if( s_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ p_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldp_t * MAX(1,n) );
+ if( p_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ vl_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ vr_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, s, lds, s_t, lds_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, p, ldp, p_t, ldp_t );
+ if( ( LAPACKE_lsame( side, 'l' ) || LAPACKE_lsame( side, 'b' ) ) &&
+ LAPACKE_lsame( howmny, 'b' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( ( LAPACKE_lsame( side, 'r' ) || LAPACKE_lsame( side, 'b' ) ) &&
+ LAPACKE_lsame( howmny, 'b' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctgevc( &side, &howmny, select, &n, s_t, &lds_t, p_t, &ldp_t,
+ vl_t, &ldvl_t, vr_t, &ldvr_t, &mm, m, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, mm, vl_t, ldvl_t, vl,
+ ldvl );
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, mm, vr_t, ldvr_t, vr,
+ ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_2:
+ LAPACKE_free( p_t );
+exit_level_1:
+ LAPACKE_free( s_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctgevc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctgevc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctgexc.c b/LAPACKE/src/lapacke_ctgexc.c
new file mode 100644
index 00000000..795f8c0e
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctgexc.c
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctgexc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctgexc( int matrix_layout, lapack_logical wantq,
+ lapack_logical wantz, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* q, lapack_int ldq,
+ lapack_complex_float* z, lapack_int ldz,
+ lapack_int ifst, lapack_int ilst )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctgexc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -7;
+ }
+ if( wantq ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -9;
+ }
+ }
+ if( wantz ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -11;
+ }
+ }
+#endif
+ return LAPACKE_ctgexc_work( matrix_layout, wantq, wantz, n, a, lda, b, ldb,
+ q, ldq, z, ldz, ifst, ilst );
+}
diff --git a/LAPACKE/src/lapacke_ctgexc_work.c b/LAPACKE/src/lapacke_ctgexc_work.c
new file mode 100644
index 00000000..fdb22746
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctgexc_work.c
@@ -0,0 +1,158 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctgexc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctgexc_work( int matrix_layout, lapack_logical wantq,
+ lapack_logical wantz, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* q, lapack_int ldq,
+ lapack_complex_float* z, lapack_int ldz,
+ lapack_int ifst, lapack_int ilst )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctgexc( &wantq, &wantz, &n, a, &lda, b, &ldb, q, &ldq, z, &ldz,
+ &ifst, &ilst, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* q_t = NULL;
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_ctgexc_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ctgexc_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ctgexc_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_ctgexc_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( wantq ) {
+ q_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( wantz ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ if( wantq ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ if( wantz ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctgexc( &wantq, &wantz, &n, a_t, &lda_t, b_t, &ldb_t, q_t,
+ &ldq_t, z_t, &ldz_t, &ifst, &ilst, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( wantq ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( wantz ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( wantz ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( wantq ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctgexc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctgexc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctgsen.c b/LAPACKE/src/lapacke_ctgsen.c
new file mode 100644
index 00000000..956dbc61
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctgsen.c
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctgsen
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctgsen( int matrix_layout, lapack_int ijob,
+ lapack_logical wantq, lapack_logical wantz,
+ const lapack_logical* select, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* alpha,
+ lapack_complex_float* beta, lapack_complex_float* q,
+ lapack_int ldq, lapack_complex_float* z,
+ lapack_int ldz, lapack_int* m, float* pl, float* pr,
+ float* dif )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_int iwork_query;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctgsen", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+ if( wantq ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -13;
+ }
+ }
+ if( wantz ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -15;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ctgsen_work( matrix_layout, ijob, wantq, wantz, select, n, a,
+ lda, b, ldb, alpha, beta, q, ldq, z, ldz, m, pl,
+ pr, dif, &work_query, lwork, &iwork_query,
+ liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ if( ijob != 0 ) {
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctgsen_work( matrix_layout, ijob, wantq, wantz, select, n, a,
+ lda, b, ldb, alpha, beta, q, ldq, z, ldz, m, pl,
+ pr, dif, work, lwork, iwork, liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ if( ijob != 0 ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctgsen", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctgsen_work.c b/LAPACKE/src/lapacke_ctgsen_work.c
new file mode 100644
index 00000000..590e430e
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctgsen_work.c
@@ -0,0 +1,172 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctgsen
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctgsen_work( int matrix_layout, lapack_int ijob,
+ lapack_logical wantq, lapack_logical wantz,
+ const lapack_logical* select, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* alpha,
+ lapack_complex_float* beta,
+ lapack_complex_float* q, lapack_int ldq,
+ lapack_complex_float* z, lapack_int ldz,
+ lapack_int* m, float* pl, float* pr, float* dif,
+ lapack_complex_float* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctgsen( &ijob, &wantq, &wantz, select, &n, a, &lda, b, &ldb,
+ alpha, beta, q, &ldq, z, &ldz, m, pl, pr, dif, work,
+ &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* q_t = NULL;
+ lapack_complex_float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ctgsen_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ctgsen_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_ctgsen_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_ctgsen_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_ctgsen( &ijob, &wantq, &wantz, select, &n, a, &lda_t, b,
+ &ldb_t, alpha, beta, q, &ldq_t, z, &ldz_t, m, pl, pr,
+ dif, work, &lwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( wantq ) {
+ q_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( wantz ) {
+ z_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ if( wantq ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ if( wantz ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctgsen( &ijob, &wantq, &wantz, select, &n, a_t, &lda_t, b_t,
+ &ldb_t, alpha, beta, q_t, &ldq_t, z_t, &ldz_t, m, pl, pr,
+ dif, work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( wantq ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( wantz ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( wantz ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( wantq ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctgsen_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctgsen_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctgsja.c b/LAPACKE/src/lapacke_ctgsja.c
new file mode 100644
index 00000000..d197c630
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctgsja.c
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctgsja
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctgsja( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int p, lapack_int n,
+ lapack_int k, lapack_int l, lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* b,
+ lapack_int ldb, float tola, float tolb, float* alpha,
+ float* beta, lapack_complex_float* u, lapack_int ldu,
+ lapack_complex_float* v, lapack_int ldv,
+ lapack_complex_float* q, lapack_int ldq,
+ lapack_int* ncycle )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctgsja", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -10;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -12;
+ }
+ if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -22;
+ }
+ }
+ if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
+ return -14;
+ }
+ if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
+ return -15;
+ }
+ if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, m, m, u, ldu ) ) {
+ return -18;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, p, p, v, ldv ) ) {
+ return -20;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctgsja_work( matrix_layout, jobu, jobv, jobq, m, p, n, k, l,
+ a, lda, b, ldb, tola, tolb, alpha, beta, u, ldu,
+ v, ldv, q, ldq, work, ncycle );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctgsja", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctgsja_work.c b/LAPACKE/src/lapacke_ctgsja_work.c
new file mode 100644
index 00000000..b477d159
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctgsja_work.c
@@ -0,0 +1,190 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctgsja
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctgsja_work( int matrix_layout, char jobu, char jobv,
+ char jobq, lapack_int m, lapack_int p,
+ lapack_int n, lapack_int k, lapack_int l,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ float tola, float tolb, float* alpha,
+ float* beta, lapack_complex_float* u,
+ lapack_int ldu, lapack_complex_float* v,
+ lapack_int ldv, lapack_complex_float* q,
+ lapack_int ldq, lapack_complex_float* work,
+ lapack_int* ncycle )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctgsja( &jobu, &jobv, &jobq, &m, &p, &n, &k, &l, a, &lda, b,
+ &ldb, &tola, &tolb, alpha, beta, u, &ldu, v, &ldv, q,
+ &ldq, work, ncycle, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldu_t = MAX(1,m);
+ lapack_int ldv_t = MAX(1,p);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* u_t = NULL;
+ lapack_complex_float* v_t = NULL;
+ lapack_complex_float* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ctgsja_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_ctgsja_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -23;
+ LAPACKE_xerbla( "LAPACKE_ctgsja_work", info );
+ return info;
+ }
+ if( ldu < m ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_ctgsja_work", info );
+ return info;
+ }
+ if( ldv < p ) {
+ info = -21;
+ LAPACKE_xerbla( "LAPACKE_ctgsja_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+ u_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldu_t * MAX(1,m) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ v_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldv_t * MAX(1,p) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+ q_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_cge_trans( matrix_layout, m, m, u, ldu, u_t, ldu_t );
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_cge_trans( matrix_layout, p, p, v, ldv, v_t, ldv_t );
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctgsja( &jobu, &jobv, &jobq, &m, &p, &n, &k, &l, a_t, &lda_t,
+ b_t, &ldb_t, &tola, &tolb, alpha, beta, u_t, &ldu_t, v_t,
+ &ldv_t, q_t, &ldq_t, work, ncycle, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
+ }
+ if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, p, p, v_t, ldv_t, v, ldv );
+ }
+ if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_4:
+ if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_free( v_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctgsja_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctgsja_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctgsna.c b/LAPACKE/src/lapacke_ctgsna.c
new file mode 100644
index 00000000..b9018998
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctgsna.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctgsna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctgsna( int matrix_layout, char job, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* b, lapack_int ldb,
+ const lapack_complex_float* vl, lapack_int ldvl,
+ const lapack_complex_float* vr, lapack_int ldvr,
+ float* s, float* dif, lapack_int mm, lapack_int* m )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctgsna", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n+2) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ctgsna_work( matrix_layout, job, howmny, select, n, a, lda, b,
+ ldb, vl, ldvl, vr, ldvr, s, dif, mm, m,
+ &work_query, lwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctgsna_work( matrix_layout, job, howmny, select, n, a, lda, b,
+ ldb, vl, ldvl, vr, ldvr, s, dif, mm, m, work,
+ lwork, iwork );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctgsna", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctgsna_work.c b/LAPACKE/src/lapacke_ctgsna_work.c
new file mode 100644
index 00000000..b6c54aea
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctgsna_work.c
@@ -0,0 +1,159 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctgsna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctgsna_work( int matrix_layout, char job, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* b, lapack_int ldb,
+ const lapack_complex_float* vl, lapack_int ldvl,
+ const lapack_complex_float* vr, lapack_int ldvr,
+ float* s, float* dif, lapack_int mm,
+ lapack_int* m, lapack_complex_float* work,
+ lapack_int lwork, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctgsna( &job, &howmny, select, &n, a, &lda, b, &ldb, vl, &ldvl,
+ vr, &ldvr, s, dif, &mm, m, work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* vl_t = NULL;
+ lapack_complex_float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ctgsna_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ctgsna_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ctgsna_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_ctgsna_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ctgsna( &job, &howmny, select, &n, a, &lda_t, b, &ldb_t, vl,
+ &ldvl_t, vr, &ldvr_t, s, dif, &mm, m, work, &lwork,
+ iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ vl_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ vr_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctgsna( &job, &howmny, select, &n, a_t, &lda_t, b_t, &ldb_t,
+ vl_t, &ldvl_t, vr_t, &ldvr_t, s, dif, &mm, m, work,
+ &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctgsna_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctgsna_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctgsyl.c b/LAPACKE/src/lapacke_ctgsyl.c
new file mode 100644
index 00000000..8db60fc1
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctgsyl.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctgsyl
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctgsyl( int matrix_layout, char trans, lapack_int ijob,
+ lapack_int m, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* c, lapack_int ldc,
+ const lapack_complex_float* d, lapack_int ldd,
+ const lapack_complex_float* e, lapack_int lde,
+ lapack_complex_float* f, lapack_int ldf,
+ float* scale, float* dif )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctgsyl", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, m, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, m, d, ldd ) ) {
+ return -12;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, e, lde ) ) {
+ return -14;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, f, ldf ) ) {
+ return -16;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m+n+2) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ctgsyl_work( matrix_layout, trans, ijob, m, n, a, lda, b, ldb,
+ c, ldc, d, ldd, e, lde, f, ldf, scale, dif,
+ &work_query, lwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctgsyl_work( matrix_layout, trans, ijob, m, n, a, lda, b, ldb,
+ c, ldc, d, ldd, e, lde, f, ldf, scale, dif,
+ work, lwork, iwork );
+ /* 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_ctgsyl", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctgsyl_work.c b/LAPACKE/src/lapacke_ctgsyl_work.c
new file mode 100644
index 00000000..6846a35b
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctgsyl_work.c
@@ -0,0 +1,183 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctgsyl
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctgsyl_work( int matrix_layout, char trans, lapack_int ijob,
+ lapack_int m, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* c, lapack_int ldc,
+ const lapack_complex_float* d, lapack_int ldd,
+ const lapack_complex_float* e, lapack_int lde,
+ lapack_complex_float* f, lapack_int ldf,
+ float* scale, float* dif,
+ lapack_complex_float* work, lapack_int lwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctgsyl( &trans, &ijob, &m, &n, a, &lda, b, &ldb, c, &ldc, d,
+ &ldd, e, &lde, f, &ldf, scale, dif, work, &lwork, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_int ldd_t = MAX(1,m);
+ lapack_int lde_t = MAX(1,n);
+ lapack_int ldf_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* c_t = NULL;
+ lapack_complex_float* d_t = NULL;
+ lapack_complex_float* e_t = NULL;
+ lapack_complex_float* f_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ctgsyl_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ctgsyl_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ctgsyl_work", info );
+ return info;
+ }
+ if( ldd < m ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_ctgsyl_work", info );
+ return info;
+ }
+ if( lde < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_ctgsyl_work", info );
+ return info;
+ }
+ if( ldf < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_ctgsyl_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ctgsyl( &trans, &ijob, &m, &n, a, &lda_t, b, &ldb_t, c,
+ &ldc_t, d, &ldd_t, e, &lde_t, f, &ldf_t, scale, dif,
+ work, &lwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ c_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ d_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldd_t * MAX(1,m) );
+ if( d_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ e_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lde_t * MAX(1,n) );
+ if( e_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ f_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldf_t * MAX(1,n) );
+ if( f_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, m, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ LAPACKE_cge_trans( matrix_layout, m, m, d, ldd, d_t, ldd_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, e, lde, e_t, lde_t );
+ LAPACKE_cge_trans( matrix_layout, m, n, f, ldf, f_t, ldf_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctgsyl( &trans, &ijob, &m, &n, a_t, &lda_t, b_t, &ldb_t, c_t,
+ &ldc_t, d_t, &ldd_t, e_t, &lde_t, f_t, &ldf_t, scale,
+ dif, work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, f_t, ldf_t, f, ldf );
+ /* Release memory and exit */
+ LAPACKE_free( f_t );
+exit_level_5:
+ LAPACKE_free( e_t );
+exit_level_4:
+ LAPACKE_free( d_t );
+exit_level_3:
+ LAPACKE_free( c_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctgsyl_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctgsyl_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctpcon.c b/LAPACKE/src/lapacke_ctpcon.c
new file mode 100644
index 00000000..3b618014
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctpcon.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctpcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctpcon( int matrix_layout, char norm, char uplo, char diag,
+ lapack_int n, const lapack_complex_float* ap,
+ float* rcond )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctpcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ctp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctpcon_work( matrix_layout, norm, uplo, diag, n, ap, rcond,
+ work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctpcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctpcon_work.c b/LAPACKE/src/lapacke_ctpcon_work.c
new file mode 100644
index 00000000..d1c62900
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctpcon_work.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctpcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctpcon_work( int matrix_layout, char norm, char uplo,
+ char diag, lapack_int n,
+ const lapack_complex_float* ap, float* rcond,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctpcon( &norm, &uplo, &diag, &n, ap, rcond, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ctp_trans( matrix_layout, uplo, diag, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctpcon( &norm, &uplo, &diag, &n, ap_t, rcond, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctpcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctpcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctpmqrt.c b/LAPACKE/src/lapacke_ctpmqrt.c
new file mode 100644
index 00000000..5ae8687f
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctpmqrt.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctpmqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctpmqrt( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int l, lapack_int nb,
+ const lapack_complex_float* v, lapack_int ldv,
+ const lapack_complex_float* t, lapack_int ldt,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctpmqrt", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -13;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -15;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) {
+ return -11;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,m) * MAX(1,nb) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctpmqrt_work( matrix_layout, side, trans, m, n, k, l, nb, v,
+ ldv, t, ldt, a, lda, b, ldb, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctpmqrt", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctpmqrt_work.c b/LAPACKE/src/lapacke_ctpmqrt_work.c
new file mode 100644
index 00000000..4a69f519
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctpmqrt_work.c
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctpmqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctpmqrt_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int l, lapack_int nb,
+ const lapack_complex_float* v, lapack_int ldv,
+ const lapack_complex_float* t, lapack_int ldt,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctpmqrt( &side, &trans, &m, &n, &k, &l, &nb, v, &ldv, t, &ldt, a,
+ &lda, b, &ldb, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'r' ) ? k : k;
+ lapack_int lda_t = MAX(1,k);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,ldt);
+ lapack_int ldv_t = MAX(1,ldv);
+ lapack_complex_float* v_t = NULL;
+ lapack_complex_float* t_t = NULL;
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_ctpmqrt_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_ctpmqrt_work", info );
+ return info;
+ }
+ if( ldt < nb ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_ctpmqrt_work", info );
+ return info;
+ }
+ if( ldv < k ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ctpmqrt_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldv_t * MAX(1,k) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldt_t * MAX(1,nb) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, ldv, k, v, ldv, v_t, ldv_t );
+ LAPACKE_cge_trans( matrix_layout, ldt, nb, t, ldt, t_t, ldt_t );
+ LAPACKE_cge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctpmqrt( &side, &trans, &m, &n, &k, &l, &nb, v_t, &ldv_t, t_t,
+ &ldt_t, a_t, &lda_t, b_t, &ldb_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, k, m, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_3:
+ LAPACKE_free( a_t );
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctpmqrt_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctpmqrt_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctpqrt.c b/LAPACKE/src/lapacke_ctpqrt.c
new file mode 100644
index 00000000..15c58cf3
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctpqrt.c
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctpqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctpqrt( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int l, lapack_int nb,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* t, lapack_int ldt )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctpqrt", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,nb) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctpqrt_work( matrix_layout, m, n, l, nb, a, lda, b, ldb,
+ t, ldt, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctpqrt", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctpqrt2.c b/LAPACKE/src/lapacke_ctpqrt2.c
new file mode 100644
index 00000000..8934a802
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctpqrt2.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctpqrt2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctpqrt2( int matrix_layout,
+ lapack_int m, lapack_int n, lapack_int l,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* t, lapack_int ldt )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctpqrt2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_ctpqrt2_work( matrix_layout, m, n, l, a, lda, b, ldb, t, ldt );
+}
diff --git a/LAPACKE/src/lapacke_ctpqrt2_work.c b/LAPACKE/src/lapacke_ctpqrt2_work.c
new file mode 100644
index 00000000..6fca3875
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctpqrt2_work.c
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctpqrt2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctpqrt2_work( int matrix_layout,
+ lapack_int m, lapack_int n, lapack_int l,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* t, lapack_int ldt )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctpqrt2( &m, &n, &l, a, &lda, b, &ldb, t, &ldt, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_ctpqrt2_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ctpqrt2_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ctpqrt2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctpqrt2( &m, &n, &l, a_t, &lda_t, b_t, &ldb_t, t_t, &ldt_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctpqrt2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctpqrt2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctpqrt_work.c b/LAPACKE/src/lapacke_ctpqrt_work.c
new file mode 100644
index 00000000..c943afef
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctpqrt_work.c
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctpqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctpqrt_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int l, lapack_int nb,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* t, lapack_int ldt,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctpqrt( &m, &n, &l, &nb, a, &lda, b, &ldb, t, &ldt, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,nb);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* t_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ctpqrt_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ctpqrt_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ctpqrt_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctpqrt( &m, &n, &l, &nb, a_t, &lda_t, b_t, &ldb_t, t_t, &ldt_t,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nb, n, t_t, ldt_t, t, ldt );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctpqrt_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctpqrt_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctprfb.c b/LAPACKE/src/lapacke_ctprfb.c
new file mode 100644
index 00000000..37457a05
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctprfb.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctprfb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctprfb( int matrix_layout, char side, char trans, char direct,
+ char storev, lapack_int m, lapack_int n,
+ lapack_int k, lapack_int l,
+ const lapack_complex_float* v, lapack_int ldv,
+ const lapack_complex_float* t, lapack_int ldt,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_int ldwork;
+ lapack_int work_size;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctprfb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -14;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -16;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, ldt, k, t, ldt ) ) {
+ return -12;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ return -10;
+ }
+#endif
+ if (side=='l' || side=='L') {
+ ldwork = k;
+ work_size = MAX(1,ldwork) * MAX(1,n);
+ }
+ else {
+ ldwork = m;
+ work_size = MAX(1,ldwork) * MAX(1,k);
+ }
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * work_size );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctprfb_work( matrix_layout, side, trans, direct, storev, m, n,
+ k, l, v, ldv, t, ldt, a, lda, b, ldb, work,
+ ldwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctprfb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctprfb_work.c b/LAPACKE/src/lapacke_ctprfb_work.c
new file mode 100644
index 00000000..8ae2d34f
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctprfb_work.c
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctprfb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctprfb_work( int matrix_layout, char side, char trans,
+ char direct, char storev, lapack_int m,
+ lapack_int n, lapack_int k, lapack_int l,
+ const lapack_complex_float* v, lapack_int ldv,
+ const lapack_complex_float* t, lapack_int ldt,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* work, lapack_int ldwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctprfb( &side, &trans, &direct, &storev, &m, &n, &k, &l, v, &ldv,
+ t, &ldt, a, &lda, b, &ldb, work, &ldwork );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'r' ) ? k : k;
+ lapack_int lda_t = MAX(1,k);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,ldt);
+ lapack_int ldv_t = MAX(1,ldv);
+ lapack_complex_float* v_t = NULL;
+ lapack_complex_float* t_t = NULL;
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_ctprfb_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_ctprfb_work", info );
+ return info;
+ }
+ if( ldt < k ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_ctprfb_work", info );
+ return info;
+ }
+ if( ldv < k ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ctprfb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldv_t * MAX(1,k) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldt_t * MAX(1,k) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, ldv, k, v, ldv, v_t, ldv_t );
+ LAPACKE_cge_trans( matrix_layout, ldt, k, t, ldt, t_t, ldt_t );
+ LAPACKE_cge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctprfb( &side, &trans, &direct, &storev, &m, &n, &k, &l, v_t,
+ &ldv_t, t_t, &ldt_t, a_t, &lda_t, b_t, &ldb_t, work,
+ &ldwork );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, k, m, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_3:
+ LAPACKE_free( a_t );
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctprfb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctprfb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctprfs.c b/LAPACKE/src/lapacke_ctprfs.c
new file mode 100644
index 00000000..07a249cf
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctprfs.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctprfs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* ap,
+ const lapack_complex_float* b, lapack_int ldb,
+ const lapack_complex_float* x, lapack_int ldx,
+ float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctprfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ctp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctprfs_work( matrix_layout, uplo, trans, diag, n, nrhs, ap, b,
+ ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctprfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctprfs_work.c b/LAPACKE/src/lapacke_ctprfs_work.c
new file mode 100644
index 00000000..fa383c8a
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctprfs_work.c
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctprfs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* ap,
+ const lapack_complex_float* b, lapack_int ldb,
+ const lapack_complex_float* x, lapack_int ldx,
+ float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctprfs( &uplo, &trans, &diag, &n, &nrhs, ap, b, &ldb, x, &ldx,
+ ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ctprfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ctprfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ LAPACKE_ctp_trans( matrix_layout, uplo, diag, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctprfs( &uplo, &trans, &diag, &n, &nrhs, ap_t, b_t, &ldb_t, x_t,
+ &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctprfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctprfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctptri.c b/LAPACKE/src/lapacke_ctptri.c
new file mode 100644
index 00000000..acf4dedc
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctptri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctptri( int matrix_layout, char uplo, char diag, lapack_int n,
+ lapack_complex_float* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctptri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ctp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_ctptri_work( matrix_layout, uplo, diag, n, ap );
+}
diff --git a/LAPACKE/src/lapacke_ctptri_work.c b/LAPACKE/src/lapacke_ctptri_work.c
new file mode 100644
index 00000000..13f0267c
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctptri_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctptri_work( int matrix_layout, char uplo, char diag,
+ lapack_int n, lapack_complex_float* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctptri( &uplo, &diag, &n, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ctp_trans( matrix_layout, uplo, diag, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctptri( &uplo, &diag, &n, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ctp_trans( LAPACK_COL_MAJOR, uplo, diag, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctptri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctptri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctptrs.c b/LAPACKE/src/lapacke_ctptrs.c
new file mode 100644
index 00000000..ab9cc74f
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctptrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctptrs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* ap,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctptrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ctp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_ctptrs_work( matrix_layout, uplo, trans, diag, n, nrhs, ap, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_ctptrs_work.c b/LAPACKE/src/lapacke_ctptrs_work.c
new file mode 100644
index 00000000..43c12c1f
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctptrs_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctptrs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* ap,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctptrs( &uplo, &trans, &diag, &n, &nrhs, ap, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ctptrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_ctp_trans( matrix_layout, uplo, diag, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctptrs( &uplo, &trans, &diag, &n, &nrhs, ap_t, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctptrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctptrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctpttf.c b/LAPACKE/src/lapacke_ctpttf.c
new file mode 100644
index 00000000..207283f0
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctpttf.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctpttf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctpttf( int matrix_layout, char transr, char uplo,
+ lapack_int n, const lapack_complex_float* ap,
+ lapack_complex_float* arf )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctpttf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpp_nancheck( n, ap ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_ctpttf_work( matrix_layout, transr, uplo, n, ap, arf );
+}
diff --git a/LAPACKE/src/lapacke_ctpttf_work.c b/LAPACKE/src/lapacke_ctpttf_work.c
new file mode 100644
index 00000000..c9f8ecc9
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctpttf_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctpttf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctpttf_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, const lapack_complex_float* ap,
+ lapack_complex_float* arf )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctpttf( &transr, &uplo, &n, ap, arf, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_float* ap_t = NULL;
+ lapack_complex_float* arf_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ arf_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( arf_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctpttf( &transr, &uplo, &n, ap_t, arf_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cpf_trans( LAPACK_COL_MAJOR, transr, uplo, n, arf_t, arf );
+ /* Release memory and exit */
+ LAPACKE_free( arf_t );
+exit_level_1:
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctpttf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctpttf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctpttr.c b/LAPACKE/src/lapacke_ctpttr.c
new file mode 100644
index 00000000..d039cedf
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctpttr.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctpttr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctpttr( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* ap,
+ lapack_complex_float* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctpttr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_ctpttr_work( matrix_layout, uplo, n, ap, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_ctpttr_work.c b/LAPACKE/src/lapacke_ctpttr_work.c
new file mode 100644
index 00000000..1e10e67d
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctpttr_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctpttr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctpttr_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* ap,
+ lapack_complex_float* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctpttr( &uplo, &n, ap, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_ctpttr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctpttr( &uplo, &n, ap_t, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctpttr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctpttr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctrcon.c b/LAPACKE/src/lapacke_ctrcon.c
new file mode 100644
index 00000000..7bfe19d6
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrcon.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrcon( int matrix_layout, char norm, char uplo, char diag,
+ lapack_int n, const lapack_complex_float* a,
+ lapack_int lda, float* rcond )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ctr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctrcon_work( matrix_layout, norm, uplo, diag, n, a, lda,
+ rcond, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctrcon_work.c b/LAPACKE/src/lapacke_ctrcon_work.c
new file mode 100644
index 00000000..ca7db9d3
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrcon_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrcon_work( int matrix_layout, char norm, char uplo,
+ char diag, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ float* rcond, lapack_complex_float* work,
+ float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrcon( &norm, &uplo, &diag, &n, a, &lda, rcond, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ctrcon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ctr_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrcon( &norm, &uplo, &diag, &n, a_t, &lda_t, rcond, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctrcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctrevc.c b/LAPACKE/src/lapacke_ctrevc.c
new file mode 100644
index 00000000..69c1cd04
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrevc.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrevc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrevc( int matrix_layout, char side, char howmny,
+ const lapack_logical* select, lapack_int n,
+ lapack_complex_float* t, lapack_int ldt,
+ lapack_complex_float* vl, lapack_int ldvl,
+ lapack_complex_float* vr, lapack_int ldvr,
+ lapack_int mm, lapack_int* m )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrevc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctrevc_work( matrix_layout, side, howmny, select, n, t, ldt,
+ vl, ldvl, vr, ldvr, mm, m, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrevc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctrevc_work.c b/LAPACKE/src/lapacke_ctrevc_work.c
new file mode 100644
index 00000000..00fbfced
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrevc_work.c
@@ -0,0 +1,145 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrevc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrevc_work( int matrix_layout, char side, char howmny,
+ const lapack_logical* select, lapack_int n,
+ lapack_complex_float* t, lapack_int ldt,
+ lapack_complex_float* vl, lapack_int ldvl,
+ lapack_complex_float* vr, lapack_int ldvr,
+ lapack_int mm, lapack_int* m,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrevc( &side, &howmny, select, &n, t, &ldt, vl, &ldvl, vr,
+ &ldvr, &mm, m, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldt_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ lapack_complex_float* t_t = NULL;
+ lapack_complex_float* vl_t = NULL;
+ lapack_complex_float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ctrevc_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ctrevc_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ctrevc_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ vl_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ vr_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( ( LAPACKE_lsame( side, 'l' ) || LAPACKE_lsame( side, 'b' ) ) &&
+ LAPACKE_lsame( howmny, 'b' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( ( LAPACKE_lsame( side, 'r' ) || LAPACKE_lsame( side, 'b' ) ) &&
+ LAPACKE_lsame( howmny, 'b' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrevc( &side, &howmny, select, &n, t_t, &ldt_t, vl_t, &ldvl_t,
+ vr_t, &ldvr_t, &mm, m, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, mm, vl_t, ldvl_t, vl,
+ ldvl );
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, mm, vr_t, ldvr_t, vr,
+ ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( t_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrevc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctrevc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctrexc.c b/LAPACKE/src/lapacke_ctrexc.c
new file mode 100644
index 00000000..5f677a85
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrexc.c
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrexc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrexc( int matrix_layout, char compq, lapack_int n,
+ lapack_complex_float* t, lapack_int ldt,
+ lapack_complex_float* q, lapack_int ldq,
+ lapack_int ifst, lapack_int ilst )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrexc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -6;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_ctrexc_work( matrix_layout, compq, n, t, ldt, q, ldq, ifst,
+ ilst );
+}
diff --git a/LAPACKE/src/lapacke_ctrexc_work.c b/LAPACKE/src/lapacke_ctrexc_work.c
new file mode 100644
index 00000000..fa9f3ba4
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrexc_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrexc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrexc_work( int matrix_layout, char compq, lapack_int n,
+ lapack_complex_float* t, lapack_int ldt,
+ lapack_complex_float* q, lapack_int ldq,
+ lapack_int ifst, lapack_int ilst )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrexc( &compq, &n, t, &ldt, q, &ldq, &ifst, &ilst, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldt_t = MAX(1,n);
+ lapack_complex_float* t_t = NULL;
+ lapack_complex_float* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldq < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ctrexc_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_ctrexc_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ q_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrexc( &compq, &n, t_t, &ldt_t, q_t, &ldq_t, &ifst, &ilst,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( t_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrexc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctrexc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctrrfs.c b/LAPACKE/src/lapacke_ctrrfs.c
new file mode 100644
index 00000000..d83a8917
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrrfs.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrrfs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* b, lapack_int ldb,
+ const lapack_complex_float* x, lapack_int ldx,
+ float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ctr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -11;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctrrfs_work( matrix_layout, uplo, trans, diag, n, nrhs, a,
+ lda, b, ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctrrfs_work.c b/LAPACKE/src/lapacke_ctrrfs_work.c
new file mode 100644
index 00000000..dbfaf7b5
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrrfs_work.c
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrrfs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* b, lapack_int ldb,
+ const lapack_complex_float* x, lapack_int ldx,
+ float* ferr, float* berr,
+ lapack_complex_float* work, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrrfs( &uplo, &trans, &diag, &n, &nrhs, a, &lda, b, &ldb, x,
+ &ldx, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ctrrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ctrrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_ctrrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ctr_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrrfs( &uplo, &trans, &diag, &n, &nrhs, a_t, &lda_t, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctrrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctrsen.c b/LAPACKE/src/lapacke_ctrsen.c
new file mode 100644
index 00000000..e61de443
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrsen.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrsen
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrsen( int matrix_layout, char job, char compq,
+ const lapack_logical* select, lapack_int n,
+ lapack_complex_float* t, lapack_int ldt,
+ lapack_complex_float* q, lapack_int ldq,
+ lapack_complex_float* w, lapack_int* m, float* s,
+ float* sep )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrsen", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -6;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ctrsen_work( matrix_layout, job, compq, select, n, t, ldt, q,
+ ldq, w, m, s, sep, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctrsen_work( matrix_layout, job, compq, select, n, t, ldt, q,
+ ldq, w, m, s, sep, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrsen", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctrsen_work.c b/LAPACKE/src/lapacke_ctrsen_work.c
new file mode 100644
index 00000000..48195004
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrsen_work.c
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrsen
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrsen_work( int matrix_layout, char job, char compq,
+ const lapack_logical* select, lapack_int n,
+ lapack_complex_float* t, lapack_int ldt,
+ lapack_complex_float* q, lapack_int ldq,
+ lapack_complex_float* w, lapack_int* m,
+ float* s, float* sep,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrsen( &job, &compq, select, &n, t, &ldt, q, &ldq, w, m, s, sep,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldt_t = MAX(1,n);
+ lapack_complex_float* t_t = NULL;
+ lapack_complex_float* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldq < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ctrsen_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ctrsen_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ctrsen( &job, &compq, select, &n, t, &ldt_t, q, &ldq_t, w, m,
+ s, sep, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ q_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrsen( &job, &compq, select, &n, t_t, &ldt_t, q_t, &ldq_t, w, m,
+ s, sep, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( t_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrsen_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctrsen_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctrsna.c b/LAPACKE/src/lapacke_ctrsna.c
new file mode 100644
index 00000000..b27ea4af
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrsna.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrsna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrsna( int matrix_layout, char job, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const lapack_complex_float* t, lapack_int ldt,
+ const lapack_complex_float* vl, lapack_int ldvl,
+ const lapack_complex_float* vr, lapack_int ldvr,
+ float* s, float* sep, lapack_int mm, lapack_int* m )
+{
+ lapack_int info = 0;
+ lapack_int ldwork = LAPACKE_lsame( job, 'e' ) ? 1 : MAX(1,n) ;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrsna", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldwork * MAX(1,n+6) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctrsna_work( matrix_layout, job, howmny, select, n, t, ldt,
+ vl, ldvl, vr, ldvr, s, sep, mm, m, work, ldwork,
+ rwork );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( rwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrsna", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctrsna_work.c b/LAPACKE/src/lapacke_ctrsna_work.c
new file mode 100644
index 00000000..e9e88846
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrsna_work.c
@@ -0,0 +1,135 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrsna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrsna_work( int matrix_layout, char job, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const lapack_complex_float* t, lapack_int ldt,
+ const lapack_complex_float* vl, lapack_int ldvl,
+ const lapack_complex_float* vr, lapack_int ldvr,
+ float* s, float* sep, lapack_int mm,
+ lapack_int* m, lapack_complex_float* work,
+ lapack_int ldwork, float* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrsna( &job, &howmny, select, &n, t, &ldt, vl, &ldvl, vr, &ldvr,
+ s, sep, &mm, m, work, &ldwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldt_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ lapack_complex_float* t_t = NULL;
+ lapack_complex_float* vl_t = NULL;
+ lapack_complex_float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ctrsna_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ctrsna_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ctrsna_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ vl_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ vr_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_cge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrsna( &job, &howmny, select, &n, t_t, &ldt_t, vl_t, &ldvl_t,
+ vr_t, &ldvr_t, s, sep, &mm, m, work, &ldwork, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( t_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrsna_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctrsna_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctrsyl.c b/LAPACKE/src/lapacke_ctrsyl.c
new file mode 100644
index 00000000..f91a1517
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrsyl.c
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrsyl
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrsyl( int matrix_layout, char trana, char tranb,
+ lapack_int isgn, lapack_int m, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* c, lapack_int ldc,
+ float* scale )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrsyl", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, m, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -11;
+ }
+#endif
+ return LAPACKE_ctrsyl_work( matrix_layout, trana, tranb, isgn, m, n, a, lda,
+ b, ldb, c, ldc, scale );
+}
diff --git a/LAPACKE/src/lapacke_ctrsyl_work.c b/LAPACKE/src/lapacke_ctrsyl_work.c
new file mode 100644
index 00000000..64fcec52
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrsyl_work.c
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrsyl
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrsyl_work( int matrix_layout, char trana, char tranb,
+ lapack_int isgn, lapack_int m, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* b, lapack_int ldb,
+ lapack_complex_float* c, lapack_int ldc,
+ float* scale )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrsyl( &trana, &tranb, &isgn, &m, &n, a, &lda, b, &ldb, c, &ldc,
+ scale, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ lapack_complex_float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ctrsyl_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ctrsyl_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_ctrsyl_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ c_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, m, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ LAPACKE_cge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrsyl( &trana, &tranb, &isgn, &m, &n, a_t, &lda_t, b_t, &ldb_t,
+ c_t, &ldc_t, scale, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrsyl_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctrsyl_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctrtri.c b/LAPACKE/src/lapacke_ctrtri.c
new file mode 100644
index 00000000..6dcb9ba1
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrtri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrtri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrtri( int matrix_layout, char uplo, char diag, lapack_int n,
+ lapack_complex_float* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrtri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ctr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_ctrtri_work( matrix_layout, uplo, diag, n, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_ctrtri_work.c b/LAPACKE/src/lapacke_ctrtri_work.c
new file mode 100644
index 00000000..a450ae08
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrtri_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrtri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrtri_work( int matrix_layout, char uplo, char diag,
+ lapack_int n, lapack_complex_float* a,
+ lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrtri( &uplo, &diag, &n, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_ctrtri_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ctr_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrtri( &uplo, &diag, &n, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ctr_trans( LAPACK_COL_MAJOR, uplo, diag, n, a_t, lda_t, a,
+ lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrtri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctrtri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctrtrs.c b/LAPACKE/src/lapacke_ctrtrs.c
new file mode 100644
index 00000000..9b686e5d
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrtrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrtrs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrtrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ctr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ return LAPACKE_ctrtrs_work( matrix_layout, uplo, trans, diag, n, nrhs, a,
+ lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_ctrtrs_work.c b/LAPACKE/src/lapacke_ctrtrs_work.c
new file mode 100644
index 00000000..3e5a74f0
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrtrs_work.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrtrs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int nrhs,
+ const lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrtrs( &uplo, &trans, &diag, &n, &nrhs, a, &lda, b, &ldb,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ctrtrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ctrtrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ctr_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrtrs( &uplo, &trans, &diag, &n, &nrhs, a_t, &lda_t, b_t,
+ &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrtrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctrtrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctrttf.c b/LAPACKE/src/lapacke_ctrttf.c
new file mode 100644
index 00000000..a8619cf1
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrttf.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrttf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrttf( int matrix_layout, char transr, char uplo,
+ lapack_int n, const lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* arf )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrttf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_ctrttf_work( matrix_layout, transr, uplo, n, a, lda, arf );
+}
diff --git a/LAPACKE/src/lapacke_ctrttf_work.c b/LAPACKE/src/lapacke_ctrttf_work.c
new file mode 100644
index 00000000..b067e492
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrttf_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrttf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrttf_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, const lapack_complex_float* a,
+ lapack_int lda, lapack_complex_float* arf )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrttf( &transr, &uplo, &n, a, &lda, arf, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* arf_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_ctrttf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ arf_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( arf_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrttf( &transr, &uplo, &n, a_t, &lda_t, arf_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cpf_trans( LAPACK_COL_MAJOR, transr, uplo, n, arf_t, arf );
+ /* Release memory and exit */
+ LAPACKE_free( arf_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrttf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctrttf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctrttp.c b/LAPACKE/src/lapacke_ctrttp.c
new file mode 100644
index 00000000..2853e891
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrttp.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrttp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrttp( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrttp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_ctrttp_work( matrix_layout, uplo, n, a, lda, ap );
+}
diff --git a/LAPACKE/src/lapacke_ctrttp_work.c b/LAPACKE/src/lapacke_ctrttp_work.c
new file mode 100644
index 00000000..04b97bcd
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctrttp_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctrttp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctrttp_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrttp( &uplo, &n, a, &lda, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_ctrttp_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctrttp( &uplo, &n, a_t, &lda_t, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctrttp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctrttp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctzrzf.c b/LAPACKE/src/lapacke_ctzrzf.c
new file mode 100644
index 00000000..a73dce9a
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctzrzf.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctzrzf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctzrzf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ctzrzf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ctzrzf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ctzrzf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctzrzf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ctzrzf_work.c b/LAPACKE/src/lapacke_ctzrzf_work.c
new file mode 100644
index 00000000..3b01dd3a
--- /dev/null
+++ b/LAPACKE/src/lapacke_ctzrzf_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ctzrzf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ctzrzf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* tau,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctzrzf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_ctzrzf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ctzrzf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ctzrzf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ctzrzf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ctzrzf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunbdb.c b/LAPACKE/src/lapacke_cunbdb.c
new file mode 100644
index 00000000..3f32427d
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunbdb.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunbdb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunbdb( int matrix_layout, char trans, char signs,
+ lapack_int m, lapack_int p, lapack_int q,
+ lapack_complex_float* x11, lapack_int ldx11,
+ lapack_complex_float* x12, lapack_int ldx12,
+ lapack_complex_float* x21, lapack_int ldx21,
+ lapack_complex_float* x22, lapack_int ldx22,
+ float* theta, float* phi,
+ lapack_complex_float* taup1,
+ lapack_complex_float* taup2,
+ lapack_complex_float* tauq1,
+ lapack_complex_float* tauq2 )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cunbdb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
+ nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
+ nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
+ nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) {
+ return -9;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
+ return -11;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) {
+ return -13;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cunbdb_work( matrix_layout, trans, signs, m, p, q, x11, ldx11,
+ x12, ldx12, x21, ldx21, x22, ldx22, theta, phi,
+ taup1, taup2, tauq1, tauq2, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cunbdb_work( matrix_layout, trans, signs, m, p, q, x11, ldx11,
+ x12, ldx12, x21, ldx21, x22, ldx22, theta, phi,
+ taup1, taup2, tauq1, tauq2, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunbdb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunbdb_work.c b/LAPACKE/src/lapacke_cunbdb_work.c
new file mode 100644
index 00000000..b6c8f638
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunbdb_work.c
@@ -0,0 +1,168 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunbdb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunbdb_work( int matrix_layout, char trans, char signs,
+ lapack_int m, lapack_int p, lapack_int q,
+ lapack_complex_float* x11, lapack_int ldx11,
+ lapack_complex_float* x12, lapack_int ldx12,
+ lapack_complex_float* x21, lapack_int ldx21,
+ lapack_complex_float* x22, lapack_int ldx22,
+ float* theta, float* phi,
+ lapack_complex_float* taup1,
+ lapack_complex_float* taup2,
+ lapack_complex_float* tauq1,
+ lapack_complex_float* tauq2,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunbdb( &trans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12,
+ x21, &ldx21, x22, &ldx22, theta, phi, taup1, taup2,
+ tauq1, tauq2, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
+ lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
+ lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
+ lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
+ lapack_int ldx11_t = MAX(1,nrows_x11);
+ lapack_int ldx12_t = MAX(1,nrows_x12);
+ lapack_int ldx21_t = MAX(1,nrows_x21);
+ lapack_int ldx22_t = MAX(1,nrows_x22);
+ lapack_complex_float* x11_t = NULL;
+ lapack_complex_float* x12_t = NULL;
+ lapack_complex_float* x21_t = NULL;
+ lapack_complex_float* x22_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldx11 < q ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cunbdb_work", info );
+ return info;
+ }
+ if( ldx12 < m-q ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_cunbdb_work", info );
+ return info;
+ }
+ if( ldx21 < q ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_cunbdb_work", info );
+ return info;
+ }
+ if( ldx22 < m-q ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_cunbdb_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cunbdb( &trans, &signs, &m, &p, &q, x11, &ldx11_t, x12,
+ &ldx12_t, x21, &ldx21_t, x22, &ldx22_t, theta, phi,
+ taup1, taup2, tauq1, tauq2, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ x11_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldx11_t * MAX(1,q) );
+ if( x11_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x12_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx12_t * MAX(1,m-q) );
+ if( x12_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x21_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldx21_t * MAX(1,q) );
+ if( x21_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x22_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx22_t * MAX(1,m-q) );
+ if( x22_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t,
+ ldx11_t );
+ LAPACKE_cge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t,
+ ldx12_t );
+ LAPACKE_cge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t,
+ ldx21_t );
+ LAPACKE_cge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t,
+ ldx22_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunbdb( &trans, &signs, &m, &p, &q, x11_t, &ldx11_t, x12_t,
+ &ldx12_t, x21_t, &ldx21_t, x22_t, &ldx22_t, theta, phi,
+ taup1, taup2, tauq1, tauq2, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11,
+ ldx11 );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t,
+ x12, ldx12 );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21,
+ ldx21 );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t,
+ x22, ldx22 );
+ /* Release memory and exit */
+ LAPACKE_free( x22_t );
+exit_level_3:
+ LAPACKE_free( x21_t );
+exit_level_2:
+ LAPACKE_free( x12_t );
+exit_level_1:
+ LAPACKE_free( x11_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunbdb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cunbdb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cuncsd.c b/LAPACKE/src/lapacke_cuncsd.c
new file mode 100644
index 00000000..eab8ea1a
--- /dev/null
+++ b/LAPACKE/src/lapacke_cuncsd.c
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cuncsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cuncsd( int matrix_layout, char jobu1, char jobu2,
+ char jobv1t, char jobv2t, char trans, char signs,
+ lapack_int m, lapack_int p, lapack_int q,
+ lapack_complex_float* x11, lapack_int ldx11,
+ lapack_complex_float* x12, lapack_int ldx12,
+ lapack_complex_float* x21, lapack_int ldx21,
+ lapack_complex_float* x22, lapack_int ldx22,
+ float* theta, lapack_complex_float* u1,
+ lapack_int ldu1, lapack_complex_float* u2,
+ lapack_int ldu2, lapack_complex_float* v1t,
+ lapack_int ldv1t, lapack_complex_float* v2t,
+ lapack_int ldv2t )
+{
+ lapack_int info = 0;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* rwork = NULL;
+ lapack_complex_float* work = NULL;
+ float rwork_query;
+ lapack_complex_float work_query;
+ lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cuncsd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
+ nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
+ nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
+ nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
+ return -11;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) {
+ return -13;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
+ return -15;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) {
+ return -17;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m-MIN(MIN(p,m-p),MIN(q,m-q))) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cuncsd_work( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
+ trans, signs, m, p, q, x11, ldx11, x12, ldx12,
+ x21, ldx21, x22, ldx22, theta, u1, ldu1, u2,
+ ldu2, v1t, ldv1t, v2t, ldv2t, &work_query,
+ lwork, &rwork_query, lrwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cuncsd_work( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
+ trans, signs, m, p, q, x11, ldx11, x12, ldx12,
+ x21, ldx21, x22, ldx22, theta, u1, ldu1, u2,
+ ldu2, v1t, ldv1t, v2t, ldv2t, work, lwork,
+ rwork, lrwork, iwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cuncsd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cuncsd_work.c b/LAPACKE/src/lapacke_cuncsd_work.c
new file mode 100644
index 00000000..c0cc7fae
--- /dev/null
+++ b/LAPACKE/src/lapacke_cuncsd_work.c
@@ -0,0 +1,276 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cuncsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cuncsd_work( int matrix_layout, char jobu1, char jobu2,
+ char jobv1t, char jobv2t, char trans,
+ char signs, lapack_int m, lapack_int p,
+ lapack_int q, lapack_complex_float* x11,
+ lapack_int ldx11, lapack_complex_float* x12,
+ lapack_int ldx12, lapack_complex_float* x21,
+ lapack_int ldx21, lapack_complex_float* x22,
+ lapack_int ldx22, float* theta,
+ lapack_complex_float* u1, lapack_int ldu1,
+ lapack_complex_float* u2, lapack_int ldu2,
+ lapack_complex_float* v1t, lapack_int ldv1t,
+ lapack_complex_float* v2t, lapack_int ldv2t,
+ lapack_complex_float* work, lapack_int lwork,
+ float* rwork, lapack_int lrwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p,
+ &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, &ldx22,
+ theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, &ldv2t,
+ work, &lwork, rwork, &lrwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
+ lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
+ lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
+ lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
+ lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
+ lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
+ lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
+ lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
+ lapack_int ldu1_t = MAX(1,nrows_u1);
+ lapack_int ldu2_t = MAX(1,nrows_u2);
+ lapack_int ldv1t_t = MAX(1,nrows_v1t);
+ lapack_int ldv2t_t = MAX(1,nrows_v2t);
+ lapack_int ldx11_t = MAX(1,nrows_x11);
+ lapack_int ldx12_t = MAX(1,nrows_x12);
+ lapack_int ldx21_t = MAX(1,nrows_x21);
+ lapack_int ldx22_t = MAX(1,nrows_x22);
+ lapack_complex_float* x11_t = NULL;
+ lapack_complex_float* x12_t = NULL;
+ lapack_complex_float* x21_t = NULL;
+ lapack_complex_float* x22_t = NULL;
+ lapack_complex_float* u1_t = NULL;
+ lapack_complex_float* u2_t = NULL;
+ lapack_complex_float* v1t_t = NULL;
+ lapack_complex_float* v2t_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldu1 < p ) {
+ info = -21;
+ LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
+ return info;
+ }
+ if( ldu2 < m-p ) {
+ info = -23;
+ LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
+ return info;
+ }
+ if( ldv1t < q ) {
+ info = -25;
+ LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
+ return info;
+ }
+ if( ldv2t < m-q ) {
+ info = -27;
+ LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
+ return info;
+ }
+ if( ldx11 < q ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
+ return info;
+ }
+ if( ldx12 < m-q ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
+ return info;
+ }
+ if( ldx21 < q ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
+ return info;
+ }
+ if( ldx22 < m-q ) {
+ info = -18;
+ LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lrwork == -1 || lwork == -1 ) {
+ LAPACK_cuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m,
+ &p, &q, x11, &ldx11_t, x12, &ldx12_t, x21, &ldx21_t,
+ x22, &ldx22_t, theta, u1, &ldu1_t, u2, &ldu2_t, v1t,
+ &ldv1t_t, v2t, &ldv2t_t, work, &lwork, rwork,
+ &lrwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ x11_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldx11_t * MAX(1,q) );
+ if( x11_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x12_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx12_t * MAX(1,m-q) );
+ if( x12_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x21_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldx21_t * MAX(1,q) );
+ if( x21_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x22_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldx22_t * MAX(1,m-q) );
+ if( x22_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ u1_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldu1_t * MAX(1,p) );
+ if( u1_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ u2_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldu2_t * MAX(1,m-p) );
+ if( u2_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ v1t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldv1t_t * MAX(1,q) );
+ if( v1t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_6;
+ }
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ v2t_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldv2t_t * MAX(1,m-q) );
+ if( v2t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_7;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t,
+ ldx11_t );
+ LAPACKE_cge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t,
+ ldx12_t );
+ LAPACKE_cge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t,
+ ldx21_t );
+ LAPACKE_cge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t,
+ ldx22_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p,
+ &q, x11_t, &ldx11_t, x12_t, &ldx12_t, x21_t, &ldx21_t,
+ x22_t, &ldx22_t, theta, u1_t, &ldu1_t, u2_t, &ldu2_t,
+ v1t_t, &ldv1t_t, v2t_t, &ldv2t_t, work, &lwork, rwork,
+ &lrwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11,
+ ldx11 );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t,
+ x12, ldx12 );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21,
+ ldx21 );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t,
+ x22, ldx22 );
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1,
+ ldu1 );
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t,
+ u2, ldu2 );
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t,
+ v1t, ldv1t );
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t,
+ v2t, ldv2t );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_free( v2t_t );
+ }
+exit_level_7:
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_free( v1t_t );
+ }
+exit_level_6:
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_free( u2_t );
+ }
+exit_level_5:
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_free( u1_t );
+ }
+exit_level_4:
+ LAPACKE_free( x22_t );
+exit_level_3:
+ LAPACKE_free( x21_t );
+exit_level_2:
+ LAPACKE_free( x12_t );
+exit_level_1:
+ LAPACKE_free( x11_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cungbr.c b/LAPACKE/src/lapacke_cungbr.c
new file mode 100644
index 00000000..dfc8ea7a
--- /dev/null
+++ b/LAPACKE/src/lapacke_cungbr.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cungbr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cungbr( int matrix_layout, char vect, lapack_int m,
+ lapack_int n, lapack_int k, lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cungbr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_c_nancheck( MIN(m,k), tau, 1 ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cungbr_work( matrix_layout, vect, m, n, k, a, lda, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cungbr_work( matrix_layout, vect, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cungbr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cungbr_work.c b/LAPACKE/src/lapacke_cungbr_work.c
new file mode 100644
index 00000000..d4ec61cb
--- /dev/null
+++ b/LAPACKE/src/lapacke_cungbr_work.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cungbr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cungbr_work( int matrix_layout, char vect, lapack_int m,
+ lapack_int n, lapack_int k,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* tau,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cungbr( &vect, &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cungbr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cungbr( &vect, &m, &n, &k, a, &lda_t, tau, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cungbr( &vect, &m, &n, &k, a_t, &lda_t, tau, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cungbr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cungbr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunghr.c b/LAPACKE/src/lapacke_cunghr.c
new file mode 100644
index 00000000..70d76179
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunghr.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunghr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunghr( int matrix_layout, lapack_int n, lapack_int ilo,
+ lapack_int ihi, lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cunghr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_c_nancheck( n-1, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cunghr_work( matrix_layout, n, ilo, ihi, a, lda, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cunghr_work( matrix_layout, n, ilo, ihi, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunghr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunghr_work.c b/LAPACKE/src/lapacke_cunghr_work.c
new file mode 100644
index 00000000..abf5fed7
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunghr_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunghr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunghr_work( int matrix_layout, lapack_int n, lapack_int ilo,
+ lapack_int ihi, lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* tau,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunghr( &n, &ilo, &ihi, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cunghr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cunghr( &n, &ilo, &ihi, a, &lda_t, tau, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunghr( &n, &ilo, &ihi, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunghr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cunghr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunglq.c b/LAPACKE/src/lapacke_cunglq.c
new file mode 100644
index 00000000..040ff5f3
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunglq.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunglq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunglq( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cunglq", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cunglq_work( matrix_layout, m, n, k, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cunglq_work( matrix_layout, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunglq", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunglq_work.c b/LAPACKE/src/lapacke_cunglq_work.c
new file mode 100644
index 00000000..52b7efdd
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunglq_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunglq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunglq_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* tau,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunglq( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cunglq_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cunglq( &m, &n, &k, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunglq( &m, &n, &k, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunglq_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cunglq_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cungql.c b/LAPACKE/src/lapacke_cungql.c
new file mode 100644
index 00000000..9ba546e9
--- /dev/null
+++ b/LAPACKE/src/lapacke_cungql.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cungql
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cungql( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cungql", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cungql_work( matrix_layout, m, n, k, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cungql_work( matrix_layout, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cungql", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cungql_work.c b/LAPACKE/src/lapacke_cungql_work.c
new file mode 100644
index 00000000..4072e102
--- /dev/null
+++ b/LAPACKE/src/lapacke_cungql_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cungql
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cungql_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* tau,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cungql( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cungql_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cungql( &m, &n, &k, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cungql( &m, &n, &k, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cungql_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cungql_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cungqr.c b/LAPACKE/src/lapacke_cungqr.c
new file mode 100644
index 00000000..fcf0ef79
--- /dev/null
+++ b/LAPACKE/src/lapacke_cungqr.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cungqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cungqr( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cungqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cungqr_work( matrix_layout, m, n, k, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cungqr_work( matrix_layout, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cungqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cungqr_work.c b/LAPACKE/src/lapacke_cungqr_work.c
new file mode 100644
index 00000000..07d41c4b
--- /dev/null
+++ b/LAPACKE/src/lapacke_cungqr_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cungqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cungqr_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* tau,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cungqr( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cungqr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cungqr( &m, &n, &k, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cungqr( &m, &n, &k, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cungqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cungqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cungrq.c b/LAPACKE/src/lapacke_cungrq.c
new file mode 100644
index 00000000..2edd3adb
--- /dev/null
+++ b/LAPACKE/src/lapacke_cungrq.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cungrq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cungrq( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cungrq", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cungrq_work( matrix_layout, m, n, k, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cungrq_work( matrix_layout, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cungrq", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cungrq_work.c b/LAPACKE/src/lapacke_cungrq_work.c
new file mode 100644
index 00000000..662985be
--- /dev/null
+++ b/LAPACKE/src/lapacke_cungrq_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cungrq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cungrq_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* tau,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cungrq( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_cungrq_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cungrq( &m, &n, &k, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cungrq( &m, &n, &k, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cungrq_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cungrq_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cungtr.c b/LAPACKE/src/lapacke_cungtr.c
new file mode 100644
index 00000000..e1e1e874
--- /dev/null
+++ b/LAPACKE/src/lapacke_cungtr.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cungtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cungtr( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cungtr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_c_nancheck( n-1, tau, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cungtr_work( matrix_layout, uplo, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cungtr_work( matrix_layout, uplo, n, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cungtr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cungtr_work.c b/LAPACKE/src/lapacke_cungtr_work.c
new file mode 100644
index 00000000..61dac0c5
--- /dev/null
+++ b/LAPACKE/src/lapacke_cungtr_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cungtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cungtr_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* tau,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cungtr( &uplo, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_cungtr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cungtr( &uplo, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cungtr( &uplo, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cungtr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cungtr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunmbr.c b/LAPACKE/src/lapacke_cunmbr.c
new file mode 100644
index 00000000..0ca06bf8
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunmbr.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunmbr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunmbr( int matrix_layout, char vect, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ lapack_int nq, r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmbr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nq = LAPACKE_lsame( side, 'l' ) ? m : n;
+ r = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k);
+ if( LAPACKE_cge_nancheck( matrix_layout, r, MIN(nq,k), a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -11;
+ }
+ if( LAPACKE_c_nancheck( MIN(nq,k), tau, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cunmbr_work( matrix_layout, vect, side, trans, m, n, k, a,
+ lda, tau, c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cunmbr_work( matrix_layout, vect, side, trans, m, n, k, a,
+ lda, tau, c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmbr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunmbr_work.c b/LAPACKE/src/lapacke_cunmbr_work.c
new file mode 100644
index 00000000..98bc4400
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunmbr_work.c
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunmbr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunmbr_work( int matrix_layout, char vect, char side,
+ char trans, lapack_int m, lapack_int n,
+ lapack_int k, const lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunmbr( &vect, &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nq = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lapack_int r = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k);
+ lapack_int lda_t = MAX(1,r);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < MIN(nq,k) ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cunmbr_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_cunmbr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cunmbr( &vect, &side, &trans, &m, &n, &k, a, &lda_t, tau, c,
+ &ldc_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ lda_t * MAX(1,MIN(nq,k)) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, r, MIN(nq,k), a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunmbr( &vect, &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t,
+ &ldc_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmbr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cunmbr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunmhr.c b/LAPACKE/src/lapacke_cunmhr.c
new file mode 100644
index 00000000..7e7d40e9
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunmhr.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunmhr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunmhr( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int ilo,
+ lapack_int ihi, const lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmhr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_cge_nancheck( matrix_layout, r, r, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -11;
+ }
+ if( LAPACKE_c_nancheck( m-1, tau, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cunmhr_work( matrix_layout, side, trans, m, n, ilo, ihi, a,
+ lda, tau, c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cunmhr_work( matrix_layout, side, trans, m, n, ilo, ihi, a,
+ lda, tau, c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmhr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunmhr_work.c b/LAPACKE/src/lapacke_cunmhr_work.c
new file mode 100644
index 00000000..f540ecb0
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunmhr_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunmhr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunmhr_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int ilo,
+ lapack_int ihi, const lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunmhr( &side, &trans, &m, &n, &ilo, &ihi, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lapack_int lda_t = MAX(1,r);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < r ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cunmhr_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_cunmhr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cunmhr( &side, &trans, &m, &n, &ilo, &ihi, a, &lda_t, tau, c,
+ &ldc_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,r) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, r, r, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunmhr( &side, &trans, &m, &n, &ilo, &ihi, a_t, &lda_t, tau, c_t,
+ &ldc_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmhr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cunmhr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunmlq.c b/LAPACKE/src/lapacke_cunmlq.c
new file mode 100644
index 00000000..e97a484e
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunmlq.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunmlq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunmlq( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmlq", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cunmlq_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cunmlq_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmlq", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunmlq_work.c b/LAPACKE/src/lapacke_cunmlq_work.c
new file mode 100644
index 00000000..e8fcf23a
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunmlq_work.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunmlq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunmlq_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunmlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,k);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cunmlq_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cunmlq_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cunmlq( &side, &trans, &m, &n, &k, a, &lda_t, tau, c, &ldc_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunmlq( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmlq_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cunmlq_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunmql.c b/LAPACKE/src/lapacke_cunmql.c
new file mode 100644
index 00000000..78e7cf6f
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunmql.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunmql
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunmql( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmql", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_cge_nancheck( matrix_layout, r, k, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cunmql_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cunmql_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmql", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunmql_work.c b/LAPACKE/src/lapacke_cunmql_work.c
new file mode 100644
index 00000000..146b46eb
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunmql_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunmql
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunmql_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunmql( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lapack_int lda_t = MAX(1,r);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < k ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cunmql_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cunmql_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cunmql( &side, &trans, &m, &n, &k, a, &lda_t, tau, c, &ldc_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,k) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, r, k, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunmql( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmql_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cunmql_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunmqr.c b/LAPACKE/src/lapacke_cunmqr.c
new file mode 100644
index 00000000..937b67b7
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunmqr.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunmqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunmqr( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_cge_nancheck( matrix_layout, r, k, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cunmqr_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cunmqr_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunmqr_work.c b/LAPACKE/src/lapacke_cunmqr_work.c
new file mode 100644
index 00000000..75e48611
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunmqr_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunmqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunmqr_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunmqr( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lapack_int lda_t = MAX(1,r);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < k ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cunmqr_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cunmqr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cunmqr( &side, &trans, &m, &n, &k, a, &lda_t, tau, c, &ldc_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,k) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, r, k, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunmqr( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cunmqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunmrq.c b/LAPACKE/src/lapacke_cunmrq.c
new file mode 100644
index 00000000..d10992c4
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunmrq.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunmrq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunmrq( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmrq", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cunmrq_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cunmrq_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmrq", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunmrq_work.c b/LAPACKE/src/lapacke_cunmrq_work.c
new file mode 100644
index 00000000..0b3251b8
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunmrq_work.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunmrq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunmrq_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunmrq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,k);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cunmrq_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cunmrq_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cunmrq( &side, &trans, &m, &n, &k, a, &lda_t, tau, c, &ldc_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunmrq( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmrq_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cunmrq_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunmrz.c b/LAPACKE/src/lapacke_cunmrz.c
new file mode 100644
index 00000000..bd55c450
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunmrz.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunmrz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunmrz( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int l, const lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmrz", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -11;
+ }
+ if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cunmrz_work( matrix_layout, side, trans, m, n, k, l, a, lda,
+ tau, c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cunmrz_work( matrix_layout, side, trans, m, n, k, l, a, lda,
+ tau, c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmrz", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunmrz_work.c b/LAPACKE/src/lapacke_cunmrz_work.c
new file mode 100644
index 00000000..a5cb7cbf
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunmrz_work.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunmrz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunmrz_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int l, const lapack_complex_float* a,
+ lapack_int lda, const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunmrz( &side, &trans, &m, &n, &k, &l, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,k);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_cunmrz_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_cunmrz_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cunmrz( &side, &trans, &m, &n, &k, &l, a, &lda_t, tau, c,
+ &ldc_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunmrz( &side, &trans, &m, &n, &k, &l, a_t, &lda_t, tau, c_t,
+ &ldc_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmrz_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cunmrz_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunmtr.c b/LAPACKE/src/lapacke_cunmtr.c
new file mode 100644
index 00000000..902568c7
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunmtr.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunmtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunmtr( int matrix_layout, char side, char uplo, char trans,
+ lapack_int m, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmtr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_cge_nancheck( matrix_layout, r, r, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_c_nancheck( m-1, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_cunmtr_work( matrix_layout, side, uplo, trans, m, n, a, lda,
+ tau, c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cunmtr_work( matrix_layout, side, uplo, trans, m, n, a, lda,
+ tau, c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmtr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cunmtr_work.c b/LAPACKE/src/lapacke_cunmtr_work.c
new file mode 100644
index 00000000..b2586adf
--- /dev/null
+++ b/LAPACKE/src/lapacke_cunmtr_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cunmtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cunmtr_work( int matrix_layout, char side, char uplo,
+ char trans, lapack_int m, lapack_int n,
+ const lapack_complex_float* a, lapack_int lda,
+ const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunmtr( &side, &uplo, &trans, &m, &n, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lapack_int lda_t = MAX(1,r);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < r ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cunmtr_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_cunmtr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_cunmtr( &side, &uplo, &trans, &m, &n, a, &lda_t, tau, c,
+ &ldc_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,r) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, r, r, a, lda, a_t, lda_t );
+ LAPACKE_cge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunmtr( &side, &uplo, &trans, &m, &n, a_t, &lda_t, tau, c_t,
+ &ldc_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cunmtr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cunmtr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cupgtr.c b/LAPACKE/src/lapacke_cupgtr.c
new file mode 100644
index 00000000..5b80def1
--- /dev/null
+++ b/LAPACKE/src/lapacke_cupgtr.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cupgtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cupgtr( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* ap,
+ const lapack_complex_float* tau,
+ lapack_complex_float* q, lapack_int ldq )
+{
+ lapack_int info = 0;
+ lapack_complex_float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cupgtr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_cpp_nancheck( n, ap ) ) {
+ return -4;
+ }
+ if( LAPACKE_c_nancheck( n-1, tau, 1 ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,n-1) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cupgtr_work( matrix_layout, uplo, n, ap, tau, q, ldq, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cupgtr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cupgtr_work.c b/LAPACKE/src/lapacke_cupgtr_work.c
new file mode 100644
index 00000000..975b3b49
--- /dev/null
+++ b/LAPACKE/src/lapacke_cupgtr_work.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cupgtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cupgtr_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_float* ap,
+ const lapack_complex_float* tau,
+ lapack_complex_float* q, lapack_int ldq,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cupgtr( &uplo, &n, ap, tau, q, &ldq, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldq_t = MAX(1,n);
+ lapack_complex_float* q_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldq < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_cupgtr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ q_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cupgtr( &uplo, &n, ap_t, tau, q_t, &ldq_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( q_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cupgtr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cupgtr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cupmtr.c b/LAPACKE/src/lapacke_cupmtr.c
new file mode 100644
index 00000000..5db9bdde
--- /dev/null
+++ b/LAPACKE/src/lapacke_cupmtr.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cupmtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cupmtr( int matrix_layout, char side, char uplo, char trans,
+ lapack_int m, lapack_int n,
+ const lapack_complex_float* ap,
+ const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lwork;
+ lapack_complex_float* work = NULL;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_cupmtr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_cpp_nancheck( r, ap ) ) {
+ return -7;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -9;
+ }
+ if( LAPACKE_c_nancheck( m-1, tau, 1 ) ) {
+ return -8;
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( side, 'l' ) ) {
+ lwork = MAX(1,n);
+ } else if( LAPACKE_lsame( side, 'r' ) ) {
+ lwork = MAX(1,m);
+ } else {
+ lwork = 1; /* Any value */
+ }
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_cupmtr_work( matrix_layout, side, uplo, trans, m, n, ap, tau,
+ c, ldc, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cupmtr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_cupmtr_work.c b/LAPACKE/src/lapacke_cupmtr_work.c
new file mode 100644
index 00000000..af94adf3
--- /dev/null
+++ b/LAPACKE/src/lapacke_cupmtr_work.c
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 cupmtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_cupmtr_work( int matrix_layout, char side, char uplo,
+ char trans, lapack_int m, lapack_int n,
+ const lapack_complex_float* ap,
+ const lapack_complex_float* tau,
+ lapack_complex_float* c, lapack_int ldc,
+ lapack_complex_float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cupmtr( &side, &uplo, &trans, &m, &n, ap, tau, c, &ldc, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_float* c_t = NULL;
+ lapack_complex_float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldc < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_cupmtr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ c_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ( MAX(1,r) * MAX(2,r+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_cge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ LAPACKE_cpp_trans( matrix_layout, uplo, r, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_cupmtr( &side, &uplo, &trans, &m, &n, ap_t, tau, c_t, &ldc_t,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( c_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_cupmtr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_cupmtr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dbbcsd.c b/LAPACKE/src/lapacke_dbbcsd.c
new file mode 100644
index 00000000..3abdd2b8
--- /dev/null
+++ b/LAPACKE/src/lapacke_dbbcsd.c
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dbbcsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dbbcsd( 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, double* u1, lapack_int ldu1, double* u2,
+ lapack_int ldu2, double* v1t, lapack_int ldv1t,
+ double* v2t, lapack_int ldv2t, double* b11d,
+ double* b11e, double* b12d, double* b12e,
+ double* b21d, double* b21e, double* b22d,
+ double* b22e )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ lapack_int nrows_u1, nrows_u2, nrows_v1t, nrows_v2t;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dbbcsd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
+ nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
+ nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
+ nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
+ if( LAPACKE_d_nancheck( q-1, phi, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_d_nancheck( q, theta, 1 ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_u1, p, u1, ldu1 ) ) {
+ return -12;
+ }
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_u2, m-p, u2, ldu2 ) ) {
+ return -14;
+ }
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_v1t, q, v1t, ldv1t ) ) {
+ return -16;
+ }
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_v2t, m-q, v2t, ldv2t ) ) {
+ return -18;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dbbcsd_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, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dbbcsd_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, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dbbcsd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dbbcsd_work.c b/LAPACKE/src/lapacke_dbbcsd_work.c
new file mode 100644
index 00000000..288fe714
--- /dev/null
+++ b/LAPACKE/src/lapacke_dbbcsd_work.c
@@ -0,0 +1,199 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dbbcsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dbbcsd_work( 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, double* u1,
+ lapack_int ldu1, double* u2, lapack_int ldu2,
+ double* v1t, lapack_int ldv1t, double* v2t,
+ lapack_int ldv2t, double* b11d, double* b11e,
+ double* b12d, double* b12e, double* b21d,
+ double* b21e, double* b22d, double* b22e,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dbbcsd( &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,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
+ lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
+ lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
+ lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
+ lapack_int ldu1_t = MAX(1,nrows_u1);
+ lapack_int ldu2_t = MAX(1,nrows_u2);
+ lapack_int ldv1t_t = MAX(1,nrows_v1t);
+ lapack_int ldv2t_t = MAX(1,nrows_v2t);
+ double* u1_t = NULL;
+ double* u2_t = NULL;
+ double* v1t_t = NULL;
+ double* v2t_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldu1 < p ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info );
+ return info;
+ }
+ if( ldu2 < m-p ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info );
+ return info;
+ }
+ if( ldv1t < q ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info );
+ return info;
+ }
+ if( ldv2t < m-q ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
+ theta, phi, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t,
+ v2t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d, b21e,
+ b22d, b22e, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ u1_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldu1_t * MAX(1,p) );
+ if( u1_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ u2_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldu2_t * MAX(1,m-p) );
+ if( u2_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ v1t_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldv1t_t * MAX(1,q) );
+ if( v1t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ v2t_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldv2t_t * MAX(1,m-q) );
+ if( v2t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_dge_trans( matrix_layout, nrows_u1, p, u1, ldu1, u1_t,
+ ldu1_t );
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_dge_trans( matrix_layout, nrows_u2, m-p, u2, ldu2, u2_t,
+ ldu2_t );
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_dge_trans( matrix_layout, nrows_v1t, q, v1t, ldv1t, v1t_t,
+ ldv1t_t );
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_dge_trans( matrix_layout, nrows_v2t, m-q, v2t, ldv2t, v2t_t,
+ ldv2t_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
+ theta, phi, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t,
+ &ldv1t_t, v2t_t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d,
+ b21e, b22d, b22e, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1,
+ ldu1 );
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t,
+ u2, ldu2 );
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t,
+ v1t, ldv1t );
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t,
+ v2t, ldv2t );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_free( v2t_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_free( v1t_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_free( u2_t );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_free( u1_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dbdsdc.c b/LAPACKE/src/lapacke_dbdsdc.c
new file mode 100644
index 00000000..9ed71f87
--- /dev/null
+++ b/LAPACKE/src/lapacke_dbdsdc.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dbdsdc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dbdsdc( int matrix_layout, char uplo, char compq,
+ lapack_int n, double* d, double* e, double* u,
+ lapack_int ldu, double* vt, lapack_int ldvt,
+ double* q, lapack_int* iq )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ size_t lwork;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dbdsdc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( n, e, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( compq, 'i' ) ) {
+ lwork = (size_t)3*MAX(1,n)*MAX(1,n)+4*MAX(1,n);
+ } else if( LAPACKE_lsame( compq, 'p' ) ) {
+ lwork = MAX(1,6*n);
+ } else if( LAPACKE_lsame( compq, 'n' ) ) {
+ lwork = MAX(1,4*n);
+ } else {
+ lwork = 1; /* Any value */
+ }
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,8*n) );
+ 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_dbdsdc_work( matrix_layout, uplo, compq, n, d, e, u, ldu, vt,
+ ldvt, q, iq, work, iwork );
+ /* 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_dbdsdc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dbdsdc_work.c b/LAPACKE/src/lapacke_dbdsdc_work.c
new file mode 100644
index 00000000..e90e81a0
--- /dev/null
+++ b/LAPACKE/src/lapacke_dbdsdc_work.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dbdsdc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dbdsdc_work( int matrix_layout, char uplo, char compq,
+ lapack_int n, double* d, double* e, double* u,
+ lapack_int ldu, double* vt, lapack_int ldvt,
+ double* q, lapack_int* iq, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dbdsdc( &uplo, &compq, &n, d, e, u, &ldu, vt, &ldvt, q, iq, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldu_t = MAX(1,n);
+ lapack_int ldvt_t = MAX(1,n);
+ double* u_t = NULL;
+ double* vt_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldu < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dbdsdc_work", info );
+ return info;
+ }
+ if( ldvt < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dbdsdc_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( compq, 'i' ) ) {
+ u_t = (double*)LAPACKE_malloc( sizeof(double) * ldu_t * MAX(1,n) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( compq, 'i' ) ) {
+ vt_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvt_t * MAX(1,n) );
+ if( vt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dbdsdc( &uplo, &compq, &n, d, e, u_t, &ldu_t, vt_t, &ldvt_t, q,
+ iq, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( compq, 'i' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, u_t, ldu_t, u, ldu );
+ }
+ if( LAPACKE_lsame( compq, 'i' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, vt_t, ldvt_t, vt, ldvt );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compq, 'i' ) ) {
+ LAPACKE_free( vt_t );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( compq, 'i' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dbdsdc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dbdsdc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dbdsqr.c b/LAPACKE/src/lapacke_dbdsqr.c
new file mode 100644
index 00000000..ad93bcd4
--- /dev/null
+++ b/LAPACKE/src/lapacke_dbdsqr.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dbdsqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dbdsqr( int matrix_layout, char uplo, lapack_int n,
+ lapack_int ncvt, lapack_int nru, lapack_int ncc,
+ double* d, double* e, double* vt, lapack_int ldvt,
+ double* u, lapack_int ldu, double* c,
+ lapack_int ldc )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dbdsqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( ncc != 0 ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, ncc, c, ldc ) ) {
+ return -13;
+ }
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+ return -8;
+ }
+ if( nru != 0 ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, nru, n, u, ldu ) ) {
+ return -11;
+ }
+ }
+ if( ncvt != 0 ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, ncvt, vt, ldvt ) ) {
+ return -9;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dbdsqr_work( matrix_layout, uplo, n, ncvt, nru, ncc, d, e, vt,
+ ldvt, u, ldu, c, ldc, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dbdsqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dbdsqr_work.c b/LAPACKE/src/lapacke_dbdsqr_work.c
new file mode 100644
index 00000000..885c4a07
--- /dev/null
+++ b/LAPACKE/src/lapacke_dbdsqr_work.c
@@ -0,0 +1,145 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dbdsqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dbdsqr_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int ncvt, lapack_int nru, lapack_int ncc,
+ double* d, double* e, double* vt,
+ lapack_int ldvt, double* u, lapack_int ldu,
+ double* c, lapack_int ldc, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dbdsqr( &uplo, &n, &ncvt, &nru, &ncc, d, e, vt, &ldvt, u, &ldu,
+ c, &ldc, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldc_t = MAX(1,n);
+ lapack_int ldu_t = MAX(1,nru);
+ lapack_int ldvt_t = MAX(1,n);
+ double* vt_t = NULL;
+ double* u_t = NULL;
+ double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldc < ncc ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_dbdsqr_work", info );
+ return info;
+ }
+ if( ldu < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dbdsqr_work", info );
+ return info;
+ }
+ if( ldvt < ncvt ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dbdsqr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( ncvt != 0 ) {
+ vt_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvt_t * MAX(1,ncvt) );
+ if( vt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( nru != 0 ) {
+ u_t = (double*)LAPACKE_malloc( sizeof(double) * ldu_t * MAX(1,n) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( ncc != 0 ) {
+ c_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldc_t * MAX(1,ncc) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ if( ncvt != 0 ) {
+ LAPACKE_dge_trans( matrix_layout, n, ncvt, vt, ldvt, vt_t, ldvt_t );
+ }
+ if( nru != 0 ) {
+ LAPACKE_dge_trans( matrix_layout, nru, n, u, ldu, u_t, ldu_t );
+ }
+ if( ncc != 0 ) {
+ LAPACKE_dge_trans( matrix_layout, n, ncc, c, ldc, c_t, ldc_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dbdsqr( &uplo, &n, &ncvt, &nru, &ncc, d, e, vt_t, &ldvt_t, u_t,
+ &ldu_t, c_t, &ldc_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( ncvt != 0 ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, ncvt, vt_t, ldvt_t, vt,
+ ldvt );
+ }
+ if( nru != 0 ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nru, n, u_t, ldu_t, u, ldu );
+ }
+ if( ncc != 0 ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, ncc, c_t, ldc_t, c, ldc );
+ }
+ /* Release memory and exit */
+ if( ncc != 0 ) {
+ LAPACKE_free( c_t );
+ }
+exit_level_2:
+ if( nru != 0 ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_1:
+ if( ncvt != 0 ) {
+ LAPACKE_free( vt_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dbdsqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dbdsqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ddisna.c b/LAPACKE/src/lapacke_ddisna.c
new file mode 100644
index 00000000..b5cb340c
--- /dev/null
+++ b/LAPACKE/src/lapacke_ddisna.c
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 ddisna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ddisna( char job, lapack_int m, lapack_int n,
+ const double* d, double* sep )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( MIN(m,n), d, 1 ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_ddisna_work( job, m, n, d, sep );
+}
diff --git a/LAPACKE/src/lapacke_ddisna_work.c b/LAPACKE/src/lapacke_ddisna_work.c
new file mode 100644
index 00000000..f3ec282f
--- /dev/null
+++ b/LAPACKE/src/lapacke_ddisna_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 ddisna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ddisna_work( char job, lapack_int m, lapack_int n,
+ const double* d, double* sep )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_ddisna( &job, &m, &n, d, sep, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgbbrd.c b/LAPACKE/src/lapacke_dgbbrd.c
new file mode 100644
index 00000000..c1467f3f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbbrd.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbbrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbbrd( int matrix_layout, char vect, lapack_int m,
+ lapack_int n, lapack_int ncc, lapack_int kl,
+ lapack_int ku, double* ab, lapack_int ldab,
+ double* d, double* e, double* q, lapack_int ldq,
+ double* pt, lapack_int ldpt, double* c,
+ lapack_int ldc )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbbrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+ return -8;
+ }
+ if( ncc != 0 ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, m, ncc, c, ldc ) ) {
+ return -16;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*MAX(m,n)) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgbbrd_work( matrix_layout, vect, m, n, ncc, kl, ku, ab, ldab,
+ d, e, q, ldq, pt, ldpt, c, ldc, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbbrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgbbrd_work.c b/LAPACKE/src/lapacke_dgbbrd_work.c
new file mode 100644
index 00000000..1e66b879
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbbrd_work.c
@@ -0,0 +1,156 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbbrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbbrd_work( int matrix_layout, char vect, lapack_int m,
+ lapack_int n, lapack_int ncc, lapack_int kl,
+ lapack_int ku, double* ab, lapack_int ldab,
+ double* d, double* e, double* q, lapack_int ldq,
+ double* pt, lapack_int ldpt, double* c,
+ lapack_int ldc, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbbrd( &vect, &m, &n, &ncc, &kl, &ku, ab, &ldab, d, e, q, &ldq,
+ pt, &ldpt, c, &ldc, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_int ldpt_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,m);
+ double* ab_t = NULL;
+ double* q_t = NULL;
+ double* pt_t = NULL;
+ double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dgbbrd_work", info );
+ return info;
+ }
+ if( ldc < ncc ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_dgbbrd_work", info );
+ return info;
+ }
+ if( ldpt < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dgbbrd_work", info );
+ return info;
+ }
+ if( ldq < m ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dgbbrd_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'q' ) ) {
+ q_t = (double*)LAPACKE_malloc( sizeof(double) * ldq_t * MAX(1,m) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'p' ) ) {
+ pt_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldpt_t * MAX(1,n) );
+ if( pt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( ncc != 0 ) {
+ c_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldc_t * MAX(1,ncc) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dgb_trans( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ if( ncc != 0 ) {
+ LAPACKE_dge_trans( matrix_layout, m, ncc, c, ldc, c_t, ldc_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbbrd( &vect, &m, &n, &ncc, &kl, &ku, ab_t, &ldab_t, d, e, q_t,
+ &ldq_t, pt_t, &ldpt_t, c_t, &ldc_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dgb_trans( LAPACK_COL_MAJOR, m, n, kl, ku, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'q' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, m, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'p' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, pt_t, ldpt_t, pt, ldpt );
+ }
+ if( ncc != 0 ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, ncc, c_t, ldc_t, c, ldc );
+ }
+ /* Release memory and exit */
+ if( ncc != 0 ) {
+ LAPACKE_free( c_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'p' ) ) {
+ LAPACKE_free( pt_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'q' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbbrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgbbrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgbcon.c b/LAPACKE/src/lapacke_dgbcon.c
new file mode 100644
index 00000000..8dfe6202
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbcon.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbcon( int matrix_layout, char norm, lapack_int n,
+ lapack_int kl, lapack_int ku, const double* ab,
+ lapack_int ldab, const lapack_int* ipiv,
+ double anorm, double* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgbcon_work( matrix_layout, norm, n, kl, ku, ab, ldab, ipiv,
+ anorm, rcond, work, iwork );
+ /* 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_dgbcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgbcon_work.c b/LAPACKE/src/lapacke_dgbcon_work.c
new file mode 100644
index 00000000..57719d63
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbcon_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbcon_work( int matrix_layout, char norm, lapack_int n,
+ lapack_int kl, lapack_int ku, const double* ab,
+ lapack_int ldab, const lapack_int* ipiv,
+ double anorm, double* rcond, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbcon( &norm, &n, &kl, &ku, ab, &ldab, ipiv, &anorm, rcond,
+ work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,2*kl+ku+1);
+ double* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dgbcon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dgb_trans( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
+ ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbcon( &norm, &n, &kl, &ku, ab_t, &ldab_t, ipiv, &anorm, rcond,
+ work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgbcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgbequ.c b/LAPACKE/src/lapacke_dgbequ.c
new file mode 100644
index 00000000..4a460261
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbequ.c
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbequ( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, const double* ab,
+ lapack_int ldab, double* r, double* c,
+ double* rowcnd, double* colcnd, double* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_dgbequ_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
+ rowcnd, colcnd, amax );
+}
diff --git a/LAPACKE/src/lapacke_dgbequ_work.c b/LAPACKE/src/lapacke_dgbequ_work.c
new file mode 100644
index 00000000..ab5ff719
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbequ_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbequ_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, const double* ab,
+ lapack_int ldab, double* r, double* c,
+ double* rowcnd, double* colcnd, double* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbequ( &m, &n, &kl, &ku, ab, &ldab, r, c, rowcnd, colcnd, amax,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ double* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dgbequ_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dgb_trans( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbequ( &m, &n, &kl, &ku, ab_t, &ldab_t, r, c, rowcnd, colcnd,
+ amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgbequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgbequb.c b/LAPACKE/src/lapacke_dgbequb.c
new file mode 100644
index 00000000..a67532b5
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbequb.c
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbequb( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, const double* ab,
+ lapack_int ldab, double* r, double* c,
+ double* rowcnd, double* colcnd, double* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_dgbequb_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
+ rowcnd, colcnd, amax );
+}
diff --git a/LAPACKE/src/lapacke_dgbequb_work.c b/LAPACKE/src/lapacke_dgbequb_work.c
new file mode 100644
index 00000000..b87be707
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbequb_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbequb_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, const double* ab,
+ lapack_int ldab, double* r, double* c,
+ double* rowcnd, double* colcnd, double* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbequb( &m, &n, &kl, &ku, ab, &ldab, r, c, rowcnd, colcnd, amax,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ double* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dgbequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dgb_trans( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbequb( &m, &n, &kl, &ku, ab_t, &ldab_t, r, c, rowcnd, colcnd,
+ amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgbequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgbrfs.c b/LAPACKE/src/lapacke_dgbrfs.c
new file mode 100644
index 00000000..c9e6de79
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbrfs.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbrfs( int matrix_layout, char trans, lapack_int n,
+ lapack_int kl, lapack_int ku, lapack_int nrhs,
+ const double* ab, lapack_int ldab, const double* afb,
+ lapack_int ldafb, const lapack_int* ipiv,
+ const double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
+ return -9;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -14;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgbrfs_work( matrix_layout, trans, n, kl, ku, nrhs, ab, ldab,
+ afb, ldafb, ipiv, b, ldb, x, ldx, ferr, berr,
+ work, iwork );
+ /* 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_dgbrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgbrfs_work.c b/LAPACKE/src/lapacke_dgbrfs_work.c
new file mode 100644
index 00000000..ee7c3b26
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbrfs_work.c
@@ -0,0 +1,136 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbrfs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int kl, lapack_int ku, lapack_int nrhs,
+ const double* ab, lapack_int ldab,
+ const double* afb, lapack_int ldafb,
+ const lapack_int* ipiv, const double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* ferr, double* berr, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbrfs( &trans, &n, &kl, &ku, &nrhs, ab, &ldab, afb, &ldafb,
+ ipiv, b, &ldb, x, &ldx, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldafb_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* afb_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dgbrfs_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dgbrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dgbrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dgbrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (double*)LAPACKE_malloc( sizeof(double) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ LAPACKE_dgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
+ ldafb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbrfs( &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t, afb_t,
+ &ldafb_t, ipiv, b_t, &ldb_t, x_t, &ldx_t, ferr, berr,
+ work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgbrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgbrfsx.c b/LAPACKE/src/lapacke_dgbrfsx.c
new file mode 100644
index 00000000..965b2104
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbrfsx.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbrfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbrfsx( int matrix_layout, char trans, char equed,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, const double* ab, lapack_int ldab,
+ const double* afb, lapack_int ldafb,
+ const lapack_int* ipiv, const double* r,
+ const double* c, const double* b, lapack_int ldb,
+ double* x, lapack_int ldx, double* rcond,
+ double* berr, lapack_int n_err_bnds,
+ double* err_bnds_norm, double* err_bnds_comp,
+ lapack_int nparams, double* params )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbrfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
+ return -10;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -15;
+ }
+ if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
+ if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+ return -14;
+ }
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -25;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
+ if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+ return -13;
+ }
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -17;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgbrfsx_work( matrix_layout, trans, equed, n, kl, ku, nrhs,
+ ab, ldab, afb, ldafb, ipiv, r, c, b, ldb, x,
+ ldx, rcond, berr, n_err_bnds, err_bnds_norm,
+ err_bnds_comp, nparams, params, work, iwork );
+ /* 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_dgbrfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgbrfsx_work.c b/LAPACKE/src/lapacke_dgbrfsx_work.c
new file mode 100644
index 00000000..e12855ae
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbrfsx_work.c
@@ -0,0 +1,165 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbrfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbrfsx_work( int matrix_layout, char trans, char equed,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, const double* ab,
+ lapack_int ldab, const double* afb,
+ lapack_int ldafb, const lapack_int* ipiv,
+ const double* r, const double* c,
+ const double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* rcond, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbrfsx( &trans, &equed, &n, &kl, &ku, &nrhs, ab, &ldab, afb,
+ &ldafb, ipiv, r, c, b, &ldb, x, &ldx, rcond, berr,
+ &n_err_bnds, err_bnds_norm, err_bnds_comp, &nparams,
+ params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldafb_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* afb_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dgbrfsx_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dgbrfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_dgbrfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -18;
+ LAPACKE_xerbla( "LAPACKE_dgbrfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (double*)LAPACKE_malloc( sizeof(double) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ LAPACKE_dgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
+ ldafb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbrfsx( &trans, &equed, &n, &kl, &ku, &nrhs, ab_t, &ldab_t,
+ afb_t, &ldafb_t, ipiv, r, c, b_t, &ldb_t, x_t, &ldx_t,
+ rcond, berr, &n_err_bnds, err_bnds_norm_t,
+ err_bnds_comp_t, &nparams, params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbrfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgbrfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgbsv.c b/LAPACKE/src/lapacke_dgbsv.c
new file mode 100644
index 00000000..5a015c5b
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbsv.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbsv( int matrix_layout, lapack_int n, lapack_int kl,
+ lapack_int ku, lapack_int nrhs, double* ab,
+ lapack_int ldab, lapack_int* ipiv, double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ return LAPACKE_dgbsv_work( matrix_layout, n, kl, ku, nrhs, ab, ldab, ipiv, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_dgbsv_work.c b/LAPACKE/src/lapacke_dgbsv_work.c
new file mode 100644
index 00000000..8b2f2ddf
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbsv_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbsv_work( int matrix_layout, lapack_int n, lapack_int kl,
+ lapack_int ku, lapack_int nrhs, double* ab,
+ lapack_int ldab, lapack_int* ipiv, double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbsv( &n, &kl, &ku, &nrhs, ab, &ldab, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dgbsv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dgbsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dgb_trans( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
+ ldab_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbsv( &n, &kl, &ku, &nrhs, ab_t, &ldab_t, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dgb_trans( LAPACK_COL_MAJOR, n, n, kl, kl+ku, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgbsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgbsvx.c b/LAPACKE/src/lapacke_dgbsvx.c
new file mode 100644
index 00000000..878458cd
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbsvx.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbsvx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, double* ab, lapack_int ldab,
+ double* afb, lapack_int ldafb, lapack_int* ipiv,
+ char* equed, double* r, double* c, double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr,
+ double* rpivot )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
+ ldafb ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -16;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) ) ) {
+ if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+ return -15;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'r' ) ) ) {
+ if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+ return -14;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgbsvx_work( matrix_layout, fact, trans, n, kl, ku, nrhs, ab,
+ ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x,
+ ldx, rcond, ferr, berr, work, iwork );
+ /* Backup significant data from working array(s) */
+ *rpivot = work[0];
+ /* 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_dgbsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgbsvx_work.c b/LAPACKE/src/lapacke_dgbsvx_work.c
new file mode 100644
index 00000000..2bca9243
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbsvx_work.c
@@ -0,0 +1,151 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbsvx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, double* ab, lapack_int ldab,
+ double* afb, lapack_int ldafb, lapack_int* ipiv,
+ char* equed, double* r, double* c, double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr,
+ double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbsvx( &fact, &trans, &n, &kl, &ku, &nrhs, ab, &ldab, afb,
+ &ldafb, ipiv, equed, r, c, b, &ldb, x, &ldx, rcond, ferr,
+ berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldafb_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* afb_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dgbsvx_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dgbsvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_dgbsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_dgbsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (double*)LAPACKE_malloc( sizeof(double) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_dgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
+ ldafb_t );
+ }
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbsvx( &fact, &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t, afb_t,
+ &ldafb_t, ipiv, equed, r, c, b_t, &ldb_t, x_t, &ldx_t,
+ rcond, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_dgb_trans( LAPACK_COL_MAJOR, n, n, kl, ku, ab_t, ldab_t, ab,
+ ldab );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_dgb_trans( LAPACK_COL_MAJOR, n, n, kl, kl+ku, afb_t,
+ ldafb_t, afb, ldafb );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgbsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgbsvxx.c b/LAPACKE/src/lapacke_dgbsvxx.c
new file mode 100644
index 00000000..ecc5eb72
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbsvxx.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbsvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbsvxx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, double* ab, lapack_int ldab,
+ double* afb, lapack_int ldafb, lapack_int* ipiv,
+ char* equed, double* r, double* c, double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* rcond, double* rpvgrw, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbsvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
+ ldafb ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -16;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) ) ) {
+ if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+ return -15;
+ }
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -27;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'r' ) ) ) {
+ if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+ return -14;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgbsvxx_work( matrix_layout, fact, trans, n, kl, ku, nrhs, ab,
+ ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x,
+ ldx, rcond, rpvgrw, berr, n_err_bnds,
+ err_bnds_norm, err_bnds_comp, nparams, params,
+ work, iwork );
+ /* 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_dgbsvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgbsvxx_work.c b/LAPACKE/src/lapacke_dgbsvxx_work.c
new file mode 100644
index 00000000..bd2a2140
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbsvxx_work.c
@@ -0,0 +1,180 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbsvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbsvxx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, double* ab, lapack_int ldab,
+ double* afb, lapack_int ldafb,
+ lapack_int* ipiv, char* equed, double* r,
+ double* c, double* b, lapack_int ldb,
+ double* x, lapack_int ldx, double* rcond,
+ double* rpvgrw, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbsvxx( &fact, &trans, &n, &kl, &ku, &nrhs, ab, &ldab, afb,
+ &ldafb, ipiv, equed, r, c, b, &ldb, x, &ldx, rcond,
+ rpvgrw, berr, &n_err_bnds, err_bnds_norm, err_bnds_comp,
+ &nparams, params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldafb_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* afb_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dgbsvxx_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dgbsvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_dgbsvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_dgbsvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (double*)LAPACKE_malloc( sizeof(double) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_dgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
+ ldafb_t );
+ }
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbsvxx( &fact, &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t,
+ afb_t, &ldafb_t, ipiv, equed, r, c, b_t, &ldb_t, x_t,
+ &ldx_t, rcond, rpvgrw, berr, &n_err_bnds,
+ err_bnds_norm_t, err_bnds_comp_t, &nparams, params,
+ work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_dgb_trans( LAPACK_COL_MAJOR, n, n, kl, ku, ab_t, ldab_t, ab,
+ ldab );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_dgb_trans( LAPACK_COL_MAJOR, n, n, kl, kl+ku, afb_t,
+ ldafb_t, afb, ldafb );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbsvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgbsvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgbtrf.c b/LAPACKE/src/lapacke_dgbtrf.c
new file mode 100644
index 00000000..6c8944a7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbtrf.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbtrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbtrf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, double* ab,
+ lapack_int ldab, lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbtrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, kl+ku, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_dgbtrf_work( matrix_layout, m, n, kl, ku, ab, ldab, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_dgbtrf_work.c b/LAPACKE/src/lapacke_dgbtrf_work.c
new file mode 100644
index 00000000..97bd03a9
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbtrf_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbtrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbtrf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, double* ab,
+ lapack_int ldab, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbtrf( &m, &n, &kl, &ku, ab, &ldab, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,2*kl+ku+1);
+ double* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dgbtrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dgb_trans( matrix_layout, m, n, kl, kl+ku, ab, ldab, ab_t,
+ ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbtrf( &m, &n, &kl, &ku, ab_t, &ldab_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dgb_trans( LAPACK_COL_MAJOR, m, n, kl, kl+ku, ab_t, ldab_t, ab,
+ ldab );
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbtrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgbtrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgbtrs.c b/LAPACKE/src/lapacke_dgbtrs.c
new file mode 100644
index 00000000..3dc0dd5e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbtrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbtrs( int matrix_layout, char trans, lapack_int n,
+ lapack_int kl, lapack_int ku, lapack_int nrhs,
+ const double* ab, lapack_int ldab,
+ const lapack_int* ipiv, double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbtrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+#endif
+ return LAPACKE_dgbtrs_work( matrix_layout, trans, n, kl, ku, nrhs, ab, ldab,
+ ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_dgbtrs_work.c b/LAPACKE/src/lapacke_dgbtrs_work.c
new file mode 100644
index 00000000..6b7f5d8d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgbtrs_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgbtrs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int kl, lapack_int ku, lapack_int nrhs,
+ const double* ab, lapack_int ldab,
+ const lapack_int* ipiv, double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbtrs( &trans, &n, &kl, &ku, &nrhs, ab, &ldab, ipiv, b, &ldb,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dgbtrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dgbtrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dgb_trans( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
+ ldab_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgbtrs( &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t, ipiv, b_t,
+ &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgbtrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgbtrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgebak.c b/LAPACKE/src/lapacke_dgebak.c
new file mode 100644
index 00000000..0e7ce2be
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgebak.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgebak
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgebak( int matrix_layout, char job, char side, lapack_int n,
+ lapack_int ilo, lapack_int ihi, const double* scale,
+ lapack_int m, double* v, lapack_int ldv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgebak", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, scale, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, m, v, ldv ) ) {
+ return -9;
+ }
+#endif
+ return LAPACKE_dgebak_work( matrix_layout, job, side, n, ilo, ihi, scale, m,
+ v, ldv );
+}
diff --git a/LAPACKE/src/lapacke_dgebak_work.c b/LAPACKE/src/lapacke_dgebak_work.c
new file mode 100644
index 00000000..7fbb13cd
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgebak_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgebak
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgebak_work( int matrix_layout, char job, char side,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ const double* scale, lapack_int m, double* v,
+ lapack_int ldv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgebak( &job, &side, &n, &ilo, &ihi, scale, &m, v, &ldv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldv_t = MAX(1,n);
+ double* v_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldv < m ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dgebak_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (double*)LAPACKE_malloc( sizeof(double) * ldv_t * MAX(1,m) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, m, v, ldv, v_t, ldv_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgebak( &job, &side, &n, &ilo, &ihi, scale, &m, v_t, &ldv_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, m, v_t, ldv_t, v, ldv );
+ /* Release memory and exit */
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgebak_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgebak_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgebal.c b/LAPACKE/src/lapacke_dgebal.c
new file mode 100644
index 00000000..8a77473b
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgebal.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgebal
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgebal( int matrix_layout, char job, lapack_int n, double* a,
+ lapack_int lda, lapack_int* ilo, lapack_int* ihi,
+ double* scale )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgebal", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ }
+#endif
+ return LAPACKE_dgebal_work( matrix_layout, job, n, a, lda, ilo, ihi, scale );
+}
diff --git a/LAPACKE/src/lapacke_dgebal_work.c b/LAPACKE/src/lapacke_dgebal_work.c
new file mode 100644
index 00000000..c51ecd79
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgebal_work.c
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgebal
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgebal_work( int matrix_layout, char job, lapack_int n,
+ double* a, lapack_int lda, lapack_int* ilo,
+ lapack_int* ihi, double* scale )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgebal( &job, &n, a, &lda, ilo, ihi, scale, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgebal_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgebal( &job, &n, a_t, &lda_t, ilo, ihi, scale, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ LAPACKE_free( a_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgebal_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgebal_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgebrd.c b/LAPACKE/src/lapacke_dgebrd.c
new file mode 100644
index 00000000..12b3a3c5
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgebrd.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgebrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgebrd( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* d, double* e,
+ double* tauq, double* taup )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgebrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgebrd_work( matrix_layout, m, n, a, lda, d, e, tauq, taup,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgebrd_work( matrix_layout, m, n, a, lda, d, e, tauq, taup,
+ work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgebrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgebrd_work.c b/LAPACKE/src/lapacke_dgebrd_work.c
new file mode 100644
index 00000000..8512b9d2
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgebrd_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgebrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgebrd_work( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* d, double* e,
+ double* tauq, double* taup, double* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgebrd( &m, &n, a, &lda, d, e, tauq, taup, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgebrd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgebrd( &m, &n, a, &lda_t, d, e, tauq, taup, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgebrd( &m, &n, a_t, &lda_t, d, e, tauq, taup, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgebrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgebrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgecon.c b/LAPACKE/src/lapacke_dgecon.c
new file mode 100644
index 00000000..9623ee80
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgecon.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgecon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgecon( int matrix_layout, char norm, lapack_int n,
+ const double* a, lapack_int lda, double anorm,
+ double* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgecon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgecon_work( matrix_layout, norm, n, a, lda, anorm, rcond,
+ work, iwork );
+ /* 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_dgecon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgecon_work.c b/LAPACKE/src/lapacke_dgecon_work.c
new file mode 100644
index 00000000..f3d72444
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgecon_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgecon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgecon_work( int matrix_layout, char norm, lapack_int n,
+ const double* a, lapack_int lda, double anorm,
+ double* rcond, double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgecon( &norm, &n, a, &lda, &anorm, rcond, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgecon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgecon( &norm, &n, a_t, &lda_t, &anorm, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgecon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgecon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeequ.c b/LAPACKE/src/lapacke_dgeequ.c
new file mode 100644
index 00000000..ee456801
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeequ.c
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeequ( int matrix_layout, lapack_int m, lapack_int n,
+ const double* a, lapack_int lda, double* r,
+ double* c, double* rowcnd, double* colcnd,
+ double* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dgeequ_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
+ colcnd, amax );
+}
diff --git a/LAPACKE/src/lapacke_dgeequ_work.c b/LAPACKE/src/lapacke_dgeequ_work.c
new file mode 100644
index 00000000..a33d8ac1
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeequ_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeequ_work( int matrix_layout, lapack_int m, lapack_int n,
+ const double* a, lapack_int lda, double* r,
+ double* c, double* rowcnd, double* colcnd,
+ double* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeequ( &m, &n, a, &lda, r, c, rowcnd, colcnd, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgeequ_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeequ( &m, &n, a_t, &lda_t, r, c, rowcnd, colcnd, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgeequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeequb.c b/LAPACKE/src/lapacke_dgeequb.c
new file mode 100644
index 00000000..0183f4e1
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeequb.c
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeequb( int matrix_layout, lapack_int m, lapack_int n,
+ const double* a, lapack_int lda, double* r,
+ double* c, double* rowcnd, double* colcnd,
+ double* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dgeequb_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
+ colcnd, amax );
+}
diff --git a/LAPACKE/src/lapacke_dgeequb_work.c b/LAPACKE/src/lapacke_dgeequb_work.c
new file mode 100644
index 00000000..bd02b485
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeequb_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeequb_work( int matrix_layout, lapack_int m, lapack_int n,
+ const double* a, lapack_int lda, double* r,
+ double* c, double* rowcnd, double* colcnd,
+ double* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeequb( &m, &n, a, &lda, r, c, rowcnd, colcnd, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgeequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeequb( &m, &n, a_t, &lda_t, r, c, rowcnd, colcnd, amax,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgeequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgees.c b/LAPACKE/src/lapacke_dgees.c
new file mode 100644
index 00000000..ee22a3c4
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgees.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgees
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgees( int matrix_layout, char jobvs, char sort,
+ LAPACK_D_SELECT2 select, lapack_int n, double* a,
+ lapack_int lda, lapack_int* sdim, double* wr,
+ double* wi, double* vs, lapack_int ldvs )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgees", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgees_work( matrix_layout, jobvs, sort, select, n, a, lda,
+ sdim, wr, wi, vs, ldvs, &work_query, lwork,
+ bwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_dgees_work( matrix_layout, jobvs, sort, select, n, a, lda,
+ sdim, wr, wi, vs, ldvs, work, lwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgees", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgees_work.c b/LAPACKE/src/lapacke_dgees_work.c
new file mode 100644
index 00000000..e7b36683
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgees_work.c
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgees
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgees_work( int matrix_layout, char jobvs, char sort,
+ LAPACK_D_SELECT2 select, lapack_int n, double* a,
+ lapack_int lda, lapack_int* sdim, double* wr,
+ double* wi, double* vs, lapack_int ldvs,
+ double* work, lapack_int lwork,
+ lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgees( &jobvs, &sort, select, &n, a, &lda, sdim, wr, wi, vs,
+ &ldvs, work, &lwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldvs_t = MAX(1,n);
+ double* a_t = NULL;
+ double* vs_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dgees_work", info );
+ return info;
+ }
+ if( ldvs < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dgees_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgees( &jobvs, &sort, select, &n, a, &lda_t, sdim, wr, wi,
+ vs, &ldvs_t, work, &lwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ vs_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvs_t * MAX(1,n) );
+ if( vs_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgees( &jobvs, &sort, select, &n, a_t, &lda_t, sdim, wr, wi,
+ vs_t, &ldvs_t, work, &lwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, vs_t, ldvs_t, vs, ldvs );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ LAPACKE_free( vs_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgees_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgees_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeesx.c b/LAPACKE/src/lapacke_dgeesx.c
new file mode 100644
index 00000000..5ba111ac
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeesx.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeesx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeesx( int matrix_layout, char jobvs, char sort,
+ LAPACK_D_SELECT2 select, char sense, lapack_int n,
+ double* a, lapack_int lda, lapack_int* sdim,
+ double* wr, double* wi, double* vs, lapack_int ldvs,
+ double* rconde, double* rcondv )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ lapack_int iwork_query;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeesx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgeesx_work( matrix_layout, jobvs, sort, select, sense, n, a,
+ lda, sdim, wr, wi, vs, ldvs, rconde, rcondv,
+ &work_query, lwork, &iwork_query, liwork,
+ bwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ liwork = (lapack_int)iwork_query;
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'v' ) ) {
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgeesx_work( matrix_layout, jobvs, sort, select, sense, n, a,
+ lda, sdim, wr, wi, vs, ldvs, rconde, rcondv,
+ work, lwork, iwork, liwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'v' ) ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeesx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeesx_work.c b/LAPACKE/src/lapacke_dgeesx_work.c
new file mode 100644
index 00000000..5204bfeb
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeesx_work.c
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeesx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeesx_work( int matrix_layout, char jobvs, char sort,
+ LAPACK_D_SELECT2 select, char sense,
+ lapack_int n, double* a, lapack_int lda,
+ lapack_int* sdim, double* wr, double* wi,
+ double* vs, lapack_int ldvs, double* rconde,
+ double* rcondv, double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork,
+ lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeesx( &jobvs, &sort, select, &sense, &n, a, &lda, sdim, wr, wi,
+ vs, &ldvs, rconde, rcondv, work, &lwork, iwork, &liwork,
+ bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldvs_t = MAX(1,n);
+ double* a_t = NULL;
+ double* vs_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dgeesx_work", info );
+ return info;
+ }
+ if( ldvs < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dgeesx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_dgeesx( &jobvs, &sort, select, &sense, &n, a, &lda_t, sdim,
+ wr, wi, vs, &ldvs_t, rconde, rcondv, work, &lwork,
+ iwork, &liwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ vs_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvs_t * MAX(1,n) );
+ if( vs_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeesx( &jobvs, &sort, select, &sense, &n, a_t, &lda_t, sdim, wr,
+ wi, vs_t, &ldvs_t, rconde, rcondv, work, &lwork, iwork,
+ &liwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, vs_t, ldvs_t, vs, ldvs );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ LAPACKE_free( vs_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeesx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgeesx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeev.c b/LAPACKE/src/lapacke_dgeev.c
new file mode 100644
index 00000000..44c8197c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeev.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeev( int matrix_layout, char jobvl, char jobvr,
+ lapack_int n, double* a, lapack_int lda, double* wr,
+ double* wi, double* vl, lapack_int ldvl, double* vr,
+ lapack_int ldvr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgeev_work( matrix_layout, jobvl, jobvr, n, a, lda, wr, wi,
+ vl, ldvl, vr, ldvr, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgeev_work( matrix_layout, jobvl, jobvr, n, a, lda, wr, wi,
+ vl, ldvl, vr, ldvr, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeev_work.c b/LAPACKE/src/lapacke_dgeev_work.c
new file mode 100644
index 00000000..97db5e75
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeev_work.c
@@ -0,0 +1,136 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeev_work( int matrix_layout, char jobvl, char jobvr,
+ lapack_int n, double* a, lapack_int lda,
+ double* wr, double* wi, double* vl,
+ lapack_int ldvl, double* vr, lapack_int ldvr,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeev( &jobvl, &jobvr, &n, a, &lda, wr, wi, vl, &ldvl, vr, &ldvr,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ double* a_t = NULL;
+ double* vl_t = NULL;
+ double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dgeev_work", info );
+ return info;
+ }
+ if( ldvl < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dgeev_work", info );
+ return info;
+ }
+ if( ldvr < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dgeev_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgeev( &jobvl, &jobvr, &n, a, &lda_t, wr, wi, vl, &ldvl_t,
+ vr, &ldvr_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ vl_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvl_t * MAX(1,n) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ vr_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvr_t * MAX(1,n) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeev( &jobvl, &jobvr, &n, a_t, &lda_t, wr, wi, vl_t, &ldvl_t,
+ vr_t, &ldvr_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, vl_t, ldvl_t, vl, ldvl );
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, vr_t, ldvr_t, vr, ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgeev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeevx.c b/LAPACKE/src/lapacke_dgeevx.c
new file mode 100644
index 00000000..c14a7746
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeevx.c
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeevx( int matrix_layout, char balanc, char jobvl,
+ char jobvr, char sense, lapack_int n, double* a,
+ lapack_int lda, double* wr, double* wi, double* vl,
+ lapack_int ldvl, double* vr, lapack_int ldvr,
+ lapack_int* ilo, lapack_int* ihi, double* scale,
+ double* abnrm, double* rconde, double* rcondv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'v' ) ) {
+ iwork = (lapack_int*)
+ LAPACKE_malloc( sizeof(lapack_int) * MAX(1,2*n-2) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgeevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
+ lda, wr, wi, vl, ldvl, vr, ldvr, ilo, ihi,
+ scale, abnrm, rconde, rcondv, &work_query,
+ lwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_dgeevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
+ lda, wr, wi, vl, ldvl, vr, ldvr, ilo, ihi,
+ scale, abnrm, rconde, rcondv, work, lwork,
+ iwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'v' ) ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeevx_work.c b/LAPACKE/src/lapacke_dgeevx_work.c
new file mode 100644
index 00000000..d461f863
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeevx_work.c
@@ -0,0 +1,142 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeevx_work( int matrix_layout, char balanc, char jobvl,
+ char jobvr, char sense, lapack_int n, double* a,
+ lapack_int lda, double* wr, double* wi,
+ double* vl, lapack_int ldvl, double* vr,
+ lapack_int ldvr, lapack_int* ilo,
+ lapack_int* ihi, double* scale, double* abnrm,
+ double* rconde, double* rcondv, double* work,
+ lapack_int lwork, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeevx( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda, wr, wi, vl,
+ &ldvl, vr, &ldvr, ilo, ihi, scale, abnrm, rconde, rcondv,
+ work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ double* a_t = NULL;
+ double* vl_t = NULL;
+ double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dgeevx_work", info );
+ return info;
+ }
+ if( ldvl < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dgeevx_work", info );
+ return info;
+ }
+ if( ldvr < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_dgeevx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgeevx( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda_t, wr,
+ wi, vl, &ldvl_t, vr, &ldvr_t, ilo, ihi, scale, abnrm,
+ rconde, rcondv, work, &lwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ vl_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvl_t * MAX(1,n) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ vr_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvr_t * MAX(1,n) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeevx( &balanc, &jobvl, &jobvr, &sense, &n, a_t, &lda_t, wr, wi,
+ vl_t, &ldvl_t, vr_t, &ldvr_t, ilo, ihi, scale, abnrm,
+ rconde, rcondv, work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, vl_t, ldvl_t, vl, ldvl );
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, vr_t, ldvr_t, vr, ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgeevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgehrd.c b/LAPACKE/src/lapacke_dgehrd.c
new file mode 100644
index 00000000..c42f347f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgehrd.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgehrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgehrd( int matrix_layout, lapack_int n, lapack_int ilo,
+ lapack_int ihi, double* a, lapack_int lda,
+ double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgehrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgehrd_work( matrix_layout, n, ilo, ihi, a, lda, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgehrd_work( matrix_layout, n, ilo, ihi, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgehrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgehrd_work.c b/LAPACKE/src/lapacke_dgehrd_work.c
new file mode 100644
index 00000000..2281c1bc
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgehrd_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgehrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgehrd_work( int matrix_layout, lapack_int n, lapack_int ilo,
+ lapack_int ihi, double* a, lapack_int lda,
+ double* tau, double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgehrd( &n, &ilo, &ihi, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dgehrd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgehrd( &n, &ilo, &ihi, a, &lda_t, tau, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgehrd( &n, &ilo, &ihi, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgehrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgehrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgejsv.c b/LAPACKE/src/lapacke_dgejsv.c
new file mode 100644
index 00000000..cb29a1f6
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgejsv.c
@@ -0,0 +1,133 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgejsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgejsv( int matrix_layout, char joba, char jobu, char jobv,
+ char jobr, char jobt, char jobp, lapack_int m,
+ lapack_int n, double* a, lapack_int lda, double* sva,
+ double* u, lapack_int ldu, double* v, lapack_int ldv,
+ double* stat, lapack_int* istat )
+{
+ lapack_int info = 0;
+ lapack_int lwork = (!( LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'f' ) ||
+ LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'j' ) ||
+ LAPACKE_lsame( joba, 'e' ) ||
+ LAPACKE_lsame( joba, 'g' ) ) ? MAX3(7,4*n+1,2*m+n) :
+ ( (!( LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'f' ) ||
+ LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'j' ) ) &&
+ ( LAPACKE_lsame( joba, 'e' ) ||
+ LAPACKE_lsame( joba, 'g' ) ) ) ? MAX3(7,4*n+n*n,2*m+n) :
+ ( ( LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'f' ) ) &&
+ (!( LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'j' ) ) ) ? MAX(7,2*n+m) :
+ ( ( LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'j' ) ) &&
+ (!( LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'f' ) ) ) ? MAX(7,2*n+m) :
+ ( ( LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'f' ) ) &&
+ ( LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'j' ) ) &&
+ !LAPACKE_lsame( jobv, 'j' ) ? MAX(1,6*n+2*n*n) :
+ ( ( LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'f' ) ) &&
+ ( LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'j' ) ) &&
+ LAPACKE_lsame( jobv, 'j' ) ? MAX(7,m+3*n+n*n) :
+ 1) ) ) ) ) );
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ lapack_int i;
+ lapack_int nu, nv;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgejsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
+ nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n;
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'w' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, nu, n, u, ldu ) ) {
+ return -13;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'w' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, nv, n, v, ldv ) ) {
+ return -15;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m+3*n) );
+ 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_dgejsv_work( matrix_layout, joba, jobu, jobv, jobr, jobt,
+ jobp, m, n, a, lda, sva, u, ldu, v, ldv, work,
+ lwork, iwork );
+ /* Backup significant data from working array(s) */
+ for( i=0; i<7; i++ ) {
+ stat[i] = work[i];
+ }
+ for( i=0; i<3; i++ ) {
+ istat[i] = iwork[i];
+ }
+ /* 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_dgejsv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgejsv_work.c b/LAPACKE/src/lapacke_dgejsv_work.c
new file mode 100644
index 00000000..a882a3d7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgejsv_work.c
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgejsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgejsv_work( int matrix_layout, char joba, char jobu,
+ char jobv, char jobr, char jobt, char jobp,
+ lapack_int m, lapack_int n, double* a,
+ lapack_int lda, double* sva, double* u,
+ lapack_int ldu, double* v, lapack_int ldv,
+ double* work, lapack_int lwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a,
+ &lda, sva, u, &ldu, v, &ldv, work, &lwork, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
+ lapack_int nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n;
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldu_t = MAX(1,nu);
+ lapack_int ldv_t = MAX(1,nv);
+ double* a_t = NULL;
+ double* u_t = NULL;
+ double* v_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dgejsv_work", info );
+ return info;
+ }
+ if( ldu < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_dgejsv_work", info );
+ return info;
+ }
+ if( ldv < n ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_dgejsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'w' ) ) {
+ u_t = (double*)LAPACKE_malloc( sizeof(double) * ldu_t * MAX(1,n) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'w' ) ) {
+ v_t = (double*)LAPACKE_malloc( sizeof(double) * ldv_t * MAX(1,n) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'w' ) ) {
+ LAPACKE_dge_trans( matrix_layout, nu, n, u, ldu, u_t, ldu_t );
+ }
+ if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'w' ) ) {
+ LAPACKE_dge_trans( matrix_layout, nv, n, v, ldv, v_t, ldv_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a_t,
+ &lda_t, sva, u_t, &ldu_t, v_t, &ldv_t, work, &lwork,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'w' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nu, n, u_t, ldu_t, u, ldu );
+ }
+ if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'w' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nv, n, v_t, ldv_t, v, ldv );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'w' ) ) {
+ LAPACKE_free( v_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'w' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgejsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgejsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgelq2.c b/LAPACKE/src/lapacke_dgelq2.c
new file mode 100644
index 00000000..34ed35b1
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgelq2.c
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgelq2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgelq2( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* tau )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgelq2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,m) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgelq2_work( matrix_layout, m, n, a, lda, tau, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgelq2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgelq2_work.c b/LAPACKE/src/lapacke_dgelq2_work.c
new file mode 100644
index 00000000..28e9dce4
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgelq2_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgelq2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgelq2_work( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* tau,
+ double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgelq2( &m, &n, a, &lda, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgelq2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgelq2( &m, &n, a_t, &lda_t, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgelq2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgelq2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgelqf.c b/LAPACKE/src/lapacke_dgelqf.c
new file mode 100644
index 00000000..a8dae2b7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgelqf.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgelqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgelqf( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgelqf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgelqf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgelqf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgelqf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgelqf_work.c b/LAPACKE/src/lapacke_dgelqf_work.c
new file mode 100644
index 00000000..8bc39e78
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgelqf_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgelqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgelqf_work( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* tau,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgelqf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgelqf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgelqf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgelqf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgelqf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgelqf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgels.c b/LAPACKE/src/lapacke_dgels.c
new file mode 100644
index 00000000..72980157
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgels.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgels
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgels( int matrix_layout, char trans, lapack_int m,
+ lapack_int n, lapack_int nrhs, double* a,
+ lapack_int lda, double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgels", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgels_work( matrix_layout, trans, m, n, nrhs, a, lda, b, ldb,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgels_work( matrix_layout, trans, m, n, nrhs, a, lda, b, ldb,
+ work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgels", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgels_work.c b/LAPACKE/src/lapacke_dgels_work.c
new file mode 100644
index 00000000..ed2923e8
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgels_work.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgels
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgels_work( int matrix_layout, char trans, lapack_int m,
+ lapack_int n, lapack_int nrhs, double* a,
+ lapack_int lda, double* b, lapack_int ldb,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgels( &trans, &m, &n, &nrhs, a, &lda, b, &ldb, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,MAX(m,n));
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dgels_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dgels_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgels( &trans, &m, &n, &nrhs, a, &lda_t, b, &ldb_t, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgels( &trans, &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
+ ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgels_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgels_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgelsd.c b/LAPACKE/src/lapacke_dgelsd.c
new file mode 100644
index 00000000..98bd3a0e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgelsd.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgelsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgelsd( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, double* a, lapack_int lda,
+ double* b, lapack_int ldb, double* s, double rcond,
+ lapack_int* rank )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ /* Additional scalars declarations for work arrays */
+ lapack_int liwork;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ lapack_int iwork_query;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgelsd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgelsd_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
+ rcond, rank, &work_query, lwork, &iwork_query );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_dgelsd_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
+ rcond, rank, work, lwork, iwork );
+ /* 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_dgelsd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgelsd_work.c b/LAPACKE/src/lapacke_dgelsd_work.c
new file mode 100644
index 00000000..0a29fc3f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgelsd_work.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgelsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgelsd_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, double* a, lapack_int lda,
+ double* b, lapack_int ldb, double* s,
+ double rcond, lapack_int* rank, double* work,
+ lapack_int lwork, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgelsd( &m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, rank, work,
+ &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,MAX(m,n));
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dgelsd_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dgelsd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgelsd( &m, &n, &nrhs, a, &lda_t, b, &ldb_t, s, &rcond, rank,
+ work, &lwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgelsd( &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, s, &rcond, rank,
+ work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
+ ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgelsd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgelsd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgelss.c b/LAPACKE/src/lapacke_dgelss.c
new file mode 100644
index 00000000..228b5d01
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgelss.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgelss
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgelss( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, double* a, lapack_int lda,
+ double* b, lapack_int ldb, double* s, double rcond,
+ lapack_int* rank )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgelss", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgelss_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
+ rcond, rank, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgelss_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
+ rcond, rank, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgelss", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgelss_work.c b/LAPACKE/src/lapacke_dgelss_work.c
new file mode 100644
index 00000000..3fc8f2ea
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgelss_work.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgelss
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgelss_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, double* a, lapack_int lda,
+ double* b, lapack_int ldb, double* s,
+ double rcond, lapack_int* rank, double* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgelss( &m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, rank, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,MAX(m,n));
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dgelss_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dgelss_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgelss( &m, &n, &nrhs, a, &lda_t, b, &ldb_t, s, &rcond, rank,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgelss( &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, s, &rcond, rank,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
+ ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgelss_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgelss_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgelsy.c b/LAPACKE/src/lapacke_dgelsy.c
new file mode 100644
index 00000000..ba66b4d7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgelsy.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgelsy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgelsy( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, double* a, lapack_int lda,
+ double* b, lapack_int ldb, lapack_int* jpvt,
+ double rcond, lapack_int* rank )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgelsy", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgelsy_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, jpvt,
+ rcond, rank, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgelsy_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, jpvt,
+ rcond, rank, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgelsy", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgelsy_work.c b/LAPACKE/src/lapacke_dgelsy_work.c
new file mode 100644
index 00000000..a99243bc
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgelsy_work.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgelsy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgelsy_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, double* a, lapack_int lda,
+ double* b, lapack_int ldb, lapack_int* jpvt,
+ double rcond, lapack_int* rank, double* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgelsy( &m, &n, &nrhs, a, &lda, b, &ldb, jpvt, &rcond, rank,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,MAX(m,n));
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dgelsy_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dgelsy_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgelsy( &m, &n, &nrhs, a, &lda_t, b, &ldb_t, jpvt, &rcond,
+ rank, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgelsy( &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, jpvt, &rcond,
+ rank, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
+ ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgelsy_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgelsy_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgemqrt.c b/LAPACKE/src/lapacke_dgemqrt.c
new file mode 100644
index 00000000..a49656cf
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgemqrt.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgemqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgemqrt( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int nb, const double* v, lapack_int ldv,
+ const double* t, lapack_int ldt, double* c,
+ lapack_int ldc )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgemqrt", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -12;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) {
+ return -10;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,m) * MAX(1,nb) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgemqrt_work( matrix_layout, side, trans, m, n, k, nb, v, ldv,
+ t, ldt, c, ldc, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgemqrt", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgemqrt_work.c b/LAPACKE/src/lapacke_dgemqrt_work.c
new file mode 100644
index 00000000..fe826793
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgemqrt_work.c
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgemqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgemqrt_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int nb, const double* v, lapack_int ldv,
+ const double* t, lapack_int ldt, double* c,
+ lapack_int ldc, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgemqrt( &side, &trans, &m, &n, &k, &nb, v, &ldv, t, &ldt, c,
+ &ldc, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldc_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,ldt);
+ lapack_int ldv_t = MAX(1,ldv);
+ double* v_t = NULL;
+ double* t_t = NULL;
+ double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldc < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dgemqrt_work", info );
+ return info;
+ }
+ if( ldt < nb ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dgemqrt_work", info );
+ return info;
+ }
+ if( ldv < k ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dgemqrt_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (double*)LAPACKE_malloc( sizeof(double) * ldv_t * MAX(1,k) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (double*)LAPACKE_malloc( sizeof(double) * ldt_t * MAX(1,nb) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ c_t = (double*)LAPACKE_malloc( sizeof(double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, ldv, k, v, ldv, v_t, ldv_t );
+ LAPACKE_dge_trans( matrix_layout, ldt, nb, t, ldt, t_t, ldt_t );
+ LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgemqrt( &side, &trans, &m, &n, &k, &nb, v_t, &ldv_t, t_t,
+ &ldt_t, c_t, &ldc_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgemqrt_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgemqrt_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeqlf.c b/LAPACKE/src/lapacke_dgeqlf.c
new file mode 100644
index 00000000..e6637c92
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqlf.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqlf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqlf( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqlf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgeqlf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgeqlf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqlf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeqlf_work.c b/LAPACKE/src/lapacke_dgeqlf_work.c
new file mode 100644
index 00000000..3e07384a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqlf_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqlf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqlf_work( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* tau,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqlf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgeqlf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgeqlf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqlf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqlf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgeqlf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeqp3.c b/LAPACKE/src/lapacke_dgeqp3.c
new file mode 100644
index 00000000..1c682a7a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqp3.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqp3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqp3( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, lapack_int* jpvt,
+ double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqp3", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgeqp3_work( matrix_layout, m, n, a, lda, jpvt, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgeqp3_work( matrix_layout, m, n, a, lda, jpvt, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqp3", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeqp3_work.c b/LAPACKE/src/lapacke_dgeqp3_work.c
new file mode 100644
index 00000000..3d0259fe
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqp3_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqp3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqp3_work( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, lapack_int* jpvt,
+ double* tau, double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqp3( &m, &n, a, &lda, jpvt, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgeqp3_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgeqp3( &m, &n, a, &lda_t, jpvt, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqp3( &m, &n, a_t, &lda_t, jpvt, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqp3_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgeqp3_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeqpf.c b/LAPACKE/src/lapacke_dgeqpf.c
new file mode 100644
index 00000000..bf6f888f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqpf.c
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqpf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqpf( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, lapack_int* jpvt,
+ double* tau )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqpf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgeqpf_work( matrix_layout, m, n, a, lda, jpvt, tau, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqpf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeqpf_work.c b/LAPACKE/src/lapacke_dgeqpf_work.c
new file mode 100644
index 00000000..ff0efb40
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqpf_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqpf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqpf_work( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, lapack_int* jpvt,
+ double* tau, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqpf( &m, &n, a, &lda, jpvt, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgeqpf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqpf( &m, &n, a_t, &lda_t, jpvt, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqpf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgeqpf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeqr2.c b/LAPACKE/src/lapacke_dgeqr2.c
new file mode 100644
index 00000000..23ad4829
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqr2.c
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqr2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqr2( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* tau )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqr2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgeqr2_work( matrix_layout, m, n, a, lda, tau, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqr2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeqr2_work.c b/LAPACKE/src/lapacke_dgeqr2_work.c
new file mode 100644
index 00000000..bbe14459
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqr2_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqr2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqr2_work( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* tau,
+ double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqr2( &m, &n, a, &lda, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgeqr2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqr2( &m, &n, a_t, &lda_t, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqr2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgeqr2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeqrf.c b/LAPACKE/src/lapacke_dgeqrf.c
new file mode 100644
index 00000000..43377440
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqrf.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqrf( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgeqrf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgeqrf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeqrf_work.c b/LAPACKE/src/lapacke_dgeqrf_work.c
new file mode 100644
index 00000000..3c466223
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqrf_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqrf_work( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* tau,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqrf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgeqrf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgeqrf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqrf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgeqrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeqrfp.c b/LAPACKE/src/lapacke_dgeqrfp.c
new file mode 100644
index 00000000..1d341286
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqrfp.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqrfp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqrfp( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqrfp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgeqrfp_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgeqrfp_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqrfp", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeqrfp_work.c b/LAPACKE/src/lapacke_dgeqrfp_work.c
new file mode 100644
index 00000000..5882ff3c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqrfp_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqrfp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqrfp_work( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* tau,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqrfp( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgeqrfp_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgeqrfp( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqrfp( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqrfp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgeqrfp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeqrt.c b/LAPACKE/src/lapacke_dgeqrt.c
new file mode 100644
index 00000000..38703f16
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqrt.c
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqrt( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nb, double* a, lapack_int lda, double* t,
+ lapack_int ldt )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqrt", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,nb) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgeqrt_work( matrix_layout, m, n, nb, a, lda, t, ldt, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqrt", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeqrt2.c b/LAPACKE/src/lapacke_dgeqrt2.c
new file mode 100644
index 00000000..2f1e61ac
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqrt2.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqrt2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqrt2( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* t,
+ lapack_int ldt )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqrt2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dgeqrt2_work( matrix_layout, m, n, a, lda, t, ldt );
+}
diff --git a/LAPACKE/src/lapacke_dgeqrt2_work.c b/LAPACKE/src/lapacke_dgeqrt2_work.c
new file mode 100644
index 00000000..2be42fe0
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqrt2_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqrt2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqrt2_work( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* t,
+ lapack_int ldt )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqrt2( &m, &n, a, &lda, t, &ldt, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,n);
+ double* a_t = NULL;
+ double* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgeqrt2_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dgeqrt2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (double*)LAPACKE_malloc( sizeof(double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqrt2( &m, &n, a_t, &lda_t, t_t, &ldt_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqrt2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgeqrt2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeqrt3.c b/LAPACKE/src/lapacke_dgeqrt3.c
new file mode 100644
index 00000000..643edc8f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqrt3.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqrt3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqrt3( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* t,
+ lapack_int ldt )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqrt3", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dgeqrt3_work( matrix_layout, m, n, a, lda, t, ldt );
+}
diff --git a/LAPACKE/src/lapacke_dgeqrt3_work.c b/LAPACKE/src/lapacke_dgeqrt3_work.c
new file mode 100644
index 00000000..6b15bcdf
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqrt3_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqrt3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqrt3_work( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* t,
+ lapack_int ldt )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqrt3( &m, &n, a, &lda, t, &ldt, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,n);
+ double* a_t = NULL;
+ double* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgeqrt3_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dgeqrt3_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (double*)LAPACKE_malloc( sizeof(double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqrt3( &m, &n, a_t, &lda_t, t_t, &ldt_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqrt3_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgeqrt3_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgeqrt_work.c b/LAPACKE/src/lapacke_dgeqrt_work.c
new file mode 100644
index 00000000..d0585f90
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgeqrt_work.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgeqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgeqrt_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nb, double* a, lapack_int lda,
+ double* t, lapack_int ldt, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqrt( &m, &n, &nb, a, &lda, t, &ldt, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,ldt);
+ double* a_t = NULL;
+ double* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dgeqrt_work", info );
+ return info;
+ }
+ if( ldt < MIN(m,n) ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dgeqrt_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldt_t * MAX(1,MIN(m,n)) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgeqrt( &m, &n, &nb, a_t, &lda_t, t_t, &ldt_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, ldt, MIN(m,n), t_t, ldt_t, t,
+ ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgeqrt_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgeqrt_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgerfs.c b/LAPACKE/src/lapacke_dgerfs.c
new file mode 100644
index 00000000..17d0b63a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgerfs.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgerfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgerfs( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const double* a, lapack_int lda,
+ const double* af, lapack_int ldaf,
+ const lapack_int* ipiv, const double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgerfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgerfs_work( matrix_layout, trans, n, nrhs, a, lda, af, ldaf,
+ ipiv, b, ldb, x, ldx, ferr, berr, work, iwork );
+ /* 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_dgerfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgerfs_work.c b/LAPACKE/src/lapacke_dgerfs_work.c
new file mode 100644
index 00000000..8da86c9d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgerfs_work.c
@@ -0,0 +1,133 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgerfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgerfs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const double* a,
+ lapack_int lda, const double* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* ferr, double* berr,
+ double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgerfs( &trans, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b, &ldb, x,
+ &ldx, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* a_t = NULL;
+ double* af_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dgerfs_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dgerfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dgerfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dgerfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (double*)LAPACKE_malloc( sizeof(double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgerfs( &trans, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, ipiv, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgerfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgerfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgerfsx.c b/LAPACKE/src/lapacke_dgerfsx.c
new file mode 100644
index 00000000..606054c7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgerfsx.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgerfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgerfsx( int matrix_layout, char trans, char equed,
+ lapack_int n, lapack_int nrhs, const double* a,
+ lapack_int lda, const double* af, lapack_int ldaf,
+ const lapack_int* ipiv, const double* r,
+ const double* c, const double* b, lapack_int ldb,
+ double* x, lapack_int ldx, double* rcond,
+ double* berr, lapack_int n_err_bnds,
+ double* err_bnds_norm, double* err_bnds_comp,
+ lapack_int nparams, double* params )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgerfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+ return -8;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
+ if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+ return -12;
+ }
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -23;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
+ if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -15;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgerfsx_work( matrix_layout, trans, equed, n, nrhs, a, lda,
+ af, ldaf, ipiv, r, c, b, ldb, x, ldx, rcond,
+ berr, n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, iwork );
+ /* 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_dgerfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgerfsx_work.c b/LAPACKE/src/lapacke_dgerfsx_work.c
new file mode 100644
index 00000000..6fc38084
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgerfsx_work.c
@@ -0,0 +1,163 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgerfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgerfsx_work( int matrix_layout, char trans, char equed,
+ lapack_int n, lapack_int nrhs, const double* a,
+ lapack_int lda, const double* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const double* r, const double* c,
+ const double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* rcond, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgerfsx( &trans, &equed, &n, &nrhs, a, &lda, af, &ldaf, ipiv, r,
+ c, b, &ldb, x, &ldx, rcond, berr, &n_err_bnds,
+ err_bnds_norm, err_bnds_comp, &nparams, params, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* a_t = NULL;
+ double* af_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dgerfsx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dgerfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_dgerfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_dgerfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (double*)LAPACKE_malloc( sizeof(double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgerfsx( &trans, &equed, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, r, c, b_t, &ldb_t, x_t, &ldx_t, rcond, berr,
+ &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t, &nparams,
+ params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgerfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgerfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgerqf.c b/LAPACKE/src/lapacke_dgerqf.c
new file mode 100644
index 00000000..0f1d7af2
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgerqf.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgerqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgerqf( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgerqf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgerqf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgerqf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgerqf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgerqf_work.c b/LAPACKE/src/lapacke_dgerqf_work.c
new file mode 100644
index 00000000..7ea9512e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgerqf_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgerqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgerqf_work( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* tau,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgerqf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgerqf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgerqf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgerqf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgerqf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgerqf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgesdd.c b/LAPACKE/src/lapacke_dgesdd.c
new file mode 100644
index 00000000..b9df1fde
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgesdd.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgesdd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgesdd( int matrix_layout, char jobz, lapack_int m,
+ lapack_int n, double* a, lapack_int lda, double* s,
+ double* u, lapack_int ldu, double* vt,
+ lapack_int ldvt )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgesdd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)
+ LAPACKE_malloc( sizeof(lapack_int) * MAX(1,8*MIN(m,n)) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgesdd_work( matrix_layout, jobz, m, n, a, lda, s, u, ldu, vt,
+ ldvt, &work_query, lwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_dgesdd_work( matrix_layout, jobz, m, n, a, lda, s, u, ldu, vt,
+ ldvt, work, lwork, iwork );
+ /* 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_dgesdd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgesdd_work.c b/LAPACKE/src/lapacke_dgesdd_work.c
new file mode 100644
index 00000000..1fb7e75c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgesdd_work.c
@@ -0,0 +1,153 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgesdd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgesdd_work( int matrix_layout, char jobz, lapack_int m,
+ lapack_int n, double* a, lapack_int lda,
+ double* s, double* u, lapack_int ldu,
+ double* vt, lapack_int ldvt, double* work,
+ lapack_int lwork, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgesdd( &jobz, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt, work,
+ &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_u = ( LAPACKE_lsame( jobz, 'a' ) ||
+ LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && m<n) ) ? m : 1;
+ lapack_int ncols_u = ( LAPACKE_lsame( jobz, 'a' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && m<n) ) ? m :
+ ( LAPACKE_lsame( jobz, 's' ) ? MIN(m,n) : 1);
+ lapack_int nrows_vt = ( LAPACKE_lsame( jobz, 'a' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && m>=n) ) ? n :
+ ( LAPACKE_lsame( jobz, 's' ) ? MIN(m,n) : 1);
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldu_t = MAX(1,nrows_u);
+ lapack_int ldvt_t = MAX(1,nrows_vt);
+ double* a_t = NULL;
+ double* u_t = NULL;
+ double* vt_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dgesdd_work", info );
+ return info;
+ }
+ if( ldu < ncols_u ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dgesdd_work", info );
+ return info;
+ }
+ if( ldvt < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dgesdd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgesdd( &jobz, &m, &n, a, &lda_t, s, u, &ldu_t, vt, &ldvt_t,
+ work, &lwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m<n) ) ) {
+ u_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldu_t * MAX(1,ncols_u) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m>=n) ) ) {
+ vt_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvt_t * MAX(1,n) );
+ if( vt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgesdd( &jobz, &m, &n, a_t, &lda_t, s, u_t, &ldu_t, vt_t,
+ &ldvt_t, work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m<n) ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t,
+ u, ldu );
+ }
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m>=n) ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt,
+ ldvt );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m>=n) ) ) {
+ LAPACKE_free( vt_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m<n) ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgesdd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgesdd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgesv.c b/LAPACKE/src/lapacke_dgesv.c
new file mode 100644
index 00000000..e7fabd38
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgesv.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgesv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgesv( int matrix_layout, lapack_int n, lapack_int nrhs,
+ double* a, lapack_int lda, lapack_int* ipiv,
+ double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgesv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_dgesv_work( matrix_layout, n, nrhs, a, lda, ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_dgesv_work.c b/LAPACKE/src/lapacke_dgesv_work.c
new file mode 100644
index 00000000..97df871f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgesv_work.c
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgesv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgesv_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ double* a, lapack_int lda, lapack_int* ipiv,
+ double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgesv( &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgesv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dgesv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgesv( &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgesv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgesv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgesvd.c b/LAPACKE/src/lapacke_dgesvd.c
new file mode 100644
index 00000000..8b255821
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgesvd.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgesvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgesvd( int matrix_layout, char jobu, char jobvt,
+ lapack_int m, lapack_int n, double* a,
+ lapack_int lda, double* s, double* u, lapack_int ldu,
+ double* vt, lapack_int ldvt, double* superb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ lapack_int i;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgesvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -6;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgesvd_work( matrix_layout, jobu, jobvt, m, n, a, lda, s, u,
+ ldu, vt, ldvt, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgesvd_work( matrix_layout, jobu, jobvt, m, n, a, lda, s, u,
+ ldu, vt, ldvt, work, lwork );
+ /* Backup significant data from working array(s) */
+ for( i=0; i<MIN(m,n)-1; i++ ) {
+ superb[i] = work[i+1];
+ }
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgesvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgesvd_work.c b/LAPACKE/src/lapacke_dgesvd_work.c
new file mode 100644
index 00000000..81e3db54
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgesvd_work.c
@@ -0,0 +1,144 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgesvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgesvd_work( int matrix_layout, char jobu, char jobvt,
+ lapack_int m, lapack_int n, double* a,
+ lapack_int lda, double* s, double* u,
+ lapack_int ldu, double* vt, lapack_int ldvt,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgesvd( &jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_u = ( LAPACKE_lsame( jobu, 'a' ) ||
+ LAPACKE_lsame( jobu, 's' ) ) ? m : 1;
+ lapack_int ncols_u = LAPACKE_lsame( jobu, 'a' ) ? m :
+ ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1);
+ lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n :
+ ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1);
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldu_t = MAX(1,nrows_u);
+ lapack_int ldvt_t = MAX(1,nrows_vt);
+ double* a_t = NULL;
+ double* u_t = NULL;
+ double* vt_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dgesvd_work", info );
+ return info;
+ }
+ if( ldu < ncols_u ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dgesvd_work", info );
+ return info;
+ }
+ if( ldvt < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dgesvd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgesvd( &jobu, &jobvt, &m, &n, a, &lda_t, s, u, &ldu_t, vt,
+ &ldvt_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ u_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldu_t * MAX(1,ncols_u) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ vt_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvt_t * MAX(1,n) );
+ if( vt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgesvd( &jobu, &jobvt, &m, &n, a_t, &lda_t, s, u_t, &ldu_t, vt_t,
+ &ldvt_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t,
+ u, ldu );
+ }
+ if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt,
+ ldvt );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ LAPACKE_free( vt_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgesvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgesvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgesvj.c b/LAPACKE/src/lapacke_dgesvj.c
new file mode 100644
index 00000000..e41c5b14
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgesvj.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgesvj
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgesvj( int matrix_layout, char joba, char jobu, char jobv,
+ lapack_int m, lapack_int n, double* a,
+ lapack_int lda, double* sva, lapack_int mv,
+ double* v, lapack_int ldv, double* stat )
+{
+ lapack_int info = 0;
+ lapack_int lwork = MAX(6,m+n);
+ double* work = NULL;
+ lapack_int i;
+ lapack_int nrows_v;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgesvj", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n :
+ ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1);
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, n, v, ldv ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work[0] = stat[0]; /* Significant if jobu = 'c' */
+ /* Call middle-level interface */
+ info = LAPACKE_dgesvj_work( matrix_layout, joba, jobu, jobv, m, n, a, lda,
+ sva, mv, v, ldv, work, lwork );
+ /* Backup significant data from working array(s) */
+ for( i=0; i<6; i++ ) {
+ stat[i] = work[i];
+ }
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgesvj", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgesvj_work.c b/LAPACKE/src/lapacke_dgesvj_work.c
new file mode 100644
index 00000000..9290cc68
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgesvj_work.c
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgesvj
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgesvj_work( int matrix_layout, char joba, char jobu,
+ char jobv, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* sva,
+ lapack_int mv, double* v, lapack_int ldv,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgesvj( &joba, &jobu, &jobv, &m, &n, a, &lda, sva, &mv, v, &ldv,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n :
+ ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1);
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldv_t = MAX(1,nrows_v);
+ double* a_t = NULL;
+ double* v_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dgesvj_work", info );
+ return info;
+ }
+ if( ldv < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dgesvj_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ v_t = (double*)LAPACKE_malloc( sizeof(double) * ldv_t * MAX(1,n) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( jobv, 'a' ) ) {
+ LAPACKE_dge_trans( matrix_layout, nrows_v, n, v, ldv, v_t, ldv_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgesvj( &joba, &jobu, &jobv, &m, &n, a_t, &lda_t, sva, &mv, v_t,
+ &ldv_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_v, n, v_t, ldv_t, v,
+ ldv );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_free( v_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgesvj_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgesvj_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgesvx.c b/LAPACKE/src/lapacke_dgesvx.c
new file mode 100644
index 00000000..42173a6a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgesvx.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgesvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgesvx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs, double* a,
+ lapack_int lda, double* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, double* r, double* c,
+ double* b, lapack_int ldb, double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr,
+ double* rpivot )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgesvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -14;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) ) ) {
+ if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+ return -13;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'r' ) ) ) {
+ if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgesvx_work( matrix_layout, fact, trans, n, nrhs, a, lda, af,
+ ldaf, ipiv, equed, r, c, b, ldb, x, ldx, rcond,
+ ferr, berr, work, iwork );
+ /* Backup significant data from working array(s) */
+ *rpivot = work[0];
+ /* 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_dgesvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgesvx_work.c b/LAPACKE/src/lapacke_dgesvx_work.c
new file mode 100644
index 00000000..3050a7ec
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgesvx_work.c
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgesvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgesvx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs, double* a,
+ lapack_int lda, double* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, double* r,
+ double* c, double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* rcond, double* ferr,
+ double* berr, double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgesvx( &fact, &trans, &n, &nrhs, a, &lda, af, &ldaf, ipiv,
+ equed, r, c, b, &ldb, x, &ldx, rcond, ferr, berr, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* a_t = NULL;
+ double* af_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dgesvx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dgesvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dgesvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_dgesvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (double*)LAPACKE_malloc( sizeof(double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgesvx( &fact, &trans, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, equed, r, c, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr,
+ berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, af_t, ldaf_t, af, ldaf );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgesvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgesvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgesvxx.c b/LAPACKE/src/lapacke_dgesvxx.c
new file mode 100644
index 00000000..682983e5
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgesvxx.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgesvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgesvxx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs, double* a,
+ lapack_int lda, double* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, double* r, double* c,
+ double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* rcond, double* rpvgrw,
+ double* berr, lapack_int n_err_bnds,
+ double* err_bnds_norm, double* err_bnds_comp,
+ lapack_int nparams, double* params )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgesvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -14;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) ) ) {
+ if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+ return -13;
+ }
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -25;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'r' ) ) ) {
+ if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgesvxx_work( matrix_layout, fact, trans, n, nrhs, a, lda, af,
+ ldaf, ipiv, equed, r, c, b, ldb, x, ldx, rcond,
+ rpvgrw, berr, n_err_bnds, err_bnds_norm,
+ err_bnds_comp, nparams, params, work, iwork );
+ /* 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_dgesvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgesvxx_work.c b/LAPACKE/src/lapacke_dgesvxx_work.c
new file mode 100644
index 00000000..0c702797
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgesvxx_work.c
@@ -0,0 +1,175 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgesvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgesvxx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs, double* a,
+ lapack_int lda, double* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, double* r,
+ double* c, double* b, lapack_int ldb,
+ double* x, lapack_int ldx, double* rcond,
+ double* rpvgrw, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgesvxx( &fact, &trans, &n, &nrhs, a, &lda, af, &ldaf, ipiv,
+ equed, r, c, b, &ldb, x, &ldx, rcond, rpvgrw, berr,
+ &n_err_bnds, err_bnds_norm, err_bnds_comp, &nparams,
+ params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* a_t = NULL;
+ double* af_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dgesvxx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dgesvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dgesvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_dgesvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (double*)LAPACKE_malloc( sizeof(double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgesvxx( &fact, &trans, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, equed, r, c, b_t, &ldb_t, x_t, &ldx_t, rcond,
+ rpvgrw, berr, &n_err_bnds, err_bnds_norm_t,
+ err_bnds_comp_t, &nparams, params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, af_t, ldaf_t, af, ldaf );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgesvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgesvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgetf2.c b/LAPACKE/src/lapacke_dgetf2.c
new file mode 100644
index 00000000..77201b41
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgetf2.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgetf2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgetf2( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgetf2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dgetf2_work( matrix_layout, m, n, a, lda, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_dgetf2_work.c b/LAPACKE/src/lapacke_dgetf2_work.c
new file mode 100644
index 00000000..32b35be6
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgetf2_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgetf2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgetf2_work( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgetf2( &m, &n, a, &lda, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgetf2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgetf2( &m, &n, a_t, &lda_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgetf2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgetf2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgetrf.c b/LAPACKE/src/lapacke_dgetrf.c
new file mode 100644
index 00000000..30339945
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgetrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgetrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgetrf( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgetrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dgetrf_work( matrix_layout, m, n, a, lda, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_dgetrf_work.c b/LAPACKE/src/lapacke_dgetrf_work.c
new file mode 100644
index 00000000..57be54c9
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgetrf_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgetrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgetrf_work( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgetrf( &m, &n, a, &lda, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dgetrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgetrf( &m, &n, a_t, &lda_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgetrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgetrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgetri.c b/LAPACKE/src/lapacke_dgetri.c
new file mode 100644
index 00000000..b28633c1
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgetri.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgetri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgetri( int matrix_layout, lapack_int n, double* a,
+ lapack_int lda, const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgetri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -3;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgetri_work( matrix_layout, n, a, lda, ipiv, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgetri_work( matrix_layout, n, a, lda, ipiv, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgetri", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgetri_work.c b/LAPACKE/src/lapacke_dgetri_work.c
new file mode 100644
index 00000000..2aadec76
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgetri_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgetri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgetri_work( int matrix_layout, lapack_int n, double* a,
+ lapack_int lda, const lapack_int* ipiv,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgetri( &n, a, &lda, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -4;
+ LAPACKE_xerbla( "LAPACKE_dgetri_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgetri( &n, a, &lda_t, ipiv, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgetri( &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgetri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgetri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgetrs.c b/LAPACKE/src/lapacke_dgetrs.c
new file mode 100644
index 00000000..db201bd4
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgetrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgetrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgetrs( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const double* a, lapack_int lda,
+ const lapack_int* ipiv, double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgetrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_dgetrs_work( matrix_layout, trans, n, nrhs, a, lda, ipiv, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_dgetrs_work.c b/LAPACKE/src/lapacke_dgetrs_work.c
new file mode 100644
index 00000000..7b4fb5fc
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgetrs_work.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgetrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgetrs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const double* a,
+ lapack_int lda, const lapack_int* ipiv,
+ double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgetrs( &trans, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dgetrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dgetrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgetrs( &trans, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgetrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgetrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggbak.c b/LAPACKE/src/lapacke_dggbak.c
new file mode 100644
index 00000000..24e40e8e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggbak.c
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggbak
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggbak( int matrix_layout, char job, char side, lapack_int n,
+ lapack_int ilo, lapack_int ihi, const double* lscale,
+ const double* rscale, lapack_int m, double* v,
+ lapack_int ldv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dggbak", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, lscale, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( n, rscale, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, m, v, ldv ) ) {
+ return -10;
+ }
+#endif
+ return LAPACKE_dggbak_work( matrix_layout, job, side, n, ilo, ihi, lscale,
+ rscale, m, v, ldv );
+}
diff --git a/LAPACKE/src/lapacke_dggbak_work.c b/LAPACKE/src/lapacke_dggbak_work.c
new file mode 100644
index 00000000..6f3395c2
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggbak_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggbak
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggbak_work( int matrix_layout, char job, char side,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ const double* lscale, const double* rscale,
+ lapack_int m, double* v, lapack_int ldv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggbak( &job, &side, &n, &ilo, &ihi, lscale, rscale, &m, v, &ldv,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldv_t = MAX(1,n);
+ double* v_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldv < m ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dggbak_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (double*)LAPACKE_malloc( sizeof(double) * ldv_t * MAX(1,m) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, m, v, ldv, v_t, ldv_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggbak( &job, &side, &n, &ilo, &ihi, lscale, rscale, &m, v_t,
+ &ldv_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, m, v_t, ldv_t, v, ldv );
+ /* Release memory and exit */
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggbak_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dggbak_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggbal.c b/LAPACKE/src/lapacke_dggbal.c
new file mode 100644
index 00000000..9b9cf530
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggbal.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggbal
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggbal( int matrix_layout, char job, lapack_int n, double* a,
+ lapack_int lda, double* b, lapack_int ldb,
+ lapack_int* ilo, lapack_int* ihi, double* lscale,
+ double* rscale )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lwork;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dggbal", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ }
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -6;
+ }
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( job, 's' ) || LAPACKE_lsame( job, 'b' ) ) {
+ lwork = MAX(1,6*n);
+ } else {
+ lwork = 1;
+ }
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dggbal_work( matrix_layout, job, n, a, lda, b, ldb, ilo, ihi,
+ lscale, rscale, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggbal", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggbal_work.c b/LAPACKE/src/lapacke_dggbal_work.c
new file mode 100644
index 00000000..c4196c91
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggbal_work.c
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggbal
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggbal_work( int matrix_layout, char job, lapack_int n,
+ double* a, lapack_int lda, double* b,
+ lapack_int ldb, lapack_int* ilo,
+ lapack_int* ihi, double* lscale, double* rscale,
+ double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggbal( &job, &n, a, &lda, b, &ldb, ilo, ihi, lscale, rscale,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dggbal_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dggbal_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ }
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggbal( &job, &n, a_t, &lda_t, b_t, &ldb_t, ilo, ihi, lscale,
+ rscale, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_free( b_t );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_free( a_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggbal_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dggbal_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgges.c b/LAPACKE/src/lapacke_dgges.c
new file mode 100644
index 00000000..2add8447
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgges.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgges
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgges( int matrix_layout, char jobvsl, char jobvsr, char sort,
+ LAPACK_D_SELECT3 selctg, lapack_int n, double* a,
+ lapack_int lda, double* b, lapack_int ldb,
+ lapack_int* sdim, double* alphar, double* alphai,
+ double* beta, double* vsl, lapack_int ldvsl,
+ double* vsr, lapack_int ldvsr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgges", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgges_work( matrix_layout, jobvsl, jobvsr, sort, selctg, n, a,
+ lda, b, ldb, sdim, alphar, alphai, beta, vsl,
+ ldvsl, vsr, ldvsr, &work_query, lwork, bwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_dgges_work( matrix_layout, jobvsl, jobvsr, sort, selctg, n, a,
+ lda, b, ldb, sdim, alphar, alphai, beta, vsl,
+ ldvsl, vsr, ldvsr, work, lwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgges", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgges_work.c b/LAPACKE/src/lapacke_dgges_work.c
new file mode 100644
index 00000000..ea465998
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgges_work.c
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgges
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgges_work( int matrix_layout, char jobvsl, char jobvsr,
+ char sort, LAPACK_D_SELECT3 selctg, lapack_int n,
+ double* a, lapack_int lda, double* b,
+ lapack_int ldb, lapack_int* sdim, double* alphar,
+ double* alphai, double* beta, double* vsl,
+ lapack_int ldvsl, double* vsr, lapack_int ldvsr,
+ double* work, lapack_int lwork,
+ lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgges( &jobvsl, &jobvsr, &sort, selctg, &n, a, &lda, b, &ldb,
+ sdim, alphar, alphai, beta, vsl, &ldvsl, vsr, &ldvsr,
+ work, &lwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvsl_t = MAX(1,n);
+ lapack_int ldvsr_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* vsl_t = NULL;
+ double* vsr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dgges_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dgges_work", info );
+ return info;
+ }
+ if( ldvsl < n ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_dgges_work", info );
+ return info;
+ }
+ if( ldvsr < n ) {
+ info = -18;
+ LAPACKE_xerbla( "LAPACKE_dgges_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgges( &jobvsl, &jobvsr, &sort, selctg, &n, a, &lda_t, b,
+ &ldb_t, sdim, alphar, alphai, beta, vsl, &ldvsl_t,
+ vsr, &ldvsr_t, work, &lwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ vsl_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvsl_t * MAX(1,n) );
+ if( vsl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ vsr_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvsr_t * MAX(1,n) );
+ if( vsr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgges( &jobvsl, &jobvsr, &sort, selctg, &n, a_t, &lda_t, b_t,
+ &ldb_t, sdim, alphar, alphai, beta, vsl_t, &ldvsl_t,
+ vsr_t, &ldvsr_t, work, &lwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, vsl_t, ldvsl_t, vsl,
+ ldvsl );
+ }
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, vsr_t, ldvsr_t, vsr,
+ ldvsr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ LAPACKE_free( vsr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ LAPACKE_free( vsl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgges_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgges_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggesx.c b/LAPACKE/src/lapacke_dggesx.c
new file mode 100644
index 00000000..54cf9738
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggesx.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggesx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggesx( int matrix_layout, char jobvsl, char jobvsr,
+ char sort, LAPACK_D_SELECT3 selctg, char sense,
+ lapack_int n, double* a, lapack_int lda, double* b,
+ lapack_int ldb, lapack_int* sdim, double* alphar,
+ double* alphai, double* beta, double* vsl,
+ lapack_int ldvsl, double* vsr, lapack_int ldvsr,
+ double* rconde, double* rcondv )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ lapack_int iwork_query;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dggesx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dggesx_work( matrix_layout, jobvsl, jobvsr, sort, selctg,
+ sense, n, a, lda, b, ldb, sdim, alphar, alphai,
+ beta, vsl, ldvsl, vsr, ldvsr, rconde, rcondv,
+ &work_query, lwork, &iwork_query, liwork,
+ bwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ liwork = (lapack_int)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_1;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dggesx_work( matrix_layout, jobvsl, jobvsr, sort, selctg,
+ sense, n, a, lda, b, ldb, sdim, alphar, alphai,
+ beta, vsl, ldvsl, vsr, ldvsr, rconde, rcondv,
+ work, lwork, iwork, liwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( iwork );
+exit_level_1:
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggesx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggesx_work.c b/LAPACKE/src/lapacke_dggesx_work.c
new file mode 100644
index 00000000..3a9d247c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggesx_work.c
@@ -0,0 +1,165 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggesx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggesx_work( int matrix_layout, char jobvsl, char jobvsr,
+ char sort, LAPACK_D_SELECT3 selctg, char sense,
+ lapack_int n, double* a, lapack_int lda,
+ double* b, lapack_int ldb, lapack_int* sdim,
+ double* alphar, double* alphai, double* beta,
+ double* vsl, lapack_int ldvsl, double* vsr,
+ lapack_int ldvsr, double* rconde,
+ double* rcondv, double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork,
+ lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggesx( &jobvsl, &jobvsr, &sort, selctg, &sense, &n, a, &lda, b,
+ &ldb, sdim, alphar, alphai, beta, vsl, &ldvsl, vsr,
+ &ldvsr, rconde, rcondv, work, &lwork, iwork, &liwork,
+ bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvsl_t = MAX(1,n);
+ lapack_int ldvsr_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* vsl_t = NULL;
+ double* vsr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dggesx_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dggesx_work", info );
+ return info;
+ }
+ if( ldvsl < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_dggesx_work", info );
+ return info;
+ }
+ if( ldvsr < n ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_dggesx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_dggesx( &jobvsl, &jobvsr, &sort, selctg, &sense, &n, a,
+ &lda_t, b, &ldb_t, sdim, alphar, alphai, beta, vsl,
+ &ldvsl_t, vsr, &ldvsr_t, rconde, rcondv, work,
+ &lwork, iwork, &liwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ vsl_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvsl_t * MAX(1,n) );
+ if( vsl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ vsr_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvsr_t * MAX(1,n) );
+ if( vsr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggesx( &jobvsl, &jobvsr, &sort, selctg, &sense, &n, a_t, &lda_t,
+ b_t, &ldb_t, sdim, alphar, alphai, beta, vsl_t, &ldvsl_t,
+ vsr_t, &ldvsr_t, rconde, rcondv, work, &lwork, iwork,
+ &liwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, vsl_t, ldvsl_t, vsl,
+ ldvsl );
+ }
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, vsr_t, ldvsr_t, vsr,
+ ldvsr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ LAPACKE_free( vsr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ LAPACKE_free( vsl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggesx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dggesx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggev.c b/LAPACKE/src/lapacke_dggev.c
new file mode 100644
index 00000000..7fb24382
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggev.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggev( int matrix_layout, char jobvl, char jobvr,
+ lapack_int n, double* a, lapack_int lda, double* b,
+ lapack_int ldb, double* alphar, double* alphai,
+ double* beta, double* vl, lapack_int ldvl, double* vr,
+ lapack_int ldvr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dggev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dggev_work( matrix_layout, jobvl, jobvr, n, a, lda, b, ldb,
+ alphar, alphai, beta, vl, ldvl, vr, ldvr,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dggev_work( matrix_layout, jobvl, jobvr, n, a, lda, b, ldb,
+ alphar, alphai, beta, vl, ldvl, vr, ldvr, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggev_work.c b/LAPACKE/src/lapacke_dggev_work.c
new file mode 100644
index 00000000..3e268790
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggev_work.c
@@ -0,0 +1,161 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggev_work( int matrix_layout, char jobvl, char jobvr,
+ lapack_int n, double* a, lapack_int lda,
+ double* b, lapack_int ldb, double* alphar,
+ double* alphai, double* beta, double* vl,
+ lapack_int ldvl, double* vr, lapack_int ldvr,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggev( &jobvl, &jobvr, &n, a, &lda, b, &ldb, alphar, alphai,
+ beta, vl, &ldvl, vr, &ldvr, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_vl = LAPACKE_lsame( jobvl, 'v' ) ? n : 1;
+ lapack_int ncols_vl = LAPACKE_lsame( jobvl, 'v' ) ? n : 1;
+ lapack_int nrows_vr = LAPACKE_lsame( jobvr, 'v' ) ? n : 1;
+ lapack_int ncols_vr = LAPACKE_lsame( jobvr, 'v' ) ? n : 1;
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,nrows_vl);
+ lapack_int ldvr_t = MAX(1,nrows_vr);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* vl_t = NULL;
+ double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dggev_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dggev_work", info );
+ return info;
+ }
+ if( ldvl < ncols_vl ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dggev_work", info );
+ return info;
+ }
+ if( ldvr < ncols_vr ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dggev_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dggev( &jobvl, &jobvr, &n, a, &lda_t, b, &ldb_t, alphar,
+ alphai, beta, vl, &ldvl_t, vr, &ldvr_t, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ vl_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvl_t * MAX(1,ncols_vl) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ vr_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvr_t * MAX(1,ncols_vr) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggev( &jobvl, &jobvr, &n, a_t, &lda_t, b_t, &ldb_t, alphar,
+ alphai, beta, vl_t, &ldvl_t, vr_t, &ldvr_t, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_vl, ncols_vl, vl_t,
+ ldvl_t, vl, ldvl );
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_vr, ncols_vr, vr_t,
+ ldvr_t, vr, ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dggev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggevx.c b/LAPACKE/src/lapacke_dggevx.c
new file mode 100644
index 00000000..3ec98cc6
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggevx.c
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggevx( int matrix_layout, char balanc, char jobvl,
+ char jobvr, char sense, lapack_int n, double* a,
+ lapack_int lda, double* b, lapack_int ldb,
+ double* alphar, double* alphai, double* beta,
+ double* vl, lapack_int ldvl, double* vr,
+ lapack_int ldvr, lapack_int* ilo, lapack_int* ihi,
+ double* lscale, double* rscale, double* abnrm,
+ double* bbnrm, double* rconde, double* rcondv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dggevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'e' ) ||
+ LAPACKE_lsame( sense, 'v' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'n' ) ||
+ LAPACKE_lsame( sense, 'v' ) ) {
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n+6) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dggevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
+ lda, b, ldb, alphar, alphai, beta, vl, ldvl, vr,
+ ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm,
+ rconde, rcondv, &work_query, lwork, iwork,
+ bwork );
+ if( info != 0 ) {
+ goto exit_level_2;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dggevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
+ lda, b, ldb, alphar, alphai, beta, vl, ldvl, vr,
+ ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm,
+ rconde, rcondv, work, lwork, iwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'n' ) ||
+ LAPACKE_lsame( sense, 'v' ) ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'e' ) ||
+ LAPACKE_lsame( sense, 'v' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggevx_work.c b/LAPACKE/src/lapacke_dggevx_work.c
new file mode 100644
index 00000000..446721c3
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggevx_work.c
@@ -0,0 +1,163 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggevx_work( int matrix_layout, char balanc, char jobvl,
+ char jobvr, char sense, lapack_int n, double* a,
+ lapack_int lda, double* b, lapack_int ldb,
+ double* alphar, double* alphai, double* beta,
+ double* vl, lapack_int ldvl, double* vr,
+ lapack_int ldvr, lapack_int* ilo,
+ lapack_int* ihi, double* lscale, double* rscale,
+ double* abnrm, double* bbnrm, double* rconde,
+ double* rcondv, double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggevx( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda, b, &ldb,
+ alphar, alphai, beta, vl, &ldvl, vr, &ldvr, ilo, ihi,
+ lscale, rscale, abnrm, bbnrm, rconde, rcondv, work,
+ &lwork, iwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* vl_t = NULL;
+ double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dggevx_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dggevx_work", info );
+ return info;
+ }
+ if( ldvl < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dggevx_work", info );
+ return info;
+ }
+ if( ldvr < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_dggevx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dggevx( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda_t, b,
+ &ldb_t, alphar, alphai, beta, vl, &ldvl_t, vr,
+ &ldvr_t, ilo, ihi, lscale, rscale, abnrm, bbnrm,
+ rconde, rcondv, work, &lwork, iwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ vl_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvl_t * MAX(1,n) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ vr_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvr_t * MAX(1,n) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggevx( &balanc, &jobvl, &jobvr, &sense, &n, a_t, &lda_t, b_t,
+ &ldb_t, alphar, alphai, beta, vl_t, &ldvl_t, vr_t,
+ &ldvr_t, ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde,
+ rcondv, work, &lwork, iwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, vl_t, ldvl_t, vl, ldvl );
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, vr_t, ldvr_t, vr, ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dggevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggglm.c b/LAPACKE/src/lapacke_dggglm.c
new file mode 100644
index 00000000..cf35decc
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggglm.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggglm
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggglm( int matrix_layout, lapack_int n, lapack_int m,
+ lapack_int p, double* a, lapack_int lda, double* b,
+ lapack_int ldb, double* d, double* x, double* y )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dggglm", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, m, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, p, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dggglm_work( matrix_layout, n, m, p, a, lda, b, ldb, d, x, y,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dggglm_work( matrix_layout, n, m, p, a, lda, b, ldb, d, x, y,
+ work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggglm", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggglm_work.c b/LAPACKE/src/lapacke_dggglm_work.c
new file mode 100644
index 00000000..0fc0e0dd
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggglm_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggglm
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggglm_work( int matrix_layout, lapack_int n, lapack_int m,
+ lapack_int p, double* a, lapack_int lda,
+ double* b, lapack_int ldb, double* d, double* x,
+ double* y, double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggglm( &n, &m, &p, a, &lda, b, &ldb, d, x, y, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dggglm_work", info );
+ return info;
+ }
+ if( ldb < p ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dggglm_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dggglm( &n, &m, &p, a, &lda_t, b, &ldb_t, d, x, y, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,p) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, m, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, p, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggglm( &n, &m, &p, a_t, &lda_t, b_t, &ldb_t, d, x, y, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, m, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, p, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggglm_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dggglm_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgghrd.c b/LAPACKE/src/lapacke_dgghrd.c
new file mode 100644
index 00000000..0cffd282
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgghrd.c
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgghrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgghrd( int matrix_layout, char compq, char compz,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ double* a, lapack_int lda, double* b, lapack_int ldb,
+ double* q, lapack_int ldq, double* z,
+ lapack_int ldz )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgghrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -13;
+ }
+ }
+#endif
+ return LAPACKE_dgghrd_work( matrix_layout, compq, compz, n, ilo, ihi, a, lda,
+ b, ldb, q, ldq, z, ldz );
+}
diff --git a/LAPACKE/src/lapacke_dgghrd_work.c b/LAPACKE/src/lapacke_dgghrd_work.c
new file mode 100644
index 00000000..037b647f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgghrd_work.c
@@ -0,0 +1,150 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgghrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgghrd_work( int matrix_layout, char compq, char compz,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ double* a, lapack_int lda, double* b,
+ lapack_int ldb, double* q, lapack_int ldq,
+ double* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgghrd( &compq, &compz, &n, &ilo, &ihi, a, &lda, b, &ldb, q,
+ &ldq, z, &ldz, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* q_t = NULL;
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dgghrd_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dgghrd_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dgghrd_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_dgghrd_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ q_t = (double*)LAPACKE_malloc( sizeof(double) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgghrd( &compq, &compz, &n, &ilo, &ihi, a_t, &lda_t, b_t, &ldb_t,
+ q_t, &ldq_t, z_t, &ldz_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgghrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgghrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgglse.c b/LAPACKE/src/lapacke_dgglse.c
new file mode 100644
index 00000000..ceb540eb
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgglse.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgglse
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgglse( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int p, double* a, lapack_int lda, double* b,
+ lapack_int ldb, double* c, double* d, double* x )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgglse", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( m, c, 1 ) ) {
+ return -9;
+ }
+ if( LAPACKE_d_nancheck( p, d, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dgglse_work( matrix_layout, m, n, p, a, lda, b, ldb, c, d, x,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgglse_work( matrix_layout, m, n, p, a, lda, b, ldb, c, d, x,
+ work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgglse", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgglse_work.c b/LAPACKE/src/lapacke_dgglse_work.c
new file mode 100644
index 00000000..97294663
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgglse_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgglse
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgglse_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int p, double* a, lapack_int lda,
+ double* b, lapack_int ldb, double* c, double* d,
+ double* x, double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgglse( &m, &n, &p, a, &lda, b, &ldb, c, d, x, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dgglse_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dgglse_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dgglse( &m, &n, &p, a, &lda_t, b, &ldb_t, c, d, x, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgglse( &m, &n, &p, a_t, &lda_t, b_t, &ldb_t, c, d, x, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgglse_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgglse_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggqrf.c b/LAPACKE/src/lapacke_dggqrf.c
new file mode 100644
index 00000000..46bb0c66
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggqrf.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggqrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggqrf( int matrix_layout, lapack_int n, lapack_int m,
+ lapack_int p, double* a, lapack_int lda,
+ double* taua, double* b, lapack_int ldb,
+ double* taub )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dggqrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, m, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, p, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dggqrf_work( matrix_layout, n, m, p, a, lda, taua, b, ldb,
+ taub, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dggqrf_work( matrix_layout, n, m, p, a, lda, taua, b, ldb,
+ taub, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggqrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggqrf_work.c b/LAPACKE/src/lapacke_dggqrf_work.c
new file mode 100644
index 00000000..214ec355
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggqrf_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggqrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggqrf_work( int matrix_layout, lapack_int n, lapack_int m,
+ lapack_int p, double* a, lapack_int lda,
+ double* taua, double* b, lapack_int ldb,
+ double* taub, double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggqrf( &n, &m, &p, a, &lda, taua, b, &ldb, taub, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dggqrf_work", info );
+ return info;
+ }
+ if( ldb < p ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dggqrf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dggqrf( &n, &m, &p, a, &lda_t, taua, b, &ldb_t, taub, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,p) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, m, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, p, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggqrf( &n, &m, &p, a_t, &lda_t, taua, b_t, &ldb_t, taub, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, m, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, p, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggqrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dggqrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggrqf.c b/LAPACKE/src/lapacke_dggrqf.c
new file mode 100644
index 00000000..16a4623f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggrqf.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggrqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggrqf( int matrix_layout, lapack_int m, lapack_int p,
+ lapack_int n, double* a, lapack_int lda,
+ double* taua, double* b, lapack_int ldb,
+ double* taub )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dggrqf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dggrqf_work( matrix_layout, m, p, n, a, lda, taua, b, ldb,
+ taub, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dggrqf_work( matrix_layout, m, p, n, a, lda, taua, b, ldb,
+ taub, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggrqf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggrqf_work.c b/LAPACKE/src/lapacke_dggrqf_work.c
new file mode 100644
index 00000000..a3ff4b99
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggrqf_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggrqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggrqf_work( int matrix_layout, lapack_int m, lapack_int p,
+ lapack_int n, double* a, lapack_int lda,
+ double* taua, double* b, lapack_int ldb,
+ double* taub, double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggrqf( &m, &p, &n, a, &lda, taua, b, &ldb, taub, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dggrqf_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dggrqf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dggrqf( &m, &p, &n, a, &lda_t, taua, b, &ldb_t, taub, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggrqf( &m, &p, &n, a_t, &lda_t, taua, b_t, &ldb_t, taub, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggrqf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dggrqf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggsvd.c b/LAPACKE/src/lapacke_dggsvd.c
new file mode 100644
index 00000000..36af84db
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggsvd.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggsvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggsvd( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int n, lapack_int p,
+ lapack_int* k, lapack_int* l, double* a,
+ lapack_int lda, double* b, lapack_int ldb,
+ double* alpha, double* beta, double* u,
+ lapack_int ldu, double* v, lapack_int ldv, double* q,
+ lapack_int ldq, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dggsvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -10;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,MAX3(3*n,m,p)+n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dggsvd_work( matrix_layout, jobu, jobv, jobq, m, n, p, k, l,
+ a, lda, b, ldb, alpha, beta, u, ldu, v, ldv, q,
+ ldq, work, iwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggsvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggsvd_work.c b/LAPACKE/src/lapacke_dggsvd_work.c
new file mode 100644
index 00000000..5bf02ffc
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggsvd_work.c
@@ -0,0 +1,170 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggsvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggsvd_work( int matrix_layout, char jobu, char jobv,
+ char jobq, lapack_int m, lapack_int n,
+ lapack_int p, lapack_int* k, lapack_int* l,
+ double* a, lapack_int lda, double* b,
+ lapack_int ldb, double* alpha, double* beta,
+ double* u, lapack_int ldu, double* v,
+ lapack_int ldv, double* q, lapack_int ldq,
+ double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggsvd( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a, &lda, b, &ldb,
+ alpha, beta, u, &ldu, v, &ldv, q, &ldq, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldu_t = MAX(1,m);
+ lapack_int ldv_t = MAX(1,p);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* u_t = NULL;
+ double* v_t = NULL;
+ double* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dggsvd_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dggsvd_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -21;
+ LAPACKE_xerbla( "LAPACKE_dggsvd_work", info );
+ return info;
+ }
+ if( ldu < m ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_dggsvd_work", info );
+ return info;
+ }
+ if( ldv < p ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_dggsvd_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ u_t = (double*)LAPACKE_malloc( sizeof(double) * ldu_t * MAX(1,m) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ v_t = (double*)LAPACKE_malloc( sizeof(double) * ldv_t * MAX(1,p) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ q_t = (double*)LAPACKE_malloc( sizeof(double) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggsvd( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a_t, &lda_t, b_t,
+ &ldb_t, alpha, beta, u_t, &ldu_t, v_t, &ldv_t, q_t,
+ &ldq_t, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, p, p, v_t, ldv_t, v, ldv );
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_4:
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_free( v_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggsvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dggsvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggsvp.c b/LAPACKE/src/lapacke_dggsvp.c
new file mode 100644
index 00000000..1cbbe681
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggsvp.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggsvp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggsvp( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int p, lapack_int n, double* a,
+ lapack_int lda, double* b, lapack_int ldb,
+ double tola, double tolb, lapack_int* k,
+ lapack_int* l, double* u, lapack_int ldu, double* v,
+ lapack_int ldv, double* q, lapack_int ldq )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* tau = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dggsvp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_d_nancheck( 1, &tola, 1 ) ) {
+ return -12;
+ }
+ if( LAPACKE_d_nancheck( 1, &tolb, 1 ) ) {
+ return -13;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ tau = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( tau == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,MAX3(3*n,m,p)) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dggsvp_work( matrix_layout, jobu, jobv, jobq, m, p, n, a, lda,
+ b, ldb, tola, tolb, k, l, u, ldu, v, ldv, q,
+ ldq, iwork, tau, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( tau );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggsvp", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dggsvp_work.c b/LAPACKE/src/lapacke_dggsvp_work.c
new file mode 100644
index 00000000..5d75bea8
--- /dev/null
+++ b/LAPACKE/src/lapacke_dggsvp_work.c
@@ -0,0 +1,170 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dggsvp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dggsvp_work( int matrix_layout, char jobu, char jobv,
+ char jobq, lapack_int m, lapack_int p,
+ lapack_int n, double* a, lapack_int lda,
+ double* b, lapack_int ldb, double tola,
+ double tolb, lapack_int* k, lapack_int* l,
+ double* u, lapack_int ldu, double* v,
+ lapack_int ldv, double* q, lapack_int ldq,
+ lapack_int* iwork, double* tau, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggsvp( &jobu, &jobv, &jobq, &m, &p, &n, a, &lda, b, &ldb, &tola,
+ &tolb, k, l, u, &ldu, v, &ldv, q, &ldq, iwork, tau, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldu_t = MAX(1,m);
+ lapack_int ldv_t = MAX(1,p);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* u_t = NULL;
+ double* v_t = NULL;
+ double* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dggsvp_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dggsvp_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -21;
+ LAPACKE_xerbla( "LAPACKE_dggsvp_work", info );
+ return info;
+ }
+ if( ldu < m ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_dggsvp_work", info );
+ return info;
+ }
+ if( ldv < m ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_dggsvp_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ u_t = (double*)LAPACKE_malloc( sizeof(double) * ldu_t * MAX(1,m) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ v_t = (double*)LAPACKE_malloc( sizeof(double) * ldv_t * MAX(1,m) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ q_t = (double*)LAPACKE_malloc( sizeof(double) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dggsvp( &jobu, &jobv, &jobq, &m, &p, &n, a_t, &lda_t, b_t,
+ &ldb_t, &tola, &tolb, k, l, u_t, &ldu_t, v_t, &ldv_t,
+ q_t, &ldq_t, iwork, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, p, m, v_t, ldv_t, v, ldv );
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_4:
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_free( v_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dggsvp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dggsvp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgtcon.c b/LAPACKE/src/lapacke_dgtcon.c
new file mode 100644
index 00000000..b8f32965
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgtcon.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dgtcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgtcon( char norm, lapack_int n, const double* dl,
+ const double* d, const double* du, const double* du2,
+ const lapack_int* ipiv, double anorm, double* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
+ return -3;
+ }
+ if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( n-2, du2, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgtcon_work( norm, n, dl, d, du, du2, ipiv, anorm, rcond,
+ work, iwork );
+ /* 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_dgtcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgtcon_work.c b/LAPACKE/src/lapacke_dgtcon_work.c
new file mode 100644
index 00000000..d977d642
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgtcon_work.c
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dgtcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgtcon_work( char norm, lapack_int n, const double* dl,
+ const double* d, const double* du,
+ const double* du2, const lapack_int* ipiv,
+ double anorm, double* rcond, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgtcon( &norm, &n, dl, d, du, du2, ipiv, &anorm, rcond, work, iwork,
+ &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgtrfs.c b/LAPACKE/src/lapacke_dgtrfs.c
new file mode 100644
index 00000000..a82d2451
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgtrfs.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgtrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgtrfs( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const double* dl, const double* d,
+ const double* du, const double* dlf,
+ const double* df, const double* duf,
+ const double* du2, const lapack_int* ipiv,
+ const double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgtrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_d_nancheck( n, df, 1 ) ) {
+ return -9;
+ }
+ if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( n-1, dlf, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( n-2, du2, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_d_nancheck( n-1, duf, 1 ) ) {
+ return -10;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -15;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgtrfs_work( matrix_layout, trans, n, nrhs, dl, d, du, dlf,
+ df, duf, du2, ipiv, b, ldb, x, ldx, ferr, berr,
+ work, iwork );
+ /* 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_dgtrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgtrfs_work.c b/LAPACKE/src/lapacke_dgtrfs_work.c
new file mode 100644
index 00000000..a185e92a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgtrfs_work.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgtrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgtrfs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const double* dl,
+ const double* d, const double* du,
+ const double* dlf, const double* df,
+ const double* duf, const double* du2,
+ const lapack_int* ipiv, const double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* ferr, double* berr, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgtrfs( &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b,
+ &ldb, x, &ldx, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_dgtrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_dgtrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgtrfs( &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2, ipiv,
+ b_t, &ldb_t, x_t, &ldx_t, ferr, berr, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgtrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgtrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgtsv.c b/LAPACKE/src/lapacke_dgtsv.c
new file mode 100644
index 00000000..4cf3216e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgtsv.c
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgtsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgtsv( int matrix_layout, lapack_int n, lapack_int nrhs,
+ double* dl, double* d, double* du, double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgtsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_dgtsv_work( matrix_layout, n, nrhs, dl, d, du, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_dgtsv_work.c b/LAPACKE/src/lapacke_dgtsv_work.c
new file mode 100644
index 00000000..2e115c90
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgtsv_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgtsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgtsv_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ double* dl, double* d, double* du, double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgtsv( &n, &nrhs, dl, d, du, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dgtsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgtsv( &n, &nrhs, dl, d, du, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgtsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgtsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgtsvx.c b/LAPACKE/src/lapacke_dgtsvx.c
new file mode 100644
index 00000000..b3034f2d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgtsvx.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgtsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgtsvx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs, const double* dl,
+ const double* d, const double* du, double* dlf,
+ double* df, double* duf, double* du2,
+ lapack_int* ipiv, const double* b, lapack_int ldb,
+ double* x, lapack_int ldx, double* rcond,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgtsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -14;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_d_nancheck( n, df, 1 ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_d_nancheck( n-1, dlf, 1 ) ) {
+ return -9;
+ }
+ }
+ if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_d_nancheck( n-2, du2, 1 ) ) {
+ return -12;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_d_nancheck( n-1, duf, 1 ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dgtsvx_work( matrix_layout, fact, trans, n, nrhs, dl, d, du,
+ dlf, df, duf, du2, ipiv, b, ldb, x, ldx, rcond,
+ ferr, berr, work, iwork );
+ /* 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_dgtsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgtsvx_work.c b/LAPACKE/src/lapacke_dgtsvx_work.c
new file mode 100644
index 00000000..6ae72a27
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgtsvx_work.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgtsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgtsvx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs, const double* dl,
+ const double* d, const double* du, double* dlf,
+ double* df, double* duf, double* du2,
+ lapack_int* ipiv, const double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr,
+ double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgtsvx( &fact, &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2,
+ ipiv, b, &ldb, x, &ldx, rcond, ferr, berr, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dgtsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_dgtsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgtsvx( &fact, &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2,
+ ipiv, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr, berr, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgtsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgtsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgttrf.c b/LAPACKE/src/lapacke_dgttrf.c
new file mode 100644
index 00000000..056b8cd8
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgttrf.c
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dgttrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgttrf( lapack_int n, double* dl, double* d, double* du,
+ double* du2, lapack_int* ipiv )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -3;
+ }
+ if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
+ return -2;
+ }
+ if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dgttrf_work( n, dl, d, du, du2, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_dgttrf_work.c b/LAPACKE/src/lapacke_dgttrf_work.c
new file mode 100644
index 00000000..5daa1cfe
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgttrf_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dgttrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgttrf_work( lapack_int n, double* dl, double* d, double* du,
+ double* du2, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgttrf( &n, dl, d, du, du2, ipiv, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dgttrs.c b/LAPACKE/src/lapacke_dgttrs.c
new file mode 100644
index 00000000..f6321ad0
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgttrs.c
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgttrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgttrs( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const double* dl, const double* d,
+ const double* du, const double* du2,
+ const lapack_int* ipiv, double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dgttrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( n-2, du2, 1 ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_dgttrs_work( matrix_layout, trans, n, nrhs, dl, d, du, du2,
+ ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_dgttrs_work.c b/LAPACKE/src/lapacke_dgttrs_work.c
new file mode 100644
index 00000000..285a07ac
--- /dev/null
+++ b/LAPACKE/src/lapacke_dgttrs_work.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dgttrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dgttrs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const double* dl,
+ const double* d, const double* du,
+ const double* du2, const lapack_int* ipiv,
+ double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgttrs( &trans, &n, &nrhs, dl, d, du, du2, ipiv, b, &ldb,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dgttrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dgttrs( &trans, &n, &nrhs, dl, d, du, du2, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dgttrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dgttrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dhgeqz.c b/LAPACKE/src/lapacke_dhgeqz.c
new file mode 100644
index 00000000..e702f0f9
--- /dev/null
+++ b/LAPACKE/src/lapacke_dhgeqz.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dhgeqz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dhgeqz( int matrix_layout, char job, char compq, char compz,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ double* h, lapack_int ldh, double* t, lapack_int ldt,
+ double* alphar, double* alphai, double* beta,
+ double* q, lapack_int ldq, double* z,
+ lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dhgeqz", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -15;
+ }
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -17;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dhgeqz_work( matrix_layout, job, compq, compz, n, ilo, ihi, h,
+ ldh, t, ldt, alphar, alphai, beta, q, ldq, z,
+ ldz, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dhgeqz_work( matrix_layout, job, compq, compz, n, ilo, ihi, h,
+ ldh, t, ldt, alphar, alphai, beta, q, ldq, z,
+ ldz, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dhgeqz", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dhgeqz_work.c b/LAPACKE/src/lapacke_dhgeqz_work.c
new file mode 100644
index 00000000..612d45ac
--- /dev/null
+++ b/LAPACKE/src/lapacke_dhgeqz_work.c
@@ -0,0 +1,161 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dhgeqz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dhgeqz_work( int matrix_layout, char job, char compq,
+ char compz, lapack_int n, lapack_int ilo,
+ lapack_int ihi, double* h, lapack_int ldh,
+ double* t, lapack_int ldt, double* alphar,
+ double* alphai, double* beta, double* q,
+ lapack_int ldq, double* z, lapack_int ldz,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dhgeqz( &job, &compq, &compz, &n, &ilo, &ihi, h, &ldh, t, &ldt,
+ alphar, alphai, beta, q, &ldq, z, &ldz, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldh_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldt_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ double* h_t = NULL;
+ double* t_t = NULL;
+ double* q_t = NULL;
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldh < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dhgeqz_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_dhgeqz_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dhgeqz_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -18;
+ LAPACKE_xerbla( "LAPACKE_dhgeqz_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dhgeqz( &job, &compq, &compz, &n, &ilo, &ihi, h, &ldh_t, t,
+ &ldt_t, alphar, alphai, beta, q, &ldq_t, z, &ldz_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ h_t = (double*)LAPACKE_malloc( sizeof(double) * ldh_t * MAX(1,n) );
+ if( h_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (double*)LAPACKE_malloc( sizeof(double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ q_t = (double*)LAPACKE_malloc( sizeof(double) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, h, ldh, h_t, ldh_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dhgeqz( &job, &compq, &compz, &n, &ilo, &ihi, h_t, &ldh_t, t_t,
+ &ldt_t, alphar, alphai, beta, q_t, &ldq_t, z_t, &ldz_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, h_t, ldh_t, h, ldh );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( h_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dhgeqz_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dhgeqz_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dhsein.c b/LAPACKE/src/lapacke_dhsein.c
new file mode 100644
index 00000000..e929691f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dhsein.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dhsein
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dhsein( int matrix_layout, char job, char eigsrc, char initv,
+ lapack_logical* select, lapack_int n,
+ const double* h, lapack_int ldh, double* wr,
+ const double* wi, double* vl, lapack_int ldvl,
+ double* vr, lapack_int ldvr, lapack_int mm,
+ lapack_int* m, lapack_int* ifaill,
+ lapack_int* ifailr )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dhsein", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -13;
+ }
+ }
+ if( LAPACKE_d_nancheck( n, wi, 1 ) ) {
+ return -10;
+ }
+ if( LAPACKE_d_nancheck( n, wr, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) * MAX(1,n+2) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dhsein_work( matrix_layout, job, eigsrc, initv, select, n, h,
+ ldh, wr, wi, vl, ldvl, vr, ldvr, mm, m, work,
+ ifaill, ifailr );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dhsein", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dhsein_work.c b/LAPACKE/src/lapacke_dhsein_work.c
new file mode 100644
index 00000000..786d4636
--- /dev/null
+++ b/LAPACKE/src/lapacke_dhsein_work.c
@@ -0,0 +1,142 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dhsein
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dhsein_work( int matrix_layout, char job, char eigsrc,
+ char initv, lapack_logical* select,
+ lapack_int n, const double* h, lapack_int ldh,
+ double* wr, const double* wi, double* vl,
+ lapack_int ldvl, double* vr, lapack_int ldvr,
+ lapack_int mm, lapack_int* m, double* work,
+ lapack_int* ifaill, lapack_int* ifailr )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dhsein( &job, &eigsrc, &initv, select, &n, h, &ldh, wr, wi, vl,
+ &ldvl, vr, &ldvr, &mm, m, work, ifaill, ifailr, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldh_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ double* h_t = NULL;
+ double* vl_t = NULL;
+ double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldh < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dhsein_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dhsein_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_dhsein_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ h_t = (double*)LAPACKE_malloc( sizeof(double) * ldh_t * MAX(1,n) );
+ if( h_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+ vl_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+ vr_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, h, ldh, h_t, ldh_t );
+ if( ( LAPACKE_lsame( job, 'l' ) || LAPACKE_lsame( job, 'b' ) ) &&
+ LAPACKE_lsame( initv, 'v' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( ( LAPACKE_lsame( job, 'r' ) || LAPACKE_lsame( job, 'b' ) ) &&
+ LAPACKE_lsame( initv, 'v' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dhsein( &job, &eigsrc, &initv, select, &n, h_t, &ldh_t, wr, wi,
+ vl_t, &ldvl_t, vr_t, &ldvr_t, &mm, m, work, ifaill,
+ ifailr, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, mm, vl_t, ldvl_t, vl,
+ ldvl );
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, mm, vr_t, ldvr_t, vr,
+ ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( h_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dhsein_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dhsein_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dhseqr.c b/LAPACKE/src/lapacke_dhseqr.c
new file mode 100644
index 00000000..66fff12d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dhseqr.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dhseqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dhseqr( int matrix_layout, char job, char compz, lapack_int n,
+ lapack_int ilo, lapack_int ihi, double* h,
+ lapack_int ldh, double* wr, double* wi, double* z,
+ lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dhseqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dhseqr_work( matrix_layout, job, compz, n, ilo, ihi, h, ldh,
+ wr, wi, z, ldz, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dhseqr_work( matrix_layout, job, compz, n, ilo, ihi, h, ldh,
+ wr, wi, z, ldz, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dhseqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dhseqr_work.c b/LAPACKE/src/lapacke_dhseqr_work.c
new file mode 100644
index 00000000..3940d5ed
--- /dev/null
+++ b/LAPACKE/src/lapacke_dhseqr_work.c
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dhseqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dhseqr_work( int matrix_layout, char job, char compz,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ double* h, lapack_int ldh, double* wr,
+ double* wi, double* z, lapack_int ldz,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dhseqr( &job, &compz, &n, &ilo, &ihi, h, &ldh, wr, wi, z, &ldz,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldh_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ double* h_t = NULL;
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldh < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dhseqr_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dhseqr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dhseqr( &job, &compz, &n, &ilo, &ihi, h, &ldh_t, wr, wi, z,
+ &ldz_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ h_t = (double*)LAPACKE_malloc( sizeof(double) * ldh_t * MAX(1,n) );
+ if( h_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, h, ldh, h_t, ldh_t );
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dhseqr( &job, &compz, &n, &ilo, &ihi, h_t, &ldh_t, wr, wi, z_t,
+ &ldz_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, h_t, ldh_t, h, ldh );
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( h_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dhseqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dhseqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlacn2.c b/LAPACKE/src/lapacke_dlacn2.c
new file mode 100644
index 00000000..1ccf0a9d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlacn2.c
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ Copyright (c) 2010, Intel Corp.
+ 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 dlacn2
+* Author: Intel Corporation
+* Generated October, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlacn2( lapack_int n, double* v, double* x, lapack_int* isgn,
+ double* est, lapack_int* kase, lapack_int* isave )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, est, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( n, x, 1 ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_dlacn2_work( n, v, x, isgn, est, kase, isave );
+}
diff --git a/LAPACKE/src/lapacke_dlacn2_work.c b/LAPACKE/src/lapacke_dlacn2_work.c
new file mode 100644
index 00000000..3b015d4e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlacn2_work.c
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ Copyright (c) 2010, Intel Corp.
+ 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 dlacn2
+* Author: Intel Corporation
+* Generated October, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlacn2_work( lapack_int n, double* v, double* x,
+ lapack_int* isgn, double* est, lapack_int* kase,
+ lapack_int* isave )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlacn2( &n, v, x, isgn, est, kase, isave );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlacpy.c b/LAPACKE/src/lapacke_dlacpy.c
new file mode 100644
index 00000000..21537b27
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlacpy.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlacpy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlacpy( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, const double* a, lapack_int lda,
+ double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dlacpy", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_dlacpy_work( matrix_layout, uplo, m, n, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_dlacpy_work.c b/LAPACKE/src/lapacke_dlacpy_work.c
new file mode 100644
index 00000000..b29626ae
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlacpy_work.c
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlacpy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlacpy_work( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, const double* a, lapack_int lda,
+ double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlacpy( &uplo, &m, &n, a, &lda, b, &ldb );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,m);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dlacpy_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dlacpy_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlacpy( &uplo, &m, &n, a_t, &lda_t, b_t, &ldb_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlacpy_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dlacpy_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlag2s.c b/LAPACKE/src/lapacke_dlag2s.c
new file mode 100644
index 00000000..989952ba
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlag2s.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlag2s
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlag2s( int matrix_layout, lapack_int m, lapack_int n,
+ const double* a, lapack_int lda, float* sa,
+ lapack_int ldsa )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dlag2s", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dlag2s_work( matrix_layout, m, n, a, lda, sa, ldsa );
+}
diff --git a/LAPACKE/src/lapacke_dlag2s_work.c b/LAPACKE/src/lapacke_dlag2s_work.c
new file mode 100644
index 00000000..c1c4435d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlag2s_work.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlag2s
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlag2s_work( int matrix_layout, lapack_int m, lapack_int n,
+ const double* a, lapack_int lda, float* sa,
+ lapack_int ldsa )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlag2s( &m, &n, a, &lda, sa, &ldsa, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldsa_t = MAX(1,m);
+ double* a_t = NULL;
+ float* sa_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dlag2s_work", info );
+ return info;
+ }
+ if( ldsa < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dlag2s_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ sa_t = (float*)LAPACKE_malloc( sizeof(float) * ldsa_t * MAX(1,n) );
+ if( sa_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlag2s( &m, &n, a_t, &lda_t, sa_t, &ldsa_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, sa_t, ldsa_t, sa, ldsa );
+ /* Release memory and exit */
+ LAPACKE_free( sa_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlag2s_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dlag2s_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlagge.c b/LAPACKE/src/lapacke_dlagge.c
new file mode 100644
index 00000000..081a8460
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlagge.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlagge
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlagge( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, const double* d,
+ double* a, lapack_int lda, lapack_int* iseed )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dlagge", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( MIN(m,n), d, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,m+n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dlagge_work( matrix_layout, m, n, kl, ku, d, a, lda, iseed,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlagge", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlagge_work.c b/LAPACKE/src/lapacke_dlagge_work.c
new file mode 100644
index 00000000..97f7fa2a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlagge_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlagge
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlagge_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, const double* d,
+ double* a, lapack_int lda, lapack_int* iseed,
+ double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlagge( &m, &n, &kl, &ku, d, a, &lda, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dlagge_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlagge( &m, &n, &kl, &ku, d, a_t, &lda_t, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlagge_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dlagge_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlagsy.c b/LAPACKE/src/lapacke_dlagsy.c
new file mode 100644
index 00000000..9bb3c8f7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlagsy.c
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlagsy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlagsy( int matrix_layout, lapack_int n, lapack_int k,
+ const double* d, double* a, lapack_int lda,
+ lapack_int* iseed )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dlagsy", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dlagsy_work( matrix_layout, n, k, d, a, lda, iseed, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlagsy", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlagsy_work.c b/LAPACKE/src/lapacke_dlagsy_work.c
new file mode 100644
index 00000000..69289e8a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlagsy_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlagsy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlagsy_work( int matrix_layout, lapack_int n, lapack_int k,
+ const double* d, double* a, lapack_int lda,
+ lapack_int* iseed, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlagsy( &n, &k, d, a, &lda, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dlagsy_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlagsy( &n, &k, d, a_t, &lda_t, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlagsy_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dlagsy_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlamch.c b/LAPACKE/src/lapacke_dlamch.c
new file mode 100644
index 00000000..500e624d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlamch.c
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dlamch
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_dlamch( char cmach )
+{
+ return LAPACKE_dlamch_work( cmach );
+}
diff --git a/LAPACKE/src/lapacke_dlamch_work.c b/LAPACKE/src/lapacke_dlamch_work.c
new file mode 100644
index 00000000..d2d7f86f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlamch_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dlamch
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_dlamch_work( char cmach )
+{
+ lapack_int info = 0;
+ double res;
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_dlamch( &cmach );
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_dlange.c b/LAPACKE/src/lapacke_dlange.c
new file mode 100644
index 00000000..369c2a05
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlange.c
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlange
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_dlange( int matrix_layout, char norm, lapack_int m,
+ lapack_int n, const double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ double res = 0.;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dlange", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) ) {
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,m) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call middle-level interface */
+ res = LAPACKE_dlange_work( matrix_layout, norm, m, n, a, lda, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlange", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_dlange_work.c b/LAPACKE/src/lapacke_dlange_work.c
new file mode 100644
index 00000000..f49d5957
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlange_work.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlange
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_dlange_work( int matrix_layout, char norm, lapack_int m,
+ lapack_int n, const double* a, lapack_int lda,
+ double* work )
+{
+ lapack_int info = 0;
+ double res = 0.;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_dlange( &norm, &m, &n, a, &lda, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dlange_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_dlange( &norm, &m, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlange_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dlange_work", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_dlansy.c b/LAPACKE/src/lapacke_dlansy.c
new file mode 100644
index 00000000..48183c1c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlansy.c
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlansy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_dlansy( int matrix_layout, char norm, char uplo, lapack_int n,
+ const double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ double res = 0.;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dlansy", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call middle-level interface */
+ res = LAPACKE_dlansy_work( matrix_layout, norm, uplo, n, a, lda, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlansy", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_dlansy_work.c b/LAPACKE/src/lapacke_dlansy_work.c
new file mode 100644
index 00000000..608edf42
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlansy_work.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlansy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_dlansy_work( int matrix_layout, char norm, char uplo,
+ lapack_int n, const double* a, lapack_int lda,
+ double* work )
+{
+ lapack_int info = 0;
+ double res = 0.;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_dlansy( &norm, &uplo, &n, a, &lda, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dlansy_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_dlansy( &norm, &uplo, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlansy_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dlansy_work", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_dlantr.c b/LAPACKE/src/lapacke_dlantr.c
new file mode 100644
index 00000000..807c620b
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlantr.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlantr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_dlantr( int matrix_layout, char norm, char uplo, char diag,
+ lapack_int m, lapack_int n, const double* a,
+ lapack_int lda )
+{
+ lapack_int info = 0;
+ double res = 0.;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dlantr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dtr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,m) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call middle-level interface */
+ res = LAPACKE_dlantr_work( matrix_layout, norm, uplo, diag, m, n, a, lda,
+ work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlantr", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_dlantr_work.c b/LAPACKE/src/lapacke_dlantr_work.c
new file mode 100644
index 00000000..e390c18d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlantr_work.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlantr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_dlantr_work( int matrix_layout, char norm, char uplo,
+ char diag, lapack_int m, lapack_int n,
+ const double* a, lapack_int lda, double* work )
+{
+ lapack_int info = 0;
+ double res = 0.;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlantr( &norm, &uplo, &diag, &m, &n, a, &lda, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dlantr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dtr_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_dlantr( &norm, &uplo, &diag, &m, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlantr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dlantr_work", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_dlapmr.c b/LAPACKE/src/lapacke_dlapmr.c
new file mode 100644
index 00000000..a20461f0
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlapmr.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlapmr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlapmr( int matrix_layout, lapack_logical forwrd,
+ lapack_int m, lapack_int n, double* x,
+ lapack_int ldx, lapack_int* k )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dlapmr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, x, ldx ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_dlapmr_work( matrix_layout, forwrd, m, n, x, ldx, k );
+}
diff --git a/LAPACKE/src/lapacke_dlapmr_work.c b/LAPACKE/src/lapacke_dlapmr_work.c
new file mode 100644
index 00000000..782010d4
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlapmr_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlapmr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlapmr_work( int matrix_layout, lapack_logical forwrd,
+ lapack_int m, lapack_int n, double* x,
+ lapack_int ldx, lapack_int* k )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlapmr( &forwrd, &m, &n, x, &ldx, k );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldx_t = MAX(1,m);
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldx < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dlapmr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,n) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlapmr( &forwrd, &m, &n, x_t, &ldx_t, k );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlapmr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dlapmr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlapy2.c b/LAPACKE/src/lapacke_dlapy2.c
new file mode 100644
index 00000000..4d636bb0
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlapy2.c
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dlapy2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_dlapy2( double x, double y )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &x, 1 ) ) {
+ return -1;
+ }
+ if( LAPACKE_d_nancheck( 1, &y, 1 ) ) {
+ return -2;
+ }
+#endif
+ return LAPACKE_dlapy2_work( x, y );
+}
diff --git a/LAPACKE/src/lapacke_dlapy2_work.c b/LAPACKE/src/lapacke_dlapy2_work.c
new file mode 100644
index 00000000..61ba740b
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlapy2_work.c
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dlapy2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_dlapy2_work( double x, double y )
+{
+ double res = 0.;
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_dlapy2( &x, &y );
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_dlapy3.c b/LAPACKE/src/lapacke_dlapy3.c
new file mode 100644
index 00000000..45bbaba3
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlapy3.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dlapy3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_dlapy3( double x, double y, double z )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &x, 1 ) ) {
+ return -1;
+ }
+ if( LAPACKE_d_nancheck( 1, &y, 1 ) ) {
+ return -2;
+ }
+ if( LAPACKE_d_nancheck( 1, &z, 1 ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_dlapy3_work( x, y, z );
+}
diff --git a/LAPACKE/src/lapacke_dlapy3_work.c b/LAPACKE/src/lapacke_dlapy3_work.c
new file mode 100644
index 00000000..1bd6dd31
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlapy3_work.c
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dlapy3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_dlapy3_work( double x, double y, double z )
+{
+ double res = 0.;
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_dlapy3( &x, &y, &z );
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_dlarfb.c b/LAPACKE/src/lapacke_dlarfb.c
new file mode 100644
index 00000000..0282fe45
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlarfb.c
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlarfb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlarfb( int matrix_layout, char side, char trans, char direct,
+ char storev, lapack_int m, lapack_int n,
+ lapack_int k, const double* v, lapack_int ldv,
+ const double* t, lapack_int ldt, double* c,
+ lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int ldwork = ( side=='l')?n:(( side=='r')?m:1);
+ double* work = NULL;
+ lapack_int ncols_v, nrows_v;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dlarfb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+ ( ( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( side, 'l' ) ) ? m :
+ ( ( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( side, 'r' ) ) ? n : 1) );
+ nrows_v = ( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( side, 'l' ) ) ? m :
+ ( ( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( side, 'r' ) ) ? n :
+ ( LAPACKE_lsame( storev, 'r' ) ? k : 1) );
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -13;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, k, k, t, ldt ) ) {
+ return -11;
+ }
+ if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'f' ) ) {
+ if( LAPACKE_dtr_nancheck( matrix_layout, 'l', 'u', k, v, ldv ) )
+ return -9;
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_v-k, ncols_v, &v[k*ldv],
+ ldv ) )
+ return -9;
+ } else if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'b' ) ) {
+ if( k > nrows_v ) {
+ LAPACKE_xerbla( "LAPACKE_dlarfb", -8 );
+ return -8;
+ }
+ if( LAPACKE_dtr_nancheck( matrix_layout, 'u', 'u', k,
+ &v[(nrows_v-k)*ldv], ldv ) )
+ return -9;
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_v-k, ncols_v, v, ldv ) )
+ return -9;
+ } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
+ if( LAPACKE_dtr_nancheck( matrix_layout, 'u', 'u', k, v, ldv ) )
+ return -9;
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, ncols_v-k, &v[k],
+ ldv ) )
+ return -9;
+ } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
+ if( k > ncols_v ) {
+ LAPACKE_xerbla( "LAPACKE_dlarfb", -8 );
+ return -8;
+ }
+ if( LAPACKE_dtr_nancheck( matrix_layout, 'l', 'u', k, &v[ncols_v-k],
+ ldv ) )
+ return -9;
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, ncols_v-k, v, ldv ) )
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * ldwork * MAX(1,k) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dlarfb_work( matrix_layout, side, trans, direct, storev, m, n,
+ k, v, ldv, t, ldt, c, ldc, work, ldwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlarfb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlarfb_work.c b/LAPACKE/src/lapacke_dlarfb_work.c
new file mode 100644
index 00000000..05a02d9d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlarfb_work.c
@@ -0,0 +1,155 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlarfb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlarfb_work( int matrix_layout, char side, char trans,
+ char direct, char storev, lapack_int m,
+ lapack_int n, lapack_int k, const double* v,
+ lapack_int ldv, const double* t, lapack_int ldt,
+ double* c, lapack_int ldc, double* work,
+ lapack_int ldwork )
+{
+ lapack_int info = 0;
+ lapack_int nrows_v, ncols_v;
+ lapack_int ldc_t, ldt_t, ldv_t;
+ double *v_t = NULL, *t_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlarfb( &side, &trans, &direct, &storev, &m, &n, &k, v, &ldv, t,
+ &ldt, c, &ldc, work, &ldwork );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ nrows_v = ( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( side, 'l' ) ) ? m :
+ ( ( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( side, 'r' ) ) ? n :
+ ( LAPACKE_lsame( storev, 'r' ) ? k : 1) );
+ ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+ ( ( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( side, 'l' ) ) ? m :
+ ( ( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( side, 'r' ) ) ? n : 1) );
+ ldc_t = MAX(1,m);
+ ldt_t = MAX(1,k);
+ ldv_t = MAX(1,nrows_v);
+ /* Check leading dimension(s) */
+ if( ldc < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_dlarfb_work", info );
+ return info;
+ }
+ if( ldt < k ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dlarfb_work", info );
+ return info;
+ }
+ if( ldv < ncols_v ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dlarfb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldv_t * MAX(1,ncols_v) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (double*)LAPACKE_malloc( sizeof(double) * ldt_t * MAX(1,k) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ c_t = (double*)LAPACKE_malloc( sizeof(double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'f' ) ) {
+ LAPACKE_dtr_trans( matrix_layout, 'l', 'u', k, v, ldv, v_t, ldv_t );
+ LAPACKE_dge_trans( matrix_layout, nrows_v-k, ncols_v, &v[k*ldv], ldv,
+ &v_t[k], ldv_t );
+ } else if( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( direct, 'b' ) ) {
+ if( k > nrows_v ) {
+ LAPACKE_xerbla( "LAPACKE_dlarfb_work", -8 );
+ return -8;
+ }
+ LAPACKE_dtr_trans( matrix_layout, 'u', 'u', k, &v[(nrows_v-k)*ldv],
+ ldv, &v_t[nrows_v-k], ldv_t );
+ LAPACKE_dge_trans( matrix_layout, nrows_v-k, ncols_v, v, ldv, v_t,
+ ldv_t );
+ } else if( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( direct, 'f' ) ) {
+ LAPACKE_dtr_trans( matrix_layout, 'u', 'u', k, v, ldv, v_t, ldv_t );
+ LAPACKE_dge_trans( matrix_layout, nrows_v, ncols_v-k, &v[k], ldv,
+ &v_t[k*ldv_t], ldv_t );
+ } else if( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( direct, 'f' ) ) {
+ if( k > ncols_v ) {
+ LAPACKE_xerbla( "LAPACKE_dlarfb_work", -8 );
+ return -8;
+ }
+ LAPACKE_dtr_trans( matrix_layout, 'l', 'u', k, &v[ncols_v-k], ldv,
+ &v_t[(ncols_v-k)*ldv_t], ldv_t );
+ LAPACKE_dge_trans( matrix_layout, nrows_v, ncols_v-k, v, ldv, v_t,
+ ldv_t );
+ }
+ LAPACKE_dge_trans( matrix_layout, k, k, t, ldt, t_t, ldt_t );
+ LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlarfb( &side, &trans, &direct, &storev, &m, &n, &k, v_t, &ldv_t,
+ t_t, &ldt_t, c_t, &ldc_t, work, &ldwork );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlarfb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dlarfb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlarfg.c b/LAPACKE/src/lapacke_dlarfg.c
new file mode 100644
index 00000000..33e4b294
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlarfg.c
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dlarfg
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlarfg( lapack_int n, double* alpha, double* x,
+ lapack_int incx, double* tau )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, alpha, 1 ) ) {
+ return -2;
+ }
+ if( LAPACKE_d_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_dlarfg_work( n, alpha, x, incx, tau );
+}
diff --git a/LAPACKE/src/lapacke_dlarfg_work.c b/LAPACKE/src/lapacke_dlarfg_work.c
new file mode 100644
index 00000000..cd23c091
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlarfg_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dlarfg
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlarfg_work( lapack_int n, double* alpha, double* x,
+ lapack_int incx, double* tau )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlarfg( &n, alpha, x, &incx, tau );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlarft.c b/LAPACKE/src/lapacke_dlarft.c
new file mode 100644
index 00000000..baf6f881
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlarft.c
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlarft
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlarft( int matrix_layout, char direct, char storev,
+ lapack_int n, lapack_int k, const double* v,
+ lapack_int ldv, const double* tau, double* t,
+ lapack_int ldt )
+{
+ lapack_int ncols_v, nrows_v;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dlarft", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+ ( LAPACKE_lsame( storev, 'r' ) ? n : 1);
+ nrows_v = LAPACKE_lsame( storev, 'c' ) ? n :
+ ( LAPACKE_lsame( storev, 'r' ) ? k : 1);
+ if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_dlarft_work( matrix_layout, direct, storev, n, k, v, ldv, tau,
+ t, ldt );
+}
diff --git a/LAPACKE/src/lapacke_dlarft_work.c b/LAPACKE/src/lapacke_dlarft_work.c
new file mode 100644
index 00000000..db818d4e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlarft_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlarft
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlarft_work( int matrix_layout, char direct, char storev,
+ lapack_int n, lapack_int k, const double* v,
+ lapack_int ldv, const double* tau, double* t,
+ lapack_int ldt )
+{
+ lapack_int info = 0;
+ lapack_int nrows_v, ncols_v;
+ lapack_int ldt_t, ldv_t;
+ double *v_t = NULL, *t_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlarft( &direct, &storev, &n, &k, v, &ldv, tau, t, &ldt );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ nrows_v = LAPACKE_lsame( storev, 'c' ) ? n :
+ ( LAPACKE_lsame( storev, 'r' ) ? k : 1);
+ ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+ ( LAPACKE_lsame( storev, 'r' ) ? n : 1);
+ ldt_t = MAX(1,k);
+ ldv_t = MAX(1,nrows_v);
+ /* Check leading dimension(s) */
+ if( ldt < k ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dlarft_work", info );
+ return info;
+ }
+ if( ldv < ncols_v ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dlarft_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldv_t * MAX(1,ncols_v) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (double*)LAPACKE_malloc( sizeof(double) * ldt_t * MAX(1,k) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, nrows_v, ncols_v, v, ldv, v_t, ldv_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlarft( &direct, &storev, &n, &k, v_t, &ldv_t, tau, t_t,
+ &ldt_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, k, k, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlarft_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dlarft_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlarfx.c b/LAPACKE/src/lapacke_dlarfx.c
new file mode 100644
index 00000000..ee94cc33
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlarfx.c
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlarfx
+* Author: Intel Corporation
+* Generated April, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlarfx( int matrix_layout, char side, lapack_int m,
+ lapack_int n, const double* v, double tau, double* c,
+ lapack_int ldc, double* work )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dlarfx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &tau, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_d_nancheck( m, v, 1 ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_dlarfx_work( matrix_layout, side, m, n, v, tau, c, ldc,
+ work );
+}
diff --git a/LAPACKE/src/lapacke_dlarfx_work.c b/LAPACKE/src/lapacke_dlarfx_work.c
new file mode 100644
index 00000000..c94c9254
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlarfx_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlarfx
+* Author: Intel Corporation
+* Generated April, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlarfx_work( int matrix_layout, char side, lapack_int m,
+ lapack_int n, const double* v, double tau,
+ double* c, lapack_int ldc, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlarfx( &side, &m, &n, v, &tau, c, &ldc, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldc_t = MAX(1,m);
+ double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldc < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dlarfx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ c_t = (double*)LAPACKE_malloc( sizeof(double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlarfx( &side, &m, &n, v, &tau, c_t, &ldc_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlarfx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dlarfx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlarnv.c b/LAPACKE/src/lapacke_dlarnv.c
new file mode 100644
index 00000000..8d825463
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlarnv.c
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dlarnv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlarnv( lapack_int idist, lapack_int* iseed, lapack_int n,
+ double* x )
+{
+ return LAPACKE_dlarnv_work( idist, iseed, n, x );
+}
diff --git a/LAPACKE/src/lapacke_dlarnv_work.c b/LAPACKE/src/lapacke_dlarnv_work.c
new file mode 100644
index 00000000..fcb649cb
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlarnv_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dlarnv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlarnv_work( lapack_int idist, lapack_int* iseed,
+ lapack_int n, double* x )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlarnv( &idist, iseed, &n, x );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlartgp.c b/LAPACKE/src/lapacke_dlartgp.c
new file mode 100644
index 00000000..2613305d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlartgp.c
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dlartgp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlartgp( double f, double g, double* cs, double* sn,
+ double* r )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &f, 1 ) ) {
+ return -1;
+ }
+ if( LAPACKE_d_nancheck( 1, &g, 1 ) ) {
+ return -2;
+ }
+#endif
+ return LAPACKE_dlartgp_work( f, g, cs, sn, r );
+}
diff --git a/LAPACKE/src/lapacke_dlartgp_work.c b/LAPACKE/src/lapacke_dlartgp_work.c
new file mode 100644
index 00000000..d66913a9
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlartgp_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dlartgp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlartgp_work( double f, double g, double* cs, double* sn,
+ double* r )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlartgp( &f, &g, cs, sn, r );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlartgs.c b/LAPACKE/src/lapacke_dlartgs.c
new file mode 100644
index 00000000..2c0c0315
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlartgs.c
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dlartgs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlartgs( double x, double y, double sigma, double* cs,
+ double* sn )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &sigma, 1 ) ) {
+ return -3;
+ }
+ if( LAPACKE_d_nancheck( 1, &x, 1 ) ) {
+ return -1;
+ }
+ if( LAPACKE_d_nancheck( 1, &y, 1 ) ) {
+ return -2;
+ }
+#endif
+ return LAPACKE_dlartgs_work( x, y, sigma, cs, sn );
+}
diff --git a/LAPACKE/src/lapacke_dlartgs_work.c b/LAPACKE/src/lapacke_dlartgs_work.c
new file mode 100644
index 00000000..16ded77e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlartgs_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dlartgs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlartgs_work( double x, double y, double sigma, double* cs,
+ double* sn )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlartgs( &x, &y, &sigma, cs, sn );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlaset.c b/LAPACKE/src/lapacke_dlaset.c
new file mode 100644
index 00000000..0003f3d7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlaset.c
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlaset
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlaset( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, double alpha, double beta, double* a,
+ lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dlaset", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &alpha, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( 1, &beta, 1 ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_dlaset_work( matrix_layout, uplo, m, n, alpha, beta, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_dlaset_work.c b/LAPACKE/src/lapacke_dlaset_work.c
new file mode 100644
index 00000000..0de72ae1
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlaset_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlaset
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlaset_work( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, double alpha, double beta,
+ double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlaset( &uplo, &m, &n, &alpha, &beta, a, &lda );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dlaset_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlaset( &uplo, &m, &n, &alpha, &beta, a_t, &lda_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlaset_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dlaset_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlasrt.c b/LAPACKE/src/lapacke_dlasrt.c
new file mode 100644
index 00000000..ba8a2441
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlasrt.c
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dlasrt
+* Author: Intel Corporation
+* Generated May, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlasrt( char id, lapack_int n, double* d )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_dlasrt_work( id, n, d );
+}
diff --git a/LAPACKE/src/lapacke_dlasrt_work.c b/LAPACKE/src/lapacke_dlasrt_work.c
new file mode 100644
index 00000000..715506de
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlasrt_work.c
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dlasrt
+* Author: Intel Corporation
+* Generated May, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlasrt_work( char id, lapack_int n, double* d )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlasrt( &id, &n, d, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlaswp.c b/LAPACKE/src/lapacke_dlaswp.c
new file mode 100644
index 00000000..4c553324
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlaswp.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlaswp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlaswp( int matrix_layout, lapack_int n, double* a,
+ lapack_int lda, lapack_int k1, lapack_int k2,
+ const lapack_int* ipiv, lapack_int incx )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dlaswp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, lda, n, a, lda ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_dlaswp_work( matrix_layout, n, a, lda, k1, k2, ipiv, incx );
+}
diff --git a/LAPACKE/src/lapacke_dlaswp_work.c b/LAPACKE/src/lapacke_dlaswp_work.c
new file mode 100644
index 00000000..536a8e85
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlaswp_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlaswp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlaswp_work( int matrix_layout, lapack_int n, double* a,
+ lapack_int lda, lapack_int k1, lapack_int k2,
+ const lapack_int* ipiv, lapack_int incx )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlaswp( &n, a, &lda, &k1, &k2, ipiv, &incx );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,lda);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -4;
+ LAPACKE_xerbla( "LAPACKE_dlaswp_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlaswp( &n, a_t, &lda_t, &k1, &k2, ipiv, &incx );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlaswp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dlaswp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlatms.c b/LAPACKE/src/lapacke_dlatms.c
new file mode 100644
index 00000000..6b3f83ea
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlatms.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlatms
+* Author: Intel Corporation
+* Generated April, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlatms( int matrix_layout, lapack_int m, lapack_int n,
+ char dist, lapack_int* iseed, char sym, double* d,
+ lapack_int mode, double cond, double dmax,
+ lapack_int kl, lapack_int ku, char pack, double* a,
+ lapack_int lda )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dlatms", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -14;
+ }
+ if( LAPACKE_d_nancheck( 1, &cond, 1 ) ) {
+ return -9;
+ }
+ if( LAPACKE_d_nancheck( MIN(n,m), d, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &dmax, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*(MAX(n,m))) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dlatms_work( matrix_layout, m, n, dist, iseed, sym, d, mode,
+ cond, dmax, kl, ku, pack, a, lda, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlatms", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlatms_work.c b/LAPACKE/src/lapacke_dlatms_work.c
new file mode 100644
index 00000000..25d874e6
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlatms_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlatms
+* Author: Intel Corporation
+* Generated April, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlatms_work( int matrix_layout, lapack_int m, lapack_int n,
+ char dist, lapack_int* iseed, char sym,
+ double* d, lapack_int mode, double cond,
+ double dmax, lapack_int kl, lapack_int ku,
+ char pack, double* a, lapack_int lda,
+ double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlatms( &m, &n, &dist, iseed, &sym, d, &mode, &cond, &dmax, &kl,
+ &ku, &pack, a, &lda, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dlatms_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlatms( &m, &n, &dist, iseed, &sym, d, &mode, &cond, &dmax, &kl,
+ &ku, &pack, a_t, &lda_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlatms_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dlatms_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dlauum.c b/LAPACKE/src/lapacke_dlauum.c
new file mode 100644
index 00000000..809a7736
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlauum.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlauum
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlauum( int matrix_layout, char uplo, lapack_int n, double* a,
+ lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dlauum", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dlauum_work( matrix_layout, uplo, n, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_dlauum_work.c b/LAPACKE/src/lapacke_dlauum_work.c
new file mode 100644
index 00000000..46289fa3
--- /dev/null
+++ b/LAPACKE/src/lapacke_dlauum_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dlauum
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlauum_work( int matrix_layout, char uplo, lapack_int n,
+ double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlauum( &uplo, &n, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dlauum_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dlauum( &uplo, &n, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dlauum_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dlauum_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dopgtr.c b/LAPACKE/src/lapacke_dopgtr.c
new file mode 100644
index 00000000..fc81f44c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dopgtr.c
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dopgtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dopgtr( int matrix_layout, char uplo, lapack_int n,
+ const double* ap, const double* tau, double* q,
+ lapack_int ldq )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dopgtr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsp_nancheck( n, ap ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n-1, tau, 1 ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n-1) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dopgtr_work( matrix_layout, uplo, n, ap, tau, q, ldq, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dopgtr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dopgtr_work.c b/LAPACKE/src/lapacke_dopgtr_work.c
new file mode 100644
index 00000000..6a3f068f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dopgtr_work.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dopgtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dopgtr_work( int matrix_layout, char uplo, lapack_int n,
+ const double* ap, const double* tau, double* q,
+ lapack_int ldq, double* work )
+{
+ lapack_int info = 0;
+ lapack_int ldq_t;
+ double *q_t = NULL, *ap_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dopgtr( &uplo, &n, ap, tau, q, &ldq, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ ldq_t = MAX(1,n);
+ /* Check leading dimension(s) */
+ if( ldq < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dopgtr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ q_t = (double*)LAPACKE_malloc( sizeof(double) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dopgtr( &uplo, &n, ap_t, tau, q_t, &ldq_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( q_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dopgtr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dopgtr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dopmtr.c b/LAPACKE/src/lapacke_dopmtr.c
new file mode 100644
index 00000000..8fb42cfb
--- /dev/null
+++ b/LAPACKE/src/lapacke_dopmtr.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dopmtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dopmtr( int matrix_layout, char side, char uplo, char trans,
+ lapack_int m, lapack_int n, const double* ap,
+ const double* tau, double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lwork;
+ double* work = NULL;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dopmtr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_dsp_nancheck( r, ap ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -9;
+ }
+ if( LAPACKE_d_nancheck( m-1, tau, 1 ) ) {
+ return -8;
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( side, 'l' ) ) {
+ lwork = MAX(1,n);
+ } else if( LAPACKE_lsame( side, 'r' ) ) {
+ lwork = MAX(1,m);
+ } else {
+ lwork = 1; /* Any value */
+ }
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dopmtr_work( matrix_layout, side, uplo, trans, m, n, ap, tau,
+ c, ldc, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dopmtr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dopmtr_work.c b/LAPACKE/src/lapacke_dopmtr_work.c
new file mode 100644
index 00000000..4f30a7d4
--- /dev/null
+++ b/LAPACKE/src/lapacke_dopmtr_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dopmtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dopmtr_work( int matrix_layout, char side, char uplo,
+ char trans, lapack_int m, lapack_int n,
+ const double* ap, const double* tau, double* c,
+ lapack_int ldc, double* work )
+{
+ lapack_int info = 0;
+ lapack_int r;
+ lapack_int ldc_t;
+ double *c_t = NULL, *ap_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dopmtr( &side, &uplo, &trans, &m, &n, ap, tau, c, &ldc, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( ldc < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dopmtr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ c_t = (double*)LAPACKE_malloc( sizeof(double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,r) * MAX(2,r+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ LAPACKE_dsp_trans( matrix_layout, uplo, r, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dopmtr( &side, &uplo, &trans, &m, &n, ap_t, tau, c_t, &ldc_t,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( c_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dopmtr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dopmtr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorbdb.c b/LAPACKE/src/lapacke_dorbdb.c
new file mode 100644
index 00000000..cd47456f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorbdb.c
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorbdb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorbdb( int matrix_layout, char trans, char signs,
+ lapack_int m, lapack_int p, lapack_int q,
+ double* x11, lapack_int ldx11, double* x12,
+ lapack_int ldx12, double* x21, lapack_int ldx21,
+ double* x22, lapack_int ldx22, double* theta,
+ double* phi, double* taup1, double* taup2,
+ double* tauq1, double* tauq2 )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dorbdb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
+ nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
+ nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
+ nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) {
+ return -9;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
+ return -11;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) {
+ return -13;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dorbdb_work( matrix_layout, trans, signs, m, p, q, x11, ldx11,
+ x12, ldx12, x21, ldx21, x22, ldx22, theta, phi,
+ taup1, taup2, tauq1, tauq2, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dorbdb_work( matrix_layout, trans, signs, m, p, q, x11, ldx11,
+ x12, ldx12, x21, ldx21, x22, ldx22, theta, phi,
+ taup1, taup2, tauq1, tauq2, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dorbdb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorbdb_work.c b/LAPACKE/src/lapacke_dorbdb_work.c
new file mode 100644
index 00000000..541487e7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorbdb_work.c
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorbdb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorbdb_work( int matrix_layout, char trans, char signs,
+ lapack_int m, lapack_int p, lapack_int q,
+ double* x11, lapack_int ldx11, double* x12,
+ lapack_int ldx12, double* x21, lapack_int ldx21,
+ double* x22, lapack_int ldx22, double* theta,
+ double* phi, double* taup1, double* taup2,
+ double* tauq1, double* tauq2, double* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorbdb( &trans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12,
+ x21, &ldx21, x22, &ldx22, theta, phi, taup1, taup2,
+ tauq1, tauq2, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
+ lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
+ lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
+ lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
+ lapack_int ldx11_t = MAX(1,nrows_x11);
+ lapack_int ldx12_t = MAX(1,nrows_x12);
+ lapack_int ldx21_t = MAX(1,nrows_x21);
+ lapack_int ldx22_t = MAX(1,nrows_x22);
+ double* x11_t = NULL;
+ double* x12_t = NULL;
+ double* x21_t = NULL;
+ double* x22_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldx11 < q ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dorbdb_work", info );
+ return info;
+ }
+ if( ldx12 < m-q ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dorbdb_work", info );
+ return info;
+ }
+ if( ldx21 < q ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dorbdb_work", info );
+ return info;
+ }
+ if( ldx22 < m-q ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_dorbdb_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dorbdb( &trans, &signs, &m, &p, &q, x11, &ldx11_t, x12,
+ &ldx12_t, x21, &ldx21_t, x22, &ldx22_t, theta, phi,
+ taup1, taup2, tauq1, tauq2, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ x11_t = (double*)LAPACKE_malloc( sizeof(double) * ldx11_t * MAX(1,q) );
+ if( x11_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x12_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldx12_t * MAX(1,m-q) );
+ if( x12_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x21_t = (double*)LAPACKE_malloc( sizeof(double) * ldx21_t * MAX(1,q) );
+ if( x21_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x22_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldx22_t * MAX(1,m-q) );
+ if( x22_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t,
+ ldx11_t );
+ LAPACKE_dge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t,
+ ldx12_t );
+ LAPACKE_dge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t,
+ ldx21_t );
+ LAPACKE_dge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t,
+ ldx22_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorbdb( &trans, &signs, &m, &p, &q, x11_t, &ldx11_t, x12_t,
+ &ldx12_t, x21_t, &ldx21_t, x22_t, &ldx22_t, theta, phi,
+ taup1, taup2, tauq1, tauq2, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11,
+ ldx11 );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t,
+ x12, ldx12 );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21,
+ ldx21 );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t,
+ x22, ldx22 );
+ /* Release memory and exit */
+ LAPACKE_free( x22_t );
+exit_level_3:
+ LAPACKE_free( x21_t );
+exit_level_2:
+ LAPACKE_free( x12_t );
+exit_level_1:
+ LAPACKE_free( x11_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dorbdb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dorbdb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorcsd.c b/LAPACKE/src/lapacke_dorcsd.c
new file mode 100644
index 00000000..a908c5e6
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorcsd.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorcsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorcsd( int matrix_layout, char jobu1, char jobu2,
+ char jobv1t, char jobv2t, char trans, char signs,
+ lapack_int m, lapack_int p, lapack_int q,
+ double* x11, lapack_int ldx11, double* x12,
+ lapack_int ldx12, double* x21, lapack_int ldx21,
+ double* x22, lapack_int ldx22, double* theta,
+ double* u1, lapack_int ldu1, double* u2,
+ lapack_int ldu2, double* v1t, lapack_int ldv1t,
+ double* v2t, lapack_int ldv2t )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ double work_query;
+ lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dorcsd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
+ nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
+ nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
+ nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
+ return -11;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) {
+ return -13;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
+ return -15;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) {
+ return -17;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m-MIN(MIN(p,m-p),MIN(q,m-q))) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dorcsd_work( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
+ trans, signs, m, p, q, x11, ldx11, x12, ldx12,
+ x21, ldx21, x22, ldx22, theta, u1, ldu1, u2,
+ ldu2, v1t, ldv1t, v2t, ldv2t, &work_query,
+ lwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_dorcsd_work( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
+ trans, signs, m, p, q, x11, ldx11, x12, ldx12,
+ x21, ldx21, x22, ldx22, theta, u1, ldu1, u2,
+ ldu2, v1t, ldv1t, v2t, ldv2t, work, lwork,
+ iwork );
+ /* 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_dorcsd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorcsd_work.c b/LAPACKE/src/lapacke_dorcsd_work.c
new file mode 100644
index 00000000..71f03823
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorcsd_work.c
@@ -0,0 +1,264 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorcsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorcsd_work( int matrix_layout, char jobu1, char jobu2,
+ char jobv1t, char jobv2t, char trans,
+ char signs, lapack_int m, lapack_int p,
+ lapack_int q, double* x11, lapack_int ldx11,
+ double* x12, lapack_int ldx12, double* x21,
+ lapack_int ldx21, double* x22, lapack_int ldx22,
+ double* theta, double* u1, lapack_int ldu1,
+ double* u2, lapack_int ldu2, double* v1t,
+ lapack_int ldv1t, double* v2t, lapack_int ldv2t,
+ double* work, lapack_int lwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p,
+ &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, &ldx22,
+ theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, &ldv2t,
+ work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
+ lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
+ lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
+ lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
+ lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
+ lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
+ lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
+ lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
+ lapack_int ldu1_t = MAX(1,nrows_u1);
+ lapack_int ldu2_t = MAX(1,nrows_u2);
+ lapack_int ldv1t_t = MAX(1,nrows_v1t);
+ lapack_int ldv2t_t = MAX(1,nrows_v2t);
+ lapack_int ldx11_t = MAX(1,nrows_x11);
+ lapack_int ldx12_t = MAX(1,nrows_x12);
+ lapack_int ldx21_t = MAX(1,nrows_x21);
+ lapack_int ldx22_t = MAX(1,nrows_x22);
+ double* x11_t = NULL;
+ double* x12_t = NULL;
+ double* x21_t = NULL;
+ double* x22_t = NULL;
+ double* u1_t = NULL;
+ double* u2_t = NULL;
+ double* v1t_t = NULL;
+ double* v2t_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldu1 < p ) {
+ info = -21;
+ LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
+ return info;
+ }
+ if( ldu2 < m-p ) {
+ info = -23;
+ LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
+ return info;
+ }
+ if( ldv1t < q ) {
+ info = -25;
+ LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
+ return info;
+ }
+ if( ldv2t < m-q ) {
+ info = -27;
+ LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
+ return info;
+ }
+ if( ldx11 < q ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
+ return info;
+ }
+ if( ldx12 < m-q ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
+ return info;
+ }
+ if( ldx21 < q ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
+ return info;
+ }
+ if( ldx22 < m-q ) {
+ info = -18;
+ LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m,
+ &p, &q, x11, &ldx11_t, x12, &ldx12_t, x21, &ldx21_t,
+ x22, &ldx22_t, theta, u1, &ldu1_t, u2, &ldu2_t, v1t,
+ &ldv1t_t, v2t, &ldv2t_t, work, &lwork, iwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ x11_t = (double*)LAPACKE_malloc( sizeof(double) * ldx11_t * MAX(1,q) );
+ if( x11_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x12_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldx12_t * MAX(1,m-q) );
+ if( x12_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x21_t = (double*)LAPACKE_malloc( sizeof(double) * ldx21_t * MAX(1,q) );
+ if( x21_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x22_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldx22_t * MAX(1,m-q) );
+ if( x22_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ u1_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldu1_t * MAX(1,p) );
+ if( u1_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ u2_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldu2_t * MAX(1,m-p) );
+ if( u2_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ v1t_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldv1t_t * MAX(1,q) );
+ if( v1t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_6;
+ }
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ v2t_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldv2t_t * MAX(1,m-q) );
+ if( v2t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_7;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t,
+ ldx11_t );
+ LAPACKE_dge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t,
+ ldx12_t );
+ LAPACKE_dge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t,
+ ldx21_t );
+ LAPACKE_dge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t,
+ ldx22_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p,
+ &q, x11_t, &ldx11_t, x12_t, &ldx12_t, x21_t, &ldx21_t,
+ x22_t, &ldx22_t, theta, u1_t, &ldu1_t, u2_t, &ldu2_t,
+ v1t_t, &ldv1t_t, v2t_t, &ldv2t_t, work, &lwork, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11,
+ ldx11 );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t,
+ x12, ldx12 );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21,
+ ldx21 );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t,
+ x22, ldx22 );
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1,
+ ldu1 );
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t,
+ u2, ldu2 );
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t,
+ v1t, ldv1t );
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t,
+ v2t, ldv2t );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_free( v2t_t );
+ }
+exit_level_7:
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_free( v1t_t );
+ }
+exit_level_6:
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_free( u2_t );
+ }
+exit_level_5:
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_free( u1_t );
+ }
+exit_level_4:
+ LAPACKE_free( x22_t );
+exit_level_3:
+ LAPACKE_free( x21_t );
+exit_level_2:
+ LAPACKE_free( x12_t );
+exit_level_1:
+ LAPACKE_free( x11_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorgbr.c b/LAPACKE/src/lapacke_dorgbr.c
new file mode 100644
index 00000000..f988fcc0
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorgbr.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorgbr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorgbr( int matrix_layout, char vect, lapack_int m,
+ lapack_int n, lapack_int k, double* a,
+ lapack_int lda, const double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dorgbr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_d_nancheck( MIN(m,k), tau, 1 ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dorgbr_work( matrix_layout, vect, m, n, k, a, lda, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dorgbr_work( matrix_layout, vect, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dorgbr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorgbr_work.c b/LAPACKE/src/lapacke_dorgbr_work.c
new file mode 100644
index 00000000..4033f6fe
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorgbr_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorgbr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorgbr_work( int matrix_layout, char vect, lapack_int m,
+ lapack_int n, lapack_int k, double* a,
+ lapack_int lda, const double* tau, double* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorgbr( &vect, &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dorgbr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dorgbr( &vect, &m, &n, &k, a, &lda_t, tau, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorgbr( &vect, &m, &n, &k, a_t, &lda_t, tau, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dorgbr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dorgbr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorghr.c b/LAPACKE/src/lapacke_dorghr.c
new file mode 100644
index 00000000..96f7a3b9
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorghr.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorghr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorghr( int matrix_layout, lapack_int n, lapack_int ilo,
+ lapack_int ihi, double* a, lapack_int lda,
+ const double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dorghr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( n-1, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dorghr_work( matrix_layout, n, ilo, ihi, a, lda, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dorghr_work( matrix_layout, n, ilo, ihi, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dorghr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorghr_work.c b/LAPACKE/src/lapacke_dorghr_work.c
new file mode 100644
index 00000000..98c5cbec
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorghr_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorghr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorghr_work( int matrix_layout, lapack_int n, lapack_int ilo,
+ lapack_int ihi, double* a, lapack_int lda,
+ const double* tau, double* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorghr( &n, &ilo, &ihi, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dorghr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dorghr( &n, &ilo, &ihi, a, &lda_t, tau, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorghr( &n, &ilo, &ihi, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dorghr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dorghr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorglq.c b/LAPACKE/src/lapacke_dorglq.c
new file mode 100644
index 00000000..23e3daf8
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorglq.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorglq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorglq( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, double* a, lapack_int lda,
+ const double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dorglq", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dorglq_work( matrix_layout, m, n, k, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dorglq_work( matrix_layout, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dorglq", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorglq_work.c b/LAPACKE/src/lapacke_dorglq_work.c
new file mode 100644
index 00000000..f67ea138
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorglq_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorglq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorglq_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, double* a, lapack_int lda,
+ const double* tau, double* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorglq( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dorglq_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dorglq( &m, &n, &k, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorglq( &m, &n, &k, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dorglq_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dorglq_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorgql.c b/LAPACKE/src/lapacke_dorgql.c
new file mode 100644
index 00000000..034ef6cf
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorgql.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorgql
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorgql( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, double* a, lapack_int lda,
+ const double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dorgql", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dorgql_work( matrix_layout, m, n, k, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dorgql_work( matrix_layout, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dorgql", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorgql_work.c b/LAPACKE/src/lapacke_dorgql_work.c
new file mode 100644
index 00000000..fbbb15e2
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorgql_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorgql
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorgql_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, double* a, lapack_int lda,
+ const double* tau, double* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorgql( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dorgql_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dorgql( &m, &n, &k, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorgql( &m, &n, &k, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dorgql_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dorgql_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorgqr.c b/LAPACKE/src/lapacke_dorgqr.c
new file mode 100644
index 00000000..94d3ac76
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorgqr.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorgqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorgqr( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, double* a, lapack_int lda,
+ const double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dorgqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dorgqr_work( matrix_layout, m, n, k, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dorgqr_work( matrix_layout, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dorgqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorgqr_work.c b/LAPACKE/src/lapacke_dorgqr_work.c
new file mode 100644
index 00000000..f130f7d6
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorgqr_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorgqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorgqr_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, double* a, lapack_int lda,
+ const double* tau, double* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorgqr( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dorgqr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dorgqr( &m, &n, &k, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorgqr( &m, &n, &k, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dorgqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dorgqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorgrq.c b/LAPACKE/src/lapacke_dorgrq.c
new file mode 100644
index 00000000..60c48b18
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorgrq.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorgrq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorgrq( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, double* a, lapack_int lda,
+ const double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dorgrq", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dorgrq_work( matrix_layout, m, n, k, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dorgrq_work( matrix_layout, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dorgrq", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorgrq_work.c b/LAPACKE/src/lapacke_dorgrq_work.c
new file mode 100644
index 00000000..6cf079f8
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorgrq_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorgrq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorgrq_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, double* a, lapack_int lda,
+ const double* tau, double* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorgrq( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dorgrq_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dorgrq( &m, &n, &k, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorgrq( &m, &n, &k, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dorgrq_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dorgrq_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorgtr.c b/LAPACKE/src/lapacke_dorgtr.c
new file mode 100644
index 00000000..fc911c3f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorgtr.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorgtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorgtr( int matrix_layout, char uplo, lapack_int n, double* a,
+ lapack_int lda, const double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dorgtr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n-1, tau, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dorgtr_work( matrix_layout, uplo, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dorgtr_work( matrix_layout, uplo, n, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dorgtr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dorgtr_work.c b/LAPACKE/src/lapacke_dorgtr_work.c
new file mode 100644
index 00000000..9756df17
--- /dev/null
+++ b/LAPACKE/src/lapacke_dorgtr_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dorgtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dorgtr_work( int matrix_layout, char uplo, lapack_int n,
+ double* a, lapack_int lda, const double* tau,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorgtr( &uplo, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dorgtr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dorgtr( &uplo, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dorgtr( &uplo, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dorgtr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dorgtr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dormbr.c b/LAPACKE/src/lapacke_dormbr.c
new file mode 100644
index 00000000..e8a446d4
--- /dev/null
+++ b/LAPACKE/src/lapacke_dormbr.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dormbr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dormbr( int matrix_layout, char vect, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const double* a, lapack_int lda, const double* tau,
+ double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ lapack_int nq, r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dormbr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nq = LAPACKE_lsame( side, 'l' ) ? m : n;
+ r = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k);
+ if( LAPACKE_dge_nancheck( matrix_layout, r, MIN(nq,k), a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -11;
+ }
+ if( LAPACKE_d_nancheck( MIN(nq,k), tau, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dormbr_work( matrix_layout, vect, side, trans, m, n, k, a,
+ lda, tau, c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dormbr_work( matrix_layout, vect, side, trans, m, n, k, a,
+ lda, tau, c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dormbr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dormbr_work.c b/LAPACKE/src/lapacke_dormbr_work.c
new file mode 100644
index 00000000..7a6fa75d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dormbr_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dormbr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dormbr_work( int matrix_layout, char vect, char side,
+ char trans, lapack_int m, lapack_int n,
+ lapack_int k, const double* a, lapack_int lda,
+ const double* tau, double* c, lapack_int ldc,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ lapack_int nq, r;
+ lapack_int lda_t, ldc_t;
+ double *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dormbr( &vect, &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ nq = LAPACKE_lsame( side, 'l' ) ? m : n;
+ r = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k);
+ lda_t = MAX(1,r);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( lda < MIN(nq,k) ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dormbr_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dormbr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dormbr( &vect, &side, &trans, &m, &n, &k, a, &lda_t, tau, c,
+ &ldc_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)
+ LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,MIN(nq,k)) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (double*)LAPACKE_malloc( sizeof(double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, r, MIN(nq,k), a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dormbr( &vect, &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t,
+ &ldc_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dormbr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dormbr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dormhr.c b/LAPACKE/src/lapacke_dormhr.c
new file mode 100644
index 00000000..aa485802
--- /dev/null
+++ b/LAPACKE/src/lapacke_dormhr.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dormhr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dormhr( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int ilo,
+ lapack_int ihi, const double* a, lapack_int lda,
+ const double* tau, double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dormhr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_dge_nancheck( matrix_layout, r, r, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -11;
+ }
+ if( LAPACKE_d_nancheck( m-1, tau, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dormhr_work( matrix_layout, side, trans, m, n, ilo, ihi, a,
+ lda, tau, c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dormhr_work( matrix_layout, side, trans, m, n, ilo, ihi, a,
+ lda, tau, c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dormhr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dormhr_work.c b/LAPACKE/src/lapacke_dormhr_work.c
new file mode 100644
index 00000000..a28f782f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dormhr_work.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dormhr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dormhr_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int ilo,
+ lapack_int ihi, const double* a, lapack_int lda,
+ const double* tau, double* c, lapack_int ldc,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ lapack_int r;
+ lapack_int lda_t, ldc_t;
+ double *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dormhr( &side, &trans, &m, &n, &ilo, &ihi, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lda_t = MAX(1,r);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( lda < r ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dormhr_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dormhr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dormhr( &side, &trans, &m, &n, &ilo, &ihi, a, &lda_t, tau, c,
+ &ldc_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,r) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (double*)LAPACKE_malloc( sizeof(double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, r, r, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dormhr( &side, &trans, &m, &n, &ilo, &ihi, a_t, &lda_t, tau, c_t,
+ &ldc_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dormhr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dormhr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dormlq.c b/LAPACKE/src/lapacke_dormlq.c
new file mode 100644
index 00000000..44eed299
--- /dev/null
+++ b/LAPACKE/src/lapacke_dormlq.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dormlq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dormlq( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const double* a, lapack_int lda, const double* tau,
+ double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dormlq", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dormlq_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dormlq_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dormlq", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dormlq_work.c b/LAPACKE/src/lapacke_dormlq_work.c
new file mode 100644
index 00000000..5a1a647d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dormlq_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dormlq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dormlq_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const double* a, lapack_int lda,
+ const double* tau, double* c, lapack_int ldc,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ lapack_int lda_t, ldc_t;
+ double *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dormlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lda_t = MAX(1,k);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dormlq_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dormlq_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dormlq( &side, &trans, &m, &n, &k, a, &lda_t, tau, c, &ldc_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (double*)LAPACKE_malloc( sizeof(double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dormlq( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dormlq_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dormlq_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dormql.c b/LAPACKE/src/lapacke_dormql.c
new file mode 100644
index 00000000..fc7877e5
--- /dev/null
+++ b/LAPACKE/src/lapacke_dormql.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dormql
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dormql( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const double* a, lapack_int lda, const double* tau,
+ double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dormql", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_dge_nancheck( matrix_layout, r, k, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dormql_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dormql_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dormql", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dormql_work.c b/LAPACKE/src/lapacke_dormql_work.c
new file mode 100644
index 00000000..fdaedfad
--- /dev/null
+++ b/LAPACKE/src/lapacke_dormql_work.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dormql
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dormql_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const double* a, lapack_int lda,
+ const double* tau, double* c, lapack_int ldc,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ lapack_int r;
+ lapack_int lda_t, ldc_t;
+ double *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dormql( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lda_t = MAX(1,r);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( lda < k ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dormql_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dormql_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dormql( &side, &trans, &m, &n, &k, a, &lda_t, tau, c, &ldc_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,k) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (double*)LAPACKE_malloc( sizeof(double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, r, k, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dormql( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dormql_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dormql_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dormqr.c b/LAPACKE/src/lapacke_dormqr.c
new file mode 100644
index 00000000..f60fa652
--- /dev/null
+++ b/LAPACKE/src/lapacke_dormqr.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dormqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dormqr( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const double* a, lapack_int lda, const double* tau,
+ double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dormqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_dge_nancheck( matrix_layout, r, k, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dormqr_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dormqr_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dormqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dormqr_work.c b/LAPACKE/src/lapacke_dormqr_work.c
new file mode 100644
index 00000000..81d7f374
--- /dev/null
+++ b/LAPACKE/src/lapacke_dormqr_work.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dormqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dormqr_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const double* a, lapack_int lda,
+ const double* tau, double* c, lapack_int ldc,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ lapack_int r;
+ lapack_int lda_t, ldc_t;
+ double *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dormqr( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lda_t = MAX(1,r);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( lda < k ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dormqr_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dormqr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dormqr( &side, &trans, &m, &n, &k, a, &lda_t, tau, c, &ldc_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,k) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (double*)LAPACKE_malloc( sizeof(double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, r, k, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dormqr( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dormqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dormqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dormrq.c b/LAPACKE/src/lapacke_dormrq.c
new file mode 100644
index 00000000..b9fc681d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dormrq.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dormrq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dormrq( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const double* a, lapack_int lda, const double* tau,
+ double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dormrq", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dormrq_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dormrq_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dormrq", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dormrq_work.c b/LAPACKE/src/lapacke_dormrq_work.c
new file mode 100644
index 00000000..901cc53c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dormrq_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dormrq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dormrq_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const double* a, lapack_int lda,
+ const double* tau, double* c, lapack_int ldc,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ lapack_int lda_t, ldc_t;
+ double *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dormrq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lda_t = MAX(1,k);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dormrq_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dormrq_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dormrq( &side, &trans, &m, &n, &k, a, &lda_t, tau, c, &ldc_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (double*)LAPACKE_malloc( sizeof(double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dormrq( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dormrq_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dormrq_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dormrz.c b/LAPACKE/src/lapacke_dormrz.c
new file mode 100644
index 00000000..4ce0fa3e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dormrz.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dormrz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dormrz( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int l, const double* a, lapack_int lda,
+ const double* tau, double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dormrz", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -11;
+ }
+ if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dormrz_work( matrix_layout, side, trans, m, n, k, l, a, lda,
+ tau, c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dormrz_work( matrix_layout, side, trans, m, n, k, l, a, lda,
+ tau, c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dormrz", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dormrz_work.c b/LAPACKE/src/lapacke_dormrz_work.c
new file mode 100644
index 00000000..375dff4a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dormrz_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dormrz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dormrz_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int l, const double* a, lapack_int lda,
+ const double* tau, double* c, lapack_int ldc,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ lapack_int lda_t, ldc_t;
+ double *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dormrz( &side, &trans, &m, &n, &k, &l, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lda_t = MAX(1,k);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dormrz_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dormrz_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dormrz( &side, &trans, &m, &n, &k, &l, a, &lda_t, tau, c,
+ &ldc_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (double*)LAPACKE_malloc( sizeof(double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dormrz( &side, &trans, &m, &n, &k, &l, a_t, &lda_t, tau, c_t,
+ &ldc_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dormrz_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dormrz_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dormtr.c b/LAPACKE/src/lapacke_dormtr.c
new file mode 100644
index 00000000..d3dee358
--- /dev/null
+++ b/LAPACKE/src/lapacke_dormtr.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dormtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dormtr( int matrix_layout, char side, char uplo, char trans,
+ lapack_int m, lapack_int n, const double* a,
+ lapack_int lda, const double* tau, double* c,
+ lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dormtr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_dge_nancheck( matrix_layout, r, r, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_d_nancheck( m-1, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dormtr_work( matrix_layout, side, uplo, trans, m, n, a, lda,
+ tau, c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dormtr_work( matrix_layout, side, uplo, trans, m, n, a, lda,
+ tau, c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dormtr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dormtr_work.c b/LAPACKE/src/lapacke_dormtr_work.c
new file mode 100644
index 00000000..fd3044c1
--- /dev/null
+++ b/LAPACKE/src/lapacke_dormtr_work.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dormtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dormtr_work( int matrix_layout, char side, char uplo,
+ char trans, lapack_int m, lapack_int n,
+ const double* a, lapack_int lda,
+ const double* tau, double* c, lapack_int ldc,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ lapack_int r, lda_t, ldc_t;
+ double *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dormtr( &side, &uplo, &trans, &m, &n, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lda_t = MAX(1,r);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( lda < r ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dormtr_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dormtr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dormtr( &side, &uplo, &trans, &m, &n, a, &lda_t, tau, c,
+ &ldc_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,r) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (double*)LAPACKE_malloc( sizeof(double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, r, r, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dormtr( &side, &uplo, &trans, &m, &n, a_t, &lda_t, tau, c_t,
+ &ldc_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dormtr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dormtr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpbcon.c b/LAPACKE/src/lapacke_dpbcon.c
new file mode 100644
index 00000000..1d7b32cd
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpbcon.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpbcon( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, const double* ab, lapack_int ldab,
+ double anorm, double* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpbcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dpbcon_work( matrix_layout, uplo, n, kd, ab, ldab, anorm,
+ rcond, work, iwork );
+ /* 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_dpbcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpbcon_work.c b/LAPACKE/src/lapacke_dpbcon_work.c
new file mode 100644
index 00000000..5b1ad7ea
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpbcon_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpbcon_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, const double* ab,
+ lapack_int ldab, double anorm, double* rcond,
+ double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpbcon( &uplo, &n, &kd, ab, &ldab, &anorm, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ double* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dpbcon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpbcon( &uplo, &n, &kd, ab_t, &ldab_t, &anorm, rcond, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpbcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpbcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpbequ.c b/LAPACKE/src/lapacke_dpbequ.c
new file mode 100644
index 00000000..a967a547
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpbequ.c
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpbequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpbequ( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, const double* ab, lapack_int ldab,
+ double* s, double* scond, double* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpbequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_dpbequ_work( matrix_layout, uplo, n, kd, ab, ldab, s, scond,
+ amax );
+}
diff --git a/LAPACKE/src/lapacke_dpbequ_work.c b/LAPACKE/src/lapacke_dpbequ_work.c
new file mode 100644
index 00000000..63bd30b7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpbequ_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpbequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpbequ_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, const double* ab,
+ lapack_int ldab, double* s, double* scond,
+ double* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpbequ( &uplo, &n, &kd, ab, &ldab, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ double* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dpbequ_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpbequ( &uplo, &n, &kd, ab_t, &ldab_t, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpbequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpbequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpbrfs.c b/LAPACKE/src/lapacke_dpbrfs.c
new file mode 100644
index 00000000..fb238d5f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpbrfs.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpbrfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs, const double* ab,
+ lapack_int ldab, const double* afb, lapack_int ldafb,
+ const double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpbrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
+ return -8;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dpbrfs_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, afb,
+ ldafb, b, ldb, x, ldx, ferr, berr, work,
+ iwork );
+ /* 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_dpbrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpbrfs_work.c b/LAPACKE/src/lapacke_dpbrfs_work.c
new file mode 100644
index 00000000..d2e694d7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpbrfs_work.c
@@ -0,0 +1,135 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpbrfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs,
+ const double* ab, lapack_int ldab,
+ const double* afb, lapack_int ldafb,
+ const double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* ferr, double* berr,
+ double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpbrfs( &uplo, &n, &kd, &nrhs, ab, &ldab, afb, &ldafb, b, &ldb,
+ x, &ldx, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldafb_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* afb_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dpbrfs_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dpbrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dpbrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dpbrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (double*)LAPACKE_malloc( sizeof(double) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ LAPACKE_dpb_trans( matrix_layout, uplo, n, kd, afb, ldafb, afb_t,
+ ldafb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpbrfs( &uplo, &n, &kd, &nrhs, ab_t, &ldab_t, afb_t, &ldafb_t,
+ b_t, &ldb_t, x_t, &ldx_t, ferr, berr, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpbrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpbrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpbstf.c b/LAPACKE/src/lapacke_dpbstf.c
new file mode 100644
index 00000000..8593d13e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpbstf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpbstf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpbstf( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kb, double* bb, lapack_int ldbb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpbstf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_dpbstf_work( matrix_layout, uplo, n, kb, bb, ldbb );
+}
diff --git a/LAPACKE/src/lapacke_dpbstf_work.c b/LAPACKE/src/lapacke_dpbstf_work.c
new file mode 100644
index 00000000..b859bce1
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpbstf_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpbstf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpbstf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kb, double* bb, lapack_int ldbb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpbstf( &uplo, &n, &kb, bb, &ldbb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldbb_t = MAX(1,kb+1);
+ double* bb_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldbb < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dpbstf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ bb_t = (double*)LAPACKE_malloc( sizeof(double) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpbstf( &uplo, &n, &kb, bb_t, &ldbb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dpb_trans( LAPACK_COL_MAJOR, uplo, n, kb, bb_t, ldbb_t, bb,
+ ldbb );
+ /* Release memory and exit */
+ LAPACKE_free( bb_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpbstf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpbstf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpbsv.c b/LAPACKE/src/lapacke_dpbsv.c
new file mode 100644
index 00000000..c91d2e8d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpbsv.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpbsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpbsv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs, double* ab,
+ lapack_int ldab, double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpbsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_dpbsv_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_dpbsv_work.c b/LAPACKE/src/lapacke_dpbsv_work.c
new file mode 100644
index 00000000..f9d9c49c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpbsv_work.c
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpbsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpbsv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs, double* ab,
+ lapack_int ldab, double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpbsv( &uplo, &n, &kd, &nrhs, ab, &ldab, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dpbsv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dpbsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpbsv( &uplo, &n, &kd, &nrhs, ab_t, &ldab_t, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dpb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpbsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpbsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpbsvx.c b/LAPACKE/src/lapacke_dpbsvx.c
new file mode 100644
index 00000000..f66608fd
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpbsvx.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpbsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpbsvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs, double* ab,
+ lapack_int ldab, double* afb, lapack_int ldafb,
+ char* equed, double* s, double* b, lapack_int ldb,
+ double* x, lapack_int ldx, double* rcond,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpbsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
+ return -9;
+ }
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dpbsvx_work( matrix_layout, fact, uplo, n, kd, nrhs, ab, ldab,
+ afb, ldafb, equed, s, b, ldb, x, ldx, rcond,
+ ferr, berr, work, iwork );
+ /* 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_dpbsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpbsvx_work.c b/LAPACKE/src/lapacke_dpbsvx_work.c
new file mode 100644
index 00000000..f55cd656
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpbsvx_work.c
@@ -0,0 +1,146 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpbsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpbsvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int kd, lapack_int nrhs,
+ double* ab, lapack_int ldab, double* afb,
+ lapack_int ldafb, char* equed, double* s,
+ double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* rcond, double* ferr,
+ double* berr, double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpbsvx( &fact, &uplo, &n, &kd, &nrhs, ab, &ldab, afb, &ldafb,
+ equed, s, b, &ldb, x, &ldx, rcond, ferr, berr, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldafb_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* afb_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dpbsvx_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dpbsvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_dpbsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_dpbsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (double*)LAPACKE_malloc( sizeof(double) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_dpb_trans( matrix_layout, uplo, n, kd, afb, ldafb, afb_t,
+ ldafb_t );
+ }
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpbsvx( &fact, &uplo, &n, &kd, &nrhs, ab_t, &ldab_t, afb_t,
+ &ldafb_t, equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond,
+ ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_dpb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_dpb_trans( LAPACK_COL_MAJOR, uplo, n, kd, afb_t, ldafb_t,
+ afb, ldafb );
+ }
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpbsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpbsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpbtrf.c b/LAPACKE/src/lapacke_dpbtrf.c
new file mode 100644
index 00000000..b2116718
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpbtrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpbtrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpbtrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, double* ab, lapack_int ldab )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpbtrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_dpbtrf_work( matrix_layout, uplo, n, kd, ab, ldab );
+}
diff --git a/LAPACKE/src/lapacke_dpbtrf_work.c b/LAPACKE/src/lapacke_dpbtrf_work.c
new file mode 100644
index 00000000..165a71d9
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpbtrf_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpbtrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpbtrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, double* ab, lapack_int ldab )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpbtrf( &uplo, &n, &kd, ab, &ldab, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ double* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dpbtrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpbtrf( &uplo, &n, &kd, ab_t, &ldab_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dpb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpbtrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpbtrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpbtrs.c b/LAPACKE/src/lapacke_dpbtrs.c
new file mode 100644
index 00000000..3f32fb3b
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpbtrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpbtrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs, const double* ab,
+ lapack_int ldab, double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpbtrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_dpbtrs_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_dpbtrs_work.c b/LAPACKE/src/lapacke_dpbtrs_work.c
new file mode 100644
index 00000000..a89f70e2
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpbtrs_work.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpbtrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs,
+ const double* ab, lapack_int ldab, double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpbtrs( &uplo, &n, &kd, &nrhs, ab, &ldab, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dpbtrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dpbtrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpbtrs( &uplo, &n, &kd, &nrhs, ab_t, &ldab_t, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpbtrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpbtrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpftrf.c b/LAPACKE/src/lapacke_dpftrf.c
new file mode 100644
index 00000000..2ffb1603
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpftrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpftrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpftrf( int matrix_layout, char transr, char uplo,
+ lapack_int n, double* a )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpftrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpf_nancheck( n, a ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_dpftrf_work( matrix_layout, transr, uplo, n, a );
+}
diff --git a/LAPACKE/src/lapacke_dpftrf_work.c b/LAPACKE/src/lapacke_dpftrf_work.c
new file mode 100644
index 00000000..1dc299c0
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpftrf_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpftrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpftrf_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, double* a )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpftrf( &transr, &uplo, &n, a, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ double* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpf_trans( matrix_layout, transr, uplo, n, a, a_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpftrf( &transr, &uplo, &n, a_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dpf_trans( LAPACK_COL_MAJOR, transr, uplo, n, a_t, a );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpftrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpftrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpftri.c b/LAPACKE/src/lapacke_dpftri.c
new file mode 100644
index 00000000..ada2e493
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpftri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpftri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpftri( int matrix_layout, char transr, char uplo,
+ lapack_int n, double* a )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpftri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpf_nancheck( n, a ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_dpftri_work( matrix_layout, transr, uplo, n, a );
+}
diff --git a/LAPACKE/src/lapacke_dpftri_work.c b/LAPACKE/src/lapacke_dpftri_work.c
new file mode 100644
index 00000000..c7d0d12b
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpftri_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpftri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpftri_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, double* a )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpftri( &transr, &uplo, &n, a, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ double* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpf_trans( matrix_layout, transr, uplo, n, a, a_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpftri( &transr, &uplo, &n, a_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dpf_trans( LAPACK_COL_MAJOR, transr, uplo, n, a_t, a );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpftri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpftri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpftrs.c b/LAPACKE/src/lapacke_dpftrs.c
new file mode 100644
index 00000000..9ffdb95b
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpftrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpftrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpftrs( int matrix_layout, char transr, char uplo,
+ lapack_int n, lapack_int nrhs, const double* a,
+ double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpftrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpf_nancheck( n, a ) ) {
+ return -6;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_dpftrs_work( matrix_layout, transr, uplo, n, nrhs, a, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_dpftrs_work.c b/LAPACKE/src/lapacke_dpftrs_work.c
new file mode 100644
index 00000000..621e7fe7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpftrs_work.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpftrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpftrs_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, lapack_int nrhs, const double* a,
+ double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpftrs( &transr, &uplo, &n, &nrhs, a, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ double* b_t = NULL;
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dpftrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ a_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dpf_trans( matrix_layout, transr, uplo, n, a, a_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpftrs( &transr, &uplo, &n, &nrhs, a_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpftrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpftrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpocon.c b/LAPACKE/src/lapacke_dpocon.c
new file mode 100644
index 00000000..13dcd973
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpocon.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpocon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpocon( int matrix_layout, char uplo, lapack_int n,
+ const double* a, lapack_int lda, double anorm,
+ double* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpocon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dpocon_work( matrix_layout, uplo, n, a, lda, anorm, rcond,
+ work, iwork );
+ /* 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_dpocon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpocon_work.c b/LAPACKE/src/lapacke_dpocon_work.c
new file mode 100644
index 00000000..00b24e9b
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpocon_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpocon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpocon_work( int matrix_layout, char uplo, lapack_int n,
+ const double* a, lapack_int lda, double anorm,
+ double* rcond, double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpocon( &uplo, &n, a, &lda, &anorm, rcond, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dpocon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpocon( &uplo, &n, a_t, &lda_t, &anorm, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpocon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpocon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpoequ.c b/LAPACKE/src/lapacke_dpoequ.c
new file mode 100644
index 00000000..e5d76dda
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpoequ.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpoequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpoequ( int matrix_layout, lapack_int n, const double* a,
+ lapack_int lda, double* s, double* scond,
+ double* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpoequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_dpoequ_work( matrix_layout, n, a, lda, s, scond, amax );
+}
diff --git a/LAPACKE/src/lapacke_dpoequ_work.c b/LAPACKE/src/lapacke_dpoequ_work.c
new file mode 100644
index 00000000..dcc8559e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpoequ_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpoequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpoequ_work( int matrix_layout, lapack_int n, const double* a,
+ lapack_int lda, double* s, double* scond,
+ double* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpoequ( &n, a, &lda, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -4;
+ LAPACKE_xerbla( "LAPACKE_dpoequ_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpoequ( &n, a_t, &lda_t, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpoequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpoequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpoequb.c b/LAPACKE/src/lapacke_dpoequb.c
new file mode 100644
index 00000000..88283c26
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpoequb.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpoequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpoequb( int matrix_layout, lapack_int n, const double* a,
+ lapack_int lda, double* s, double* scond,
+ double* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpoequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_dpoequb_work( matrix_layout, n, a, lda, s, scond, amax );
+}
diff --git a/LAPACKE/src/lapacke_dpoequb_work.c b/LAPACKE/src/lapacke_dpoequb_work.c
new file mode 100644
index 00000000..3318b8a2
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpoequb_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpoequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpoequb_work( int matrix_layout, lapack_int n,
+ const double* a, lapack_int lda, double* s,
+ double* scond, double* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpoequb( &n, a, &lda, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -4;
+ LAPACKE_xerbla( "LAPACKE_dpoequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpoequb( &n, a_t, &lda_t, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpoequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpoequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dporfs.c b/LAPACKE/src/lapacke_dporfs.c
new file mode 100644
index 00000000..4ae413af
--- /dev/null
+++ b/LAPACKE/src/lapacke_dporfs.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dporfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dporfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* a, lapack_int lda,
+ const double* af, lapack_int ldaf, const double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dporfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -11;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dporfs_work( matrix_layout, uplo, n, nrhs, a, lda, af, ldaf,
+ b, ldb, x, ldx, ferr, berr, work, iwork );
+ /* 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_dporfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dporfs_work.c b/LAPACKE/src/lapacke_dporfs_work.c
new file mode 100644
index 00000000..a10f9ae3
--- /dev/null
+++ b/LAPACKE/src/lapacke_dporfs_work.c
@@ -0,0 +1,133 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dporfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dporfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* a,
+ lapack_int lda, const double* af,
+ lapack_int ldaf, const double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* ferr, double* berr, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dporfs( &uplo, &n, &nrhs, a, &lda, af, &ldaf, b, &ldb, x, &ldx,
+ ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* a_t = NULL;
+ double* af_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dporfs_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dporfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dporfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dporfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (double*)LAPACKE_malloc( sizeof(double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_dpo_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dporfs( &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dporfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dporfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dporfsx.c b/LAPACKE/src/lapacke_dporfsx.c
new file mode 100644
index 00000000..d888affb
--- /dev/null
+++ b/LAPACKE/src/lapacke_dporfsx.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dporfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dporfsx( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs, const double* a,
+ lapack_int lda, const double* af, lapack_int ldaf,
+ const double* s, const double* b, lapack_int ldb,
+ double* x, lapack_int ldx, double* rcond,
+ double* berr, lapack_int n_err_bnds,
+ double* err_bnds_norm, double* err_bnds_comp,
+ lapack_int nparams, double* params )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dporfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -11;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -21;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'y' ) ) {
+ if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -13;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dporfsx_work( matrix_layout, uplo, equed, n, nrhs, a, lda, af,
+ ldaf, s, b, ldb, x, ldx, rcond, berr,
+ n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, iwork );
+ /* 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_dporfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dporfsx_work.c b/LAPACKE/src/lapacke_dporfsx_work.c
new file mode 100644
index 00000000..9d28ae7f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dporfsx_work.c
@@ -0,0 +1,161 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dporfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dporfsx_work( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs, const double* a,
+ lapack_int lda, const double* af,
+ lapack_int ldaf, const double* s,
+ const double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* rcond, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dporfsx( &uplo, &equed, &n, &nrhs, a, &lda, af, &ldaf, s, b,
+ &ldb, x, &ldx, rcond, berr, &n_err_bnds, err_bnds_norm,
+ err_bnds_comp, &nparams, params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* a_t = NULL;
+ double* af_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dporfsx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dporfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dporfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_dporfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (double*)LAPACKE_malloc( sizeof(double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dporfsx( &uplo, &equed, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, s,
+ b_t, &ldb_t, x_t, &ldx_t, rcond, berr, &n_err_bnds,
+ err_bnds_norm_t, err_bnds_comp_t, &nparams, params,
+ work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dporfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dporfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dposv.c b/LAPACKE/src/lapacke_dposv.c
new file mode 100644
index 00000000..2ac4ed6f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dposv.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dposv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dposv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, double* a, lapack_int lda, double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dposv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_dposv_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_dposv_work.c b/LAPACKE/src/lapacke_dposv_work.c
new file mode 100644
index 00000000..2ae7cc9d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dposv_work.c
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dposv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dposv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, double* a, lapack_int lda,
+ double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dposv( &uplo, &n, &nrhs, a, &lda, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dposv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dposv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dposv( &uplo, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dposv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dposv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dposvx.c b/LAPACKE/src/lapacke_dposvx.c
new file mode 100644
index 00000000..24b03467
--- /dev/null
+++ b/LAPACKE/src/lapacke_dposvx.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dposvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dposvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, double* a, lapack_int lda,
+ double* af, lapack_int ldaf, char* equed, double* s,
+ double* b, lapack_int ldb, double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dposvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dposvx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, equed, s, b, ldb, x, ldx, rcond, ferr,
+ berr, work, iwork );
+ /* 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_dposvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dposvx_work.c b/LAPACKE/src/lapacke_dposvx_work.c
new file mode 100644
index 00000000..35c41f3b
--- /dev/null
+++ b/LAPACKE/src/lapacke_dposvx_work.c
@@ -0,0 +1,143 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dposvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dposvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs, double* a,
+ lapack_int lda, double* af, lapack_int ldaf,
+ char* equed, double* s, double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr,
+ double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dposvx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, equed, s, b,
+ &ldb, x, &ldx, rcond, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* a_t = NULL;
+ double* af_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dposvx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dposvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dposvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dposvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (double*)LAPACKE_malloc( sizeof(double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_dpo_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dposvx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr, berr,
+ work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_dpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_dpo_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dposvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dposvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dposvxx.c b/LAPACKE/src/lapacke_dposvxx.c
new file mode 100644
index 00000000..1bff772d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dposvxx.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dposvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dposvxx( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs, double* a,
+ lapack_int lda, double* af, lapack_int ldaf,
+ char* equed, double* s, double* b, lapack_int ldb,
+ double* x, lapack_int ldx, double* rcond,
+ double* rpvgrw, double* berr, lapack_int n_err_bnds,
+ double* err_bnds_norm, double* err_bnds_comp,
+ lapack_int nparams, double* params )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dposvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -23;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dposvxx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, equed, s, b, ldb, x, ldx, rcond, rpvgrw,
+ berr, n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, iwork );
+ /* 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_dposvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dposvxx_work.c b/LAPACKE/src/lapacke_dposvxx_work.c
new file mode 100644
index 00000000..e765019f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dposvxx_work.c
@@ -0,0 +1,171 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dposvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dposvxx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs, double* a,
+ lapack_int lda, double* af, lapack_int ldaf,
+ char* equed, double* s, double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* rcond, double* rpvgrw, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dposvxx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, equed, s,
+ b, &ldb, x, &ldx, rcond, rpvgrw, berr, &n_err_bnds,
+ err_bnds_norm, err_bnds_comp, &nparams, params, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* a_t = NULL;
+ double* af_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dposvxx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dposvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dposvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dposvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (double*)LAPACKE_malloc( sizeof(double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_dpo_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dposvxx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond, rpvgrw, berr,
+ &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t, &nparams,
+ params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_dpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_dpo_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dposvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dposvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpotrf.c b/LAPACKE/src/lapacke_dpotrf.c
new file mode 100644
index 00000000..2bf5ed8e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpotrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpotrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpotrf( int matrix_layout, char uplo, lapack_int n, double* a,
+ lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpotrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dpotrf_work( matrix_layout, uplo, n, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_dpotrf_work.c b/LAPACKE/src/lapacke_dpotrf_work.c
new file mode 100644
index 00000000..4d8e4a67
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpotrf_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpotrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpotrf_work( int matrix_layout, char uplo, lapack_int n,
+ double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpotrf( &uplo, &n, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dpotrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpotrf( &uplo, &n, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpotrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpotrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpotri.c b/LAPACKE/src/lapacke_dpotri.c
new file mode 100644
index 00000000..7b066b0f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpotri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpotri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpotri( int matrix_layout, char uplo, lapack_int n, double* a,
+ lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpotri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dpotri_work( matrix_layout, uplo, n, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_dpotri_work.c b/LAPACKE/src/lapacke_dpotri_work.c
new file mode 100644
index 00000000..8b8629f9
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpotri_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpotri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpotri_work( int matrix_layout, char uplo, lapack_int n,
+ double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpotri( &uplo, &n, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dpotri_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpotri( &uplo, &n, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpotri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpotri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpotrs.c b/LAPACKE/src/lapacke_dpotrs.c
new file mode 100644
index 00000000..6c43bfe8
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpotrs.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpotrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpotrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* a, lapack_int lda,
+ double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpotrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_dpotrs_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_dpotrs_work.c b/LAPACKE/src/lapacke_dpotrs_work.c
new file mode 100644
index 00000000..db499a1f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpotrs_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpotrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpotrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* a,
+ lapack_int lda, double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpotrs( &uplo, &n, &nrhs, a, &lda, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dpotrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dpotrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpotrs( &uplo, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpotrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpotrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dppcon.c b/LAPACKE/src/lapacke_dppcon.c
new file mode 100644
index 00000000..1f450d0a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dppcon.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dppcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dppcon( int matrix_layout, char uplo, lapack_int n,
+ const double* ap, double anorm, double* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dppcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_dpp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dppcon_work( matrix_layout, uplo, n, ap, anorm, rcond, work,
+ iwork );
+ /* 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_dppcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dppcon_work.c b/LAPACKE/src/lapacke_dppcon_work.c
new file mode 100644
index 00000000..5f4a13f0
--- /dev/null
+++ b/LAPACKE/src/lapacke_dppcon_work.c
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dppcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dppcon_work( int matrix_layout, char uplo, lapack_int n,
+ const double* ap, double anorm, double* rcond,
+ double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dppcon( &uplo, &n, ap, &anorm, rcond, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dppcon( &uplo, &n, ap_t, &anorm, rcond, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dppcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dppcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dppequ.c b/LAPACKE/src/lapacke_dppequ.c
new file mode 100644
index 00000000..a096b7e1
--- /dev/null
+++ b/LAPACKE/src/lapacke_dppequ.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dppequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dppequ( int matrix_layout, char uplo, lapack_int n,
+ const double* ap, double* s, double* scond,
+ double* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dppequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dppequ_work( matrix_layout, uplo, n, ap, s, scond, amax );
+}
diff --git a/LAPACKE/src/lapacke_dppequ_work.c b/LAPACKE/src/lapacke_dppequ_work.c
new file mode 100644
index 00000000..bbf7edbc
--- /dev/null
+++ b/LAPACKE/src/lapacke_dppequ_work.c
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dppequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dppequ_work( int matrix_layout, char uplo, lapack_int n,
+ const double* ap, double* s, double* scond,
+ double* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dppequ( &uplo, &n, ap, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dppequ( &uplo, &n, ap_t, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dppequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dppequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpprfs.c b/LAPACKE/src/lapacke_dpprfs.c
new file mode 100644
index 00000000..d48c39c5
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpprfs.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpprfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* ap, const double* afp,
+ const double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpprfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpp_nancheck( n, afp ) ) {
+ return -6;
+ }
+ if( LAPACKE_dpp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dpprfs_work( matrix_layout, uplo, n, nrhs, ap, afp, b, ldb, x,
+ ldx, ferr, berr, work, iwork );
+ /* 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_dpprfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpprfs_work.c b/LAPACKE/src/lapacke_dpprfs_work.c
new file mode 100644
index 00000000..b3bf21de
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpprfs_work.c
@@ -0,0 +1,122 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpprfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* ap,
+ const double* afp, const double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* ferr, double* berr, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpprfs( &uplo, &n, &nrhs, ap, afp, b, &ldb, x, &ldx, ferr, berr,
+ work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* b_t = NULL;
+ double* x_t = NULL;
+ double* ap_t = NULL;
+ double* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dpprfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dpprfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ LAPACKE_dpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_dpp_trans( matrix_layout, uplo, n, afp, afp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpprfs( &uplo, &n, &nrhs, ap_t, afp_t, b_t, &ldb_t, x_t, &ldx_t,
+ ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpprfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpprfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dppsv.c b/LAPACKE/src/lapacke_dppsv.c
new file mode 100644
index 00000000..f2097790
--- /dev/null
+++ b/LAPACKE/src/lapacke_dppsv.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dppsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dppsv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, double* ap, double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dppsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_dppsv_work( matrix_layout, uplo, n, nrhs, ap, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_dppsv_work.c b/LAPACKE/src/lapacke_dppsv_work.c
new file mode 100644
index 00000000..100a793b
--- /dev/null
+++ b/LAPACKE/src/lapacke_dppsv_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dppsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dppsv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, double* ap, double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dppsv( &uplo, &n, &nrhs, ap, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ double* b_t = NULL;
+ double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dppsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dppsv( &uplo, &n, &nrhs, ap_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_dpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dppsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dppsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dppsvx.c b/LAPACKE/src/lapacke_dppsvx.c
new file mode 100644
index 00000000..645263db
--- /dev/null
+++ b/LAPACKE/src/lapacke_dppsvx.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dppsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dppsvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, double* ap, double* afp,
+ char* equed, double* s, double* b, lapack_int ldb,
+ double* x, lapack_int ldx, double* rcond,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dppsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_dpp_nancheck( n, afp ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_dpp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+ return -9;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dppsvx_work( matrix_layout, fact, uplo, n, nrhs, ap, afp,
+ equed, s, b, ldb, x, ldx, rcond, ferr, berr,
+ work, iwork );
+ /* 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_dppsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dppsvx_work.c b/LAPACKE/src/lapacke_dppsvx_work.c
new file mode 100644
index 00000000..68613950
--- /dev/null
+++ b/LAPACKE/src/lapacke_dppsvx_work.c
@@ -0,0 +1,131 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dppsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dppsvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs, double* ap,
+ double* afp, char* equed, double* s, double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr,
+ double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dppsvx( &fact, &uplo, &n, &nrhs, ap, afp, equed, s, b, &ldb, x,
+ &ldx, rcond, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* b_t = NULL;
+ double* x_t = NULL;
+ double* ap_t = NULL;
+ double* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dppsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dppsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_dpp_trans( matrix_layout, uplo, n, afp, afp_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dppsvx( &fact, &uplo, &n, &nrhs, ap_t, afp_t, equed, s, b_t,
+ &ldb_t, x_t, &ldx_t, rcond, ferr, berr, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_dpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_dpp_trans( LAPACK_COL_MAJOR, uplo, n, afp_t, afp );
+ }
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dppsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dppsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpptrf.c b/LAPACKE/src/lapacke_dpptrf.c
new file mode 100644
index 00000000..0d66497f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpptrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpptrf( int matrix_layout, char uplo, lapack_int n,
+ double* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpptrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dpptrf_work( matrix_layout, uplo, n, ap );
+}
diff --git a/LAPACKE/src/lapacke_dpptrf_work.c b/LAPACKE/src/lapacke_dpptrf_work.c
new file mode 100644
index 00000000..508cdaeb
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpptrf_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpptrf_work( int matrix_layout, char uplo, lapack_int n,
+ double* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpptrf( &uplo, &n, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpptrf( &uplo, &n, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpptrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpptrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpptri.c b/LAPACKE/src/lapacke_dpptri.c
new file mode 100644
index 00000000..15d79513
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpptri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpptri( int matrix_layout, char uplo, lapack_int n,
+ double* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpptri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dpptri_work( matrix_layout, uplo, n, ap );
+}
diff --git a/LAPACKE/src/lapacke_dpptri_work.c b/LAPACKE/src/lapacke_dpptri_work.c
new file mode 100644
index 00000000..9468e564
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpptri_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpptri_work( int matrix_layout, char uplo, lapack_int n,
+ double* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpptri( &uplo, &n, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpptri( &uplo, &n, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpptri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpptri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpptrs.c b/LAPACKE/src/lapacke_dpptrs.c
new file mode 100644
index 00000000..99aab706
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpptrs.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpptrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* ap, double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpptrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_dpptrs_work( matrix_layout, uplo, n, nrhs, ap, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_dpptrs_work.c b/LAPACKE/src/lapacke_dpptrs_work.c
new file mode 100644
index 00000000..0e225bb8
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpptrs_work.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpptrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* ap, double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpptrs( &uplo, &n, &nrhs, ap, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ double* b_t = NULL;
+ double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dpptrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpptrs( &uplo, &n, &nrhs, ap_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpptrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpptrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpstrf.c b/LAPACKE/src/lapacke_dpstrf.c
new file mode 100644
index 00000000..78187265
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpstrf.c
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpstrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpstrf( int matrix_layout, char uplo, lapack_int n, double* a,
+ lapack_int lda, lapack_int* piv, lapack_int* rank,
+ double tol )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpstrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( 1, &tol, 1 ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dpstrf_work( matrix_layout, uplo, n, a, lda, piv, rank, tol,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpstrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpstrf_work.c b/LAPACKE/src/lapacke_dpstrf_work.c
new file mode 100644
index 00000000..a8e875c6
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpstrf_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpstrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpstrf_work( int matrix_layout, char uplo, lapack_int n,
+ double* a, lapack_int lda, lapack_int* piv,
+ lapack_int* rank, double tol, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpstrf( &uplo, &n, a, &lda, piv, rank, &tol, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dpstrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpstrf( &uplo, &n, a_t, &lda_t, piv, rank, &tol, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpstrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpstrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dptcon.c b/LAPACKE/src/lapacke_dptcon.c
new file mode 100644
index 00000000..7b5def46
--- /dev/null
+++ b/LAPACKE/src/lapacke_dptcon.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dptcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dptcon( lapack_int n, const double* d, const double* e,
+ double anorm, double* rcond )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -2;
+ }
+ if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+ return -3;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dptcon_work( n, d, e, anorm, rcond, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dptcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dptcon_work.c b/LAPACKE/src/lapacke_dptcon_work.c
new file mode 100644
index 00000000..29cf9a2a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dptcon_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dptcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dptcon_work( lapack_int n, const double* d, const double* e,
+ double anorm, double* rcond, double* work )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_dptcon( &n, d, e, &anorm, rcond, work, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpteqr.c b/LAPACKE/src/lapacke_dpteqr.c
new file mode 100644
index 00000000..e491283f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpteqr.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpteqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpteqr( int matrix_layout, char compz, lapack_int n,
+ double* d, double* e, double* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lwork;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpteqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -6;
+ }
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( compz, 'n' ) ) {
+ lwork = 1;
+ } else {
+ lwork = MAX(1,4*n-4);
+ }
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dpteqr_work( matrix_layout, compz, n, d, e, z, ldz, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpteqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpteqr_work.c b/LAPACKE/src/lapacke_dpteqr_work.c
new file mode 100644
index 00000000..d9477fa8
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpteqr_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpteqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpteqr_work( int matrix_layout, char compz, lapack_int n,
+ double* d, double* e, double* z, lapack_int ldz,
+ double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpteqr( &compz, &n, d, e, z, &ldz, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dpteqr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpteqr( &compz, &n, d, e, z_t, &ldz_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ /* Release memory and exit */
+ LAPACKE_free( z_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpteqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpteqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dptrfs.c b/LAPACKE/src/lapacke_dptrfs.c
new file mode 100644
index 00000000..53d55139
--- /dev/null
+++ b/LAPACKE/src/lapacke_dptrfs.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dptrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dptrfs( int matrix_layout, lapack_int n, lapack_int nrhs,
+ const double* d, const double* e, const double* df,
+ const double* ef, const double* b, lapack_int ldb,
+ double* x, lapack_int ldx, double* ferr,
+ double* berr )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dptrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n, df, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( n-1, ef, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dptrfs_work( matrix_layout, n, nrhs, d, e, df, ef, b, ldb, x,
+ ldx, ferr, berr, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dptrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dptrfs_work.c b/LAPACKE/src/lapacke_dptrfs_work.c
new file mode 100644
index 00000000..c3061239
--- /dev/null
+++ b/LAPACKE/src/lapacke_dptrfs_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dptrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dptrfs_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ const double* d, const double* e,
+ const double* df, const double* ef,
+ const double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* ferr, double* berr,
+ double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dptrfs( &n, &nrhs, d, e, df, ef, b, &ldb, x, &ldx, ferr, berr,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dptrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dptrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dptrfs( &n, &nrhs, d, e, df, ef, b_t, &ldb_t, x_t, &ldx_t, ferr,
+ berr, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dptrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dptrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dptsv.c b/LAPACKE/src/lapacke_dptsv.c
new file mode 100644
index 00000000..a3d9922a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dptsv.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dptsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dptsv( int matrix_layout, lapack_int n, lapack_int nrhs,
+ double* d, double* e, double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dptsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -6;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_dptsv_work( matrix_layout, n, nrhs, d, e, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_dptsv_work.c b/LAPACKE/src/lapacke_dptsv_work.c
new file mode 100644
index 00000000..4c46a4f0
--- /dev/null
+++ b/LAPACKE/src/lapacke_dptsv_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dptsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dptsv_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ double* d, double* e, double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dptsv( &n, &nrhs, d, e, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dptsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dptsv( &n, &nrhs, d, e, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dptsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dptsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dptsvx.c b/LAPACKE/src/lapacke_dptsvx.c
new file mode 100644
index 00000000..55bb0f74
--- /dev/null
+++ b/LAPACKE/src/lapacke_dptsvx.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dptsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dptsvx( int matrix_layout, char fact, lapack_int n,
+ lapack_int nrhs, const double* d, const double* e,
+ double* df, double* ef, const double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dptsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_d_nancheck( n, df, 1 ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_d_nancheck( n-1, ef, 1 ) ) {
+ return -8;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dptsvx_work( matrix_layout, fact, n, nrhs, d, e, df, ef, b,
+ ldb, x, ldx, rcond, ferr, berr, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dptsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dptsvx_work.c b/LAPACKE/src/lapacke_dptsvx_work.c
new file mode 100644
index 00000000..9d2100ad
--- /dev/null
+++ b/LAPACKE/src/lapacke_dptsvx_work.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dptsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dptsvx_work( int matrix_layout, char fact, lapack_int n,
+ lapack_int nrhs, const double* d,
+ const double* e, double* df, double* ef,
+ const double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* rcond, double* ferr,
+ double* berr, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dptsvx( &fact, &n, &nrhs, d, e, df, ef, b, &ldb, x, &ldx, rcond,
+ ferr, berr, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dptsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dptsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dptsvx( &fact, &n, &nrhs, d, e, df, ef, b_t, &ldb_t, x_t, &ldx_t,
+ rcond, ferr, berr, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dptsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dptsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpttrf.c b/LAPACKE/src/lapacke_dpttrf.c
new file mode 100644
index 00000000..d6652700
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpttrf.c
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dpttrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpttrf( lapack_int n, double* d, double* e )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* 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
+ return LAPACKE_dpttrf_work( n, d, e );
+}
diff --git a/LAPACKE/src/lapacke_dpttrf_work.c b/LAPACKE/src/lapacke_dpttrf_work.c
new file mode 100644
index 00000000..1d412095
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpttrf_work.c
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dpttrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpttrf_work( lapack_int n, double* d, double* e )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpttrf( &n, d, e, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dpttrs.c b/LAPACKE/src/lapacke_dpttrs.c
new file mode 100644
index 00000000..4c12af02
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpttrs.c
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpttrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpttrs( int matrix_layout, lapack_int n, lapack_int nrhs,
+ const double* d, const double* e, double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dpttrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -6;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_dpttrs_work( matrix_layout, n, nrhs, d, e, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_dpttrs_work.c b/LAPACKE/src/lapacke_dpttrs_work.c
new file mode 100644
index 00000000..c12700c2
--- /dev/null
+++ b/LAPACKE/src/lapacke_dpttrs_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dpttrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dpttrs_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ const double* d, const double* e, double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpttrs( &n, &nrhs, d, e, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dpttrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dpttrs( &n, &nrhs, d, e, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dpttrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dpttrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsbev.c b/LAPACKE/src/lapacke_dsbev.c
new file mode 100644
index 00000000..927a5925
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsbev.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsbev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsbev( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_int kd, double* ab, lapack_int ldab, double* w,
+ double* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n-2) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsbev_work( matrix_layout, jobz, uplo, n, kd, ab, ldab, w, z,
+ ldz, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsbev_work.c b/LAPACKE/src/lapacke_dsbev_work.c
new file mode 100644
index 00000000..71b0ec06
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsbev_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsbev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsbev_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_int kd, double* ab,
+ lapack_int ldab, double* w, double* z,
+ lapack_int ldz, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsbev( &jobz, &uplo, &n, &kd, ab, &ldab, w, z, &ldz, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldz_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dsbev_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dsbev_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsbev( &jobz, &uplo, &n, &kd, ab_t, &ldab_t, w, z_t, &ldz_t,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsbev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsbevd.c b/LAPACKE/src/lapacke_dsbevd.c
new file mode 100644
index 00000000..03aec545
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsbevd.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsbevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsbevd( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_int kd, double* ab, lapack_int ldab,
+ double* w, double* z, lapack_int ldz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbevd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dsbevd_work( matrix_layout, jobz, uplo, n, kd, ab, ldab, w, z,
+ ldz, &work_query, lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_dsbevd_work( matrix_layout, jobz, uplo, n, kd, ab, ldab, w, z,
+ ldz, 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_dsbevd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsbevd_work.c b/LAPACKE/src/lapacke_dsbevd_work.c
new file mode 100644
index 00000000..c61cc533
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsbevd_work.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsbevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsbevd_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_int kd, double* ab,
+ lapack_int ldab, double* w, double* z,
+ lapack_int ldz, double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsbevd( &jobz, &uplo, &n, &kd, ab, &ldab, w, z, &ldz, work,
+ &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldz_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dsbevd_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dsbevd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_dsbevd( &jobz, &uplo, &n, &kd, ab, &ldab_t, w, z, &ldz_t,
+ work, &lwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsbevd( &jobz, &uplo, &n, &kd, ab_t, &ldab_t, w, z_t, &ldz_t,
+ work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbevd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsbevd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsbevx.c b/LAPACKE/src/lapacke_dsbevx.c
new file mode 100644
index 00000000..b79e1edf
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsbevx.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsbevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsbevx( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, lapack_int kd, double* ab,
+ lapack_int ldab, double* q, lapack_int ldq,
+ double vl, double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w, double* z,
+ lapack_int ldz, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -15;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,7*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsbevx_work( matrix_layout, jobz, range, uplo, n, kd, ab,
+ ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z,
+ ldz, work, iwork, ifail );
+ /* 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_dsbevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsbevx_work.c b/LAPACKE/src/lapacke_dsbevx_work.c
new file mode 100644
index 00000000..e3642cbe
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsbevx_work.c
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsbevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsbevx_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n, lapack_int kd,
+ double* ab, lapack_int ldab, double* q,
+ lapack_int ldq, double vl, double vu,
+ lapack_int il, lapack_int iu, double abstol,
+ lapack_int* m, double* w, double* z,
+ lapack_int ldz, double* work, lapack_int* iwork,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsbevx( &jobz, &range, &uplo, &n, &kd, ab, &ldab, q, &ldq, &vl,
+ &vu, &il, &iu, &abstol, m, w, z, &ldz, work, iwork,
+ ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* q_t = NULL;
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dsbevx_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dsbevx_work", info );
+ return info;
+ }
+ if( ldz < ncols_z ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_dsbevx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ q_t = (double*)LAPACKE_malloc( sizeof(double) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsbevx( &jobz, &range, &uplo, &n, &kd, ab_t, &ldab_t, q_t,
+ &ldq_t, &vl, &vu, &il, &iu, &abstol, m, w, z_t, &ldz_t,
+ work, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsbevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsbgst.c b/LAPACKE/src/lapacke_dsbgst.c
new file mode 100644
index 00000000..e81fe25a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsbgst.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsbgst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsbgst( int matrix_layout, char vect, char uplo, lapack_int n,
+ lapack_int ka, lapack_int kb, double* ab,
+ lapack_int ldab, const double* bb, lapack_int ldbb,
+ double* x, lapack_int ldx )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbgst", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsbgst_work( matrix_layout, vect, uplo, n, ka, kb, ab, ldab,
+ bb, ldbb, x, ldx, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbgst", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsbgst_work.c b/LAPACKE/src/lapacke_dsbgst_work.c
new file mode 100644
index 00000000..248ab615
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsbgst_work.c
@@ -0,0 +1,123 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsbgst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsbgst_work( int matrix_layout, char vect, char uplo,
+ lapack_int n, lapack_int ka, lapack_int kb,
+ double* ab, lapack_int ldab, const double* bb,
+ lapack_int ldbb, double* x, lapack_int ldx,
+ double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsbgst( &vect, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, x,
+ &ldx, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,ka+1);
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_int ldx_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* bb_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dsbgst_work", info );
+ return info;
+ }
+ if( ldbb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dsbgst_work", info );
+ return info;
+ }
+ if( ldx < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dsbgst_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bb_t = (double*)LAPACKE_malloc( sizeof(double) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( vect, 'v' ) ) {
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,n) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsb_trans( matrix_layout, uplo, n, ka, ab, ldab, ab_t, ldab_t );
+ LAPACKE_dsb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsbgst( &vect, &uplo, &n, &ka, &kb, ab_t, &ldab_t, bb_t, &ldbb_t,
+ x_t, &ldx_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsb_trans( LAPACK_COL_MAJOR, uplo, n, ka, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, x_t, ldx_t, x, ldx );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_free( x_t );
+ }
+exit_level_2:
+ LAPACKE_free( bb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbgst_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsbgst_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsbgv.c b/LAPACKE/src/lapacke_dsbgv.c
new file mode 100644
index 00000000..37ea55bb
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsbgv.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsbgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsbgv( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_int ka, lapack_int kb, double* ab,
+ lapack_int ldab, double* bb, lapack_int ldbb,
+ double* w, double* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbgv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsbgv_work( matrix_layout, jobz, uplo, n, ka, kb, ab, ldab,
+ bb, ldbb, w, z, ldz, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbgv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsbgv_work.c b/LAPACKE/src/lapacke_dsbgv_work.c
new file mode 100644
index 00000000..069650b2
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsbgv_work.c
@@ -0,0 +1,125 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsbgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsbgv_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_int ka, lapack_int kb,
+ double* ab, lapack_int ldab, double* bb,
+ lapack_int ldbb, double* w, double* z,
+ lapack_int ldz, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsbgv( &jobz, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, w, z,
+ &ldz, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,ka+1);
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_int ldz_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* bb_t = NULL;
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dsbgv_work", info );
+ return info;
+ }
+ if( ldbb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dsbgv_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dsbgv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bb_t = (double*)LAPACKE_malloc( sizeof(double) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsb_trans( matrix_layout, uplo, n, ka, ab, ldab, ab_t, ldab_t );
+ LAPACKE_dsb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsbgv( &jobz, &uplo, &n, &ka, &kb, ab_t, &ldab_t, bb_t, &ldbb_t,
+ w, z_t, &ldz_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsb_trans( LAPACK_COL_MAJOR, uplo, n, ka, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_dsb_trans( LAPACK_COL_MAJOR, uplo, n, kb, bb_t, ldbb_t, bb,
+ ldbb );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_2:
+ LAPACKE_free( bb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbgv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsbgv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsbgvd.c b/LAPACKE/src/lapacke_dsbgvd.c
new file mode 100644
index 00000000..591e2b98
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsbgvd.c
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsbgvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsbgvd( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_int ka, lapack_int kb, double* ab,
+ lapack_int ldab, double* bb, lapack_int ldbb,
+ double* w, double* z, lapack_int ldz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbgvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dsbgvd_work( matrix_layout, jobz, uplo, n, ka, kb, ab, ldab,
+ bb, ldbb, w, z, ldz, &work_query, lwork,
+ &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_dsbgvd_work( matrix_layout, jobz, uplo, n, ka, kb, ab, ldab,
+ bb, ldbb, w, z, ldz, 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_dsbgvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsbgvd_work.c b/LAPACKE/src/lapacke_dsbgvd_work.c
new file mode 100644
index 00000000..4880a088
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsbgvd_work.c
@@ -0,0 +1,132 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsbgvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsbgvd_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_int ka, lapack_int kb,
+ double* ab, lapack_int ldab, double* bb,
+ lapack_int ldbb, double* w, double* z,
+ lapack_int ldz, double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsbgvd( &jobz, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, w, z,
+ &ldz, work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,ka+1);
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_int ldz_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* bb_t = NULL;
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dsbgvd_work", info );
+ return info;
+ }
+ if( ldbb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dsbgvd_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dsbgvd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_dsbgvd( &jobz, &uplo, &n, &ka, &kb, ab, &ldab_t, bb, &ldbb_t,
+ w, z, &ldz_t, work, &lwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bb_t = (double*)LAPACKE_malloc( sizeof(double) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsb_trans( matrix_layout, uplo, n, ka, ab, ldab, ab_t, ldab_t );
+ LAPACKE_dsb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsbgvd( &jobz, &uplo, &n, &ka, &kb, ab_t, &ldab_t, bb_t, &ldbb_t,
+ w, z_t, &ldz_t, work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsb_trans( LAPACK_COL_MAJOR, uplo, n, ka, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_dsb_trans( LAPACK_COL_MAJOR, uplo, n, kb, bb_t, ldbb_t, bb,
+ ldbb );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_2:
+ LAPACKE_free( bb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbgvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsbgvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsbgvx.c b/LAPACKE/src/lapacke_dsbgvx.c
new file mode 100644
index 00000000..8c122552
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsbgvx.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsbgvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsbgvx( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, lapack_int ka, lapack_int kb,
+ double* ab, lapack_int ldab, double* bb,
+ lapack_int ldbb, double* q, lapack_int ldq,
+ double vl, double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w, double* z,
+ lapack_int ldz, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbgvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -18;
+ }
+ if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -14;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -15;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,7*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsbgvx_work( matrix_layout, jobz, range, uplo, n, ka, kb, ab,
+ ldab, bb, ldbb, q, ldq, vl, vu, il, iu, abstol,
+ m, w, z, ldz, work, iwork, ifail );
+ /* 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_dsbgvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsbgvx_work.c b/LAPACKE/src/lapacke_dsbgvx_work.c
new file mode 100644
index 00000000..8e6768f4
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsbgvx_work.c
@@ -0,0 +1,152 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsbgvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsbgvx_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n, lapack_int ka,
+ lapack_int kb, double* ab, lapack_int ldab,
+ double* bb, lapack_int ldbb, double* q,
+ lapack_int ldq, double vl, double vu,
+ lapack_int il, lapack_int iu, double abstol,
+ lapack_int* m, double* w, double* z,
+ lapack_int ldz, double* work, lapack_int* iwork,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsbgvx( &jobz, &range, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb,
+ q, &ldq, &vl, &vu, &il, &iu, &abstol, m, w, z, &ldz,
+ work, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,ka+1);
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* bb_t = NULL;
+ double* q_t = NULL;
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dsbgvx_work", info );
+ return info;
+ }
+ if( ldbb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dsbgvx_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dsbgvx_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -22;
+ LAPACKE_xerbla( "LAPACKE_dsbgvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bb_t = (double*)LAPACKE_malloc( sizeof(double) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ q_t = (double*)LAPACKE_malloc( sizeof(double) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsb_trans( matrix_layout, uplo, n, ka, ab, ldab, ab_t, ldab_t );
+ LAPACKE_dsb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsbgvx( &jobz, &range, &uplo, &n, &ka, &kb, ab_t, &ldab_t, bb_t,
+ &ldbb_t, q_t, &ldq_t, &vl, &vu, &il, &iu, &abstol, m, w,
+ z_t, &ldz_t, work, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsb_trans( LAPACK_COL_MAJOR, uplo, n, ka, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_dsb_trans( LAPACK_COL_MAJOR, uplo, n, kb, bb_t, ldbb_t, bb,
+ ldbb );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( bb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbgvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsbgvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsbtrd.c b/LAPACKE/src/lapacke_dsbtrd.c
new file mode 100644
index 00000000..33a89ad2
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsbtrd.c
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsbtrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsbtrd( int matrix_layout, char vect, char uplo, lapack_int n,
+ lapack_int kd, double* ab, lapack_int ldab,
+ double* d, double* e, double* q, lapack_int ldq )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbtrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsbtrd_work( matrix_layout, vect, uplo, n, kd, ab, ldab, d, e,
+ q, ldq, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbtrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsbtrd_work.c b/LAPACKE/src/lapacke_dsbtrd_work.c
new file mode 100644
index 00000000..b654545d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsbtrd_work.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsbtrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsbtrd_work( int matrix_layout, char vect, char uplo,
+ lapack_int n, lapack_int kd, double* ab,
+ lapack_int ldab, double* d, double* e,
+ double* q, lapack_int ldq, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsbtrd( &vect, &uplo, &n, &kd, ab, &ldab, d, e, q, &ldq, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldq_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dsbtrd_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dsbtrd_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ q_t = (double*)LAPACKE_malloc( sizeof(double) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsbtrd( &vect, &uplo, &n, &kd, ab_t, &ldab_t, d, e, q_t, &ldq_t,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsbtrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsbtrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsfrk.c b/LAPACKE/src/lapacke_dsfrk.c
new file mode 100644
index 00000000..850a9b86
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsfrk.c
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsfrk
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsfrk( int matrix_layout, char transr, char uplo, char trans,
+ lapack_int n, lapack_int k, double alpha,
+ const double* a, lapack_int lda, double beta,
+ double* c )
+{
+ lapack_int ka, na;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsfrk", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ ka = LAPACKE_lsame( trans, 'n' ) ? k : n;
+ na = LAPACKE_lsame( trans, 'n' ) ? n : k;
+ if( LAPACKE_dge_nancheck( matrix_layout, na, ka, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_d_nancheck( 1, &alpha, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &beta, 1 ) ) {
+ return -10;
+ }
+ if( LAPACKE_dpf_nancheck( n, c ) ) {
+ return -11;
+ }
+#endif
+ return LAPACKE_dsfrk_work( matrix_layout, transr, uplo, trans, n, k, alpha,
+ a, lda, beta, c );
+}
diff --git a/LAPACKE/src/lapacke_dsfrk_work.c b/LAPACKE/src/lapacke_dsfrk_work.c
new file mode 100644
index 00000000..c3ccd0a8
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsfrk_work.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsfrk
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsfrk_work( int matrix_layout, char transr, char uplo,
+ char trans, lapack_int n, lapack_int k,
+ double alpha, const double* a, lapack_int lda,
+ double beta, double* c )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsfrk( &transr, &uplo, &trans, &n, &k, &alpha, a, &lda, &beta,
+ c );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int na = LAPACKE_lsame( trans, 'n' ) ? n : k;
+ lapack_int ka = LAPACKE_lsame( trans, 'n' ) ? k : n;
+ lapack_int lda_t = MAX(1,na);
+ double* a_t = NULL;
+ double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < ka ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dsfrk_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,ka) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, na, ka, a, lda, a_t, lda_t );
+ LAPACKE_dpf_trans( matrix_layout, transr, uplo, n, c, c_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsfrk( &transr, &uplo, &trans, &n, &k, &alpha, a_t, &lda_t,
+ &beta, c_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_dpf_trans( LAPACK_COL_MAJOR, transr, uplo, n, c_t, c );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsfrk_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsfrk_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsgesv.c b/LAPACKE/src/lapacke_dsgesv.c
new file mode 100644
index 00000000..546006e2
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsgesv.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsgesv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsgesv( int matrix_layout, lapack_int n, lapack_int nrhs,
+ double* a, lapack_int lda, lapack_int* ipiv,
+ double* b, lapack_int ldb, double* x, lapack_int ldx,
+ lapack_int* iter )
+{
+ lapack_int info = 0;
+ float* swork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsgesv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ swork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) * MAX(1,n+nrhs) );
+ if( swork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) * MAX(1,nrhs) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsgesv_work( matrix_layout, n, nrhs, a, lda, ipiv, b, ldb, x,
+ ldx, work, swork, iter );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( swork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsgesv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsgesv_work.c b/LAPACKE/src/lapacke_dsgesv_work.c
new file mode 100644
index 00000000..f7791a5c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsgesv_work.c
@@ -0,0 +1,117 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsgesv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsgesv_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ double* a, lapack_int lda, lapack_int* ipiv,
+ double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* work, float* swork,
+ lapack_int* iter )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsgesv( &n, &nrhs, a, &lda, ipiv, b, &ldb, x, &ldx, work, swork,
+ iter, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dsgesv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dsgesv_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dsgesv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsgesv( &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, x_t, &ldx_t,
+ work, swork, iter, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsgesv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsgesv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspcon.c b/LAPACKE/src/lapacke_dspcon.c
new file mode 100644
index 00000000..c80c8226
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspcon.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspcon( int matrix_layout, char uplo, lapack_int n,
+ const double* ap, const lapack_int* ipiv,
+ double anorm, double* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dspcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_dsp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dspcon_work( matrix_layout, uplo, n, ap, ipiv, anorm, rcond,
+ work, iwork );
+ /* 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_dspcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspcon_work.c b/LAPACKE/src/lapacke_dspcon_work.c
new file mode 100644
index 00000000..2902521a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspcon_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspcon_work( int matrix_layout, char uplo, lapack_int n,
+ const double* ap, const lapack_int* ipiv,
+ double anorm, double* rcond, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspcon( &uplo, &n, ap, ipiv, &anorm, rcond, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspcon( &uplo, &n, ap_t, ipiv, &anorm, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dspcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dspcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspev.c b/LAPACKE/src/lapacke_dspev.c
new file mode 100644
index 00000000..82693a0f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspev.c
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspev( int matrix_layout, char jobz, char uplo, lapack_int n,
+ double* ap, double* w, double* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dspev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsp_nancheck( n, ap ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dspev_work( matrix_layout, jobz, uplo, n, ap, w, z, ldz,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dspev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspev_work.c b/LAPACKE/src/lapacke_dspev_work.c
new file mode 100644
index 00000000..3fbd4dba
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspev_work.c
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspev_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, double* ap, double* w, double* z,
+ lapack_int ldz, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspev( &jobz, &uplo, &n, ap, w, z, &ldz, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ double* z_t = NULL;
+ double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dspev_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspev( &jobz, &uplo, &n, ap_t, w, z_t, &ldz_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ LAPACKE_dsp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dspev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dspev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspevd.c b/LAPACKE/src/lapacke_dspevd.c
new file mode 100644
index 00000000..9a138d09
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspevd.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspevd( int matrix_layout, char jobz, char uplo, lapack_int n,
+ double* ap, double* w, double* z, lapack_int ldz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dspevd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsp_nancheck( n, ap ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dspevd_work( matrix_layout, jobz, uplo, n, ap, w, z, ldz,
+ &work_query, lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_dspevd_work( matrix_layout, jobz, uplo, n, ap, w, z, ldz,
+ 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_dspevd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspevd_work.c b/LAPACKE/src/lapacke_dspevd_work.c
new file mode 100644
index 00000000..46f27c5b
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspevd_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspevd_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, double* ap, double* w, double* z,
+ lapack_int ldz, double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspevd( &jobz, &uplo, &n, ap, w, z, &ldz, work, &lwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ double* z_t = NULL;
+ double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dspevd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_dspevd( &jobz, &uplo, &n, ap, w, z, &ldz_t, work, &lwork,
+ iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspevd( &jobz, &uplo, &n, ap_t, w, z_t, &ldz_t, work, &lwork,
+ iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ LAPACKE_dsp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dspevd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dspevd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspevx.c b/LAPACKE/src/lapacke_dspevx.c
new file mode 100644
index 00000000..6fd72448
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspevx.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspevx( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, double* ap, double vl, double vu,
+ lapack_int il, lapack_int iu, double abstol,
+ lapack_int* m, double* w, double* z, lapack_int ldz,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dspevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_dsp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -8;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,8*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dspevx_work( matrix_layout, jobz, range, uplo, n, ap, vl, vu,
+ il, iu, abstol, m, w, z, ldz, work, iwork,
+ ifail );
+ /* 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_dspevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspevx_work.c b/LAPACKE/src/lapacke_dspevx_work.c
new file mode 100644
index 00000000..06719b27
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspevx_work.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspevx_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n, double* ap, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w,
+ double* z, lapack_int ldz, double* work,
+ lapack_int* iwork, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspevx( &jobz, &range, &uplo, &n, ap, &vl, &vu, &il, &iu,
+ &abstol, m, w, z, &ldz, work, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int ldz_t = MAX(1,n);
+ double* z_t = NULL;
+ double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < ncols_z ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dspevx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspevx( &jobz, &range, &uplo, &n, ap_t, &vl, &vu, &il, &iu,
+ &abstol, m, w, z_t, &ldz_t, work, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ LAPACKE_dsp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dspevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dspevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspgst.c b/LAPACKE/src/lapacke_dspgst.c
new file mode 100644
index 00000000..8af877cd
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspgst.c
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspgst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspgst( int matrix_layout, lapack_int itype, char uplo,
+ lapack_int n, double* ap, const double* bp )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dspgst", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_dsp_nancheck( n, bp ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_dspgst_work( matrix_layout, itype, uplo, n, ap, bp );
+}
diff --git a/LAPACKE/src/lapacke_dspgst_work.c b/LAPACKE/src/lapacke_dspgst_work.c
new file mode 100644
index 00000000..57c74b93
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspgst_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspgst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspgst_work( int matrix_layout, lapack_int itype, char uplo,
+ lapack_int n, double* ap, const double* bp )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspgst( &itype, &uplo, &n, ap, bp, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ double* ap_t = NULL;
+ double* bp_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( bp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, bp, bp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspgst( &itype, &uplo, &n, ap_t, bp_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( bp_t );
+exit_level_1:
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dspgst_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dspgst_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspgv.c b/LAPACKE/src/lapacke_dspgv.c
new file mode 100644
index 00000000..16c99093
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspgv.c
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspgv( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, double* ap, double* bp,
+ double* w, double* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dspgv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_dsp_nancheck( n, bp ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dspgv_work( matrix_layout, itype, jobz, uplo, n, ap, bp, w, z,
+ ldz, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dspgv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspgv_work.c b/LAPACKE/src/lapacke_dspgv_work.c
new file mode 100644
index 00000000..434c6bf9
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspgv_work.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspgv_work( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, double* ap, double* bp,
+ double* w, double* z, lapack_int ldz,
+ double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspgv( &itype, &jobz, &uplo, &n, ap, bp, w, z, &ldz, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ double* z_t = NULL;
+ double* ap_t = NULL;
+ double* bp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dspgv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ bp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( bp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, bp, bp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspgv( &itype, &jobz, &uplo, &n, ap_t, bp_t, w, z_t, &ldz_t,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ LAPACKE_dsp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ LAPACKE_dsp_trans( LAPACK_COL_MAJOR, uplo, n, bp_t, bp );
+ /* Release memory and exit */
+ LAPACKE_free( bp_t );
+exit_level_2:
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dspgv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dspgv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspgvd.c b/LAPACKE/src/lapacke_dspgvd.c
new file mode 100644
index 00000000..c554a6f6
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspgvd.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspgvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspgvd( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, double* ap, double* bp,
+ double* w, double* z, lapack_int ldz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dspgvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_dsp_nancheck( n, bp ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dspgvd_work( matrix_layout, itype, jobz, uplo, n, ap, bp, w,
+ z, ldz, &work_query, lwork, &iwork_query,
+ liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_dspgvd_work( matrix_layout, itype, jobz, uplo, n, ap, bp, w,
+ z, ldz, 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_dspgvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspgvd_work.c b/LAPACKE/src/lapacke_dspgvd_work.c
new file mode 100644
index 00000000..125831cc
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspgvd_work.c
@@ -0,0 +1,119 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspgvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspgvd_work( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, double* ap, double* bp,
+ double* w, double* z, lapack_int ldz,
+ double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspgvd( &itype, &jobz, &uplo, &n, ap, bp, w, z, &ldz, work,
+ &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ double* z_t = NULL;
+ double* ap_t = NULL;
+ double* bp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dspgvd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_dspgvd( &itype, &jobz, &uplo, &n, ap, bp, w, z, &ldz_t, work,
+ &lwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ bp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( bp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, bp, bp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspgvd( &itype, &jobz, &uplo, &n, ap_t, bp_t, w, z_t, &ldz_t,
+ work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ LAPACKE_dsp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ LAPACKE_dsp_trans( LAPACK_COL_MAJOR, uplo, n, bp_t, bp );
+ /* Release memory and exit */
+ LAPACKE_free( bp_t );
+exit_level_2:
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dspgvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dspgvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspgvx.c b/LAPACKE/src/lapacke_dspgvx.c
new file mode 100644
index 00000000..76e2ae7d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspgvx.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspgvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspgvx( int matrix_layout, lapack_int itype, char jobz,
+ char range, char uplo, lapack_int n, double* ap,
+ double* bp, double vl, double vu, lapack_int il,
+ lapack_int iu, double abstol, lapack_int* m,
+ double* w, double* z, lapack_int ldz,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dspgvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -13;
+ }
+ if( LAPACKE_dsp_nancheck( n, ap ) ) {
+ return -7;
+ }
+ if( LAPACKE_dsp_nancheck( n, bp ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -9;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,8*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dspgvx_work( matrix_layout, itype, jobz, range, uplo, n, ap,
+ bp, vl, vu, il, iu, abstol, m, w, z, ldz, work,
+ iwork, ifail );
+ /* 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_dspgvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspgvx_work.c b/LAPACKE/src/lapacke_dspgvx_work.c
new file mode 100644
index 00000000..bf967472
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspgvx_work.c
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspgvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspgvx_work( int matrix_layout, lapack_int itype, char jobz,
+ char range, char uplo, lapack_int n, double* ap,
+ double* bp, double vl, double vu, lapack_int il,
+ lapack_int iu, double abstol, lapack_int* m,
+ double* w, double* z, lapack_int ldz,
+ double* work, lapack_int* iwork,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspgvx( &itype, &jobz, &range, &uplo, &n, ap, bp, &vl, &vu, &il,
+ &iu, &abstol, m, w, z, &ldz, work, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int ldz_t = MAX(1,n);
+ double* z_t = NULL;
+ double* ap_t = NULL;
+ double* bp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < ncols_z ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_dspgvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ bp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( bp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, bp, bp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspgvx( &itype, &jobz, &range, &uplo, &n, ap_t, bp_t, &vl, &vu,
+ &il, &iu, &abstol, m, w, z_t, &ldz_t, work, iwork, ifail,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ LAPACKE_dsp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ LAPACKE_dsp_trans( LAPACK_COL_MAJOR, uplo, n, bp_t, bp );
+ /* Release memory and exit */
+ LAPACKE_free( bp_t );
+exit_level_2:
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dspgvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dspgvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsposv.c b/LAPACKE/src/lapacke_dsposv.c
new file mode 100644
index 00000000..688e89cd
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsposv.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsposv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsposv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, double* a, lapack_int lda,
+ double* b, lapack_int ldb, double* x, lapack_int ldx,
+ lapack_int* iter )
+{
+ lapack_int info = 0;
+ float* swork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsposv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ swork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) * MAX(1,n+nrhs) );
+ if( swork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) * MAX(1,nrhs) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsposv_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb, x,
+ ldx, work, swork, iter );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( swork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsposv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsposv_work.c b/LAPACKE/src/lapacke_dsposv_work.c
new file mode 100644
index 00000000..53a127fd
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsposv_work.c
@@ -0,0 +1,117 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsposv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsposv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, double* a, lapack_int lda,
+ double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* work, float* swork,
+ lapack_int* iter )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsposv( &uplo, &n, &nrhs, a, &lda, b, &ldb, x, &ldx, work, swork,
+ iter, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dsposv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dsposv_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dsposv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsposv( &uplo, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, x_t, &ldx_t,
+ work, swork, iter, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsposv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsposv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsprfs.c b/LAPACKE/src/lapacke_dsprfs.c
new file mode 100644
index 00000000..4559e6ed
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsprfs.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsprfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* ap, const double* afp,
+ const lapack_int* ipiv, const double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsprfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsp_nancheck( n, afp ) ) {
+ return -6;
+ }
+ if( LAPACKE_dsp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsprfs_work( matrix_layout, uplo, n, nrhs, ap, afp, ipiv, b,
+ ldb, x, ldx, ferr, berr, work, iwork );
+ /* 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_dsprfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsprfs_work.c b/LAPACKE/src/lapacke_dsprfs_work.c
new file mode 100644
index 00000000..16f3c8b2
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsprfs_work.c
@@ -0,0 +1,122 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsprfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* ap,
+ const double* afp, const lapack_int* ipiv,
+ const double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* ferr, double* berr,
+ double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsprfs( &uplo, &n, &nrhs, ap, afp, ipiv, b, &ldb, x, &ldx, ferr,
+ berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* b_t = NULL;
+ double* x_t = NULL;
+ double* ap_t = NULL;
+ double* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dsprfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dsprfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, afp, afp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsprfs( &uplo, &n, &nrhs, ap_t, afp_t, ipiv, b_t, &ldb_t, x_t,
+ &ldx_t, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsprfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsprfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspsv.c b/LAPACKE/src/lapacke_dspsv.c
new file mode 100644
index 00000000..9eadc601
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspsv.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspsv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, double* ap, lapack_int* ipiv,
+ double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dspsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_dspsv_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_dspsv_work.c b/LAPACKE/src/lapacke_dspsv_work.c
new file mode 100644
index 00000000..e813bb39
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspsv_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspsv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, double* ap, lapack_int* ipiv,
+ double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspsv( &uplo, &n, &nrhs, ap, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ double* b_t = NULL;
+ double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dspsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspsv( &uplo, &n, &nrhs, ap_t, ipiv, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_dsp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dspsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dspsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspsvx.c b/LAPACKE/src/lapacke_dspsvx.c
new file mode 100644
index 00000000..68be0539
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspsvx.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspsvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, const double* ap, double* afp,
+ lapack_int* ipiv, const double* b, lapack_int ldb,
+ double* x, lapack_int ldx, double* rcond,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dspsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_dsp_nancheck( n, afp ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_dsp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dspsvx_work( matrix_layout, fact, uplo, n, nrhs, ap, afp,
+ ipiv, b, ldb, x, ldx, rcond, ferr, berr, work,
+ iwork );
+ /* 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_dspsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dspsvx_work.c b/LAPACKE/src/lapacke_dspsvx_work.c
new file mode 100644
index 00000000..31db38ac
--- /dev/null
+++ b/LAPACKE/src/lapacke_dspsvx_work.c
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dspsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dspsvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs, const double* ap,
+ double* afp, lapack_int* ipiv, const double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr,
+ double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspsvx( &fact, &uplo, &n, &nrhs, ap, afp, ipiv, b, &ldb, x, &ldx,
+ rcond, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* b_t = NULL;
+ double* x_t = NULL;
+ double* ap_t = NULL;
+ double* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dspsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dspsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, afp, afp_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dspsvx( &fact, &uplo, &n, &nrhs, ap_t, afp_t, ipiv, b_t, &ldb_t,
+ x_t, &ldx_t, rcond, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ if( LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_dsp_trans( LAPACK_COL_MAJOR, uplo, n, afp_t, afp );
+ }
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dspsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dspsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsptrd.c b/LAPACKE/src/lapacke_dsptrd.c
new file mode 100644
index 00000000..9ac1a2a8
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsptrd.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsptrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsptrd( int matrix_layout, char uplo, lapack_int n,
+ double* ap, double* d, double* e, double* tau )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsptrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dsptrd_work( matrix_layout, uplo, n, ap, d, e, tau );
+}
diff --git a/LAPACKE/src/lapacke_dsptrd_work.c b/LAPACKE/src/lapacke_dsptrd_work.c
new file mode 100644
index 00000000..0ed0e879
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsptrd_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsptrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsptrd_work( int matrix_layout, char uplo, lapack_int n,
+ double* ap, double* d, double* e, double* tau )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsptrd( &uplo, &n, ap, d, e, tau, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsptrd( &uplo, &n, ap_t, d, e, tau, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsptrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsptrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsptrf.c b/LAPACKE/src/lapacke_dsptrf.c
new file mode 100644
index 00000000..44981ece
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsptrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsptrf( int matrix_layout, char uplo, lapack_int n,
+ double* ap, lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsptrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dsptrf_work( matrix_layout, uplo, n, ap, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_dsptrf_work.c b/LAPACKE/src/lapacke_dsptrf_work.c
new file mode 100644
index 00000000..36eb8efd
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsptrf_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsptrf_work( int matrix_layout, char uplo, lapack_int n,
+ double* ap, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsptrf( &uplo, &n, ap, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsptrf( &uplo, &n, ap_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsptrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsptrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsptri.c b/LAPACKE/src/lapacke_dsptri.c
new file mode 100644
index 00000000..c11d4aa9
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsptri.c
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsptri( int matrix_layout, char uplo, lapack_int n,
+ double* ap, const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsptri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsptri_work( matrix_layout, uplo, n, ap, ipiv, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsptri", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsptri_work.c b/LAPACKE/src/lapacke_dsptri_work.c
new file mode 100644
index 00000000..c8ad3ee2
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsptri_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsptri_work( int matrix_layout, char uplo, lapack_int n,
+ double* ap, const lapack_int* ipiv,
+ double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsptri( &uplo, &n, ap, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsptri( &uplo, &n, ap_t, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsptri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsptri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsptrs.c b/LAPACKE/src/lapacke_dsptrs.c
new file mode 100644
index 00000000..d56daf16
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsptrs.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsptrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* ap,
+ const lapack_int* ipiv, double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsptrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_dsptrs_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_dsptrs_work.c b/LAPACKE/src/lapacke_dsptrs_work.c
new file mode 100644
index 00000000..c1831673
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsptrs_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsptrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* ap,
+ const lapack_int* ipiv, double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsptrs( &uplo, &n, &nrhs, ap, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ double* b_t = NULL;
+ double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dsptrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsptrs( &uplo, &n, &nrhs, ap_t, ipiv, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsptrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsptrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstebz.c b/LAPACKE/src/lapacke_dstebz.c
new file mode 100644
index 00000000..fb1646c5
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstebz.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dstebz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstebz( char range, char order, lapack_int n, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, const double* d, const double* e,
+ lapack_int* m, lapack_int* nsplit, double* w,
+ lapack_int* iblock, lapack_int* isplit )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -9;
+ }
+ if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -4;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -5;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,3*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dstebz_work( range, order, n, vl, vu, il, iu, abstol, d, e,
+ m, nsplit, w, iblock, isplit, work, iwork );
+ /* 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_dstebz", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstebz_work.c b/LAPACKE/src/lapacke_dstebz_work.c
new file mode 100644
index 00000000..12e16c63
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstebz_work.c
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dstebz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstebz_work( char range, char order, lapack_int n, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, const double* d, const double* e,
+ lapack_int* m, lapack_int* nsplit, double* w,
+ lapack_int* iblock, lapack_int* isplit,
+ double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_dstebz( &range, &order, &n, &vl, &vu, &il, &iu, &abstol, d, e, m,
+ nsplit, w, iblock, isplit, work, iwork, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstedc.c b/LAPACKE/src/lapacke_dstedc.c
new file mode 100644
index 00000000..c9e1a0e1
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstedc.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dstedc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstedc( int matrix_layout, char compz, lapack_int n,
+ double* d, double* e, double* z, lapack_int ldz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dstedc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -6;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dstedc_work( matrix_layout, compz, n, d, e, z, ldz,
+ &work_query, lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_dstedc_work( matrix_layout, compz, n, d, e, z, ldz, 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_dstedc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstedc_work.c b/LAPACKE/src/lapacke_dstedc_work.c
new file mode 100644
index 00000000..951c3b09
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstedc_work.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dstedc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstedc_work( int matrix_layout, char compz, lapack_int n,
+ double* d, double* e, double* z, lapack_int ldz,
+ double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dstedc( &compz, &n, d, e, z, &ldz, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dstedc_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_dstedc( &compz, &n, d, e, z, &ldz_t, work, &lwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dstedc( &compz, &n, d, e, z_t, &ldz_t, work, &lwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dstedc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dstedc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstegr.c b/LAPACKE/src/lapacke_dstegr.c
new file mode 100644
index 00000000..270fd9a9
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstegr.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dstegr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstegr( int matrix_layout, char jobz, char range,
+ lapack_int n, double* d, double* e, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w, double* z,
+ lapack_int ldz, lapack_int* isuppz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dstegr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( n, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -8;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dstegr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, abstol, m, w, z, ldz, isuppz, &work_query,
+ lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_dstegr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, abstol, m, w, z, ldz, isuppz, 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_dstegr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstegr_work.c b/LAPACKE/src/lapacke_dstegr_work.c
new file mode 100644
index 00000000..2b462361
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstegr_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dstegr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstegr_work( int matrix_layout, char jobz, char range,
+ lapack_int n, double* d, double* e, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w,
+ double* z, lapack_int ldz, lapack_int* isuppz,
+ double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dstegr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol, m,
+ w, z, &ldz, isuppz, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ( LAPACKE_lsame( jobz, 'v' ) && ( ldz < ldz_t ) ) || ( ldz < 1 ) ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dstegr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_dstegr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol,
+ m, w, z, &ldz_t, isuppz, work, &lwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ /* Let be always 'n' instead of 'm' */
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dstegr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol, m,
+ w, z_t, &ldz_t, isuppz, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, *m, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dstegr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dstegr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstein.c b/LAPACKE/src/lapacke_dstein.c
new file mode 100644
index 00000000..4ef1a3c1
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstein.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dstein
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstein( int matrix_layout, lapack_int n, const double* d,
+ const double* e, lapack_int m, const double* w,
+ const lapack_int* iblock, const lapack_int* isplit,
+ double* z, lapack_int ldz, lapack_int* ifailv )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dstein", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -3;
+ }
+ if( LAPACKE_d_nancheck( n, e, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n, w, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,5*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dstein_work( matrix_layout, n, d, e, m, w, iblock, isplit, z,
+ ldz, work, iwork, ifailv );
+ /* 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_dstein", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstein_work.c b/LAPACKE/src/lapacke_dstein_work.c
new file mode 100644
index 00000000..573b77f7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstein_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dstein
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstein_work( int matrix_layout, lapack_int n, const double* d,
+ const double* e, lapack_int m, const double* w,
+ const lapack_int* iblock,
+ const lapack_int* isplit, double* z,
+ lapack_int ldz, double* work, lapack_int* iwork,
+ lapack_int* ifailv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dstein( &n, d, e, &m, w, iblock, isplit, z, &ldz, work, iwork,
+ ifailv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < m ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dstein_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,m) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dstein( &n, d, e, &m, w, iblock, isplit, z_t, &ldz_t, work,
+ iwork, ifailv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, m, z_t, ldz_t, z, ldz );
+ /* Release memory and exit */
+ LAPACKE_free( z_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dstein_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dstein_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstemr.c b/LAPACKE/src/lapacke_dstemr.c
new file mode 100644
index 00000000..01cbbd19
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstemr.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dstemr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstemr( int matrix_layout, char jobz, char range,
+ lapack_int n, double* d, double* e, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ lapack_int* m, double* w, double* z, lapack_int ldz,
+ lapack_int nzc, lapack_int* isuppz,
+ lapack_logical* tryrac )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dstemr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dstemr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, m, w, z, ldz, nzc, isuppz, tryrac,
+ &work_query, lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_dstemr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, m, w, z, ldz, nzc, isuppz, tryrac, 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_dstemr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstemr_work.c b/LAPACKE/src/lapacke_dstemr_work.c
new file mode 100644
index 00000000..7370ce8c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstemr_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dstemr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstemr_work( int matrix_layout, char jobz, char range,
+ lapack_int n, double* d, double* e, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ lapack_int* m, double* w, double* z,
+ lapack_int ldz, lapack_int nzc,
+ lapack_int* isuppz, lapack_logical* tryrac,
+ double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dstemr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, m, w, z,
+ &ldz, &nzc, isuppz, tryrac, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_dstemr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_dstemr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, m, w, z,
+ &ldz_t, &nzc, isuppz, tryrac, work, &lwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dstemr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, m, w, z_t,
+ &ldz_t, &nzc, isuppz, tryrac, work, &lwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dstemr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dstemr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsteqr.c b/LAPACKE/src/lapacke_dsteqr.c
new file mode 100644
index 00000000..4e4d8492
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsteqr.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsteqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsteqr( int matrix_layout, char compz, lapack_int n,
+ double* d, double* e, double* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lwork;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsteqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -6;
+ }
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( compz, 'n' ) ) {
+ lwork = 1;
+ } else {
+ lwork = MAX(1,2*n-2);
+ }
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsteqr_work( matrix_layout, compz, n, d, e, z, ldz, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsteqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsteqr_work.c b/LAPACKE/src/lapacke_dsteqr_work.c
new file mode 100644
index 00000000..e29aa337
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsteqr_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsteqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsteqr_work( int matrix_layout, char compz, lapack_int n,
+ double* d, double* e, double* z, lapack_int ldz,
+ double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsteqr( &compz, &n, d, e, z, &ldz, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dsteqr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsteqr( &compz, &n, d, e, z_t, &ldz_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsteqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsteqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsterf.c b/LAPACKE/src/lapacke_dsterf.c
new file mode 100644
index 00000000..29f46cf4
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsterf.c
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dsterf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsterf( lapack_int n, double* d, double* e )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* 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
+ return LAPACKE_dsterf_work( n, d, e );
+}
diff --git a/LAPACKE/src/lapacke_dsterf_work.c b/LAPACKE/src/lapacke_dsterf_work.c
new file mode 100644
index 00000000..b405fbb7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsterf_work.c
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dsterf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsterf_work( lapack_int n, double* d, double* e )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsterf( &n, d, e, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstev.c b/LAPACKE/src/lapacke_dstev.c
new file mode 100644
index 00000000..b023a212
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstev.c
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dstev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstev( int matrix_layout, char jobz, lapack_int n, double* d,
+ double* e, double* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dstev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n, e, 1 ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n-2) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dstev_work( matrix_layout, jobz, n, d, e, z, ldz, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dstev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstev_work.c b/LAPACKE/src/lapacke_dstev_work.c
new file mode 100644
index 00000000..ec6daec9
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstev_work.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dstev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstev_work( int matrix_layout, char jobz, lapack_int n,
+ double* d, double* e, double* z, lapack_int ldz,
+ double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dstev( &jobz, &n, d, e, z, &ldz, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dstev_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dstev( &jobz, &n, d, e, z_t, &ldz_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dstev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dstev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstevd.c b/LAPACKE/src/lapacke_dstevd.c
new file mode 100644
index 00000000..9f9a375c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstevd.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dstevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstevd( int matrix_layout, char jobz, lapack_int n, double* d,
+ double* e, double* z, lapack_int ldz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dstevd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n, e, 1 ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dstevd_work( matrix_layout, jobz, n, d, e, z, ldz,
+ &work_query, lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_dstevd_work( matrix_layout, jobz, n, d, e, z, ldz, 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_dstevd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstevd_work.c b/LAPACKE/src/lapacke_dstevd_work.c
new file mode 100644
index 00000000..0d378f88
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstevd_work.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dstevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstevd_work( int matrix_layout, char jobz, lapack_int n,
+ double* d, double* e, double* z, lapack_int ldz,
+ double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dstevd( &jobz, &n, d, e, z, &ldz, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dstevd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_dstevd( &jobz, &n, d, e, z, &ldz_t, work, &lwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dstevd( &jobz, &n, d, e, z_t, &ldz_t, work, &lwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dstevd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dstevd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstevr.c b/LAPACKE/src/lapacke_dstevr.c
new file mode 100644
index 00000000..8daa15f9
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstevr.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dstevr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstevr( int matrix_layout, char jobz, char range,
+ lapack_int n, double* d, double* e, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w, double* z,
+ lapack_int ldz, lapack_int* isuppz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dstevr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -8;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dstevr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, abstol, m, w, z, ldz, isuppz, &work_query,
+ lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_dstevr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, abstol, m, w, z, ldz, isuppz, 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_dstevr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstevr_work.c b/LAPACKE/src/lapacke_dstevr_work.c
new file mode 100644
index 00000000..314318f7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstevr_work.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dstevr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstevr_work( int matrix_layout, char jobz, char range,
+ lapack_int n, double* d, double* e, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w,
+ double* z, lapack_int ldz, lapack_int* isuppz,
+ double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dstevr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol, m,
+ w, z, &ldz, isuppz, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int ldz_t = MAX(1,n);
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < ncols_z ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dstevr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_dstevr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol,
+ m, w, z, &ldz_t, isuppz, work, &lwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dstevr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol, m,
+ w, z_t, &ldz_t, isuppz, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dstevr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dstevr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstevx.c b/LAPACKE/src/lapacke_dstevx.c
new file mode 100644
index 00000000..50d2e77c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstevx.c
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dstevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstevx( int matrix_layout, char jobz, char range,
+ lapack_int n, double* d, double* e, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w, double* z,
+ lapack_int ldz, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dstevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( n, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -8;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,5*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dstevx_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, abstol, m, w, z, ldz, work, iwork, ifail );
+ /* 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_dstevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dstevx_work.c b/LAPACKE/src/lapacke_dstevx_work.c
new file mode 100644
index 00000000..06767673
--- /dev/null
+++ b/LAPACKE/src/lapacke_dstevx_work.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dstevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dstevx_work( int matrix_layout, char jobz, char range,
+ lapack_int n, double* d, double* e, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w,
+ double* z, lapack_int ldz, double* work,
+ lapack_int* iwork, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dstevx( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol, m,
+ w, z, &ldz, work, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int ldz_t = MAX(1,n);
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < ncols_z ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dstevx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dstevx( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol, m,
+ w, z_t, &ldz_t, work, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dstevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dstevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsycon.c b/LAPACKE/src/lapacke_dsycon.c
new file mode 100644
index 00000000..2419d642
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsycon.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsycon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsycon( int matrix_layout, char uplo, lapack_int n,
+ const double* a, lapack_int lda,
+ const lapack_int* ipiv, double anorm, double* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsycon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsycon_work( matrix_layout, uplo, n, a, lda, ipiv, anorm,
+ rcond, work, iwork );
+ /* 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_dsycon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsycon_work.c b/LAPACKE/src/lapacke_dsycon_work.c
new file mode 100644
index 00000000..89843151
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsycon_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsycon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsycon_work( int matrix_layout, char uplo, lapack_int n,
+ const double* a, lapack_int lda,
+ const lapack_int* ipiv, double anorm,
+ double* rcond, double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsycon( &uplo, &n, a, &lda, ipiv, &anorm, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dsycon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsycon( &uplo, &n, a_t, &lda_t, ipiv, &anorm, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsycon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsycon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsyconv.c b/LAPACKE/src/lapacke_dsyconv.c
new file mode 100644
index 00000000..ed841f20
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyconv.c
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyconv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyconv( int matrix_layout, char uplo, char way, lapack_int n,
+ double* a, lapack_int lda, const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyconv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, lda, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsyconv_work( matrix_layout, uplo, way, n, a, lda, ipiv,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyconv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsyconv_work.c b/LAPACKE/src/lapacke_dsyconv_work.c
new file mode 100644
index 00000000..cf70ead3
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyconv_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyconv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyconv_work( int matrix_layout, char uplo, char way,
+ lapack_int n, double* a, lapack_int lda,
+ const lapack_int* ipiv, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyconv( &uplo, &way, &n, a, &lda, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,lda);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dsyconv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyconv( &uplo, &way, &n, a_t, &lda_t, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyconv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsyconv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsyequb.c b/LAPACKE/src/lapacke_dsyequb.c
new file mode 100644
index 00000000..a75e0bc3
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyequb.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyequb( int matrix_layout, char uplo, lapack_int n,
+ const double* a, lapack_int lda, double* s,
+ double* scond, double* amax )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsyequb_work( matrix_layout, uplo, n, a, lda, s, scond, amax,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyequb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsyequb_work.c b/LAPACKE/src/lapacke_dsyequb_work.c
new file mode 100644
index 00000000..a29a4ce1
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyequb_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyequb_work( int matrix_layout, char uplo, lapack_int n,
+ const double* a, lapack_int lda, double* s,
+ double* scond, double* amax, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyequb( &uplo, &n, a, &lda, s, scond, amax, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dsyequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyequb( &uplo, &n, a_t, &lda_t, s, scond, amax, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsyequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsyev.c b/LAPACKE/src/lapacke_dsyev.c
new file mode 100644
index 00000000..46cc0334
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyev.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyev( int matrix_layout, char jobz, char uplo, lapack_int n,
+ double* a, lapack_int lda, double* w )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dsyev_work( matrix_layout, jobz, uplo, n, a, lda, w,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsyev_work( matrix_layout, jobz, uplo, n, a, lda, w, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsyev_work.c b/LAPACKE/src/lapacke_dsyev_work.c
new file mode 100644
index 00000000..39ed8f32
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyev_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyev_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, double* a, lapack_int lda,
+ double* w, double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyev( &jobz, &uplo, &n, a, &lda, w, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dsyev_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dsyev( &jobz, &uplo, &n, a, &lda_t, w, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyev( &jobz, &uplo, &n, a_t, &lda_t, w, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsyev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsyevd.c b/LAPACKE/src/lapacke_dsyevd.c
new file mode 100644
index 00000000..515d32ff
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyevd.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyevd( int matrix_layout, char jobz, char uplo, lapack_int n,
+ double* a, lapack_int lda, double* w )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyevd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dsyevd_work( matrix_layout, jobz, uplo, n, a, lda, w,
+ &work_query, lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_dsyevd_work( matrix_layout, jobz, uplo, n, a, lda, w, 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_dsyevd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsyevd_work.c b/LAPACKE/src/lapacke_dsyevd_work.c
new file mode 100644
index 00000000..78336290
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyevd_work.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyevd_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, double* a, lapack_int lda,
+ double* w, double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyevd( &jobz, &uplo, &n, a, &lda, w, work, &lwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dsyevd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_dsyevd( &jobz, &uplo, &n, a, &lda_t, w, work, &lwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyevd( &jobz, &uplo, &n, a_t, &lda_t, w, work, &lwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyevd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsyevd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsyevr.c b/LAPACKE/src/lapacke_dsyevr.c
new file mode 100644
index 00000000..2d371b9e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyevr.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyevr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyevr( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, double* a, lapack_int lda, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w, double* z,
+ lapack_int ldz, lapack_int* isuppz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyevr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -12;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -9;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dsyevr_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
+ vu, il, iu, abstol, m, w, z, ldz, isuppz,
+ &work_query, lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_dsyevr_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
+ vu, il, iu, abstol, m, w, z, ldz, isuppz, 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_dsyevr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsyevr_work.c b/LAPACKE/src/lapacke_dsyevr_work.c
new file mode 100644
index 00000000..681e70f4
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyevr_work.c
@@ -0,0 +1,124 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyevr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyevr_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n, double* a,
+ lapack_int lda, double vl, double vu,
+ lapack_int il, lapack_int iu, double abstol,
+ lapack_int* m, double* w, double* z,
+ lapack_int ldz, lapack_int* isuppz,
+ double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyevr( &jobz, &range, &uplo, &n, a, &lda, &vl, &vu, &il, &iu,
+ &abstol, m, w, z, &ldz, isuppz, work, &lwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ double* a_t = NULL;
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dsyevr_work", info );
+ return info;
+ }
+ if( ldz < ncols_z ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_dsyevr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_dsyevr( &jobz, &range, &uplo, &n, a, &lda_t, &vl, &vu, &il,
+ &iu, &abstol, m, w, z, &ldz_t, isuppz, work, &lwork,
+ iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyevr( &jobz, &range, &uplo, &n, a_t, &lda_t, &vl, &vu, &il,
+ &iu, &abstol, m, w, z_t, &ldz_t, isuppz, work, &lwork,
+ iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyevr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsyevr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsyevx.c b/LAPACKE/src/lapacke_dsyevx.c
new file mode 100644
index 00000000..bad1f793
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyevx.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyevx( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, double* a, lapack_int lda, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w, double* z,
+ lapack_int ldz, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -12;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -9;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dsyevx_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
+ vu, il, iu, abstol, m, w, z, ldz, &work_query,
+ lwork, iwork, ifail );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_dsyevx_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
+ vu, il, iu, abstol, m, w, z, ldz, work, lwork,
+ iwork, ifail );
+ /* 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_dsyevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsyevx_work.c b/LAPACKE/src/lapacke_dsyevx_work.c
new file mode 100644
index 00000000..e3d29f9c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyevx_work.c
@@ -0,0 +1,123 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyevx_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n, double* a,
+ lapack_int lda, double vl, double vu,
+ lapack_int il, lapack_int iu, double abstol,
+ lapack_int* m, double* w, double* z,
+ lapack_int ldz, double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyevx( &jobz, &range, &uplo, &n, a, &lda, &vl, &vu, &il, &iu,
+ &abstol, m, w, z, &ldz, work, &lwork, iwork, ifail,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ double* a_t = NULL;
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dsyevx_work", info );
+ return info;
+ }
+ if( ldz < ncols_z ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_dsyevx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dsyevx( &jobz, &range, &uplo, &n, a, &lda_t, &vl, &vu, &il,
+ &iu, &abstol, m, w, z, &ldz_t, work, &lwork, iwork,
+ ifail, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyevx( &jobz, &range, &uplo, &n, a_t, &lda_t, &vl, &vu, &il,
+ &iu, &abstol, m, w, z_t, &ldz_t, work, &lwork, iwork,
+ ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsyevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsygst.c b/LAPACKE/src/lapacke_dsygst.c
new file mode 100644
index 00000000..69a1db9b
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsygst.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsygst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsygst( int matrix_layout, lapack_int itype, char uplo,
+ lapack_int n, double* a, lapack_int lda,
+ const double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsygst", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_dsygst_work( matrix_layout, itype, uplo, n, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_dsygst_work.c b/LAPACKE/src/lapacke_dsygst_work.c
new file mode 100644
index 00000000..77f64a47
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsygst_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsygst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsygst_work( int matrix_layout, lapack_int itype, char uplo,
+ lapack_int n, double* a, lapack_int lda,
+ const double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsygst( &itype, &uplo, &n, a, &lda, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dsygst_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dsygst_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsygst( &itype, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsygst_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsygst_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsygv.c b/LAPACKE/src/lapacke_dsygv.c
new file mode 100644
index 00000000..c32902d5
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsygv.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsygv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsygv( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, double* a, lapack_int lda,
+ double* b, lapack_int ldb, double* w )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsygv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dsygv_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
+ ldb, w, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsygv_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
+ ldb, w, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsygv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsygv_work.c b/LAPACKE/src/lapacke_dsygv_work.c
new file mode 100644
index 00000000..98b5185c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsygv_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsygv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsygv_work( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, double* a,
+ lapack_int lda, double* b, lapack_int ldb,
+ double* w, double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsygv( &itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dsygv_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dsygv_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dsygv( &itype, &jobz, &uplo, &n, a, &lda_t, b, &ldb_t, w,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsygv( &itype, &jobz, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, w,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsygv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsygv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsygvd.c b/LAPACKE/src/lapacke_dsygvd.c
new file mode 100644
index 00000000..6e66c26d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsygvd.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsygvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsygvd( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, double* a, lapack_int lda,
+ double* b, lapack_int ldb, double* w )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsygvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dsygvd_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
+ ldb, w, &work_query, lwork, &iwork_query,
+ liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_dsygvd_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
+ ldb, w, 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_dsygvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsygvd_work.c b/LAPACKE/src/lapacke_dsygvd_work.c
new file mode 100644
index 00000000..98b19a57
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsygvd_work.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsygvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsygvd_work( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, double* a,
+ lapack_int lda, double* b, lapack_int ldb,
+ double* w, double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsygvd( &itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work,
+ &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dsygvd_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dsygvd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_dsygvd( &itype, &jobz, &uplo, &n, a, &lda_t, b, &ldb_t, w,
+ work, &lwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsygvd( &itype, &jobz, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, w,
+ work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsygvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsygvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsygvx.c b/LAPACKE/src/lapacke_dsygvx.c
new file mode 100644
index 00000000..7306e0d5
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsygvx.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsygvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsygvx( int matrix_layout, lapack_int itype, char jobz,
+ char range, char uplo, lapack_int n, double* a,
+ lapack_int lda, double* b, lapack_int ldb, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w, double* z,
+ lapack_int ldz, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsygvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -15;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dsygvx_work( matrix_layout, itype, jobz, range, uplo, n, a,
+ lda, b, ldb, vl, vu, il, iu, abstol, m, w, z,
+ ldz, &work_query, lwork, iwork, ifail );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_dsygvx_work( matrix_layout, itype, jobz, range, uplo, n, a,
+ lda, b, ldb, vl, vu, il, iu, abstol, m, w, z,
+ ldz, work, lwork, iwork, ifail );
+ /* 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_dsygvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsygvx_work.c b/LAPACKE/src/lapacke_dsygvx_work.c
new file mode 100644
index 00000000..88e7d5cf
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsygvx_work.c
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsygvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsygvx_work( int matrix_layout, lapack_int itype, char jobz,
+ char range, char uplo, lapack_int n, double* a,
+ lapack_int lda, double* b, lapack_int ldb,
+ double vl, double vu, lapack_int il,
+ lapack_int iu, double abstol, lapack_int* m,
+ double* w, double* z, lapack_int ldz,
+ double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsygvx( &itype, &jobz, &range, &uplo, &n, a, &lda, b, &ldb, &vl,
+ &vu, &il, &iu, &abstol, m, w, z, &ldz, work, &lwork,
+ iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dsygvx_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dsygvx_work", info );
+ return info;
+ }
+ if( ldz < ncols_z ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_dsygvx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dsygvx( &itype, &jobz, &range, &uplo, &n, a, &lda_t, b,
+ &ldb_t, &vl, &vu, &il, &iu, &abstol, m, w, z, &ldz_t,
+ work, &lwork, iwork, ifail, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsygvx( &itype, &jobz, &range, &uplo, &n, a_t, &lda_t, b_t,
+ &ldb_t, &vl, &vu, &il, &iu, &abstol, m, w, z_t, &ldz_t,
+ work, &lwork, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsygvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsygvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsyrfs.c b/LAPACKE/src/lapacke_dsyrfs.c
new file mode 100644
index 00000000..0870b2f7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyrfs.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyrfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* a, lapack_int lda,
+ const double* af, lapack_int ldaf,
+ const lapack_int* ipiv, const double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsyrfs_work( matrix_layout, uplo, n, nrhs, a, lda, af, ldaf,
+ ipiv, b, ldb, x, ldx, ferr, berr, work, iwork );
+ /* 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_dsyrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsyrfs_work.c b/LAPACKE/src/lapacke_dsyrfs_work.c
new file mode 100644
index 00000000..dbbf095f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyrfs_work.c
@@ -0,0 +1,133 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyrfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* a,
+ lapack_int lda, const double* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* ferr, double* berr,
+ double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyrfs( &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b, &ldb, x,
+ &ldx, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* a_t = NULL;
+ double* af_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dsyrfs_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dsyrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dsyrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dsyrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (double*)LAPACKE_malloc( sizeof(double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyrfs( &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, ipiv, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsyrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsyrfsx.c b/LAPACKE/src/lapacke_dsyrfsx.c
new file mode 100644
index 00000000..119e94ed
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyrfsx.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyrfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyrfsx( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs, const double* a,
+ lapack_int lda, const double* af, lapack_int ldaf,
+ const lapack_int* ipiv, const double* s,
+ const double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* rcond, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyrfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -22;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'y' ) ) {
+ if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -14;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsyrfsx_work( matrix_layout, uplo, equed, n, nrhs, a, lda, af,
+ ldaf, ipiv, s, b, ldb, x, ldx, rcond, berr,
+ n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, iwork );
+ /* 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_dsyrfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsyrfsx_work.c b/LAPACKE/src/lapacke_dsyrfsx_work.c
new file mode 100644
index 00000000..4deb89f4
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyrfsx_work.c
@@ -0,0 +1,163 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyrfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyrfsx_work( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs, const double* a,
+ lapack_int lda, const double* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const double* s, const double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* rcond, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyrfsx( &uplo, &equed, &n, &nrhs, a, &lda, af, &ldaf, ipiv, s,
+ b, &ldb, x, &ldx, rcond, berr, &n_err_bnds,
+ err_bnds_norm, err_bnds_comp, &nparams, params, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* a_t = NULL;
+ double* af_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dsyrfsx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dsyrfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dsyrfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dsyrfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (double*)LAPACKE_malloc( sizeof(double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyrfsx( &uplo, &equed, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, s, b_t, &ldb_t, x_t, &ldx_t, rcond, berr,
+ &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t, &nparams,
+ params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyrfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsyrfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsysv.c b/LAPACKE/src/lapacke_dsysv.c
new file mode 100644
index 00000000..2e815f82
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsysv.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsysv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsysv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, double* a, lapack_int lda,
+ lapack_int* ipiv, double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsysv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dsysv_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsysv_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsysv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsysv_rook.c b/LAPACKE/src/lapacke_dsysv_rook.c
new file mode 100644
index 00000000..9c77733a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsysv_rook.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsysv_rook
+* Author: Intel Corporation
+* Generated January, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsysv_rook( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, double* a, lapack_int lda,
+ lapack_int* ipiv, double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsysv_rook", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dsysv_rook_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv,
+ b, ldb, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsysv_rook_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv,
+ b, ldb, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsysv_rook", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsysv_rook_work.c b/LAPACKE/src/lapacke_dsysv_rook_work.c
new file mode 100644
index 00000000..4553e9dc
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsysv_rook_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsysv_rook
+* Author: Intel Corporation
+* Generated January, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsysv_rook_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, double* a, lapack_int lda,
+ lapack_int* ipiv, double* b, lapack_int ldb,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsysv_rook( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dsysv_rook_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dsysv_rook_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dsysv_rook( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsysv_rook( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsysv_rook_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsysv_rook_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsysv_work.c b/LAPACKE/src/lapacke_dsysv_work.c
new file mode 100644
index 00000000..d30914fd
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsysv_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsysv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsysv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, double* a, lapack_int lda,
+ lapack_int* ipiv, double* b, lapack_int ldb,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsysv( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dsysv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dsysv_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dsysv( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsysv( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsysv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsysv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsysvx.c b/LAPACKE/src/lapacke_dsysvx.c
new file mode 100644
index 00000000..06bdcf2b
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsysvx.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsysvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsysvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, const double* a, lapack_int lda,
+ double* af, lapack_int ldaf, lapack_int* ipiv,
+ const double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* rcond, double* ferr,
+ double* berr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsysvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -11;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dsysvx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr,
+ &work_query, lwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_dsysvx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr,
+ work, lwork, iwork );
+ /* 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_dsysvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsysvx_work.c b/LAPACKE/src/lapacke_dsysvx_work.c
new file mode 100644
index 00000000..1e43e23a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsysvx_work.c
@@ -0,0 +1,148 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsysvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsysvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs, const double* a,
+ lapack_int lda, double* af, lapack_int ldaf,
+ lapack_int* ipiv, const double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr,
+ double* work, lapack_int lwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsysvx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b,
+ &ldb, x, &ldx, rcond, ferr, berr, work, &lwork, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* a_t = NULL;
+ double* af_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dsysvx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dsysvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dsysvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_dsysvx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dsysvx( &fact, &uplo, &n, &nrhs, a, &lda_t, af, &ldaf_t,
+ ipiv, b, &ldb_t, x, &ldx_t, rcond, ferr, berr, work,
+ &lwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (double*)LAPACKE_malloc( sizeof(double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsysvx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr, berr, work,
+ &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsysvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsysvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsysvxx.c b/LAPACKE/src/lapacke_dsysvxx.c
new file mode 100644
index 00000000..86a47037
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsysvxx.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsysvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsysvxx( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs, double* a,
+ lapack_int lda, double* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, double* s, double* b,
+ lapack_int ldb, double* x, lapack_int ldx,
+ double* rcond, double* rpvgrw, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsysvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -24;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsysvxx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, equed, s, b, ldb, x, ldx, rcond,
+ rpvgrw, berr, n_err_bnds, err_bnds_norm,
+ err_bnds_comp, nparams, params, work, iwork );
+ /* 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_dsysvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsysvxx_work.c b/LAPACKE/src/lapacke_dsysvxx_work.c
new file mode 100644
index 00000000..53857765
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsysvxx_work.c
@@ -0,0 +1,173 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsysvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsysvxx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs, double* a,
+ lapack_int lda, double* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, double* s,
+ double* b, lapack_int ldb, double* x,
+ lapack_int ldx, double* rcond, double* rpvgrw,
+ double* berr, lapack_int n_err_bnds,
+ double* err_bnds_norm, double* err_bnds_comp,
+ lapack_int nparams, double* params,
+ double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsysvxx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv,
+ equed, s, b, &ldb, x, &ldx, rcond, rpvgrw, berr,
+ &n_err_bnds, err_bnds_norm, err_bnds_comp, &nparams,
+ params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* a_t = NULL;
+ double* af_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dsysvxx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dsysvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_dsysvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_dsysvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (double*)LAPACKE_malloc( sizeof(double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsysvxx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond, rpvgrw,
+ berr, &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t,
+ &nparams, params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsysvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsysvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsyswapr.c b/LAPACKE/src/lapacke_dsyswapr.c
new file mode 100644
index 00000000..b41b9f40
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyswapr.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyswapr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyswapr( int matrix_layout, char uplo, lapack_int n,
+ double* a, lapack_int i1, lapack_int i2 )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyswapr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, n ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dsyswapr_work( matrix_layout, uplo, n, a, i1, i2 );
+}
diff --git a/LAPACKE/src/lapacke_dsyswapr_work.c b/LAPACKE/src/lapacke_dsyswapr_work.c
new file mode 100644
index 00000000..32d51b5a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsyswapr_work.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsyswapr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsyswapr_work( int matrix_layout, char uplo, lapack_int n,
+ double* a, lapack_int i1, lapack_int i2 )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyswapr( &uplo, &n, a, &i1, &i2 );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ double* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * n * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, n, a_t, n );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsyswapr( &uplo, &n, a_t, &i1, &i2 );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, n, a, n );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsyswapr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsyswapr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsytrd.c b/LAPACKE/src/lapacke_dsytrd.c
new file mode 100644
index 00000000..1a40ebcc
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsytrd.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsytrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytrd( int matrix_layout, char uplo, lapack_int n, double* a,
+ lapack_int lda, double* d, double* e, double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dsytrd_work( matrix_layout, uplo, n, a, lda, d, e, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsytrd_work( matrix_layout, uplo, n, a, lda, d, e, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsytrd_work.c b/LAPACKE/src/lapacke_dsytrd_work.c
new file mode 100644
index 00000000..e2325be7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsytrd_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsytrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytrd_work( int matrix_layout, char uplo, lapack_int n,
+ double* a, lapack_int lda, double* d, double* e,
+ double* tau, double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsytrd( &uplo, &n, a, &lda, d, e, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dsytrd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dsytrd( &uplo, &n, a, &lda_t, d, e, tau, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsytrd( &uplo, &n, a_t, &lda_t, d, e, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsytrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsytrf.c b/LAPACKE/src/lapacke_dsytrf.c
new file mode 100644
index 00000000..47ae8277
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsytrf.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsytrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytrf( int matrix_layout, char uplo, lapack_int n, double* a,
+ lapack_int lda, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dsytrf_work( matrix_layout, uplo, n, a, lda, ipiv,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsytrf_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsytrf_work.c b/LAPACKE/src/lapacke_dsytrf_work.c
new file mode 100644
index 00000000..92396b71
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsytrf_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsytrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytrf_work( int matrix_layout, char uplo, lapack_int n,
+ double* a, lapack_int lda, lapack_int* ipiv,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsytrf( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dsytrf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dsytrf( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsytrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsytrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsytri.c b/LAPACKE/src/lapacke_dsytri.c
new file mode 100644
index 00000000..225089d6
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsytri.c
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsytri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytri( int matrix_layout, char uplo, lapack_int n, double* a,
+ lapack_int lda, const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsytri_work( matrix_layout, uplo, n, a, lda, ipiv, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytri", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsytri2.c b/LAPACKE/src/lapacke_dsytri2.c
new file mode 100644
index 00000000..9c8ae062
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsytri2.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsytri2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytri2( int matrix_layout, char uplo, lapack_int n,
+ double* a, lapack_int lda, const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytri2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dsytri2_work( matrix_layout, uplo, n, a, lda, ipiv,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsytri2_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytri2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsytri2_work.c b/LAPACKE/src/lapacke_dsytri2_work.c
new file mode 100644
index 00000000..10135fde
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsytri2_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsytri2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytri2_work( int matrix_layout, char uplo, lapack_int n,
+ double* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsytri2( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dsytri2_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dsytri2( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsytri2( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytri2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsytri2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsytri2x.c b/LAPACKE/src/lapacke_dsytri2x.c
new file mode 100644
index 00000000..e84e6b9e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsytri2x.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsytri2x
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytri2x( int matrix_layout, char uplo, lapack_int n,
+ double* a, lapack_int lda, const lapack_int* ipiv,
+ lapack_int nb )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytri2x", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n+nb+1)*(+1) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsytri2x_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ nb );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytri2x", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsytri2x_work.c b/LAPACKE/src/lapacke_dsytri2x_work.c
new file mode 100644
index 00000000..433619a6
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsytri2x_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsytri2x
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytri2x_work( int matrix_layout, char uplo, lapack_int n,
+ double* a, lapack_int lda,
+ const lapack_int* ipiv, double* work,
+ lapack_int nb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsytri2x( &uplo, &n, a, &lda, ipiv, work, &nb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dsytri2x_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsytri2x( &uplo, &n, a_t, &lda_t, ipiv, work, &nb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytri2x_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsytri2x_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsytri_work.c b/LAPACKE/src/lapacke_dsytri_work.c
new file mode 100644
index 00000000..b7e197f3
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsytri_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsytri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytri_work( int matrix_layout, char uplo, lapack_int n,
+ double* a, lapack_int lda,
+ const lapack_int* ipiv, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsytri( &uplo, &n, a, &lda, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dsytri_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsytri( &uplo, &n, a_t, &lda_t, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsytri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsytrs.c b/LAPACKE/src/lapacke_dsytrs.c
new file mode 100644
index 00000000..c022822c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsytrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsytrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* a, lapack_int lda,
+ const lapack_int* ipiv, double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_dsytrs_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_dsytrs2.c b/LAPACKE/src/lapacke_dsytrs2.c
new file mode 100644
index 00000000..4f48e57a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsytrs2.c
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsytrs2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytrs2( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* a, lapack_int lda,
+ const lapack_int* ipiv, double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytrs2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dsytrs2_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytrs2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsytrs2_work.c b/LAPACKE/src/lapacke_dsytrs2_work.c
new file mode 100644
index 00000000..d651972e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsytrs2_work.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsytrs2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytrs2_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* a,
+ lapack_int lda, const lapack_int* ipiv,
+ double* b, lapack_int ldb, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsytrs2( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dsytrs2_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dsytrs2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsytrs2( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytrs2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsytrs2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dsytrs_work.c b/LAPACKE/src/lapacke_dsytrs_work.c
new file mode 100644
index 00000000..7afe6584
--- /dev/null
+++ b/LAPACKE/src/lapacke_dsytrs_work.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dsytrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* a,
+ lapack_int lda, const lapack_int* ipiv,
+ double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsytrs( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dsytrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dsytrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dsytrs( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dsytrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dsytrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtbcon.c b/LAPACKE/src/lapacke_dtbcon.c
new file mode 100644
index 00000000..b2d8af80
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtbcon.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtbcon( int matrix_layout, char norm, char uplo, char diag,
+ lapack_int n, lapack_int kd, const double* ab,
+ lapack_int ldab, double* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtbcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dtb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dtbcon_work( matrix_layout, norm, uplo, diag, n, kd, ab, ldab,
+ rcond, work, iwork );
+ /* 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_dtbcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtbcon_work.c b/LAPACKE/src/lapacke_dtbcon_work.c
new file mode 100644
index 00000000..b0d9755c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtbcon_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtbcon_work( int matrix_layout, char norm, char uplo,
+ char diag, lapack_int n, lapack_int kd,
+ const double* ab, lapack_int ldab,
+ double* rcond, double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtbcon( &norm, &uplo, &diag, &n, &kd, ab, &ldab, rcond, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ double* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dtbcon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dtb_trans( matrix_layout, uplo, diag, n, kd, ab, ldab, ab_t,
+ ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtbcon( &norm, &uplo, &diag, &n, &kd, ab_t, &ldab_t, rcond, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtbcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtbcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtbrfs.c b/LAPACKE/src/lapacke_dtbrfs.c
new file mode 100644
index 00000000..3a928b10
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtbrfs.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtbrfs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int kd, lapack_int nrhs,
+ const double* ab, lapack_int ldab, const double* b,
+ lapack_int ldb, const double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtbrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dtb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dtbrfs_work( matrix_layout, uplo, trans, diag, n, kd, nrhs,
+ ab, ldab, b, ldb, x, ldx, ferr, berr, work,
+ iwork );
+ /* 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_dtbrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtbrfs_work.c b/LAPACKE/src/lapacke_dtbrfs_work.c
new file mode 100644
index 00000000..a5c95568
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtbrfs_work.c
@@ -0,0 +1,117 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtbrfs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int kd,
+ lapack_int nrhs, const double* ab,
+ lapack_int ldab, const double* b,
+ lapack_int ldb, const double* x, lapack_int ldx,
+ double* ferr, double* berr, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtbrfs( &uplo, &trans, &diag, &n, &kd, &nrhs, ab, &ldab, b, &ldb,
+ x, &ldx, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dtbrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dtbrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dtbrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dtb_trans( matrix_layout, uplo, diag, n, kd, ab, ldab, ab_t,
+ ldab_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtbrfs( &uplo, &trans, &diag, &n, &kd, &nrhs, ab_t, &ldab_t, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtbrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtbrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtbtrs.c b/LAPACKE/src/lapacke_dtbtrs.c
new file mode 100644
index 00000000..1e09dd1f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtbtrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtbtrs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int kd, lapack_int nrhs,
+ const double* ab, lapack_int ldab, double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtbtrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dtb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+#endif
+ return LAPACKE_dtbtrs_work( matrix_layout, uplo, trans, diag, n, kd, nrhs,
+ ab, ldab, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_dtbtrs_work.c b/LAPACKE/src/lapacke_dtbtrs_work.c
new file mode 100644
index 00000000..fec68894
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtbtrs_work.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtbtrs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int kd,
+ lapack_int nrhs, const double* ab,
+ lapack_int ldab, double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtbtrs( &uplo, &trans, &diag, &n, &kd, &nrhs, ab, &ldab, b, &ldb,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ double* ab_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dtbtrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dtbtrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (double*)LAPACKE_malloc( sizeof(double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dtb_trans( matrix_layout, uplo, diag, n, kd, ab, ldab, ab_t,
+ ldab_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtbtrs( &uplo, &trans, &diag, &n, &kd, &nrhs, ab_t, &ldab_t, b_t,
+ &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtbtrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtbtrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtfsm.c b/LAPACKE/src/lapacke_dtfsm.c
new file mode 100644
index 00000000..840e45ae
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtfsm.c
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtfsm
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtfsm( int matrix_layout, char transr, char side, char uplo,
+ char trans, char diag, lapack_int m, lapack_int n,
+ double alpha, const double* a, double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtfsm", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( IS_D_NONZERO(alpha) ) {
+ if( LAPACKE_dtf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_d_nancheck( 1, &alpha, 1 ) ) {
+ return -9;
+ }
+ if( IS_D_NONZERO(alpha) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -11;
+ }
+ }
+#endif
+ return LAPACKE_dtfsm_work( matrix_layout, transr, side, uplo, trans, diag, m,
+ n, alpha, a, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_dtfsm_work.c b/LAPACKE/src/lapacke_dtfsm_work.c
new file mode 100644
index 00000000..2ee8a517
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtfsm_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtfsm
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtfsm_work( int matrix_layout, char transr, char side,
+ char uplo, char trans, char diag, lapack_int m,
+ lapack_int n, double alpha, const double* a,
+ double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtfsm( &transr, &side, &uplo, &trans, &diag, &m, &n, &alpha, a,
+ b, &ldb );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,m);
+ double* b_t = NULL;
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dtfsm_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( IS_D_NONZERO(alpha) ) {
+ a_t = (double*)
+ LAPACKE_malloc( sizeof(double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ if( IS_D_NONZERO(alpha) ) {
+ LAPACKE_dge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ }
+ if( IS_D_NONZERO(alpha) ) {
+ LAPACKE_dtf_trans( matrix_layout, transr, uplo, diag, n, a, a_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtfsm( &transr, &side, &uplo, &trans, &diag, &m, &n, &alpha, a_t,
+ b_t, &ldb_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ if( IS_D_NONZERO(alpha) ) {
+ LAPACKE_free( a_t );
+ }
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtfsm_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtfsm_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtftri.c b/LAPACKE/src/lapacke_dtftri.c
new file mode 100644
index 00000000..1271b0a9
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtftri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtftri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtftri( int matrix_layout, char transr, char uplo, char diag,
+ lapack_int n, double* a )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtftri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dtf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_dtftri_work( matrix_layout, transr, uplo, diag, n, a );
+}
diff --git a/LAPACKE/src/lapacke_dtftri_work.c b/LAPACKE/src/lapacke_dtftri_work.c
new file mode 100644
index 00000000..86fd657c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtftri_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtftri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtftri_work( int matrix_layout, char transr, char uplo,
+ char diag, lapack_int n, double* a )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtftri( &transr, &uplo, &diag, &n, a, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ double* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dtf_trans( matrix_layout, transr, uplo, diag, n, a, a_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtftri( &transr, &uplo, &diag, &n, a_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dtf_trans( LAPACK_COL_MAJOR, transr, uplo, diag, n, a_t, a );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtftri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtftri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtfttp.c b/LAPACKE/src/lapacke_dtfttp.c
new file mode 100644
index 00000000..bc1b86c3
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtfttp.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtfttp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtfttp( int matrix_layout, char transr, char uplo,
+ lapack_int n, const double* arf, double* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtfttp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpf_nancheck( n, arf ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_dtfttp_work( matrix_layout, transr, uplo, n, arf, ap );
+}
diff --git a/LAPACKE/src/lapacke_dtfttp_work.c b/LAPACKE/src/lapacke_dtfttp_work.c
new file mode 100644
index 00000000..e6b5fa6c
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtfttp_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtfttp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtfttp_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, const double* arf, double* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtfttp( &transr, &uplo, &n, arf, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ double* ap_t = NULL;
+ double* arf_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ arf_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( arf_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpf_trans( matrix_layout, transr, uplo, n, arf, arf_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtfttp( &transr, &uplo, &n, arf_t, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( arf_t );
+exit_level_1:
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtfttp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtfttp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtfttr.c b/LAPACKE/src/lapacke_dtfttr.c
new file mode 100644
index 00000000..eabf7abe
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtfttr.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtfttr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtfttr( int matrix_layout, char transr, char uplo,
+ lapack_int n, const double* arf, double* a,
+ lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtfttr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpf_nancheck( n, arf ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_dtfttr_work( matrix_layout, transr, uplo, n, arf, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_dtfttr_work.c b/LAPACKE/src/lapacke_dtfttr_work.c
new file mode 100644
index 00000000..e7939d94
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtfttr_work.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtfttr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtfttr_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, const double* arf, double* a,
+ lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtfttr( &transr, &uplo, &n, arf, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ double* arf_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dtfttr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ arf_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( arf_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpf_trans( matrix_layout, transr, uplo, n, arf, arf_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtfttr( &transr, &uplo, &n, arf_t, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( arf_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtfttr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtfttr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtgevc.c b/LAPACKE/src/lapacke_dtgevc.c
new file mode 100644
index 00000000..10befd09
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtgevc.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtgevc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtgevc( int matrix_layout, char side, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const double* s, lapack_int lds, const double* p,
+ lapack_int ldp, double* vl, lapack_int ldvl,
+ double* vr, lapack_int ldvr, lapack_int mm,
+ lapack_int* m )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtgevc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, p, ldp ) ) {
+ return -8;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, s, lds ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,6*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dtgevc_work( matrix_layout, side, howmny, select, n, s, lds,
+ p, ldp, vl, ldvl, vr, ldvr, mm, m, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtgevc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtgevc_work.c b/LAPACKE/src/lapacke_dtgevc_work.c
new file mode 100644
index 00000000..cd0dd9cc
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtgevc_work.c
@@ -0,0 +1,155 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtgevc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtgevc_work( int matrix_layout, char side, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const double* s, lapack_int lds,
+ const double* p, lapack_int ldp, double* vl,
+ lapack_int ldvl, double* vr, lapack_int ldvr,
+ lapack_int mm, lapack_int* m, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtgevc( &side, &howmny, select, &n, s, &lds, p, &ldp, vl, &ldvl,
+ vr, &ldvr, &mm, m, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldp_t = MAX(1,n);
+ lapack_int lds_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ double* s_t = NULL;
+ double* p_t = NULL;
+ double* vl_t = NULL;
+ double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldp < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dtgevc_work", info );
+ return info;
+ }
+ if( lds < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dtgevc_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dtgevc_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dtgevc_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ s_t = (double*)LAPACKE_malloc( sizeof(double) * lds_t * MAX(1,n) );
+ if( s_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ p_t = (double*)LAPACKE_malloc( sizeof(double) * ldp_t * MAX(1,n) );
+ if( p_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ vl_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ vr_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, s, lds, s_t, lds_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, p, ldp, p_t, ldp_t );
+ if( ( LAPACKE_lsame( side, 'l' ) || LAPACKE_lsame( side, 'b' ) ) &&
+ LAPACKE_lsame( howmny, 'b' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( ( LAPACKE_lsame( side, 'r' ) || LAPACKE_lsame( side, 'b' ) ) &&
+ LAPACKE_lsame( howmny, 'b' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtgevc( &side, &howmny, select, &n, s_t, &lds_t, p_t, &ldp_t,
+ vl_t, &ldvl_t, vr_t, &ldvr_t, &mm, m, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, mm, vl_t, ldvl_t, vl,
+ ldvl );
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, mm, vr_t, ldvr_t, vr,
+ ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_2:
+ LAPACKE_free( p_t );
+exit_level_1:
+ LAPACKE_free( s_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtgevc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtgevc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtgexc.c b/LAPACKE/src/lapacke_dtgexc.c
new file mode 100644
index 00000000..cf9b58a1
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtgexc.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtgexc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtgexc( int matrix_layout, lapack_logical wantq,
+ lapack_logical wantz, lapack_int n, double* a,
+ lapack_int lda, double* b, lapack_int ldb, double* q,
+ lapack_int ldq, double* z, lapack_int ldz,
+ lapack_int* ifst, lapack_int* ilst )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtgexc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -7;
+ }
+ if( wantq ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -9;
+ }
+ }
+ if( wantz ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dtgexc_work( matrix_layout, wantq, wantz, n, a, lda, b, ldb,
+ q, ldq, z, ldz, ifst, ilst, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dtgexc_work( matrix_layout, wantq, wantz, n, a, lda, b, ldb,
+ q, ldq, z, ldz, ifst, ilst, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtgexc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtgexc_work.c b/LAPACKE/src/lapacke_dtgexc_work.c
new file mode 100644
index 00000000..6b4aafe5
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtgexc_work.c
@@ -0,0 +1,158 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtgexc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtgexc_work( int matrix_layout, lapack_logical wantq,
+ lapack_logical wantz, lapack_int n, double* a,
+ lapack_int lda, double* b, lapack_int ldb,
+ double* q, lapack_int ldq, double* z,
+ lapack_int ldz, lapack_int* ifst,
+ lapack_int* ilst, double* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtgexc( &wantq, &wantz, &n, a, &lda, b, &ldb, q, &ldq, z, &ldz,
+ ifst, ilst, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* q_t = NULL;
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dtgexc_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dtgexc_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dtgexc_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dtgexc_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dtgexc( &wantq, &wantz, &n, a, &lda_t, b, &ldb_t, q, &ldq_t,
+ z, &ldz_t, ifst, ilst, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( wantq ) {
+ q_t = (double*)LAPACKE_malloc( sizeof(double) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( wantz ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ if( wantq ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ if( wantz ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtgexc( &wantq, &wantz, &n, a_t, &lda_t, b_t, &ldb_t, q_t,
+ &ldq_t, z_t, &ldz_t, ifst, ilst, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( wantq ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( wantz ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( wantz ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( wantq ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtgexc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtgexc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtgsen.c b/LAPACKE/src/lapacke_dtgsen.c
new file mode 100644
index 00000000..fc8a5241
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtgsen.c
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtgsen
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtgsen( int matrix_layout, lapack_int ijob,
+ lapack_logical wantq, lapack_logical wantz,
+ const lapack_logical* select, lapack_int n,
+ double* a, lapack_int lda, double* b, lapack_int ldb,
+ double* alphar, double* alphai, double* beta,
+ double* q, lapack_int ldq, double* z, lapack_int ldz,
+ lapack_int* m, double* pl, double* pr, double* dif )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtgsen", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+ if( wantq ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -14;
+ }
+ }
+ if( wantz ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -16;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dtgsen_work( matrix_layout, ijob, wantq, wantz, select, n, a,
+ lda, b, ldb, alphar, alphai, beta, q, ldq, z,
+ ldz, m, pl, pr, dif, &work_query, lwork,
+ &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ if( ijob != 0 ) {
+ 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_dtgsen_work( matrix_layout, ijob, wantq, wantz, select, n, a,
+ lda, b, ldb, alphar, alphai, beta, q, ldq, z,
+ ldz, m, pl, pr, dif, work, lwork, iwork,
+ liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ if( ijob != 0 ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtgsen", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtgsen_work.c b/LAPACKE/src/lapacke_dtgsen_work.c
new file mode 100644
index 00000000..1daa57f9
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtgsen_work.c
@@ -0,0 +1,165 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtgsen
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtgsen_work( int matrix_layout, lapack_int ijob,
+ lapack_logical wantq, lapack_logical wantz,
+ const lapack_logical* select, lapack_int n,
+ double* a, lapack_int lda, double* b,
+ lapack_int ldb, double* alphar, double* alphai,
+ double* beta, double* q, lapack_int ldq,
+ double* z, lapack_int ldz, lapack_int* m,
+ double* pl, double* pr, double* dif,
+ double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtgsen( &ijob, &wantq, &wantz, select, &n, a, &lda, b, &ldb,
+ alphar, alphai, beta, q, &ldq, z, &ldz, m, pl, pr, dif,
+ work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* q_t = NULL;
+ double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dtgsen_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dtgsen_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dtgsen_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_dtgsen_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_dtgsen( &ijob, &wantq, &wantz, select, &n, a, &lda_t, b,
+ &ldb_t, alphar, alphai, beta, q, &ldq_t, z, &ldz_t,
+ m, pl, pr, dif, work, &lwork, iwork, &liwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( wantq ) {
+ q_t = (double*)LAPACKE_malloc( sizeof(double) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( wantz ) {
+ z_t = (double*)LAPACKE_malloc( sizeof(double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ if( wantq ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ if( wantz ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtgsen( &ijob, &wantq, &wantz, select, &n, a_t, &lda_t, b_t,
+ &ldb_t, alphar, alphai, beta, q_t, &ldq_t, z_t, &ldz_t,
+ m, pl, pr, dif, work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( wantq ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( wantz ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( wantz ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( wantq ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtgsen_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtgsen_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtgsja.c b/LAPACKE/src/lapacke_dtgsja.c
new file mode 100644
index 00000000..b3d999f7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtgsja.c
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtgsja
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtgsja( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int p, lapack_int n,
+ lapack_int k, lapack_int l, double* a,
+ lapack_int lda, double* b, lapack_int ldb,
+ double tola, double tolb, double* alpha,
+ double* beta, double* u, lapack_int ldu, double* v,
+ lapack_int ldv, double* q, lapack_int ldq,
+ lapack_int* ncycle )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtgsja", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -10;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -12;
+ }
+ if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -22;
+ }
+ }
+ if( LAPACKE_d_nancheck( 1, &tola, 1 ) ) {
+ return -14;
+ }
+ if( LAPACKE_d_nancheck( 1, &tolb, 1 ) ) {
+ return -15;
+ }
+ if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, m, m, u, ldu ) ) {
+ return -18;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, p, p, v, ldv ) ) {
+ return -20;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dtgsja_work( matrix_layout, jobu, jobv, jobq, m, p, n, k, l,
+ a, lda, b, ldb, tola, tolb, alpha, beta, u, ldu,
+ v, ldv, q, ldq, work, ncycle );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtgsja", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtgsja_work.c b/LAPACKE/src/lapacke_dtgsja_work.c
new file mode 100644
index 00000000..44994eae
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtgsja_work.c
@@ -0,0 +1,180 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtgsja
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtgsja_work( int matrix_layout, char jobu, char jobv,
+ char jobq, lapack_int m, lapack_int p,
+ lapack_int n, lapack_int k, lapack_int l,
+ double* a, lapack_int lda, double* b,
+ lapack_int ldb, double tola, double tolb,
+ double* alpha, double* beta, double* u,
+ lapack_int ldu, double* v, lapack_int ldv,
+ double* q, lapack_int ldq, double* work,
+ lapack_int* ncycle )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtgsja( &jobu, &jobv, &jobq, &m, &p, &n, &k, &l, a, &lda, b,
+ &ldb, &tola, &tolb, alpha, beta, u, &ldu, v, &ldv, q,
+ &ldq, work, ncycle, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldu_t = MAX(1,m);
+ lapack_int ldv_t = MAX(1,p);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* u_t = NULL;
+ double* v_t = NULL;
+ double* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dtgsja_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dtgsja_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -23;
+ LAPACKE_xerbla( "LAPACKE_dtgsja_work", info );
+ return info;
+ }
+ if( ldu < m ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_dtgsja_work", info );
+ return info;
+ }
+ if( ldv < p ) {
+ info = -21;
+ LAPACKE_xerbla( "LAPACKE_dtgsja_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+ u_t = (double*)LAPACKE_malloc( sizeof(double) * ldu_t * MAX(1,m) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ v_t = (double*)LAPACKE_malloc( sizeof(double) * ldv_t * MAX(1,p) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+ q_t = (double*)LAPACKE_malloc( sizeof(double) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_dge_trans( matrix_layout, m, m, u, ldu, u_t, ldu_t );
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_dge_trans( matrix_layout, p, p, v, ldv, v_t, ldv_t );
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtgsja( &jobu, &jobv, &jobq, &m, &p, &n, &k, &l, a_t, &lda_t,
+ b_t, &ldb_t, &tola, &tolb, alpha, beta, u_t, &ldu_t, v_t,
+ &ldv_t, q_t, &ldq_t, work, ncycle, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
+ }
+ if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, p, p, v_t, ldv_t, v, ldv );
+ }
+ if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_4:
+ if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_free( v_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtgsja_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtgsja_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtgsna.c b/LAPACKE/src/lapacke_dtgsna.c
new file mode 100644
index 00000000..a86a3517
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtgsna.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtgsna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtgsna( int matrix_layout, char job, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const double* a, lapack_int lda, const double* b,
+ lapack_int ldb, const double* vl, lapack_int ldvl,
+ const double* vr, lapack_int ldvr, double* s,
+ double* dif, lapack_int mm, lapack_int* m )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtgsna", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n+6) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dtgsna_work( matrix_layout, job, howmny, select, n, a, lda, b,
+ ldb, vl, ldvl, vr, ldvr, s, dif, mm, m,
+ &work_query, lwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ 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_dtgsna_work( matrix_layout, job, howmny, select, n, a, lda, b,
+ ldb, vl, ldvl, vr, ldvr, s, dif, mm, m, work,
+ lwork, iwork );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtgsna", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtgsna_work.c b/LAPACKE/src/lapacke_dtgsna_work.c
new file mode 100644
index 00000000..c7f3e1d9
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtgsna_work.c
@@ -0,0 +1,155 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtgsna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtgsna_work( int matrix_layout, char job, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const double* a, lapack_int lda,
+ const double* b, lapack_int ldb,
+ const double* vl, lapack_int ldvl,
+ const double* vr, lapack_int ldvr, double* s,
+ double* dif, lapack_int mm, lapack_int* m,
+ double* work, lapack_int lwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtgsna( &job, &howmny, select, &n, a, &lda, b, &ldb, vl, &ldvl,
+ vr, &ldvr, s, dif, &mm, m, work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* vl_t = NULL;
+ double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dtgsna_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dtgsna_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dtgsna_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dtgsna_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dtgsna( &job, &howmny, select, &n, a, &lda_t, b, &ldb_t, vl,
+ &ldvl_t, vr, &ldvr_t, s, dif, &mm, m, work, &lwork,
+ iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ vl_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ vr_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtgsna( &job, &howmny, select, &n, a_t, &lda_t, b_t, &ldb_t,
+ vl_t, &ldvl_t, vr_t, &ldvr_t, s, dif, &mm, m, work,
+ &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtgsna_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtgsna_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtgsyl.c b/LAPACKE/src/lapacke_dtgsyl.c
new file mode 100644
index 00000000..e408373e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtgsyl.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtgsyl
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtgsyl( int matrix_layout, char trans, lapack_int ijob,
+ lapack_int m, lapack_int n, const double* a,
+ lapack_int lda, const double* b, lapack_int ldb,
+ double* c, lapack_int ldc, const double* d,
+ lapack_int ldd, const double* e, lapack_int lde,
+ double* f, lapack_int ldf, double* scale,
+ double* dif )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtgsyl", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, m, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, m, d, ldd ) ) {
+ return -12;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, e, lde ) ) {
+ return -14;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, f, ldf ) ) {
+ return -16;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m+n+6) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dtgsyl_work( matrix_layout, trans, ijob, m, n, a, lda, b, ldb,
+ c, ldc, d, ldd, e, lde, f, ldf, scale, dif,
+ &work_query, lwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_dtgsyl_work( matrix_layout, trans, ijob, m, n, a, lda, b, ldb,
+ c, ldc, d, ldd, e, lde, f, ldf, scale, dif,
+ work, lwork, iwork );
+ /* 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_dtgsyl", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtgsyl_work.c b/LAPACKE/src/lapacke_dtgsyl_work.c
new file mode 100644
index 00000000..a86167ef
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtgsyl_work.c
@@ -0,0 +1,174 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtgsyl
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtgsyl_work( int matrix_layout, char trans, lapack_int ijob,
+ lapack_int m, lapack_int n, const double* a,
+ lapack_int lda, const double* b, lapack_int ldb,
+ double* c, lapack_int ldc, const double* d,
+ lapack_int ldd, const double* e, lapack_int lde,
+ double* f, lapack_int ldf, double* scale,
+ double* dif, double* work, lapack_int lwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtgsyl( &trans, &ijob, &m, &n, a, &lda, b, &ldb, c, &ldc, d,
+ &ldd, e, &lde, f, &ldf, scale, dif, work, &lwork, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_int ldd_t = MAX(1,m);
+ lapack_int lde_t = MAX(1,n);
+ lapack_int ldf_t = MAX(1,m);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* c_t = NULL;
+ double* d_t = NULL;
+ double* e_t = NULL;
+ double* f_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dtgsyl_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dtgsyl_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dtgsyl_work", info );
+ return info;
+ }
+ if( ldd < m ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dtgsyl_work", info );
+ return info;
+ }
+ if( lde < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dtgsyl_work", info );
+ return info;
+ }
+ if( ldf < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_dtgsyl_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dtgsyl( &trans, &ijob, &m, &n, a, &lda_t, b, &ldb_t, c,
+ &ldc_t, d, &ldd_t, e, &lde_t, f, &ldf_t, scale, dif,
+ work, &lwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ c_t = (double*)LAPACKE_malloc( sizeof(double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ d_t = (double*)LAPACKE_malloc( sizeof(double) * ldd_t * MAX(1,m) );
+ if( d_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ e_t = (double*)LAPACKE_malloc( sizeof(double) * lde_t * MAX(1,n) );
+ if( e_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ f_t = (double*)LAPACKE_malloc( sizeof(double) * ldf_t * MAX(1,n) );
+ if( f_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, m, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ LAPACKE_dge_trans( matrix_layout, m, m, d, ldd, d_t, ldd_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, e, lde, e_t, lde_t );
+ LAPACKE_dge_trans( matrix_layout, m, n, f, ldf, f_t, ldf_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtgsyl( &trans, &ijob, &m, &n, a_t, &lda_t, b_t, &ldb_t, c_t,
+ &ldc_t, d_t, &ldd_t, e_t, &lde_t, f_t, &ldf_t, scale,
+ dif, work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, f_t, ldf_t, f, ldf );
+ /* Release memory and exit */
+ LAPACKE_free( f_t );
+exit_level_5:
+ LAPACKE_free( e_t );
+exit_level_4:
+ LAPACKE_free( d_t );
+exit_level_3:
+ LAPACKE_free( c_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtgsyl_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtgsyl_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtpcon.c b/LAPACKE/src/lapacke_dtpcon.c
new file mode 100644
index 00000000..1944db08
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtpcon.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtpcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtpcon( int matrix_layout, char norm, char uplo, char diag,
+ lapack_int n, const double* ap, double* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtpcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dtp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dtpcon_work( matrix_layout, norm, uplo, diag, n, ap, rcond,
+ work, iwork );
+ /* 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_dtpcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtpcon_work.c b/LAPACKE/src/lapacke_dtpcon_work.c
new file mode 100644
index 00000000..ae237ef2
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtpcon_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtpcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtpcon_work( int matrix_layout, char norm, char uplo,
+ char diag, lapack_int n, const double* ap,
+ double* rcond, double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtpcon( &norm, &uplo, &diag, &n, ap, rcond, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dtp_trans( matrix_layout, uplo, diag, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtpcon( &norm, &uplo, &diag, &n, ap_t, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtpcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtpcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtpmqrt.c b/LAPACKE/src/lapacke_dtpmqrt.c
new file mode 100644
index 00000000..4550f4c9
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtpmqrt.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtpmqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtpmqrt( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int l, lapack_int nb, const double* v,
+ lapack_int ldv, const double* t, lapack_int ldt,
+ double* a, lapack_int lda, double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtpmqrt", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -13;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -15;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) {
+ return -11;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,m) * MAX(1,nb) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dtpmqrt_work( matrix_layout, side, trans, m, n, k, l, nb, v,
+ ldv, t, ldt, a, lda, b, ldb, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtpmqrt", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtpmqrt_work.c b/LAPACKE/src/lapacke_dtpmqrt_work.c
new file mode 100644
index 00000000..6912c796
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtpmqrt_work.c
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtpmqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtpmqrt_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int l, lapack_int nb, const double* v,
+ lapack_int ldv, const double* t,
+ lapack_int ldt, double* a, lapack_int lda,
+ double* b, lapack_int ldb, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtpmqrt( &side, &trans, &m, &n, &k, &l, &nb, v, &ldv, t, &ldt, a,
+ &lda, b, &ldb, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'r' ) ? k : k;
+ lapack_int lda_t = MAX(1,k);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,ldt);
+ lapack_int ldv_t = MAX(1,ldv);
+ double* v_t = NULL;
+ double* t_t = NULL;
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_dtpmqrt_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_dtpmqrt_work", info );
+ return info;
+ }
+ if( ldt < nb ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dtpmqrt_work", info );
+ return info;
+ }
+ if( ldv < k ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dtpmqrt_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (double*)LAPACKE_malloc( sizeof(double) * ldv_t * MAX(1,k) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (double*)LAPACKE_malloc( sizeof(double) * ldt_t * MAX(1,nb) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, ldv, k, v, ldv, v_t, ldv_t );
+ LAPACKE_dge_trans( matrix_layout, ldt, nb, t, ldt, t_t, ldt_t );
+ LAPACKE_dge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtpmqrt( &side, &trans, &m, &n, &k, &l, &nb, v_t, &ldv_t, t_t,
+ &ldt_t, a_t, &lda_t, b_t, &ldb_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, k, m, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_3:
+ LAPACKE_free( a_t );
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtpmqrt_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtpmqrt_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtpqrt.c b/LAPACKE/src/lapacke_dtpqrt.c
new file mode 100644
index 00000000..c508a0cd
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtpqrt.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtpqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtpqrt( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int l, lapack_int nb, double* a,
+ lapack_int lda, double* b, lapack_int ldb, double* t,
+ lapack_int ldt )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtpqrt", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,nb) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dtpqrt_work( matrix_layout, m, n, l, nb, a, lda, b, ldb, t,
+ ldt, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtpqrt", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtpqrt2.c b/LAPACKE/src/lapacke_dtpqrt2.c
new file mode 100644
index 00000000..9a7f877f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtpqrt2.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtpqrt2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtpqrt2( int matrix_layout,
+ lapack_int m, lapack_int n, lapack_int l,
+ double* a, lapack_int lda, double* b,
+ lapack_int ldb, double* t, lapack_int ldt )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtpqrt2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_dtpqrt2_work( matrix_layout, m, n, l, a, lda, b, ldb, t, ldt );
+}
diff --git a/LAPACKE/src/lapacke_dtpqrt2_work.c b/LAPACKE/src/lapacke_dtpqrt2_work.c
new file mode 100644
index 00000000..a73895d7
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtpqrt2_work.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtpqrt2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtpqrt2_work( int matrix_layout,
+ lapack_int m, lapack_int n, lapack_int l,
+ double* a, lapack_int lda, double* b,
+ lapack_int ldb, double* t, lapack_int ldt )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtpqrt2( &m, &n, &l, a, &lda, b, &ldb, t, &ldt, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dtpqrt2_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dtpqrt2_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dtpqrt2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ t_t = (double*)LAPACKE_malloc( sizeof(double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtpqrt2( &m, &n, &l, a_t, &lda_t, b_t, &ldb_t, t_t, &ldt_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtpqrt2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtpqrt2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtpqrt_work.c b/LAPACKE/src/lapacke_dtpqrt_work.c
new file mode 100644
index 00000000..9c2c1573
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtpqrt_work.c
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtpqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtpqrt_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int l, lapack_int nb, double* a,
+ lapack_int lda, double* b, lapack_int ldb,
+ double* t, lapack_int ldt, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtpqrt( &m, &n, &l, &nb, a, &lda, b, &ldb, t, &ldt, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,nb);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dtpqrt_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dtpqrt_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dtpqrt_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ t_t = (double*)LAPACKE_malloc( sizeof(double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtpqrt( &m, &n, &l, &nb, a_t, &lda_t, b_t, &ldb_t, t_t, &ldt_t,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nb, n, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtpqrt_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtpqrt_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtprfb.c b/LAPACKE/src/lapacke_dtprfb.c
new file mode 100644
index 00000000..59d3d52e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtprfb.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtprfb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtprfb( int matrix_layout, char side, char trans, char direct,
+ char storev, lapack_int m, lapack_int n,
+ lapack_int k, lapack_int l, const double* v,
+ lapack_int ldv, const double* t, lapack_int ldt,
+ double* a, lapack_int lda, double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_int ldwork;
+ lapack_int work_size;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtprfb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -14;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -16;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, ldt, k, t, ldt ) ) {
+ return -12;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ return -10;
+ }
+#endif
+ if (side=='l' || side=='L') {
+ ldwork = k;
+ work_size = MAX(1,ldwork) * MAX(1,n);
+ }
+ else {
+ ldwork = m;
+ work_size = MAX(1,ldwork) * MAX(1,k);
+ }
+ /* Allocate memory for working array(s) */
+ work = (double*)
+ LAPACKE_malloc( sizeof(double) * work_size );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dtprfb_work( matrix_layout, side, trans, direct, storev, m, n,
+ k, l, v, ldv, t, ldt, a, lda, b, ldb, work,
+ ldwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtprfb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtprfb_work.c b/LAPACKE/src/lapacke_dtprfb_work.c
new file mode 100644
index 00000000..29fbfc4d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtprfb_work.c
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtprfb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtprfb_work( int matrix_layout, char side, char trans,
+ char direct, char storev, lapack_int m,
+ lapack_int n, lapack_int k, lapack_int l,
+ const double* v, lapack_int ldv,
+ const double* t, lapack_int ldt, double* a,
+ lapack_int lda, double* b, lapack_int ldb,
+ const double* work, lapack_int ldwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtprfb( &side, &trans, &direct, &storev, &m, &n, &k, &l, v, &ldv,
+ t, &ldt, a, &lda, b, &ldb, work, &ldwork );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'r' ) ? k : k;
+ lapack_int lda_t = MAX(1,k);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,ldt);
+ lapack_int ldv_t = MAX(1,ldv);
+ double* v_t = NULL;
+ double* t_t = NULL;
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_dtprfb_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_dtprfb_work", info );
+ return info;
+ }
+ if( ldt < k ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_dtprfb_work", info );
+ return info;
+ }
+ if( ldv < k ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dtprfb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (double*)LAPACKE_malloc( sizeof(double) * ldv_t * MAX(1,k) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (double*)LAPACKE_malloc( sizeof(double) * ldt_t * MAX(1,k) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, ldv, k, v, ldv, v_t, ldv_t );
+ LAPACKE_dge_trans( matrix_layout, ldt, k, t, ldt, t_t, ldt_t );
+ LAPACKE_dge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtprfb( &side, &trans, &direct, &storev, &m, &n, &k, &l, v_t,
+ &ldv_t, t_t, &ldt_t, a_t, &lda_t, b_t, &ldb_t, work,
+ &ldwork );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, k, m, a_t, lda_t, a, lda );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_3:
+ LAPACKE_free( a_t );
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtprfb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtprfb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtprfs.c b/LAPACKE/src/lapacke_dtprfs.c
new file mode 100644
index 00000000..6d908b7e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtprfs.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtprfs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int nrhs, const double* ap,
+ const double* b, lapack_int ldb, const double* x,
+ lapack_int ldx, double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtprfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dtp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dtprfs_work( matrix_layout, uplo, trans, diag, n, nrhs, ap, b,
+ ldb, x, ldx, ferr, berr, work, iwork );
+ /* 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_dtprfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtprfs_work.c b/LAPACKE/src/lapacke_dtprfs_work.c
new file mode 100644
index 00000000..b4d7d693
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtprfs_work.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtprfs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int nrhs,
+ const double* ap, const double* b,
+ lapack_int ldb, const double* x, lapack_int ldx,
+ double* ferr, double* berr, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtprfs( &uplo, &trans, &diag, &n, &nrhs, ap, b, &ldb, x, &ldx,
+ ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* b_t = NULL;
+ double* x_t = NULL;
+ double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dtprfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dtprfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ LAPACKE_dtp_trans( matrix_layout, uplo, diag, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtprfs( &uplo, &trans, &diag, &n, &nrhs, ap_t, b_t, &ldb_t, x_t,
+ &ldx_t, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtprfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtprfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtptri.c b/LAPACKE/src/lapacke_dtptri.c
new file mode 100644
index 00000000..34633ff1
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtptri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtptri( int matrix_layout, char uplo, char diag, lapack_int n,
+ double* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtptri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dtp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_dtptri_work( matrix_layout, uplo, diag, n, ap );
+}
diff --git a/LAPACKE/src/lapacke_dtptri_work.c b/LAPACKE/src/lapacke_dtptri_work.c
new file mode 100644
index 00000000..433f276d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtptri_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtptri_work( int matrix_layout, char uplo, char diag,
+ lapack_int n, double* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtptri( &uplo, &diag, &n, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dtp_trans( matrix_layout, uplo, diag, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtptri( &uplo, &diag, &n, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dtp_trans( LAPACK_COL_MAJOR, uplo, diag, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtptri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtptri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtptrs.c b/LAPACKE/src/lapacke_dtptrs.c
new file mode 100644
index 00000000..d79aa92b
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtptrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtptrs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int nrhs, const double* ap,
+ double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtptrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dtp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_dtptrs_work( matrix_layout, uplo, trans, diag, n, nrhs, ap, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_dtptrs_work.c b/LAPACKE/src/lapacke_dtptrs_work.c
new file mode 100644
index 00000000..bbd0aa28
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtptrs_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtptrs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int nrhs,
+ const double* ap, double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtptrs( &uplo, &trans, &diag, &n, &nrhs, ap, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ double* b_t = NULL;
+ double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dtptrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dtp_trans( matrix_layout, uplo, diag, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtptrs( &uplo, &trans, &diag, &n, &nrhs, ap_t, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtptrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtptrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtpttf.c b/LAPACKE/src/lapacke_dtpttf.c
new file mode 100644
index 00000000..d5049a01
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtpttf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtpttf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtpttf( int matrix_layout, char transr, char uplo,
+ lapack_int n, const double* ap, double* arf )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtpttf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpp_nancheck( n, ap ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_dtpttf_work( matrix_layout, transr, uplo, n, ap, arf );
+}
diff --git a/LAPACKE/src/lapacke_dtpttf_work.c b/LAPACKE/src/lapacke_dtpttf_work.c
new file mode 100644
index 00000000..cb49f48f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtpttf_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtpttf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtpttf_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, const double* ap, double* arf )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtpttf( &transr, &uplo, &n, ap, arf, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ double* ap_t = NULL;
+ double* arf_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ arf_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( arf_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtpttf( &transr, &uplo, &n, ap_t, arf_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dpf_trans( LAPACK_COL_MAJOR, transr, uplo, n, arf_t, arf );
+ /* Release memory and exit */
+ LAPACKE_free( arf_t );
+exit_level_1:
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtpttf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtpttf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtpttr.c b/LAPACKE/src/lapacke_dtpttr.c
new file mode 100644
index 00000000..e8c1485e
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtpttr.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtpttr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtpttr( int matrix_layout, char uplo, lapack_int n,
+ const double* ap, double* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtpttr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dpp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dtpttr_work( matrix_layout, uplo, n, ap, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_dtpttr_work.c b/LAPACKE/src/lapacke_dtpttr_work.c
new file mode 100644
index 00000000..08a64c8d
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtpttr_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtpttr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtpttr_work( int matrix_layout, char uplo, lapack_int n,
+ const double* ap, double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtpttr( &uplo, &n, ap, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dtpttr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtpttr( &uplo, &n, ap_t, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtpttr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtpttr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtrcon.c b/LAPACKE/src/lapacke_dtrcon.c
new file mode 100644
index 00000000..6f78649b
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrcon.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrcon( int matrix_layout, char norm, char uplo, char diag,
+ lapack_int n, const double* a, lapack_int lda,
+ double* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dtr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dtrcon_work( matrix_layout, norm, uplo, diag, n, a, lda,
+ rcond, work, iwork );
+ /* 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_dtrcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtrcon_work.c b/LAPACKE/src/lapacke_dtrcon_work.c
new file mode 100644
index 00000000..88f68533
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrcon_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrcon_work( int matrix_layout, char norm, char uplo,
+ char diag, lapack_int n, const double* a,
+ lapack_int lda, double* rcond, double* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrcon( &norm, &uplo, &diag, &n, a, &lda, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dtrcon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dtr_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrcon( &norm, &uplo, &diag, &n, a_t, &lda_t, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtrcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtrevc.c b/LAPACKE/src/lapacke_dtrevc.c
new file mode 100644
index 00000000..cc952714
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrevc.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrevc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrevc( int matrix_layout, char side, char howmny,
+ lapack_logical* select, lapack_int n,
+ const double* t, lapack_int ldt, double* vl,
+ lapack_int ldvl, double* vr, lapack_int ldvr,
+ lapack_int mm, lapack_int* m )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrevc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dtrevc_work( matrix_layout, side, howmny, select, n, t, ldt,
+ vl, ldvl, vr, ldvr, mm, m, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrevc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtrevc_work.c b/LAPACKE/src/lapacke_dtrevc_work.c
new file mode 100644
index 00000000..70a70afb
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrevc_work.c
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrevc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrevc_work( int matrix_layout, char side, char howmny,
+ lapack_logical* select, lapack_int n,
+ const double* t, lapack_int ldt, double* vl,
+ lapack_int ldvl, double* vr, lapack_int ldvr,
+ lapack_int mm, lapack_int* m, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrevc( &side, &howmny, select, &n, t, &ldt, vl, &ldvl, vr,
+ &ldvr, &mm, m, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldt_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ double* t_t = NULL;
+ double* vl_t = NULL;
+ double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dtrevc_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dtrevc_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dtrevc_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ t_t = (double*)LAPACKE_malloc( sizeof(double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ vl_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ vr_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( ( LAPACKE_lsame( side, 'l' ) || LAPACKE_lsame( side, 'b' ) ) &&
+ LAPACKE_lsame( howmny, 'b' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( ( LAPACKE_lsame( side, 'r' ) || LAPACKE_lsame( side, 'b' ) ) &&
+ LAPACKE_lsame( howmny, 'b' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrevc( &side, &howmny, select, &n, t_t, &ldt_t, vl_t, &ldvl_t,
+ vr_t, &ldvr_t, &mm, m, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, mm, vl_t, ldvl_t, vl,
+ ldvl );
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, mm, vr_t, ldvr_t, vr,
+ ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( t_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrevc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtrevc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtrexc.c b/LAPACKE/src/lapacke_dtrexc.c
new file mode 100644
index 00000000..b1719323
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrexc.c
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrexc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrexc( int matrix_layout, char compq, lapack_int n,
+ double* t, lapack_int ldt, double* q, lapack_int ldq,
+ lapack_int* ifst, lapack_int* ilst )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrexc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -6;
+ }
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dtrexc_work( matrix_layout, compq, n, t, ldt, q, ldq, ifst,
+ ilst, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrexc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtrexc_work.c b/LAPACKE/src/lapacke_dtrexc_work.c
new file mode 100644
index 00000000..01368f22
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrexc_work.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrexc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrexc_work( int matrix_layout, char compq, lapack_int n,
+ double* t, lapack_int ldt, double* q,
+ lapack_int ldq, lapack_int* ifst,
+ lapack_int* ilst, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrexc( &compq, &n, t, &ldt, q, &ldq, ifst, ilst, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldt_t = MAX(1,n);
+ double* t_t = NULL;
+ double* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldq < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dtrexc_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dtrexc_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ t_t = (double*)LAPACKE_malloc( sizeof(double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ q_t = (double*)LAPACKE_malloc( sizeof(double) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrexc( &compq, &n, t_t, &ldt_t, q_t, &ldq_t, ifst, ilst, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( t_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrexc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtrexc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtrrfs.c b/LAPACKE/src/lapacke_dtrrfs.c
new file mode 100644
index 00000000..f2e61f35
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrrfs.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrrfs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int nrhs, const double* a,
+ lapack_int lda, const double* b, lapack_int ldb,
+ const double* x, lapack_int ldx, double* ferr,
+ double* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dtr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -11;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dtrrfs_work( matrix_layout, uplo, trans, diag, n, nrhs, a,
+ lda, b, ldb, x, ldx, ferr, berr, work, iwork );
+ /* 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_dtrrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtrrfs_work.c b/LAPACKE/src/lapacke_dtrrfs_work.c
new file mode 100644
index 00000000..6d5ba912
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrrfs_work.c
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrrfs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int nrhs,
+ const double* a, lapack_int lda,
+ const double* b, lapack_int ldb,
+ const double* x, lapack_int ldx, double* ferr,
+ double* berr, double* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrrfs( &uplo, &trans, &diag, &n, &nrhs, a, &lda, b, &ldb, x,
+ &ldx, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dtrrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dtrrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dtrrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x_t = (double*)LAPACKE_malloc( sizeof(double) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dtr_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrrfs( &uplo, &trans, &diag, &n, &nrhs, a_t, &lda_t, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtrrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtrsen.c b/LAPACKE/src/lapacke_dtrsen.c
new file mode 100644
index 00000000..4fc47889
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrsen.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrsen
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrsen( int matrix_layout, char job, char compq,
+ const lapack_logical* select, lapack_int n,
+ double* t, lapack_int ldt, double* q, lapack_int ldq,
+ double* wr, double* wi, lapack_int* m, double* s,
+ double* sep )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrsen", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -6;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dtrsen_work( matrix_layout, job, compq, select, n, t, ldt, q,
+ ldq, wr, wi, m, s, sep, &work_query, lwork,
+ &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ 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_dtrsen_work( matrix_layout, job, compq, select, n, t, ldt, q,
+ ldq, wr, wi, m, s, sep, work, lwork, iwork,
+ liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrsen", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtrsen_work.c b/LAPACKE/src/lapacke_dtrsen_work.c
new file mode 100644
index 00000000..1d5d79a6
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrsen_work.c
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrsen
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrsen_work( int matrix_layout, char job, char compq,
+ const lapack_logical* select, lapack_int n,
+ double* t, lapack_int ldt, double* q,
+ lapack_int ldq, double* wr, double* wi,
+ lapack_int* m, double* s, double* sep,
+ double* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrsen( &job, &compq, select, &n, t, &ldt, q, &ldq, wr, wi, m, s,
+ sep, work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldt_t = MAX(1,n);
+ double* t_t = NULL;
+ double* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldq < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dtrsen_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dtrsen_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array T */
+ t_t = (double*)LAPACKE_malloc( sizeof(double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrix T */
+ LAPACKE_dge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_dtrsen( &job, &compq, select, &n, t_t, &ldt_t, q, &ldq_t, wr,
+ wi, m, s, sep, work, &lwork, iwork, &liwork, &info );
+ LAPACKE_free( t_t );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ q_t = (double*)LAPACKE_malloc( sizeof(double) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrsen( &job, &compq, select, &n, t_t, &ldt_t, q_t, &ldq_t, wr,
+ wi, m, s, sep, work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( t_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrsen_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtrsen_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtrsna.c b/LAPACKE/src/lapacke_dtrsna.c
new file mode 100644
index 00000000..f5c097d9
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrsna.c
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrsna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrsna( int matrix_layout, char job, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const double* t, lapack_int ldt, const double* vl,
+ lapack_int ldvl, const double* vr, lapack_int ldvr,
+ double* s, double* sep, lapack_int mm,
+ lapack_int* m )
+{
+ lapack_int info = 0;
+ lapack_int ldwork = LAPACKE_lsame( job, 'e' ) ? 1 : MAX(1,n) ;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrsna", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ iwork = (lapack_int*)
+ LAPACKE_malloc( sizeof(lapack_int) * MAX(1,2*(n-1)) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ work = (double*)LAPACKE_malloc( sizeof(double) * ldwork * MAX(1,n+6) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dtrsna_work( matrix_layout, job, howmny, select, n, t, ldt,
+ vl, ldvl, vr, ldvr, s, sep, mm, m, work, ldwork,
+ iwork );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrsna", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtrsna_work.c b/LAPACKE/src/lapacke_dtrsna_work.c
new file mode 100644
index 00000000..61561e3a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrsna_work.c
@@ -0,0 +1,132 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrsna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrsna_work( int matrix_layout, char job, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const double* t, lapack_int ldt,
+ const double* vl, lapack_int ldvl,
+ const double* vr, lapack_int ldvr, double* s,
+ double* sep, lapack_int mm, lapack_int* m,
+ double* work, lapack_int ldwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrsna( &job, &howmny, select, &n, t, &ldt, vl, &ldvl, vr, &ldvr,
+ s, sep, &mm, m, work, &ldwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldt_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ double* t_t = NULL;
+ double* vl_t = NULL;
+ double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_dtrsna_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_dtrsna_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_dtrsna_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ t_t = (double*)LAPACKE_malloc( sizeof(double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ vl_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ vr_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_dge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrsna( &job, &howmny, select, &n, t_t, &ldt_t, vl_t, &ldvl_t,
+ vr_t, &ldvr_t, s, sep, &mm, m, work, &ldwork, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( t_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrsna_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtrsna_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtrsyl.c b/LAPACKE/src/lapacke_dtrsyl.c
new file mode 100644
index 00000000..ccf11432
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrsyl.c
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrsyl
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrsyl( int matrix_layout, char trana, char tranb,
+ lapack_int isgn, lapack_int m, lapack_int n,
+ const double* a, lapack_int lda, const double* b,
+ lapack_int ldb, double* c, lapack_int ldc,
+ double* scale )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrsyl", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, m, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -11;
+ }
+#endif
+ return LAPACKE_dtrsyl_work( matrix_layout, trana, tranb, isgn, m, n, a, lda,
+ b, ldb, c, ldc, scale );
+}
diff --git a/LAPACKE/src/lapacke_dtrsyl_work.c b/LAPACKE/src/lapacke_dtrsyl_work.c
new file mode 100644
index 00000000..12403694
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrsyl_work.c
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrsyl
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrsyl_work( int matrix_layout, char trana, char tranb,
+ lapack_int isgn, lapack_int m, lapack_int n,
+ const double* a, lapack_int lda,
+ const double* b, lapack_int ldb, double* c,
+ lapack_int ldc, double* scale )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrsyl( &trana, &tranb, &isgn, &m, &n, a, &lda, b, &ldb, c, &ldc,
+ scale, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldc_t = MAX(1,m);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dtrsyl_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dtrsyl_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_dtrsyl_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ c_t = (double*)LAPACKE_malloc( sizeof(double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, m, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrsyl( &trana, &tranb, &isgn, &m, &n, a_t, &lda_t, b_t, &ldb_t,
+ c_t, &ldc_t, scale, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrsyl_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtrsyl_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtrtri.c b/LAPACKE/src/lapacke_dtrtri.c
new file mode 100644
index 00000000..e60e38fd
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrtri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrtri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrtri( int matrix_layout, char uplo, char diag, lapack_int n,
+ double* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrtri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dtr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_dtrtri_work( matrix_layout, uplo, diag, n, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_dtrtri_work.c b/LAPACKE/src/lapacke_dtrtri_work.c
new file mode 100644
index 00000000..6a02455f
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrtri_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrtri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrtri_work( int matrix_layout, char uplo, char diag,
+ lapack_int n, double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrtri( &uplo, &diag, &n, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dtrtri_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dtr_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrtri( &uplo, &diag, &n, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dtr_trans( LAPACK_COL_MAJOR, uplo, diag, n, a_t, lda_t, a,
+ lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrtri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtrtri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtrtrs.c b/LAPACKE/src/lapacke_dtrtrs.c
new file mode 100644
index 00000000..30b859f4
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrtrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrtrs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int nrhs, const double* a,
+ lapack_int lda, double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrtrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dtr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ return LAPACKE_dtrtrs_work( matrix_layout, uplo, trans, diag, n, nrhs, a,
+ lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_dtrtrs_work.c b/LAPACKE/src/lapacke_dtrtrs_work.c
new file mode 100644
index 00000000..e924d281
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrtrs_work.c
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrtrs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int nrhs,
+ const double* a, lapack_int lda, double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrtrs( &uplo, &trans, &diag, &n, &nrhs, a, &lda, b, &ldb,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ double* a_t = NULL;
+ double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dtrtrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_dtrtrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dtr_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrtrs( &uplo, &trans, &diag, &n, &nrhs, a_t, &lda_t, b_t,
+ &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrtrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtrtrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtrttf.c b/LAPACKE/src/lapacke_dtrttf.c
new file mode 100644
index 00000000..7bf2005b
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrttf.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrttf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrttf( int matrix_layout, char transr, char uplo,
+ lapack_int n, const double* a, lapack_int lda,
+ double* arf )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrttf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_dtrttf_work( matrix_layout, transr, uplo, n, a, lda, arf );
+}
diff --git a/LAPACKE/src/lapacke_dtrttf_work.c b/LAPACKE/src/lapacke_dtrttf_work.c
new file mode 100644
index 00000000..00f1c46a
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrttf_work.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrttf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrttf_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, const double* a, lapack_int lda,
+ double* arf )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrttf( &transr, &uplo, &n, a, &lda, arf, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ double* arf_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_dtrttf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ arf_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( arf_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrttf( &transr, &uplo, &n, a_t, &lda_t, arf_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dpf_trans( LAPACK_COL_MAJOR, transr, uplo, n, arf_t, arf );
+ /* Release memory and exit */
+ LAPACKE_free( arf_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrttf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtrttf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtrttp.c b/LAPACKE/src/lapacke_dtrttp.c
new file mode 100644
index 00000000..6c16e21b
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrttp.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrttp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrttp( int matrix_layout, char uplo, lapack_int n,
+ const double* a, lapack_int lda, double* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrttp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_dtrttp_work( matrix_layout, uplo, n, a, lda, ap );
+}
diff --git a/LAPACKE/src/lapacke_dtrttp_work.c b/LAPACKE/src/lapacke_dtrttp_work.c
new file mode 100644
index 00000000..2a6f71b3
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtrttp_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtrttp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtrttp_work( int matrix_layout, char uplo, lapack_int n,
+ const double* a, lapack_int lda, double* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrttp( &uplo, &n, a, &lda, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ double* a_t = NULL;
+ double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dtrttp_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (double*)
+ LAPACKE_malloc( sizeof(double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtrttp( &uplo, &n, a_t, &lda_t, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtrttp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtrttp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtzrzf.c b/LAPACKE/src/lapacke_dtzrzf.c
new file mode 100644
index 00000000..4463d518
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtzrzf.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtzrzf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtzrzf( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* work = NULL;
+ double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_dtzrzf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_dtzrzf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_dtzrzf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtzrzf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_dtzrzf_work.c b/LAPACKE/src/lapacke_dtzrzf_work.c
new file mode 100644
index 00000000..b3a5f784
--- /dev/null
+++ b/LAPACKE/src/lapacke_dtzrzf_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 dtzrzf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dtzrzf_work( int matrix_layout, lapack_int m, lapack_int n,
+ double* a, lapack_int lda, double* tau,
+ double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtzrzf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_dtzrzf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_dtzrzf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_dtzrzf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_dtzrzf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_dtzrzf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ilaver.c b/LAPACKE/src/lapacke_ilaver.c
new file mode 100644
index 00000000..bec1d900
--- /dev/null
+++ b/LAPACKE/src/lapacke_ilaver.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 dgesv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+void LAPACKE_ilaver( const lapack_int* vers_major,
+ const lapack_int* vers_minor,
+ const lapack_int* vers_patch )
+{
+ /* Call LAPACK function */
+ LAPACK_ilaver( vers_major, vers_minor, vers_patch );
+ return ;
+}
diff --git a/LAPACKE/src/lapacke_sbbcsd.c b/LAPACKE/src/lapacke_sbbcsd.c
new file mode 100644
index 00000000..90ed51ae
--- /dev/null
+++ b/LAPACKE/src/lapacke_sbbcsd.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sbbcsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sbbcsd( int matrix_layout, char jobu1, char jobu2,
+ char jobv1t, char jobv2t, char trans, lapack_int m,
+ lapack_int p, lapack_int q, float* theta, float* phi,
+ float* u1, lapack_int ldu1, float* u2,
+ lapack_int ldu2, float* v1t, lapack_int ldv1t,
+ float* v2t, lapack_int ldv2t, float* b11d,
+ float* b11e, float* b12d, float* b12e, float* b21d,
+ float* b21e, float* b22d, float* b22e )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ lapack_int nrows_u1, nrows_u2, nrows_v1t, nrows_v2t;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sbbcsd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
+ nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
+ nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
+ nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
+ if( LAPACKE_s_nancheck( q-1, phi, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_s_nancheck( q, theta, 1 ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_u1, p, u1, ldu1 ) ) {
+ return -12;
+ }
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_u2, m-p, u2, ldu2 ) ) {
+ return -14;
+ }
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_v1t, q, v1t, ldv1t ) ) {
+ return -16;
+ }
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_v2t, m-q, v2t, ldv2t ) ) {
+ return -18;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sbbcsd_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, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sbbcsd_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, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sbbcsd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sbbcsd_work.c b/LAPACKE/src/lapacke_sbbcsd_work.c
new file mode 100644
index 00000000..a7d0eeab
--- /dev/null
+++ b/LAPACKE/src/lapacke_sbbcsd_work.c
@@ -0,0 +1,198 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sbbcsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sbbcsd_work( int matrix_layout, char jobu1, char jobu2,
+ char jobv1t, char jobv2t, char trans,
+ lapack_int m, lapack_int p, lapack_int q,
+ float* theta, float* phi, float* u1,
+ lapack_int ldu1, float* u2, lapack_int ldu2,
+ float* v1t, lapack_int ldv1t, float* v2t,
+ lapack_int ldv2t, float* b11d, float* b11e,
+ float* b12d, float* b12e, float* b21d,
+ float* b21e, float* b22d, float* b22e,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sbbcsd( &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,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
+ lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
+ lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
+ lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
+ lapack_int ldu1_t = MAX(1,nrows_u1);
+ lapack_int ldu2_t = MAX(1,nrows_u2);
+ lapack_int ldv1t_t = MAX(1,nrows_v1t);
+ lapack_int ldv2t_t = MAX(1,nrows_v2t);
+ float* u1_t = NULL;
+ float* u2_t = NULL;
+ float* v1t_t = NULL;
+ float* v2t_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldu1 < p ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info );
+ return info;
+ }
+ if( ldu2 < m-p ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info );
+ return info;
+ }
+ if( ldv1t < q ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info );
+ return info;
+ }
+ if( ldv2t < m-q ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
+ theta, phi, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t,
+ v2t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d, b21e,
+ b22d, b22e, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ u1_t = (float*)LAPACKE_malloc( sizeof(float) * ldu1_t * MAX(1,p) );
+ if( u1_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ u2_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldu2_t * MAX(1,m-p) );
+ if( u2_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ v1t_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldv1t_t * MAX(1,q) );
+ if( v1t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ v2t_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldv2t_t * MAX(1,m-q) );
+ if( v2t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_sge_trans( matrix_layout, nrows_u1, p, u1, ldu1, u1_t,
+ ldu1_t );
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_sge_trans( matrix_layout, nrows_u2, m-p, u2, ldu2, u2_t,
+ ldu2_t );
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_sge_trans( matrix_layout, nrows_v1t, q, v1t, ldv1t, v1t_t,
+ ldv1t_t );
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_sge_trans( matrix_layout, nrows_v2t, m-q, v2t, ldv2t, v2t_t,
+ ldv2t_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
+ theta, phi, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t,
+ &ldv1t_t, v2t_t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d,
+ b21e, b22d, b22e, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1,
+ ldu1 );
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t,
+ u2, ldu2 );
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t,
+ v1t, ldv1t );
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t,
+ v2t, ldv2t );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_free( v2t_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_free( v1t_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_free( u2_t );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_free( u1_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sbdsdc.c b/LAPACKE/src/lapacke_sbdsdc.c
new file mode 100644
index 00000000..e2345c4a
--- /dev/null
+++ b/LAPACKE/src/lapacke_sbdsdc.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sbdsdc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sbdsdc( int matrix_layout, char uplo, char compq,
+ lapack_int n, float* d, float* e, float* u,
+ lapack_int ldu, float* vt, lapack_int ldvt, float* q,
+ lapack_int* iq )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ size_t lwork;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sbdsdc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( n, e, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( compq, 'i' ) ) {
+ lwork = (size_t)3*MAX(1,n)*MAX(1,n)+4*MAX(1,n);
+ } else if( LAPACKE_lsame( compq, 'p' ) ) {
+ lwork = MAX(1,6*n);
+ } else if( LAPACKE_lsame( compq, 'n' ) ) {
+ lwork = MAX(1,4*n);
+ } else {
+ lwork = 1; /* Any value */
+ }
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,8*n) );
+ 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_sbdsdc_work( matrix_layout, uplo, compq, n, d, e, u, ldu, vt,
+ ldvt, q, iq, work, iwork );
+ /* 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_sbdsdc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sbdsdc_work.c b/LAPACKE/src/lapacke_sbdsdc_work.c
new file mode 100644
index 00000000..2a27f8a7
--- /dev/null
+++ b/LAPACKE/src/lapacke_sbdsdc_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sbdsdc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sbdsdc_work( int matrix_layout, char uplo, char compq,
+ lapack_int n, float* d, float* e, float* u,
+ lapack_int ldu, float* vt, lapack_int ldvt,
+ float* q, lapack_int* iq, float* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sbdsdc( &uplo, &compq, &n, d, e, u, &ldu, vt, &ldvt, q, iq, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldu_t = MAX(1,n);
+ lapack_int ldvt_t = MAX(1,n);
+ float* u_t = NULL;
+ float* vt_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldu < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sbdsdc_work", info );
+ return info;
+ }
+ if( ldvt < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sbdsdc_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( compq, 'i' ) ) {
+ u_t = (float*)LAPACKE_malloc( sizeof(float) * ldu_t * MAX(1,n) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( compq, 'i' ) ) {
+ vt_t = (float*)LAPACKE_malloc( sizeof(float) * ldvt_t * MAX(1,n) );
+ if( vt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sbdsdc( &uplo, &compq, &n, d, e, u_t, &ldu_t, vt_t, &ldvt_t, q,
+ iq, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( compq, 'i' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, u_t, ldu_t, u, ldu );
+ }
+ if( LAPACKE_lsame( compq, 'i' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, vt_t, ldvt_t, vt, ldvt );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compq, 'i' ) ) {
+ LAPACKE_free( vt_t );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( compq, 'i' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sbdsdc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sbdsdc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sbdsqr.c b/LAPACKE/src/lapacke_sbdsqr.c
new file mode 100644
index 00000000..70080519
--- /dev/null
+++ b/LAPACKE/src/lapacke_sbdsqr.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sbdsqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sbdsqr( int matrix_layout, char uplo, lapack_int n,
+ lapack_int ncvt, lapack_int nru, lapack_int ncc,
+ float* d, float* e, float* vt, lapack_int ldvt,
+ float* u, lapack_int ldu, float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sbdsqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( ncc != 0 ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, ncc, c, ldc ) ) {
+ return -13;
+ }
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+ return -8;
+ }
+ if( nru != 0 ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, nru, n, u, ldu ) ) {
+ return -11;
+ }
+ }
+ if( ncvt != 0 ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, ncvt, vt, ldvt ) ) {
+ return -9;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sbdsqr_work( matrix_layout, uplo, n, ncvt, nru, ncc, d, e, vt,
+ ldvt, u, ldu, c, ldc, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sbdsqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sbdsqr_work.c b/LAPACKE/src/lapacke_sbdsqr_work.c
new file mode 100644
index 00000000..117c36d5
--- /dev/null
+++ b/LAPACKE/src/lapacke_sbdsqr_work.c
@@ -0,0 +1,144 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sbdsqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sbdsqr_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int ncvt, lapack_int nru, lapack_int ncc,
+ float* d, float* e, float* vt, lapack_int ldvt,
+ float* u, lapack_int ldu, float* c,
+ lapack_int ldc, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sbdsqr( &uplo, &n, &ncvt, &nru, &ncc, d, e, vt, &ldvt, u, &ldu,
+ c, &ldc, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldc_t = MAX(1,n);
+ lapack_int ldu_t = MAX(1,nru);
+ lapack_int ldvt_t = MAX(1,n);
+ float* vt_t = NULL;
+ float* u_t = NULL;
+ float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldc < ncc ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_sbdsqr_work", info );
+ return info;
+ }
+ if( ldu < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_sbdsqr_work", info );
+ return info;
+ }
+ if( ldvt < ncvt ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sbdsqr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( ncvt != 0 ) {
+ vt_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldvt_t * MAX(1,ncvt) );
+ if( vt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( nru != 0 ) {
+ u_t = (float*)LAPACKE_malloc( sizeof(float) * ldu_t * MAX(1,n) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( ncc != 0 ) {
+ c_t = (float*)LAPACKE_malloc( sizeof(float) * ldc_t * MAX(1,ncc) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ if( ncvt != 0 ) {
+ LAPACKE_sge_trans( matrix_layout, n, ncvt, vt, ldvt, vt_t, ldvt_t );
+ }
+ if( nru != 0 ) {
+ LAPACKE_sge_trans( matrix_layout, nru, n, u, ldu, u_t, ldu_t );
+ }
+ if( ncc != 0 ) {
+ LAPACKE_sge_trans( matrix_layout, n, ncc, c, ldc, c_t, ldc_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sbdsqr( &uplo, &n, &ncvt, &nru, &ncc, d, e, vt_t, &ldvt_t, u_t,
+ &ldu_t, c_t, &ldc_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( ncvt != 0 ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, ncvt, vt_t, ldvt_t, vt,
+ ldvt );
+ }
+ if( nru != 0 ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nru, n, u_t, ldu_t, u, ldu );
+ }
+ if( ncc != 0 ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, ncc, c_t, ldc_t, c, ldc );
+ }
+ /* Release memory and exit */
+ if( ncc != 0 ) {
+ LAPACKE_free( c_t );
+ }
+exit_level_2:
+ if( nru != 0 ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_1:
+ if( ncvt != 0 ) {
+ LAPACKE_free( vt_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sbdsqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sbdsqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sdisna.c b/LAPACKE/src/lapacke_sdisna.c
new file mode 100644
index 00000000..07be8c56
--- /dev/null
+++ b/LAPACKE/src/lapacke_sdisna.c
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 sdisna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sdisna( char job, lapack_int m, lapack_int n, const float* d,
+ float* sep )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( MIN(m,n), d, 1 ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_sdisna_work( job, m, n, d, sep );
+}
diff --git a/LAPACKE/src/lapacke_sdisna_work.c b/LAPACKE/src/lapacke_sdisna_work.c
new file mode 100644
index 00000000..48a83930
--- /dev/null
+++ b/LAPACKE/src/lapacke_sdisna_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 sdisna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sdisna_work( char job, lapack_int m, lapack_int n,
+ const float* d, float* sep )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_sdisna( &job, &m, &n, d, sep, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgbbrd.c b/LAPACKE/src/lapacke_sgbbrd.c
new file mode 100644
index 00000000..f19fde56
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbbrd.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbbrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbbrd( int matrix_layout, char vect, lapack_int m,
+ lapack_int n, lapack_int ncc, lapack_int kl,
+ lapack_int ku, float* ab, lapack_int ldab, float* d,
+ float* e, float* q, lapack_int ldq, float* pt,
+ lapack_int ldpt, float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbbrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+ return -8;
+ }
+ if( ncc != 0 ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, m, ncc, c, ldc ) ) {
+ return -16;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*MAX(m,n)) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgbbrd_work( matrix_layout, vect, m, n, ncc, kl, ku, ab, ldab,
+ d, e, q, ldq, pt, ldpt, c, ldc, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbbrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgbbrd_work.c b/LAPACKE/src/lapacke_sgbbrd_work.c
new file mode 100644
index 00000000..8d3be321
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbbrd_work.c
@@ -0,0 +1,154 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbbrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbbrd_work( int matrix_layout, char vect, lapack_int m,
+ lapack_int n, lapack_int ncc, lapack_int kl,
+ lapack_int ku, float* ab, lapack_int ldab,
+ float* d, float* e, float* q, lapack_int ldq,
+ float* pt, lapack_int ldpt, float* c,
+ lapack_int ldc, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbbrd( &vect, &m, &n, &ncc, &kl, &ku, ab, &ldab, d, e, q, &ldq,
+ pt, &ldpt, c, &ldc, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_int ldpt_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,m);
+ float* ab_t = NULL;
+ float* q_t = NULL;
+ float* pt_t = NULL;
+ float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sgbbrd_work", info );
+ return info;
+ }
+ if( ldc < ncc ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_sgbbrd_work", info );
+ return info;
+ }
+ if( ldpt < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_sgbbrd_work", info );
+ return info;
+ }
+ if( ldq < m ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_sgbbrd_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'q' ) ) {
+ q_t = (float*)LAPACKE_malloc( sizeof(float) * ldq_t * MAX(1,m) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'p' ) ) {
+ pt_t = (float*)LAPACKE_malloc( sizeof(float) * ldpt_t * MAX(1,n) );
+ if( pt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( ncc != 0 ) {
+ c_t = (float*)LAPACKE_malloc( sizeof(float) * ldc_t * MAX(1,ncc) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sgb_trans( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ if( ncc != 0 ) {
+ LAPACKE_sge_trans( matrix_layout, m, ncc, c, ldc, c_t, ldc_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbbrd( &vect, &m, &n, &ncc, &kl, &ku, ab_t, &ldab_t, d, e, q_t,
+ &ldq_t, pt_t, &ldpt_t, c_t, &ldc_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sgb_trans( LAPACK_COL_MAJOR, m, n, kl, ku, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'q' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, m, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'p' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, pt_t, ldpt_t, pt, ldpt );
+ }
+ if( ncc != 0 ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, ncc, c_t, ldc_t, c, ldc );
+ }
+ /* Release memory and exit */
+ if( ncc != 0 ) {
+ LAPACKE_free( c_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'p' ) ) {
+ LAPACKE_free( pt_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'q' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbbrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgbbrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgbcon.c b/LAPACKE/src/lapacke_sgbcon.c
new file mode 100644
index 00000000..a920e8e1
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbcon.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbcon( int matrix_layout, char norm, lapack_int n,
+ lapack_int kl, lapack_int ku, const float* ab,
+ lapack_int ldab, const lapack_int* ipiv, float anorm,
+ float* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgbcon_work( matrix_layout, norm, n, kl, ku, ab, ldab, ipiv,
+ anorm, rcond, work, iwork );
+ /* 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_sgbcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgbcon_work.c b/LAPACKE/src/lapacke_sgbcon_work.c
new file mode 100644
index 00000000..ba272e8e
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbcon_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbcon_work( int matrix_layout, char norm, lapack_int n,
+ lapack_int kl, lapack_int ku, const float* ab,
+ lapack_int ldab, const lapack_int* ipiv,
+ float anorm, float* rcond, float* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbcon( &norm, &n, &kl, &ku, ab, &ldab, ipiv, &anorm, rcond,
+ work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,2*kl+ku+1);
+ float* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sgbcon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sgb_trans( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
+ ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbcon( &norm, &n, &kl, &ku, ab_t, &ldab_t, ipiv, &anorm, rcond,
+ work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgbcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgbequ.c b/LAPACKE/src/lapacke_sgbequ.c
new file mode 100644
index 00000000..9feb23e9
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbequ.c
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbequ( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, const float* ab,
+ lapack_int ldab, float* r, float* c, float* rowcnd,
+ float* colcnd, float* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_sgbequ_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
+ rowcnd, colcnd, amax );
+}
diff --git a/LAPACKE/src/lapacke_sgbequ_work.c b/LAPACKE/src/lapacke_sgbequ_work.c
new file mode 100644
index 00000000..7fecd94a
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbequ_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbequ_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, const float* ab,
+ lapack_int ldab, float* r, float* c,
+ float* rowcnd, float* colcnd, float* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbequ( &m, &n, &kl, &ku, ab, &ldab, r, c, rowcnd, colcnd, amax,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ float* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sgbequ_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sgb_trans( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbequ( &m, &n, &kl, &ku, ab_t, &ldab_t, r, c, rowcnd, colcnd,
+ amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgbequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgbequb.c b/LAPACKE/src/lapacke_sgbequb.c
new file mode 100644
index 00000000..4afda074
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbequb.c
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbequb( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, const float* ab,
+ lapack_int ldab, float* r, float* c, float* rowcnd,
+ float* colcnd, float* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_sgbequb_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
+ rowcnd, colcnd, amax );
+}
diff --git a/LAPACKE/src/lapacke_sgbequb_work.c b/LAPACKE/src/lapacke_sgbequb_work.c
new file mode 100644
index 00000000..04e4a8ab
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbequb_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbequb_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, const float* ab,
+ lapack_int ldab, float* r, float* c,
+ float* rowcnd, float* colcnd, float* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbequb( &m, &n, &kl, &ku, ab, &ldab, r, c, rowcnd, colcnd, amax,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ float* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sgbequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sgb_trans( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbequb( &m, &n, &kl, &ku, ab_t, &ldab_t, r, c, rowcnd, colcnd,
+ amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgbequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgbrfs.c b/LAPACKE/src/lapacke_sgbrfs.c
new file mode 100644
index 00000000..d463cf7c
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbrfs.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbrfs( int matrix_layout, char trans, lapack_int n,
+ lapack_int kl, lapack_int ku, lapack_int nrhs,
+ const float* ab, lapack_int ldab, const float* afb,
+ lapack_int ldafb, const lapack_int* ipiv,
+ const float* b, lapack_int ldb, float* x,
+ lapack_int ldx, float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
+ return -9;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -14;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgbrfs_work( matrix_layout, trans, n, kl, ku, nrhs, ab, ldab,
+ afb, ldafb, ipiv, b, ldb, x, ldx, ferr, berr,
+ work, iwork );
+ /* 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_sgbrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgbrfs_work.c b/LAPACKE/src/lapacke_sgbrfs_work.c
new file mode 100644
index 00000000..1942e4dc
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbrfs_work.c
@@ -0,0 +1,136 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbrfs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int kl, lapack_int ku, lapack_int nrhs,
+ const float* ab, lapack_int ldab,
+ const float* afb, lapack_int ldafb,
+ const lapack_int* ipiv, const float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* ferr, float* berr, float* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbrfs( &trans, &n, &kl, &ku, &nrhs, ab, &ldab, afb, &ldafb,
+ ipiv, b, &ldb, x, &ldx, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldafb_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* afb_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sgbrfs_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sgbrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_sgbrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_sgbrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (float*)LAPACKE_malloc( sizeof(float) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ LAPACKE_sgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
+ ldafb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbrfs( &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t, afb_t,
+ &ldafb_t, ipiv, b_t, &ldb_t, x_t, &ldx_t, ferr, berr,
+ work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgbrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgbrfsx.c b/LAPACKE/src/lapacke_sgbrfsx.c
new file mode 100644
index 00000000..b3e8d765
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbrfsx.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbrfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbrfsx( int matrix_layout, char trans, char equed,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, const float* ab, lapack_int ldab,
+ const float* afb, lapack_int ldafb,
+ const lapack_int* ipiv, const float* r,
+ const float* c, const float* b, lapack_int ldb,
+ float* x, lapack_int ldx, float* rcond, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbrfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
+ return -10;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -15;
+ }
+ if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
+ if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+ return -14;
+ }
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -25;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
+ if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+ return -13;
+ }
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -17;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgbrfsx_work( matrix_layout, trans, equed, n, kl, ku, nrhs,
+ ab, ldab, afb, ldafb, ipiv, r, c, b, ldb, x,
+ ldx, rcond, berr, n_err_bnds, err_bnds_norm,
+ err_bnds_comp, nparams, params, work, iwork );
+ /* 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_sgbrfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgbrfsx_work.c b/LAPACKE/src/lapacke_sgbrfsx_work.c
new file mode 100644
index 00000000..b41e8bae
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbrfsx_work.c
@@ -0,0 +1,164 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbrfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbrfsx_work( int matrix_layout, char trans, char equed,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, const float* ab,
+ lapack_int ldab, const float* afb,
+ lapack_int ldafb, const lapack_int* ipiv,
+ const float* r, const float* c, const float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* rcond, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params, float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbrfsx( &trans, &equed, &n, &kl, &ku, &nrhs, ab, &ldab, afb,
+ &ldafb, ipiv, r, c, b, &ldb, x, &ldx, rcond, berr,
+ &n_err_bnds, err_bnds_norm, err_bnds_comp, &nparams,
+ params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldafb_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* afb_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sgbrfsx_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sgbrfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_sgbrfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -18;
+ LAPACKE_xerbla( "LAPACKE_sgbrfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (float*)LAPACKE_malloc( sizeof(float) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ LAPACKE_sgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
+ ldafb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbrfsx( &trans, &equed, &n, &kl, &ku, &nrhs, ab_t, &ldab_t,
+ afb_t, &ldafb_t, ipiv, r, c, b_t, &ldb_t, x_t, &ldx_t,
+ rcond, berr, &n_err_bnds, err_bnds_norm_t,
+ err_bnds_comp_t, &nparams, params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbrfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgbrfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgbsv.c b/LAPACKE/src/lapacke_sgbsv.c
new file mode 100644
index 00000000..e089aecf
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbsv.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbsv( int matrix_layout, lapack_int n, lapack_int kl,
+ lapack_int ku, lapack_int nrhs, float* ab,
+ lapack_int ldab, lapack_int* ipiv, float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ return LAPACKE_sgbsv_work( matrix_layout, n, kl, ku, nrhs, ab, ldab, ipiv, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_sgbsv_work.c b/LAPACKE/src/lapacke_sgbsv_work.c
new file mode 100644
index 00000000..16d0614f
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbsv_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbsv_work( int matrix_layout, lapack_int n, lapack_int kl,
+ lapack_int ku, lapack_int nrhs, float* ab,
+ lapack_int ldab, lapack_int* ipiv, float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbsv( &n, &kl, &ku, &nrhs, ab, &ldab, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sgbsv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sgbsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sgb_trans( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
+ ldab_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbsv( &n, &kl, &ku, &nrhs, ab_t, &ldab_t, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sgb_trans( LAPACK_COL_MAJOR, n, n, kl, kl+ku, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgbsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgbsvx.c b/LAPACKE/src/lapacke_sgbsvx.c
new file mode 100644
index 00000000..162d5cc3
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbsvx.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbsvx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, float* ab, lapack_int ldab,
+ float* afb, lapack_int ldafb, lapack_int* ipiv,
+ char* equed, float* r, float* c, float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr,
+ float* rpivot )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
+ ldafb ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -16;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) ) ) {
+ if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+ return -15;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'r' ) ) ) {
+ if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+ return -14;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgbsvx_work( matrix_layout, fact, trans, n, kl, ku, nrhs, ab,
+ ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x,
+ ldx, rcond, ferr, berr, work, iwork );
+ /* Backup significant data from working array(s) */
+ *rpivot = work[0];
+ /* 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_sgbsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgbsvx_work.c b/LAPACKE/src/lapacke_sgbsvx_work.c
new file mode 100644
index 00000000..ef753b55
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbsvx_work.c
@@ -0,0 +1,151 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbsvx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, float* ab, lapack_int ldab,
+ float* afb, lapack_int ldafb, lapack_int* ipiv,
+ char* equed, float* r, float* c, float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr,
+ float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbsvx( &fact, &trans, &n, &kl, &ku, &nrhs, ab, &ldab, afb,
+ &ldafb, ipiv, equed, r, c, b, &ldb, x, &ldx, rcond, ferr,
+ berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldafb_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* afb_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sgbsvx_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sgbsvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_sgbsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_sgbsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (float*)LAPACKE_malloc( sizeof(float) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_sgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
+ ldafb_t );
+ }
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbsvx( &fact, &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t, afb_t,
+ &ldafb_t, ipiv, equed, r, c, b_t, &ldb_t, x_t, &ldx_t,
+ rcond, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_sgb_trans( LAPACK_COL_MAJOR, n, n, kl, ku, ab_t, ldab_t, ab,
+ ldab );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_sgb_trans( LAPACK_COL_MAJOR, n, n, kl, kl+ku, afb_t,
+ ldafb_t, afb, ldafb );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgbsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgbsvxx.c b/LAPACKE/src/lapacke_sgbsvxx.c
new file mode 100644
index 00000000..6958422c
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbsvxx.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbsvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbsvxx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, float* ab, lapack_int ldab,
+ float* afb, lapack_int ldafb, lapack_int* ipiv,
+ char* equed, float* r, float* c, float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* rcond, float* rpvgrw, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbsvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
+ ldafb ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -16;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) ) ) {
+ if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+ return -15;
+ }
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -27;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'r' ) ) ) {
+ if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+ return -14;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgbsvxx_work( matrix_layout, fact, trans, n, kl, ku, nrhs, ab,
+ ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x,
+ ldx, rcond, rpvgrw, berr, n_err_bnds,
+ err_bnds_norm, err_bnds_comp, nparams, params,
+ work, iwork );
+ /* 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_sgbsvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgbsvxx_work.c b/LAPACKE/src/lapacke_sgbsvxx_work.c
new file mode 100644
index 00000000..99d593f3
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbsvxx_work.c
@@ -0,0 +1,178 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbsvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbsvxx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, float* ab, lapack_int ldab,
+ float* afb, lapack_int ldafb, lapack_int* ipiv,
+ char* equed, float* r, float* c, float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* rcond, float* rpvgrw, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params, float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbsvxx( &fact, &trans, &n, &kl, &ku, &nrhs, ab, &ldab, afb,
+ &ldafb, ipiv, equed, r, c, b, &ldb, x, &ldx, rcond,
+ rpvgrw, berr, &n_err_bnds, err_bnds_norm, err_bnds_comp,
+ &nparams, params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldafb_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* afb_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sgbsvxx_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sgbsvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_sgbsvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_sgbsvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (float*)LAPACKE_malloc( sizeof(float) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_sgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
+ ldafb_t );
+ }
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbsvxx( &fact, &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t,
+ afb_t, &ldafb_t, ipiv, equed, r, c, b_t, &ldb_t, x_t,
+ &ldx_t, rcond, rpvgrw, berr, &n_err_bnds,
+ err_bnds_norm_t, err_bnds_comp_t, &nparams, params,
+ work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_sgb_trans( LAPACK_COL_MAJOR, n, n, kl, ku, ab_t, ldab_t, ab,
+ ldab );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_sgb_trans( LAPACK_COL_MAJOR, n, n, kl, kl+ku, afb_t,
+ ldafb_t, afb, ldafb );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbsvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgbsvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgbtrf.c b/LAPACKE/src/lapacke_sgbtrf.c
new file mode 100644
index 00000000..d8f22b67
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbtrf.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbtrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbtrf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, float* ab,
+ lapack_int ldab, lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbtrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, kl+ku, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_sgbtrf_work( matrix_layout, m, n, kl, ku, ab, ldab, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_sgbtrf_work.c b/LAPACKE/src/lapacke_sgbtrf_work.c
new file mode 100644
index 00000000..9f3fada1
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbtrf_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbtrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbtrf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, float* ab,
+ lapack_int ldab, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbtrf( &m, &n, &kl, &ku, ab, &ldab, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,2*kl+ku+1);
+ float* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sgbtrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sgb_trans( matrix_layout, m, n, kl, kl+ku, ab, ldab, ab_t,
+ ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbtrf( &m, &n, &kl, &ku, ab_t, &ldab_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sgb_trans( LAPACK_COL_MAJOR, m, n, kl, kl+ku, ab_t, ldab_t, ab,
+ ldab );
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbtrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgbtrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgbtrs.c b/LAPACKE/src/lapacke_sgbtrs.c
new file mode 100644
index 00000000..68e6b046
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbtrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbtrs( int matrix_layout, char trans, lapack_int n,
+ lapack_int kl, lapack_int ku, lapack_int nrhs,
+ const float* ab, lapack_int ldab,
+ const lapack_int* ipiv, float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbtrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+#endif
+ return LAPACKE_sgbtrs_work( matrix_layout, trans, n, kl, ku, nrhs, ab, ldab,
+ ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_sgbtrs_work.c b/LAPACKE/src/lapacke_sgbtrs_work.c
new file mode 100644
index 00000000..85a80269
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgbtrs_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgbtrs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int kl, lapack_int ku, lapack_int nrhs,
+ const float* ab, lapack_int ldab,
+ const lapack_int* ipiv, float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbtrs( &trans, &n, &kl, &ku, &nrhs, ab, &ldab, ipiv, b, &ldb,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sgbtrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sgbtrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sgb_trans( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
+ ldab_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgbtrs( &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t, ipiv, b_t,
+ &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgbtrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgbtrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgebak.c b/LAPACKE/src/lapacke_sgebak.c
new file mode 100644
index 00000000..ecc1823a
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgebak.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgebak
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgebak( int matrix_layout, char job, char side, lapack_int n,
+ lapack_int ilo, lapack_int ihi, const float* scale,
+ lapack_int m, float* v, lapack_int ldv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgebak", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, scale, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, m, v, ldv ) ) {
+ return -9;
+ }
+#endif
+ return LAPACKE_sgebak_work( matrix_layout, job, side, n, ilo, ihi, scale, m,
+ v, ldv );
+}
diff --git a/LAPACKE/src/lapacke_sgebak_work.c b/LAPACKE/src/lapacke_sgebak_work.c
new file mode 100644
index 00000000..6cac0f3d
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgebak_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgebak
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgebak_work( int matrix_layout, char job, char side,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ const float* scale, lapack_int m, float* v,
+ lapack_int ldv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgebak( &job, &side, &n, &ilo, &ihi, scale, &m, v, &ldv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldv_t = MAX(1,n);
+ float* v_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldv < m ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sgebak_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (float*)LAPACKE_malloc( sizeof(float) * ldv_t * MAX(1,m) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, m, v, ldv, v_t, ldv_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgebak( &job, &side, &n, &ilo, &ihi, scale, &m, v_t, &ldv_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, m, v_t, ldv_t, v, ldv );
+ /* Release memory and exit */
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgebak_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgebak_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgebal.c b/LAPACKE/src/lapacke_sgebal.c
new file mode 100644
index 00000000..e6328d97
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgebal.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgebal
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgebal( int matrix_layout, char job, lapack_int n, float* a,
+ lapack_int lda, lapack_int* ilo, lapack_int* ihi,
+ float* scale )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgebal", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ }
+#endif
+ return LAPACKE_sgebal_work( matrix_layout, job, n, a, lda, ilo, ihi, scale );
+}
diff --git a/LAPACKE/src/lapacke_sgebal_work.c b/LAPACKE/src/lapacke_sgebal_work.c
new file mode 100644
index 00000000..22747f23
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgebal_work.c
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgebal
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgebal_work( int matrix_layout, char job, lapack_int n,
+ float* a, lapack_int lda, lapack_int* ilo,
+ lapack_int* ihi, float* scale )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgebal( &job, &n, a, &lda, ilo, ihi, scale, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgebal_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgebal( &job, &n, a_t, &lda_t, ilo, ihi, scale, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ LAPACKE_free( a_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgebal_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgebal_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgebrd.c b/LAPACKE/src/lapacke_sgebrd.c
new file mode 100644
index 00000000..ddd068bf
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgebrd.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgebrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgebrd( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* d, float* e,
+ float* tauq, float* taup )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgebrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgebrd_work( matrix_layout, m, n, a, lda, d, e, tauq, taup,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgebrd_work( matrix_layout, m, n, a, lda, d, e, tauq, taup,
+ work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgebrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgebrd_work.c b/LAPACKE/src/lapacke_sgebrd_work.c
new file mode 100644
index 00000000..213b850a
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgebrd_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgebrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgebrd_work( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* d, float* e,
+ float* tauq, float* taup, float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgebrd( &m, &n, a, &lda, d, e, tauq, taup, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgebrd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgebrd( &m, &n, a, &lda_t, d, e, tauq, taup, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgebrd( &m, &n, a_t, &lda_t, d, e, tauq, taup, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgebrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgebrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgecon.c b/LAPACKE/src/lapacke_sgecon.c
new file mode 100644
index 00000000..d48eb52f
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgecon.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgecon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgecon( int matrix_layout, char norm, lapack_int n,
+ const float* a, lapack_int lda, float anorm,
+ float* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgecon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgecon_work( matrix_layout, norm, n, a, lda, anorm, rcond,
+ work, iwork );
+ /* 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_sgecon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgecon_work.c b/LAPACKE/src/lapacke_sgecon_work.c
new file mode 100644
index 00000000..97901c2a
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgecon_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgecon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgecon_work( int matrix_layout, char norm, lapack_int n,
+ const float* a, lapack_int lda, float anorm,
+ float* rcond, float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgecon( &norm, &n, a, &lda, &anorm, rcond, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgecon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgecon( &norm, &n, a_t, &lda_t, &anorm, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgecon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgecon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeequ.c b/LAPACKE/src/lapacke_sgeequ.c
new file mode 100644
index 00000000..6ba73048
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeequ.c
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeequ( int matrix_layout, lapack_int m, lapack_int n,
+ const float* a, lapack_int lda, float* r, float* c,
+ float* rowcnd, float* colcnd, float* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_sgeequ_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
+ colcnd, amax );
+}
diff --git a/LAPACKE/src/lapacke_sgeequ_work.c b/LAPACKE/src/lapacke_sgeequ_work.c
new file mode 100644
index 00000000..03bd573e
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeequ_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeequ_work( int matrix_layout, lapack_int m, lapack_int n,
+ const float* a, lapack_int lda, float* r,
+ float* c, float* rowcnd, float* colcnd,
+ float* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeequ( &m, &n, a, &lda, r, c, rowcnd, colcnd, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgeequ_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeequ( &m, &n, a_t, &lda_t, r, c, rowcnd, colcnd, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgeequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeequb.c b/LAPACKE/src/lapacke_sgeequb.c
new file mode 100644
index 00000000..c181afea
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeequb.c
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeequb( int matrix_layout, lapack_int m, lapack_int n,
+ const float* a, lapack_int lda, float* r, float* c,
+ float* rowcnd, float* colcnd, float* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_sgeequb_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
+ colcnd, amax );
+}
diff --git a/LAPACKE/src/lapacke_sgeequb_work.c b/LAPACKE/src/lapacke_sgeequb_work.c
new file mode 100644
index 00000000..0c523010
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeequb_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeequb_work( int matrix_layout, lapack_int m, lapack_int n,
+ const float* a, lapack_int lda, float* r,
+ float* c, float* rowcnd, float* colcnd,
+ float* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeequb( &m, &n, a, &lda, r, c, rowcnd, colcnd, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgeequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeequb( &m, &n, a_t, &lda_t, r, c, rowcnd, colcnd, amax,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgeequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgees.c b/LAPACKE/src/lapacke_sgees.c
new file mode 100644
index 00000000..18219656
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgees.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgees
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgees( int matrix_layout, char jobvs, char sort,
+ LAPACK_S_SELECT2 select, lapack_int n, float* a,
+ lapack_int lda, lapack_int* sdim, float* wr,
+ float* wi, float* vs, lapack_int ldvs )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgees", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgees_work( matrix_layout, jobvs, sort, select, n, a, lda,
+ sdim, wr, wi, vs, ldvs, &work_query, lwork,
+ bwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_sgees_work( matrix_layout, jobvs, sort, select, n, a, lda,
+ sdim, wr, wi, vs, ldvs, work, lwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgees", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgees_work.c b/LAPACKE/src/lapacke_sgees_work.c
new file mode 100644
index 00000000..6fcd0876
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgees_work.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgees
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgees_work( int matrix_layout, char jobvs, char sort,
+ LAPACK_S_SELECT2 select, lapack_int n, float* a,
+ lapack_int lda, lapack_int* sdim, float* wr,
+ float* wi, float* vs, lapack_int ldvs,
+ float* work, lapack_int lwork,
+ lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgees( &jobvs, &sort, select, &n, a, &lda, sdim, wr, wi, vs,
+ &ldvs, work, &lwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldvs_t = MAX(1,n);
+ float* a_t = NULL;
+ float* vs_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sgees_work", info );
+ return info;
+ }
+ if( ldvs < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_sgees_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgees( &jobvs, &sort, select, &n, a, &lda_t, sdim, wr, wi,
+ vs, &ldvs_t, work, &lwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ vs_t = (float*)LAPACKE_malloc( sizeof(float) * ldvs_t * MAX(1,n) );
+ if( vs_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgees( &jobvs, &sort, select, &n, a_t, &lda_t, sdim, wr, wi,
+ vs_t, &ldvs_t, work, &lwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, vs_t, ldvs_t, vs, ldvs );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ LAPACKE_free( vs_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgees_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgees_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeesx.c b/LAPACKE/src/lapacke_sgeesx.c
new file mode 100644
index 00000000..34bfd814
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeesx.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeesx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeesx( int matrix_layout, char jobvs, char sort,
+ LAPACK_S_SELECT2 select, char sense, lapack_int n,
+ float* a, lapack_int lda, lapack_int* sdim,
+ float* wr, float* wi, float* vs, lapack_int ldvs,
+ float* rconde, float* rcondv )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ lapack_int iwork_query;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeesx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgeesx_work( matrix_layout, jobvs, sort, select, sense, n, a,
+ lda, sdim, wr, wi, vs, ldvs, rconde, rcondv,
+ &work_query, lwork, &iwork_query, liwork,
+ bwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ liwork = (lapack_int)iwork_query;
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'v' ) ) {
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgeesx_work( matrix_layout, jobvs, sort, select, sense, n, a,
+ lda, sdim, wr, wi, vs, ldvs, rconde, rcondv,
+ work, lwork, iwork, liwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'v' ) ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeesx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeesx_work.c b/LAPACKE/src/lapacke_sgeesx_work.c
new file mode 100644
index 00000000..35b279e4
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeesx_work.c
@@ -0,0 +1,119 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeesx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeesx_work( int matrix_layout, char jobvs, char sort,
+ LAPACK_S_SELECT2 select, char sense,
+ lapack_int n, float* a, lapack_int lda,
+ lapack_int* sdim, float* wr, float* wi,
+ float* vs, lapack_int ldvs, float* rconde,
+ float* rcondv, float* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork,
+ lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeesx( &jobvs, &sort, select, &sense, &n, a, &lda, sdim, wr, wi,
+ vs, &ldvs, rconde, rcondv, work, &lwork, iwork, &liwork,
+ bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldvs_t = MAX(1,n);
+ float* a_t = NULL;
+ float* vs_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sgeesx_work", info );
+ return info;
+ }
+ if( ldvs < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_sgeesx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_sgeesx( &jobvs, &sort, select, &sense, &n, a, &lda_t, sdim,
+ wr, wi, vs, &ldvs_t, rconde, rcondv, work, &lwork,
+ iwork, &liwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ vs_t = (float*)LAPACKE_malloc( sizeof(float) * ldvs_t * MAX(1,n) );
+ if( vs_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeesx( &jobvs, &sort, select, &sense, &n, a_t, &lda_t, sdim, wr,
+ wi, vs_t, &ldvs_t, rconde, rcondv, work, &lwork, iwork,
+ &liwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, vs_t, ldvs_t, vs, ldvs );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ LAPACKE_free( vs_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeesx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgeesx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeev.c b/LAPACKE/src/lapacke_sgeev.c
new file mode 100644
index 00000000..d7641db5
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeev.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeev( int matrix_layout, char jobvl, char jobvr,
+ lapack_int n, float* a, lapack_int lda, float* wr,
+ float* wi, float* vl, lapack_int ldvl, float* vr,
+ lapack_int ldvr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgeev_work( matrix_layout, jobvl, jobvr, n, a, lda, wr, wi,
+ vl, ldvl, vr, ldvr, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgeev_work( matrix_layout, jobvl, jobvr, n, a, lda, wr, wi,
+ vl, ldvl, vr, ldvr, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeev_work.c b/LAPACKE/src/lapacke_sgeev_work.c
new file mode 100644
index 00000000..439a94c8
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeev_work.c
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeev_work( int matrix_layout, char jobvl, char jobvr,
+ lapack_int n, float* a, lapack_int lda,
+ float* wr, float* wi, float* vl, lapack_int ldvl,
+ float* vr, lapack_int ldvr, float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeev( &jobvl, &jobvr, &n, a, &lda, wr, wi, vl, &ldvl, vr, &ldvr,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ float* a_t = NULL;
+ float* vl_t = NULL;
+ float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sgeev_work", info );
+ return info;
+ }
+ if( ldvl < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sgeev_work", info );
+ return info;
+ }
+ if( ldvr < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_sgeev_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgeev( &jobvl, &jobvr, &n, a, &lda_t, wr, wi, vl, &ldvl_t,
+ vr, &ldvr_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ vl_t = (float*)LAPACKE_malloc( sizeof(float) * ldvl_t * MAX(1,n) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ vr_t = (float*)LAPACKE_malloc( sizeof(float) * ldvr_t * MAX(1,n) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeev( &jobvl, &jobvr, &n, a_t, &lda_t, wr, wi, vl_t, &ldvl_t,
+ vr_t, &ldvr_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, vl_t, ldvl_t, vl, ldvl );
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, vr_t, ldvr_t, vr, ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgeev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeevx.c b/LAPACKE/src/lapacke_sgeevx.c
new file mode 100644
index 00000000..33cccf0a
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeevx.c
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeevx( int matrix_layout, char balanc, char jobvl,
+ char jobvr, char sense, lapack_int n, float* a,
+ lapack_int lda, float* wr, float* wi, float* vl,
+ lapack_int ldvl, float* vr, lapack_int ldvr,
+ lapack_int* ilo, lapack_int* ihi, float* scale,
+ float* abnrm, float* rconde, float* rcondv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'v' ) ) {
+ iwork = (lapack_int*)
+ LAPACKE_malloc( sizeof(lapack_int) * MAX(1,2*n-2) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgeevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
+ lda, wr, wi, vl, ldvl, vr, ldvr, ilo, ihi,
+ scale, abnrm, rconde, rcondv, &work_query,
+ lwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_sgeevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
+ lda, wr, wi, vl, ldvl, vr, ldvr, ilo, ihi,
+ scale, abnrm, rconde, rcondv, work, lwork,
+ iwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'v' ) ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeevx_work.c b/LAPACKE/src/lapacke_sgeevx_work.c
new file mode 100644
index 00000000..a95782c6
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeevx_work.c
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeevx_work( int matrix_layout, char balanc, char jobvl,
+ char jobvr, char sense, lapack_int n, float* a,
+ lapack_int lda, float* wr, float* wi, float* vl,
+ lapack_int ldvl, float* vr, lapack_int ldvr,
+ lapack_int* ilo, lapack_int* ihi, float* scale,
+ float* abnrm, float* rconde, float* rcondv,
+ float* work, lapack_int lwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeevx( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda, wr, wi, vl,
+ &ldvl, vr, &ldvr, ilo, ihi, scale, abnrm, rconde, rcondv,
+ work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ float* a_t = NULL;
+ float* vl_t = NULL;
+ float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sgeevx_work", info );
+ return info;
+ }
+ if( ldvl < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_sgeevx_work", info );
+ return info;
+ }
+ if( ldvr < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_sgeevx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgeevx( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda_t, wr,
+ wi, vl, &ldvl_t, vr, &ldvr_t, ilo, ihi, scale, abnrm,
+ rconde, rcondv, work, &lwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ vl_t = (float*)LAPACKE_malloc( sizeof(float) * ldvl_t * MAX(1,n) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ vr_t = (float*)LAPACKE_malloc( sizeof(float) * ldvr_t * MAX(1,n) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeevx( &balanc, &jobvl, &jobvr, &sense, &n, a_t, &lda_t, wr, wi,
+ vl_t, &ldvl_t, vr_t, &ldvr_t, ilo, ihi, scale, abnrm,
+ rconde, rcondv, work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, vl_t, ldvl_t, vl, ldvl );
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, vr_t, ldvr_t, vr, ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgeevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgehrd.c b/LAPACKE/src/lapacke_sgehrd.c
new file mode 100644
index 00000000..24226af2
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgehrd.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgehrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgehrd( int matrix_layout, lapack_int n, lapack_int ilo,
+ lapack_int ihi, float* a, lapack_int lda,
+ float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgehrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgehrd_work( matrix_layout, n, ilo, ihi, a, lda, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgehrd_work( matrix_layout, n, ilo, ihi, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgehrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgehrd_work.c b/LAPACKE/src/lapacke_sgehrd_work.c
new file mode 100644
index 00000000..606ba69f
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgehrd_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgehrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgehrd_work( int matrix_layout, lapack_int n, lapack_int ilo,
+ lapack_int ihi, float* a, lapack_int lda,
+ float* tau, float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgehrd( &n, &ilo, &ihi, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sgehrd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgehrd( &n, &ilo, &ihi, a, &lda_t, tau, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgehrd( &n, &ilo, &ihi, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgehrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgehrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgejsv.c b/LAPACKE/src/lapacke_sgejsv.c
new file mode 100644
index 00000000..9861ddb2
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgejsv.c
@@ -0,0 +1,133 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgejsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgejsv( int matrix_layout, char joba, char jobu, char jobv,
+ char jobr, char jobt, char jobp, lapack_int m,
+ lapack_int n, float* a, lapack_int lda, float* sva,
+ float* u, lapack_int ldu, float* v, lapack_int ldv,
+ float* stat, lapack_int* istat )
+{
+ lapack_int info = 0;
+ lapack_int lwork = (!( LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'f' ) ||
+ LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'j' ) ||
+ LAPACKE_lsame( joba, 'e' ) ||
+ LAPACKE_lsame( joba, 'g' ) ) ? MAX3(7,4*n+1,2*m+n) :
+ ( (!( LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'f' ) ||
+ LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'j' ) ) &&
+ ( LAPACKE_lsame( joba, 'e' ) ||
+ LAPACKE_lsame( joba, 'g' ) ) ) ? MAX3(7,4*n+n*n,2*m+n) :
+ ( ( LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'f' ) ) &&
+ (!( LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'j' ) ) ) ? MAX(7,2*n+m) :
+ ( ( LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'j' ) ) &&
+ (!( LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'f' ) ) ) ? MAX(7,2*n+m) :
+ ( ( LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'f' ) ) &&
+ ( LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'j' ) ) &&
+ !LAPACKE_lsame( jobv, 'j' ) ? MAX(1,6*n+2*n*n) :
+ ( ( LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'f' ) ) &&
+ ( LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'j' ) ) &&
+ LAPACKE_lsame( jobv, 'j' ) ? MAX(7,m+3*n+n*n) :
+ 1) ) ) ) ) );
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ lapack_int i;
+ lapack_int nu, nv;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgejsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
+ nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n;
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'w' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, nu, n, u, ldu ) ) {
+ return -13;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'w' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, nv, n, v, ldv ) ) {
+ return -15;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m+3*n) );
+ 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_sgejsv_work( matrix_layout, joba, jobu, jobv, jobr, jobt,
+ jobp, m, n, a, lda, sva, u, ldu, v, ldv, work,
+ lwork, iwork );
+ /* Backup significant data from working array(s) */
+ for( i=0; i<7; i++ ) {
+ stat[i] = work[i];
+ }
+ for( i=0; i<3; i++ ) {
+ istat[i] = iwork[i];
+ }
+ /* 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_sgejsv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgejsv_work.c b/LAPACKE/src/lapacke_sgejsv_work.c
new file mode 100644
index 00000000..f1986cde
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgejsv_work.c
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgejsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgejsv_work( int matrix_layout, char joba, char jobu,
+ char jobv, char jobr, char jobt, char jobp,
+ lapack_int m, lapack_int n, float* a,
+ lapack_int lda, float* sva, float* u,
+ lapack_int ldu, float* v, lapack_int ldv,
+ float* work, lapack_int lwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a,
+ &lda, sva, u, &ldu, v, &ldv, work, &lwork, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
+ lapack_int nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n;
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldu_t = MAX(1,nu);
+ lapack_int ldv_t = MAX(1,nv);
+ float* a_t = NULL;
+ float* u_t = NULL;
+ float* v_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sgejsv_work", info );
+ return info;
+ }
+ if( ldu < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_sgejsv_work", info );
+ return info;
+ }
+ if( ldv < n ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_sgejsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'w' ) ) {
+ u_t = (float*)LAPACKE_malloc( sizeof(float) * ldu_t * MAX(1,n) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'w' ) ) {
+ v_t = (float*)LAPACKE_malloc( sizeof(float) * ldv_t * MAX(1,n) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'w' ) ) {
+ LAPACKE_sge_trans( matrix_layout, nu, n, u, ldu, u_t, ldu_t );
+ }
+ if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'w' ) ) {
+ LAPACKE_sge_trans( matrix_layout, nv, n, v, ldv, v_t, ldv_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a_t,
+ &lda_t, sva, u_t, &ldu_t, v_t, &ldv_t, work, &lwork,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'w' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nu, n, u_t, ldu_t, u, ldu );
+ }
+ if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'w' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nv, n, v_t, ldv_t, v, ldv );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
+ LAPACKE_lsame( jobv, 'w' ) ) {
+ LAPACKE_free( v_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
+ LAPACKE_lsame( jobu, 'w' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgejsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgejsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgelq2.c b/LAPACKE/src/lapacke_sgelq2.c
new file mode 100644
index 00000000..1068b396
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgelq2.c
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgelq2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgelq2( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* tau )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgelq2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,m) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgelq2_work( matrix_layout, m, n, a, lda, tau, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgelq2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgelq2_work.c b/LAPACKE/src/lapacke_sgelq2_work.c
new file mode 100644
index 00000000..8eeb757d
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgelq2_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgelq2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgelq2_work( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* tau,
+ float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgelq2( &m, &n, a, &lda, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgelq2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgelq2( &m, &n, a_t, &lda_t, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgelq2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgelq2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgelqf.c b/LAPACKE/src/lapacke_sgelqf.c
new file mode 100644
index 00000000..a8913350
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgelqf.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgelqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgelqf( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgelqf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgelqf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgelqf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgelqf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgelqf_work.c b/LAPACKE/src/lapacke_sgelqf_work.c
new file mode 100644
index 00000000..2aea6749
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgelqf_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgelqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgelqf_work( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* tau,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgelqf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgelqf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgelqf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgelqf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgelqf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgelqf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgels.c b/LAPACKE/src/lapacke_sgels.c
new file mode 100644
index 00000000..4b6c8cd3
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgels.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgels
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgels( int matrix_layout, char trans, lapack_int m,
+ lapack_int n, lapack_int nrhs, float* a,
+ lapack_int lda, float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgels", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgels_work( matrix_layout, trans, m, n, nrhs, a, lda, b, ldb,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgels_work( matrix_layout, trans, m, n, nrhs, a, lda, b, ldb,
+ work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgels", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgels_work.c b/LAPACKE/src/lapacke_sgels_work.c
new file mode 100644
index 00000000..79bd6037
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgels_work.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgels
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgels_work( int matrix_layout, char trans, lapack_int m,
+ lapack_int n, lapack_int nrhs, float* a,
+ lapack_int lda, float* b, lapack_int ldb,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgels( &trans, &m, &n, &nrhs, a, &lda, b, &ldb, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,MAX(m,n));
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sgels_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sgels_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgels( &trans, &m, &n, &nrhs, a, &lda_t, b, &ldb_t, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgels( &trans, &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
+ ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgels_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgels_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgelsd.c b/LAPACKE/src/lapacke_sgelsd.c
new file mode 100644
index 00000000..4f8b61af
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgelsd.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgelsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgelsd( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, float* a, lapack_int lda, float* b,
+ lapack_int ldb, float* s, float rcond,
+ lapack_int* rank )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ /* Additional scalars declarations for work arrays */
+ lapack_int liwork;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ lapack_int iwork_query;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgelsd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgelsd_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
+ rcond, rank, &work_query, lwork, &iwork_query );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_sgelsd_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
+ rcond, rank, work, lwork, iwork );
+ /* 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_sgelsd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgelsd_work.c b/LAPACKE/src/lapacke_sgelsd_work.c
new file mode 100644
index 00000000..fdb0232b
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgelsd_work.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgelsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgelsd_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, float* a, lapack_int lda,
+ float* b, lapack_int ldb, float* s, float rcond,
+ lapack_int* rank, float* work, lapack_int lwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgelsd( &m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, rank, work,
+ &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,MAX(m,n));
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sgelsd_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sgelsd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgelsd( &m, &n, &nrhs, a, &lda_t, b, &ldb_t, s, &rcond, rank,
+ work, &lwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgelsd( &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, s, &rcond, rank,
+ work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
+ ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgelsd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgelsd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgelss.c b/LAPACKE/src/lapacke_sgelss.c
new file mode 100644
index 00000000..3e2a5a39
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgelss.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgelss
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgelss( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, float* a, lapack_int lda, float* b,
+ lapack_int ldb, float* s, float rcond,
+ lapack_int* rank )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgelss", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgelss_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
+ rcond, rank, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgelss_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
+ rcond, rank, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgelss", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgelss_work.c b/LAPACKE/src/lapacke_sgelss_work.c
new file mode 100644
index 00000000..97b7267e
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgelss_work.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgelss
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgelss_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, float* a, lapack_int lda,
+ float* b, lapack_int ldb, float* s, float rcond,
+ lapack_int* rank, float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgelss( &m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, rank, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,MAX(m,n));
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sgelss_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sgelss_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgelss( &m, &n, &nrhs, a, &lda_t, b, &ldb_t, s, &rcond, rank,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgelss( &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, s, &rcond, rank,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
+ ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgelss_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgelss_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgelsy.c b/LAPACKE/src/lapacke_sgelsy.c
new file mode 100644
index 00000000..96787d6b
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgelsy.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgelsy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgelsy( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, float* a, lapack_int lda, float* b,
+ lapack_int ldb, lapack_int* jpvt, float rcond,
+ lapack_int* rank )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgelsy", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgelsy_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, jpvt,
+ rcond, rank, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgelsy_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, jpvt,
+ rcond, rank, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgelsy", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgelsy_work.c b/LAPACKE/src/lapacke_sgelsy_work.c
new file mode 100644
index 00000000..52c4bd92
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgelsy_work.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgelsy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgelsy_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, float* a, lapack_int lda,
+ float* b, lapack_int ldb, lapack_int* jpvt,
+ float rcond, lapack_int* rank, float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgelsy( &m, &n, &nrhs, a, &lda, b, &ldb, jpvt, &rcond, rank,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,MAX(m,n));
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sgelsy_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sgelsy_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgelsy( &m, &n, &nrhs, a, &lda_t, b, &ldb_t, jpvt, &rcond,
+ rank, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgelsy( &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, jpvt, &rcond,
+ rank, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
+ ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgelsy_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgelsy_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgemqrt.c b/LAPACKE/src/lapacke_sgemqrt.c
new file mode 100644
index 00000000..424159fd
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgemqrt.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgemqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgemqrt( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int nb, const float* v, lapack_int ldv,
+ const float* t, lapack_int ldt, float* c,
+ lapack_int ldc )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgemqrt", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -12;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) {
+ return -10;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,m) * MAX(1,nb) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgemqrt_work( matrix_layout, side, trans, m, n, k, nb, v, ldv,
+ t, ldt, c, ldc, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgemqrt", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgemqrt_work.c b/LAPACKE/src/lapacke_sgemqrt_work.c
new file mode 100644
index 00000000..f54e9d19
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgemqrt_work.c
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgemqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgemqrt_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int nb, const float* v, lapack_int ldv,
+ const float* t, lapack_int ldt, float* c,
+ lapack_int ldc, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgemqrt( &side, &trans, &m, &n, &k, &nb, v, &ldv, t, &ldt, c,
+ &ldc, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldc_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,ldt);
+ lapack_int ldv_t = MAX(1,ldv);
+ float* v_t = NULL;
+ float* t_t = NULL;
+ float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldc < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_sgemqrt_work", info );
+ return info;
+ }
+ if( ldt < nb ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sgemqrt_work", info );
+ return info;
+ }
+ if( ldv < k ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sgemqrt_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (float*)LAPACKE_malloc( sizeof(float) * ldv_t * MAX(1,k) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (float*)LAPACKE_malloc( sizeof(float) * ldt_t * MAX(1,nb) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ c_t = (float*)LAPACKE_malloc( sizeof(float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, ldv, k, v, ldv, v_t, ldv_t );
+ LAPACKE_sge_trans( matrix_layout, ldt, nb, t, ldt, t_t, ldt_t );
+ LAPACKE_sge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgemqrt( &side, &trans, &m, &n, &k, &nb, v_t, &ldv_t, t_t,
+ &ldt_t, c_t, &ldc_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgemqrt_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgemqrt_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeqlf.c b/LAPACKE/src/lapacke_sgeqlf.c
new file mode 100644
index 00000000..11f8cbea
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqlf.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqlf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqlf( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqlf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgeqlf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgeqlf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqlf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeqlf_work.c b/LAPACKE/src/lapacke_sgeqlf_work.c
new file mode 100644
index 00000000..51feb33a
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqlf_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqlf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqlf_work( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* tau,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqlf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgeqlf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgeqlf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqlf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqlf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgeqlf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeqp3.c b/LAPACKE/src/lapacke_sgeqp3.c
new file mode 100644
index 00000000..5a98fdba
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqp3.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqp3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqp3( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, lapack_int* jpvt,
+ float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqp3", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgeqp3_work( matrix_layout, m, n, a, lda, jpvt, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgeqp3_work( matrix_layout, m, n, a, lda, jpvt, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqp3", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeqp3_work.c b/LAPACKE/src/lapacke_sgeqp3_work.c
new file mode 100644
index 00000000..b4744918
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqp3_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqp3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqp3_work( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, lapack_int* jpvt,
+ float* tau, float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqp3( &m, &n, a, &lda, jpvt, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgeqp3_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgeqp3( &m, &n, a, &lda_t, jpvt, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqp3( &m, &n, a_t, &lda_t, jpvt, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqp3_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgeqp3_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeqpf.c b/LAPACKE/src/lapacke_sgeqpf.c
new file mode 100644
index 00000000..ba5c2573
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqpf.c
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqpf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqpf( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, lapack_int* jpvt,
+ float* tau )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqpf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgeqpf_work( matrix_layout, m, n, a, lda, jpvt, tau, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqpf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeqpf_work.c b/LAPACKE/src/lapacke_sgeqpf_work.c
new file mode 100644
index 00000000..40abf00a
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqpf_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqpf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqpf_work( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, lapack_int* jpvt,
+ float* tau, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqpf( &m, &n, a, &lda, jpvt, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgeqpf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqpf( &m, &n, a_t, &lda_t, jpvt, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqpf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgeqpf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeqr2.c b/LAPACKE/src/lapacke_sgeqr2.c
new file mode 100644
index 00000000..d604a40a
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqr2.c
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqr2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqr2( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* tau )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqr2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgeqr2_work( matrix_layout, m, n, a, lda, tau, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqr2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeqr2_work.c b/LAPACKE/src/lapacke_sgeqr2_work.c
new file mode 100644
index 00000000..e6c90bac
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqr2_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqr2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqr2_work( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* tau,
+ float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqr2( &m, &n, a, &lda, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgeqr2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqr2( &m, &n, a_t, &lda_t, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqr2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgeqr2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeqrf.c b/LAPACKE/src/lapacke_sgeqrf.c
new file mode 100644
index 00000000..bbfd0dbf
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqrf.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqrf( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgeqrf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgeqrf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeqrf_work.c b/LAPACKE/src/lapacke_sgeqrf_work.c
new file mode 100644
index 00000000..eeb2ff33
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqrf_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqrf_work( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* tau,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqrf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgeqrf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgeqrf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqrf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgeqrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeqrfp.c b/LAPACKE/src/lapacke_sgeqrfp.c
new file mode 100644
index 00000000..062ce655
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqrfp.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqrfp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqrfp( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqrfp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgeqrfp_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgeqrfp_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqrfp", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeqrfp_work.c b/LAPACKE/src/lapacke_sgeqrfp_work.c
new file mode 100644
index 00000000..a412197e
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqrfp_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqrfp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqrfp_work( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* tau,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqrfp( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgeqrfp_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgeqrfp( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqrfp( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqrfp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgeqrfp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeqrt.c b/LAPACKE/src/lapacke_sgeqrt.c
new file mode 100644
index 00000000..40f83ef2
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqrt.c
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqrt( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nb, float* a, lapack_int lda, float* t,
+ lapack_int ldt )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqrt", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,nb) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgeqrt_work( matrix_layout, m, n, nb, a, lda, t, ldt, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqrt", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeqrt2.c b/LAPACKE/src/lapacke_sgeqrt2.c
new file mode 100644
index 00000000..e9109228
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqrt2.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqrt2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqrt2( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* t, lapack_int ldt )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqrt2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_sgeqrt2_work( matrix_layout, m, n, a, lda, t, ldt );
+}
diff --git a/LAPACKE/src/lapacke_sgeqrt2_work.c b/LAPACKE/src/lapacke_sgeqrt2_work.c
new file mode 100644
index 00000000..e8f458b7
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqrt2_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqrt2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqrt2_work( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* t,
+ lapack_int ldt )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqrt2( &m, &n, a, &lda, t, &ldt, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,n);
+ float* a_t = NULL;
+ float* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgeqrt2_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sgeqrt2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (float*)LAPACKE_malloc( sizeof(float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqrt2( &m, &n, a_t, &lda_t, t_t, &ldt_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqrt2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgeqrt2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeqrt3.c b/LAPACKE/src/lapacke_sgeqrt3.c
new file mode 100644
index 00000000..a207d61e
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqrt3.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqrt3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqrt3( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* t, lapack_int ldt )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqrt3", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_sgeqrt3_work( matrix_layout, m, n, a, lda, t, ldt );
+}
diff --git a/LAPACKE/src/lapacke_sgeqrt3_work.c b/LAPACKE/src/lapacke_sgeqrt3_work.c
new file mode 100644
index 00000000..067aa345
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqrt3_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqrt3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqrt3_work( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* t,
+ lapack_int ldt )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqrt3( &m, &n, a, &lda, t, &ldt, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,n);
+ float* a_t = NULL;
+ float* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgeqrt3_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sgeqrt3_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (float*)LAPACKE_malloc( sizeof(float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqrt3( &m, &n, a_t, &lda_t, t_t, &ldt_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqrt3_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgeqrt3_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgeqrt_work.c b/LAPACKE/src/lapacke_sgeqrt_work.c
new file mode 100644
index 00000000..8757cabb
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgeqrt_work.c
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgeqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgeqrt_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nb, float* a, lapack_int lda,
+ float* t, lapack_int ldt, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqrt( &m, &n, &nb, a, &lda, t, &ldt, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,ldt);
+ float* a_t = NULL;
+ float* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sgeqrt_work", info );
+ return info;
+ }
+ if( ldt < MIN(m,n) ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sgeqrt_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (float*)LAPACKE_malloc( sizeof(float) * ldt_t * MAX(1,MIN(m,n)) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgeqrt( &m, &n, &nb, a_t, &lda_t, t_t, &ldt_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, ldt, MIN(m,n), t_t, ldt_t, t,
+ ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgeqrt_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgeqrt_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgerfs.c b/LAPACKE/src/lapacke_sgerfs.c
new file mode 100644
index 00000000..92dc6210
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgerfs.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgerfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgerfs( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const float* a, lapack_int lda,
+ const float* af, lapack_int ldaf,
+ const lapack_int* ipiv, const float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgerfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgerfs_work( matrix_layout, trans, n, nrhs, a, lda, af, ldaf,
+ ipiv, b, ldb, x, ldx, ferr, berr, work, iwork );
+ /* 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_sgerfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgerfs_work.c b/LAPACKE/src/lapacke_sgerfs_work.c
new file mode 100644
index 00000000..421703db
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgerfs_work.c
@@ -0,0 +1,133 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgerfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgerfs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const float* a, lapack_int lda,
+ const float* af, lapack_int ldaf,
+ const lapack_int* ipiv, const float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* ferr, float* berr, float* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgerfs( &trans, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b, &ldb, x,
+ &ldx, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* a_t = NULL;
+ float* af_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sgerfs_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sgerfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sgerfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_sgerfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (float*)LAPACKE_malloc( sizeof(float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgerfs( &trans, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, ipiv, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgerfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgerfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgerfsx.c b/LAPACKE/src/lapacke_sgerfsx.c
new file mode 100644
index 00000000..f7d926ab
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgerfsx.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgerfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgerfsx( int matrix_layout, char trans, char equed,
+ lapack_int n, lapack_int nrhs, const float* a,
+ lapack_int lda, const float* af, lapack_int ldaf,
+ const lapack_int* ipiv, const float* r,
+ const float* c, const float* b, lapack_int ldb,
+ float* x, lapack_int ldx, float* rcond, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgerfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+ return -8;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
+ if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+ return -12;
+ }
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -23;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
+ if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -15;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgerfsx_work( matrix_layout, trans, equed, n, nrhs, a, lda,
+ af, ldaf, ipiv, r, c, b, ldb, x, ldx, rcond,
+ berr, n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, iwork );
+ /* 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_sgerfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgerfsx_work.c b/LAPACKE/src/lapacke_sgerfsx_work.c
new file mode 100644
index 00000000..6eae0115
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgerfsx_work.c
@@ -0,0 +1,162 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgerfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgerfsx_work( int matrix_layout, char trans, char equed,
+ lapack_int n, lapack_int nrhs, const float* a,
+ lapack_int lda, const float* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const float* r, const float* c, const float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* rcond, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params, float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgerfsx( &trans, &equed, &n, &nrhs, a, &lda, af, &ldaf, ipiv, r,
+ c, b, &ldb, x, &ldx, rcond, berr, &n_err_bnds,
+ err_bnds_norm, err_bnds_comp, &nparams, params, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* a_t = NULL;
+ float* af_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sgerfsx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sgerfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_sgerfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_sgerfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (float*)LAPACKE_malloc( sizeof(float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgerfsx( &trans, &equed, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, r, c, b_t, &ldb_t, x_t, &ldx_t, rcond, berr,
+ &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t, &nparams,
+ params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgerfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgerfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgerqf.c b/LAPACKE/src/lapacke_sgerqf.c
new file mode 100644
index 00000000..41a20e0f
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgerqf.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgerqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgerqf( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgerqf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgerqf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgerqf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgerqf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgerqf_work.c b/LAPACKE/src/lapacke_sgerqf_work.c
new file mode 100644
index 00000000..7a8a8df3
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgerqf_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgerqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgerqf_work( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* tau,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgerqf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgerqf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgerqf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgerqf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgerqf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgerqf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgesdd.c b/LAPACKE/src/lapacke_sgesdd.c
new file mode 100644
index 00000000..85d12faa
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgesdd.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgesdd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgesdd( int matrix_layout, char jobz, lapack_int m,
+ lapack_int n, float* a, lapack_int lda, float* s,
+ float* u, lapack_int ldu, float* vt,
+ lapack_int ldvt )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgesdd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)
+ LAPACKE_malloc( sizeof(lapack_int) * MAX(1,8*MIN(m,n)) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgesdd_work( matrix_layout, jobz, m, n, a, lda, s, u, ldu, vt,
+ ldvt, &work_query, lwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_sgesdd_work( matrix_layout, jobz, m, n, a, lda, s, u, ldu, vt,
+ ldvt, work, lwork, iwork );
+ /* 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_sgesdd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgesdd_work.c b/LAPACKE/src/lapacke_sgesdd_work.c
new file mode 100644
index 00000000..f9082493
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgesdd_work.c
@@ -0,0 +1,152 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgesdd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgesdd_work( int matrix_layout, char jobz, lapack_int m,
+ lapack_int n, float* a, lapack_int lda,
+ float* s, float* u, lapack_int ldu, float* vt,
+ lapack_int ldvt, float* work, lapack_int lwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgesdd( &jobz, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt, work,
+ &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_u = ( LAPACKE_lsame( jobz, 'a' ) ||
+ LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && m<n) ) ? m : 1;
+ lapack_int ncols_u = ( LAPACKE_lsame( jobz, 'a' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && m<n) ) ? m :
+ ( LAPACKE_lsame( jobz, 's' ) ? MIN(m,n) : 1);
+ lapack_int nrows_vt = ( LAPACKE_lsame( jobz, 'a' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && m>=n) ) ? n :
+ ( LAPACKE_lsame( jobz, 's' ) ? MIN(m,n) : 1);
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldu_t = MAX(1,nrows_u);
+ lapack_int ldvt_t = MAX(1,nrows_vt);
+ float* a_t = NULL;
+ float* u_t = NULL;
+ float* vt_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sgesdd_work", info );
+ return info;
+ }
+ if( ldu < ncols_u ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sgesdd_work", info );
+ return info;
+ }
+ if( ldvt < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sgesdd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgesdd( &jobz, &m, &n, a, &lda_t, s, u, &ldu_t, vt, &ldvt_t,
+ work, &lwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m<n) ) ) {
+ u_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldu_t * MAX(1,ncols_u) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m>=n) ) ) {
+ vt_t = (float*)LAPACKE_malloc( sizeof(float) * ldvt_t * MAX(1,n) );
+ if( vt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgesdd( &jobz, &m, &n, a_t, &lda_t, s, u_t, &ldu_t, vt_t,
+ &ldvt_t, work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m<n) ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t,
+ u, ldu );
+ }
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m>=n) ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt,
+ ldvt );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m>=n) ) ) {
+ LAPACKE_free( vt_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m<n) ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgesdd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgesdd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgesv.c b/LAPACKE/src/lapacke_sgesv.c
new file mode 100644
index 00000000..37d91fb2
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgesv.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgesv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgesv( int matrix_layout, lapack_int n, lapack_int nrhs,
+ float* a, lapack_int lda, lapack_int* ipiv, float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgesv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_sgesv_work( matrix_layout, n, nrhs, a, lda, ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_sgesv_work.c b/LAPACKE/src/lapacke_sgesv_work.c
new file mode 100644
index 00000000..66e922e8
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgesv_work.c
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgesv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgesv_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ float* a, lapack_int lda, lapack_int* ipiv,
+ float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgesv( &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgesv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sgesv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgesv( &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgesv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgesv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgesvd.c b/LAPACKE/src/lapacke_sgesvd.c
new file mode 100644
index 00000000..0170f864
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgesvd.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgesvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgesvd( int matrix_layout, char jobu, char jobvt,
+ lapack_int m, lapack_int n, float* a, lapack_int lda,
+ float* s, float* u, lapack_int ldu, float* vt,
+ lapack_int ldvt, float* superb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ lapack_int i;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgesvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -6;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgesvd_work( matrix_layout, jobu, jobvt, m, n, a, lda, s, u,
+ ldu, vt, ldvt, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgesvd_work( matrix_layout, jobu, jobvt, m, n, a, lda, s, u,
+ ldu, vt, ldvt, work, lwork );
+ /* Backup significant data from working array(s) */
+ for( i=0; i<MIN(m,n)-1; i++ ) {
+ superb[i] = work[i+1];
+ }
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgesvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgesvd_work.c b/LAPACKE/src/lapacke_sgesvd_work.c
new file mode 100644
index 00000000..7f72e268
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgesvd_work.c
@@ -0,0 +1,143 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgesvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgesvd_work( int matrix_layout, char jobu, char jobvt,
+ lapack_int m, lapack_int n, float* a,
+ lapack_int lda, float* s, float* u,
+ lapack_int ldu, float* vt, lapack_int ldvt,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgesvd( &jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_u = ( LAPACKE_lsame( jobu, 'a' ) ||
+ LAPACKE_lsame( jobu, 's' ) ) ? m : 1;
+ lapack_int ncols_u = LAPACKE_lsame( jobu, 'a' ) ? m :
+ ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1);
+ lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n :
+ ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1);
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldu_t = MAX(1,nrows_u);
+ lapack_int ldvt_t = MAX(1,nrows_vt);
+ float* a_t = NULL;
+ float* u_t = NULL;
+ float* vt_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sgesvd_work", info );
+ return info;
+ }
+ if( ldu < ncols_u ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sgesvd_work", info );
+ return info;
+ }
+ if( ldvt < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_sgesvd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgesvd( &jobu, &jobvt, &m, &n, a, &lda_t, s, u, &ldu_t, vt,
+ &ldvt_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ u_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldu_t * MAX(1,ncols_u) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ vt_t = (float*)LAPACKE_malloc( sizeof(float) * ldvt_t * MAX(1,n) );
+ if( vt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgesvd( &jobu, &jobvt, &m, &n, a_t, &lda_t, s, u_t, &ldu_t, vt_t,
+ &ldvt_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t,
+ u, ldu );
+ }
+ if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt,
+ ldvt );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ LAPACKE_free( vt_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgesvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgesvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgesvj.c b/LAPACKE/src/lapacke_sgesvj.c
new file mode 100644
index 00000000..d137a886
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgesvj.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgesvj
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgesvj( int matrix_layout, char joba, char jobu, char jobv,
+ lapack_int m, lapack_int n, float* a, lapack_int lda,
+ float* sva, lapack_int mv, float* v, lapack_int ldv,
+ float* stat )
+{
+ lapack_int info = 0;
+ lapack_int lwork = MAX(6,m+n);
+ float* work = NULL;
+ lapack_int i;
+ lapack_int nrows_v;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgesvj", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n :
+ ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1);
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, n, v, ldv ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work[0] = stat[0]; /* Significant if jobu = 'c' */
+ /* Call middle-level interface */
+ info = LAPACKE_sgesvj_work( matrix_layout, joba, jobu, jobv, m, n, a, lda,
+ sva, mv, v, ldv, work, lwork );
+ /* Backup significant data from working array(s) */
+ for( i=0; i<6; i++ ) {
+ stat[i] = work[i];
+ }
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgesvj", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgesvj_work.c b/LAPACKE/src/lapacke_sgesvj_work.c
new file mode 100644
index 00000000..ec65606f
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgesvj_work.c
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgesvj
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgesvj_work( int matrix_layout, char joba, char jobu,
+ char jobv, lapack_int m, lapack_int n, float* a,
+ lapack_int lda, float* sva, lapack_int mv,
+ float* v, lapack_int ldv, float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgesvj( &joba, &jobu, &jobv, &m, &n, a, &lda, sva, &mv, v, &ldv,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n :
+ ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1);
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldv_t = MAX(1,nrows_v);
+ float* a_t = NULL;
+ float* v_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sgesvj_work", info );
+ return info;
+ }
+ if( ldv < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_sgesvj_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ v_t = (float*)LAPACKE_malloc( sizeof(float) * ldv_t * MAX(1,n) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( jobv, 'a' ) ) {
+ LAPACKE_sge_trans( matrix_layout, nrows_v, n, v, ldv, v_t, ldv_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgesvj( &joba, &jobu, &jobv, &m, &n, a_t, &lda_t, sva, &mv, v_t,
+ &ldv_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_v, n, v_t, ldv_t, v,
+ ldv );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_free( v_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgesvj_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgesvj_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgesvx.c b/LAPACKE/src/lapacke_sgesvx.c
new file mode 100644
index 00000000..0162b1cb
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgesvx.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgesvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgesvx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs, float* a,
+ lapack_int lda, float* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, float* r, float* c,
+ float* b, lapack_int ldb, float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr,
+ float* rpivot )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgesvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -14;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) ) ) {
+ if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+ return -13;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'r' ) ) ) {
+ if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgesvx_work( matrix_layout, fact, trans, n, nrhs, a, lda, af,
+ ldaf, ipiv, equed, r, c, b, ldb, x, ldx, rcond,
+ ferr, berr, work, iwork );
+ /* Backup significant data from working array(s) */
+ *rpivot = work[0];
+ /* 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_sgesvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgesvx_work.c b/LAPACKE/src/lapacke_sgesvx_work.c
new file mode 100644
index 00000000..1772e7b1
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgesvx_work.c
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgesvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgesvx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs, float* a,
+ lapack_int lda, float* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, float* r,
+ float* c, float* b, lapack_int ldb, float* x,
+ lapack_int ldx, float* rcond, float* ferr,
+ float* berr, float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgesvx( &fact, &trans, &n, &nrhs, a, &lda, af, &ldaf, ipiv,
+ equed, r, c, b, &ldb, x, &ldx, rcond, ferr, berr, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* a_t = NULL;
+ float* af_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sgesvx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sgesvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_sgesvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_sgesvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (float*)LAPACKE_malloc( sizeof(float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgesvx( &fact, &trans, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, equed, r, c, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr,
+ berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, af_t, ldaf_t, af, ldaf );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgesvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgesvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgesvxx.c b/LAPACKE/src/lapacke_sgesvxx.c
new file mode 100644
index 00000000..81e623b6
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgesvxx.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgesvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgesvxx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs, float* a,
+ lapack_int lda, float* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, float* r, float* c,
+ float* b, lapack_int ldb, float* x, lapack_int ldx,
+ float* rcond, float* rpvgrw, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgesvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -14;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) ) ) {
+ if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+ return -13;
+ }
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -25;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'r' ) ) ) {
+ if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgesvxx_work( matrix_layout, fact, trans, n, nrhs, a, lda, af,
+ ldaf, ipiv, equed, r, c, b, ldb, x, ldx, rcond,
+ rpvgrw, berr, n_err_bnds, err_bnds_norm,
+ err_bnds_comp, nparams, params, work, iwork );
+ /* 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_sgesvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgesvxx_work.c b/LAPACKE/src/lapacke_sgesvxx_work.c
new file mode 100644
index 00000000..8b0e4e45
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgesvxx_work.c
@@ -0,0 +1,174 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgesvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgesvxx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs, float* a,
+ lapack_int lda, float* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, float* r,
+ float* c, float* b, lapack_int ldb, float* x,
+ lapack_int ldx, float* rcond, float* rpvgrw,
+ float* berr, lapack_int n_err_bnds,
+ float* err_bnds_norm, float* err_bnds_comp,
+ lapack_int nparams, float* params, float* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgesvxx( &fact, &trans, &n, &nrhs, a, &lda, af, &ldaf, ipiv,
+ equed, r, c, b, &ldb, x, &ldx, rcond, rpvgrw, berr,
+ &n_err_bnds, err_bnds_norm, err_bnds_comp, &nparams,
+ params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* a_t = NULL;
+ float* af_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sgesvxx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sgesvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_sgesvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_sgesvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (float*)LAPACKE_malloc( sizeof(float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgesvxx( &fact, &trans, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, equed, r, c, b_t, &ldb_t, x_t, &ldx_t, rcond,
+ rpvgrw, berr, &n_err_bnds, err_bnds_norm_t,
+ err_bnds_comp_t, &nparams, params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, af_t, ldaf_t, af, ldaf );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgesvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgesvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgetf2.c b/LAPACKE/src/lapacke_sgetf2.c
new file mode 100644
index 00000000..984b8066
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgetf2.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgetf2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgetf2( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgetf2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_sgetf2_work( matrix_layout, m, n, a, lda, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_sgetf2_work.c b/LAPACKE/src/lapacke_sgetf2_work.c
new file mode 100644
index 00000000..e43e9882
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgetf2_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgetf2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgetf2_work( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgetf2( &m, &n, a, &lda, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgetf2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgetf2( &m, &n, a_t, &lda_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgetf2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgetf2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgetrf.c b/LAPACKE/src/lapacke_sgetrf.c
new file mode 100644
index 00000000..da5a8c3a
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgetrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgetrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgetrf( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgetrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_sgetrf_work( matrix_layout, m, n, a, lda, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_sgetrf_work.c b/LAPACKE/src/lapacke_sgetrf_work.c
new file mode 100644
index 00000000..92b57746
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgetrf_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgetrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgetrf_work( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgetrf( &m, &n, a, &lda, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sgetrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgetrf( &m, &n, a_t, &lda_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgetrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgetrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgetri.c b/LAPACKE/src/lapacke_sgetri.c
new file mode 100644
index 00000000..4adddae1
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgetri.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgetri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgetri( int matrix_layout, lapack_int n, float* a,
+ lapack_int lda, const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgetri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -3;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgetri_work( matrix_layout, n, a, lda, ipiv, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgetri_work( matrix_layout, n, a, lda, ipiv, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgetri", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgetri_work.c b/LAPACKE/src/lapacke_sgetri_work.c
new file mode 100644
index 00000000..07b26e7e
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgetri_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgetri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgetri_work( int matrix_layout, lapack_int n, float* a,
+ lapack_int lda, const lapack_int* ipiv,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgetri( &n, a, &lda, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -4;
+ LAPACKE_xerbla( "LAPACKE_sgetri_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgetri( &n, a, &lda_t, ipiv, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgetri( &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgetri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgetri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgetrs.c b/LAPACKE/src/lapacke_sgetrs.c
new file mode 100644
index 00000000..d961cb06
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgetrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgetrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgetrs( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const float* a, lapack_int lda,
+ const lapack_int* ipiv, float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgetrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_sgetrs_work( matrix_layout, trans, n, nrhs, a, lda, ipiv, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_sgetrs_work.c b/LAPACKE/src/lapacke_sgetrs_work.c
new file mode 100644
index 00000000..02e2d232
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgetrs_work.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgetrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgetrs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const float* a, lapack_int lda,
+ const lapack_int* ipiv, float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgetrs( &trans, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sgetrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sgetrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgetrs( &trans, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgetrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgetrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggbak.c b/LAPACKE/src/lapacke_sggbak.c
new file mode 100644
index 00000000..3f0e1b30
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggbak.c
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggbak
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggbak( int matrix_layout, char job, char side, lapack_int n,
+ lapack_int ilo, lapack_int ihi, const float* lscale,
+ const float* rscale, lapack_int m, float* v,
+ lapack_int ldv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sggbak", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, lscale, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( n, rscale, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, m, v, ldv ) ) {
+ return -10;
+ }
+#endif
+ return LAPACKE_sggbak_work( matrix_layout, job, side, n, ilo, ihi, lscale,
+ rscale, m, v, ldv );
+}
diff --git a/LAPACKE/src/lapacke_sggbak_work.c b/LAPACKE/src/lapacke_sggbak_work.c
new file mode 100644
index 00000000..3b01747d
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggbak_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggbak
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggbak_work( int matrix_layout, char job, char side,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ const float* lscale, const float* rscale,
+ lapack_int m, float* v, lapack_int ldv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggbak( &job, &side, &n, &ilo, &ihi, lscale, rscale, &m, v, &ldv,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldv_t = MAX(1,n);
+ float* v_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldv < m ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sggbak_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (float*)LAPACKE_malloc( sizeof(float) * ldv_t * MAX(1,m) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, m, v, ldv, v_t, ldv_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggbak( &job, &side, &n, &ilo, &ihi, lscale, rscale, &m, v_t,
+ &ldv_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, m, v_t, ldv_t, v, ldv );
+ /* Release memory and exit */
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggbak_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sggbak_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggbal.c b/LAPACKE/src/lapacke_sggbal.c
new file mode 100644
index 00000000..6f7399bc
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggbal.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggbal
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggbal( int matrix_layout, char job, lapack_int n, float* a,
+ lapack_int lda, float* b, lapack_int ldb,
+ lapack_int* ilo, lapack_int* ihi, float* lscale,
+ float* rscale )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lwork;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sggbal", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ }
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -6;
+ }
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( job, 's' ) || LAPACKE_lsame( job, 'b' ) ) {
+ lwork = MAX(1,6*n);
+ } else {
+ lwork = 1;
+ }
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sggbal_work( matrix_layout, job, n, a, lda, b, ldb, ilo, ihi,
+ lscale, rscale, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggbal", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggbal_work.c b/LAPACKE/src/lapacke_sggbal_work.c
new file mode 100644
index 00000000..519a1b4f
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggbal_work.c
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggbal
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggbal_work( int matrix_layout, char job, lapack_int n,
+ float* a, lapack_int lda, float* b,
+ lapack_int ldb, lapack_int* ilo,
+ lapack_int* ihi, float* lscale, float* rscale,
+ float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggbal( &job, &n, a, &lda, b, &ldb, ilo, ihi, lscale, rscale,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sggbal_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sggbal_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ }
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggbal( &job, &n, a_t, &lda_t, b_t, &ldb_t, ilo, ihi, lscale,
+ rscale, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_free( b_t );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_free( a_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggbal_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sggbal_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgges.c b/LAPACKE/src/lapacke_sgges.c
new file mode 100644
index 00000000..57bfd632
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgges.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgges
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgges( int matrix_layout, char jobvsl, char jobvsr, char sort,
+ LAPACK_S_SELECT3 selctg, lapack_int n, float* a,
+ lapack_int lda, float* b, lapack_int ldb,
+ lapack_int* sdim, float* alphar, float* alphai,
+ float* beta, float* vsl, lapack_int ldvsl, float* vsr,
+ lapack_int ldvsr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgges", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgges_work( matrix_layout, jobvsl, jobvsr, sort, selctg, n, a,
+ lda, b, ldb, sdim, alphar, alphai, beta, vsl,
+ ldvsl, vsr, ldvsr, &work_query, lwork, bwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_sgges_work( matrix_layout, jobvsl, jobvsr, sort, selctg, n, a,
+ lda, b, ldb, sdim, alphar, alphai, beta, vsl,
+ ldvsl, vsr, ldvsr, work, lwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgges", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgges_work.c b/LAPACKE/src/lapacke_sgges_work.c
new file mode 100644
index 00000000..ea9f527a
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgges_work.c
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgges
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgges_work( int matrix_layout, char jobvsl, char jobvsr,
+ char sort, LAPACK_S_SELECT3 selctg, lapack_int n,
+ float* a, lapack_int lda, float* b,
+ lapack_int ldb, lapack_int* sdim, float* alphar,
+ float* alphai, float* beta, float* vsl,
+ lapack_int ldvsl, float* vsr, lapack_int ldvsr,
+ float* work, lapack_int lwork,
+ lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgges( &jobvsl, &jobvsr, &sort, selctg, &n, a, &lda, b, &ldb,
+ sdim, alphar, alphai, beta, vsl, &ldvsl, vsr, &ldvsr,
+ work, &lwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvsl_t = MAX(1,n);
+ lapack_int ldvsr_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ float* vsl_t = NULL;
+ float* vsr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sgges_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sgges_work", info );
+ return info;
+ }
+ if( ldvsl < n ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_sgges_work", info );
+ return info;
+ }
+ if( ldvsr < n ) {
+ info = -18;
+ LAPACKE_xerbla( "LAPACKE_sgges_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgges( &jobvsl, &jobvsr, &sort, selctg, &n, a, &lda_t, b,
+ &ldb_t, sdim, alphar, alphai, beta, vsl, &ldvsl_t,
+ vsr, &ldvsr_t, work, &lwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ vsl_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldvsl_t * MAX(1,n) );
+ if( vsl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ vsr_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldvsr_t * MAX(1,n) );
+ if( vsr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgges( &jobvsl, &jobvsr, &sort, selctg, &n, a_t, &lda_t, b_t,
+ &ldb_t, sdim, alphar, alphai, beta, vsl_t, &ldvsl_t,
+ vsr_t, &ldvsr_t, work, &lwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, vsl_t, ldvsl_t, vsl,
+ ldvsl );
+ }
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, vsr_t, ldvsr_t, vsr,
+ ldvsr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ LAPACKE_free( vsr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ LAPACKE_free( vsl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgges_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgges_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggesx.c b/LAPACKE/src/lapacke_sggesx.c
new file mode 100644
index 00000000..7810936c
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggesx.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggesx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggesx( int matrix_layout, char jobvsl, char jobvsr,
+ char sort, LAPACK_S_SELECT3 selctg, char sense,
+ lapack_int n, float* a, lapack_int lda, float* b,
+ lapack_int ldb, lapack_int* sdim, float* alphar,
+ float* alphai, float* beta, float* vsl,
+ lapack_int ldvsl, float* vsr, lapack_int ldvsr,
+ float* rconde, float* rcondv )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ lapack_int iwork_query;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sggesx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sggesx_work( matrix_layout, jobvsl, jobvsr, sort, selctg,
+ sense, n, a, lda, b, ldb, sdim, alphar, alphai,
+ beta, vsl, ldvsl, vsr, ldvsr, rconde, rcondv,
+ &work_query, lwork, &iwork_query, liwork,
+ bwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ liwork = (lapack_int)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_1;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sggesx_work( matrix_layout, jobvsl, jobvsr, sort, selctg,
+ sense, n, a, lda, b, ldb, sdim, alphar, alphai,
+ beta, vsl, ldvsl, vsr, ldvsr, rconde, rcondv,
+ work, lwork, iwork, liwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( iwork );
+exit_level_1:
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggesx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggesx_work.c b/LAPACKE/src/lapacke_sggesx_work.c
new file mode 100644
index 00000000..500f216f
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggesx_work.c
@@ -0,0 +1,165 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggesx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggesx_work( int matrix_layout, char jobvsl, char jobvsr,
+ char sort, LAPACK_S_SELECT3 selctg, char sense,
+ lapack_int n, float* a, lapack_int lda,
+ float* b, lapack_int ldb, lapack_int* sdim,
+ float* alphar, float* alphai, float* beta,
+ float* vsl, lapack_int ldvsl, float* vsr,
+ lapack_int ldvsr, float* rconde, float* rcondv,
+ float* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork,
+ lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggesx( &jobvsl, &jobvsr, &sort, selctg, &sense, &n, a, &lda, b,
+ &ldb, sdim, alphar, alphai, beta, vsl, &ldvsl, vsr,
+ &ldvsr, rconde, rcondv, work, &lwork, iwork, &liwork,
+ bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvsl_t = MAX(1,n);
+ lapack_int ldvsr_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ float* vsl_t = NULL;
+ float* vsr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sggesx_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sggesx_work", info );
+ return info;
+ }
+ if( ldvsl < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_sggesx_work", info );
+ return info;
+ }
+ if( ldvsr < n ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_sggesx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_sggesx( &jobvsl, &jobvsr, &sort, selctg, &sense, &n, a,
+ &lda_t, b, &ldb_t, sdim, alphar, alphai, beta, vsl,
+ &ldvsl_t, vsr, &ldvsr_t, rconde, rcondv, work,
+ &lwork, iwork, &liwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ vsl_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldvsl_t * MAX(1,n) );
+ if( vsl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ vsr_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldvsr_t * MAX(1,n) );
+ if( vsr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggesx( &jobvsl, &jobvsr, &sort, selctg, &sense, &n, a_t, &lda_t,
+ b_t, &ldb_t, sdim, alphar, alphai, beta, vsl_t, &ldvsl_t,
+ vsr_t, &ldvsr_t, rconde, rcondv, work, &lwork, iwork,
+ &liwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, vsl_t, ldvsl_t, vsl,
+ ldvsl );
+ }
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, vsr_t, ldvsr_t, vsr,
+ ldvsr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ LAPACKE_free( vsr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ LAPACKE_free( vsl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggesx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sggesx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggev.c b/LAPACKE/src/lapacke_sggev.c
new file mode 100644
index 00000000..929b68a9
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggev.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggev( int matrix_layout, char jobvl, char jobvr,
+ lapack_int n, float* a, lapack_int lda, float* b,
+ lapack_int ldb, float* alphar, float* alphai,
+ float* beta, float* vl, lapack_int ldvl, float* vr,
+ lapack_int ldvr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sggev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sggev_work( matrix_layout, jobvl, jobvr, n, a, lda, b, ldb,
+ alphar, alphai, beta, vl, ldvl, vr, ldvr,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sggev_work( matrix_layout, jobvl, jobvr, n, a, lda, b, ldb,
+ alphar, alphai, beta, vl, ldvl, vr, ldvr, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggev_work.c b/LAPACKE/src/lapacke_sggev_work.c
new file mode 100644
index 00000000..5faf5c76
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggev_work.c
@@ -0,0 +1,161 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggev_work( int matrix_layout, char jobvl, char jobvr,
+ lapack_int n, float* a, lapack_int lda, float* b,
+ lapack_int ldb, float* alphar, float* alphai,
+ float* beta, float* vl, lapack_int ldvl,
+ float* vr, lapack_int ldvr, float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggev( &jobvl, &jobvr, &n, a, &lda, b, &ldb, alphar, alphai,
+ beta, vl, &ldvl, vr, &ldvr, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_vl = LAPACKE_lsame( jobvl, 'v' ) ? n : 1;
+ lapack_int ncols_vl = LAPACKE_lsame( jobvl, 'v' ) ? n : 1;
+ lapack_int nrows_vr = LAPACKE_lsame( jobvr, 'v' ) ? n : 1;
+ lapack_int ncols_vr = LAPACKE_lsame( jobvr, 'v' ) ? n : 1;
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,nrows_vl);
+ lapack_int ldvr_t = MAX(1,nrows_vr);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ float* vl_t = NULL;
+ float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sggev_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sggev_work", info );
+ return info;
+ }
+ if( ldvl < ncols_vl ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_sggev_work", info );
+ return info;
+ }
+ if( ldvr < ncols_vr ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_sggev_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sggev( &jobvl, &jobvr, &n, a, &lda_t, b, &ldb_t, alphar,
+ alphai, beta, vl, &ldvl_t, vr, &ldvr_t, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ vl_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldvl_t * MAX(1,ncols_vl) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ vr_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldvr_t * MAX(1,ncols_vr) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggev( &jobvl, &jobvr, &n, a_t, &lda_t, b_t, &ldb_t, alphar,
+ alphai, beta, vl_t, &ldvl_t, vr_t, &ldvr_t, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_vl, ncols_vl, vl_t,
+ ldvl_t, vl, ldvl );
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_vr, ncols_vr, vr_t,
+ ldvr_t, vr, ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sggev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggevx.c b/LAPACKE/src/lapacke_sggevx.c
new file mode 100644
index 00000000..ec1e6ee4
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggevx.c
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggevx( int matrix_layout, char balanc, char jobvl,
+ char jobvr, char sense, lapack_int n, float* a,
+ lapack_int lda, float* b, lapack_int ldb,
+ float* alphar, float* alphai, float* beta, float* vl,
+ lapack_int ldvl, float* vr, lapack_int ldvr,
+ lapack_int* ilo, lapack_int* ihi, float* lscale,
+ float* rscale, float* abnrm, float* bbnrm,
+ float* rconde, float* rcondv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sggevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'e' ) ||
+ LAPACKE_lsame( sense, 'v' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'n' ) ||
+ LAPACKE_lsame( sense, 'v' ) ) {
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n+6) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sggevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
+ lda, b, ldb, alphar, alphai, beta, vl, ldvl, vr,
+ ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm,
+ rconde, rcondv, &work_query, lwork, iwork,
+ bwork );
+ if( info != 0 ) {
+ goto exit_level_2;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sggevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
+ lda, b, ldb, alphar, alphai, beta, vl, ldvl, vr,
+ ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm,
+ rconde, rcondv, work, lwork, iwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'n' ) ||
+ LAPACKE_lsame( sense, 'v' ) ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'e' ) ||
+ LAPACKE_lsame( sense, 'v' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggevx_work.c b/LAPACKE/src/lapacke_sggevx_work.c
new file mode 100644
index 00000000..73aa2b15
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggevx_work.c
@@ -0,0 +1,161 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggevx_work( int matrix_layout, char balanc, char jobvl,
+ char jobvr, char sense, lapack_int n, float* a,
+ lapack_int lda, float* b, lapack_int ldb,
+ float* alphar, float* alphai, float* beta,
+ float* vl, lapack_int ldvl, float* vr,
+ lapack_int ldvr, lapack_int* ilo,
+ lapack_int* ihi, float* lscale, float* rscale,
+ float* abnrm, float* bbnrm, float* rconde,
+ float* rcondv, float* work, lapack_int lwork,
+ lapack_int* iwork, lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggevx( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda, b, &ldb,
+ alphar, alphai, beta, vl, &ldvl, vr, &ldvr, ilo, ihi,
+ lscale, rscale, abnrm, bbnrm, rconde, rcondv, work,
+ &lwork, iwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ float* vl_t = NULL;
+ float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sggevx_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sggevx_work", info );
+ return info;
+ }
+ if( ldvl < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_sggevx_work", info );
+ return info;
+ }
+ if( ldvr < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_sggevx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sggevx( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda_t, b,
+ &ldb_t, alphar, alphai, beta, vl, &ldvl_t, vr,
+ &ldvr_t, ilo, ihi, lscale, rscale, abnrm, bbnrm,
+ rconde, rcondv, work, &lwork, iwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ vl_t = (float*)LAPACKE_malloc( sizeof(float) * ldvl_t * MAX(1,n) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ vr_t = (float*)LAPACKE_malloc( sizeof(float) * ldvr_t * MAX(1,n) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggevx( &balanc, &jobvl, &jobvr, &sense, &n, a_t, &lda_t, b_t,
+ &ldb_t, alphar, alphai, beta, vl_t, &ldvl_t, vr_t,
+ &ldvr_t, ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde,
+ rcondv, work, &lwork, iwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, vl_t, ldvl_t, vl, ldvl );
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, vr_t, ldvr_t, vr, ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sggevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggglm.c b/LAPACKE/src/lapacke_sggglm.c
new file mode 100644
index 00000000..cfca12f8
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggglm.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggglm
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggglm( int matrix_layout, lapack_int n, lapack_int m,
+ lapack_int p, float* a, lapack_int lda, float* b,
+ lapack_int ldb, float* d, float* x, float* y )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sggglm", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, m, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, p, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sggglm_work( matrix_layout, n, m, p, a, lda, b, ldb, d, x, y,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sggglm_work( matrix_layout, n, m, p, a, lda, b, ldb, d, x, y,
+ work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggglm", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggglm_work.c b/LAPACKE/src/lapacke_sggglm_work.c
new file mode 100644
index 00000000..e71de17a
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggglm_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggglm
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggglm_work( int matrix_layout, lapack_int n, lapack_int m,
+ lapack_int p, float* a, lapack_int lda,
+ float* b, lapack_int ldb, float* d, float* x,
+ float* y, float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggglm( &n, &m, &p, a, &lda, b, &ldb, d, x, y, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sggglm_work", info );
+ return info;
+ }
+ if( ldb < p ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sggglm_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sggglm( &n, &m, &p, a, &lda_t, b, &ldb_t, d, x, y, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,p) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, m, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, p, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggglm( &n, &m, &p, a_t, &lda_t, b_t, &ldb_t, d, x, y, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, m, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, p, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggglm_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sggglm_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgghrd.c b/LAPACKE/src/lapacke_sgghrd.c
new file mode 100644
index 00000000..f4da0eaa
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgghrd.c
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgghrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgghrd( int matrix_layout, char compq, char compz,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ float* a, lapack_int lda, float* b, lapack_int ldb,
+ float* q, lapack_int ldq, float* z, lapack_int ldz )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgghrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -13;
+ }
+ }
+#endif
+ return LAPACKE_sgghrd_work( matrix_layout, compq, compz, n, ilo, ihi, a, lda,
+ b, ldb, q, ldq, z, ldz );
+}
diff --git a/LAPACKE/src/lapacke_sgghrd_work.c b/LAPACKE/src/lapacke_sgghrd_work.c
new file mode 100644
index 00000000..3e5a1088
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgghrd_work.c
@@ -0,0 +1,150 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgghrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgghrd_work( int matrix_layout, char compq, char compz,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ float* a, lapack_int lda, float* b,
+ lapack_int ldb, float* q, lapack_int ldq,
+ float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgghrd( &compq, &compz, &n, &ilo, &ihi, a, &lda, b, &ldb, q,
+ &ldq, z, &ldz, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ float* q_t = NULL;
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sgghrd_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sgghrd_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_sgghrd_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_sgghrd_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ q_t = (float*)LAPACKE_malloc( sizeof(float) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgghrd( &compq, &compz, &n, &ilo, &ihi, a_t, &lda_t, b_t, &ldb_t,
+ q_t, &ldq_t, z_t, &ldz_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgghrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgghrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgglse.c b/LAPACKE/src/lapacke_sgglse.c
new file mode 100644
index 00000000..8e95c0df
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgglse.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgglse
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgglse( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int p, float* a, lapack_int lda, float* b,
+ lapack_int ldb, float* c, float* d, float* x )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgglse", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( m, c, 1 ) ) {
+ return -9;
+ }
+ if( LAPACKE_s_nancheck( p, d, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sgglse_work( matrix_layout, m, n, p, a, lda, b, ldb, c, d, x,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgglse_work( matrix_layout, m, n, p, a, lda, b, ldb, c, d, x,
+ work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgglse", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgglse_work.c b/LAPACKE/src/lapacke_sgglse_work.c
new file mode 100644
index 00000000..ea713d3f
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgglse_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgglse
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgglse_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int p, float* a, lapack_int lda,
+ float* b, lapack_int ldb, float* c, float* d,
+ float* x, float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgglse( &m, &n, &p, a, &lda, b, &ldb, c, d, x, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sgglse_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sgglse_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sgglse( &m, &n, &p, a, &lda_t, b, &ldb_t, c, d, x, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgglse( &m, &n, &p, a_t, &lda_t, b_t, &ldb_t, c, d, x, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgglse_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgglse_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggqrf.c b/LAPACKE/src/lapacke_sggqrf.c
new file mode 100644
index 00000000..955abb2b
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggqrf.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggqrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggqrf( int matrix_layout, lapack_int n, lapack_int m,
+ lapack_int p, float* a, lapack_int lda, float* taua,
+ float* b, lapack_int ldb, float* taub )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sggqrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, m, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, p, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sggqrf_work( matrix_layout, n, m, p, a, lda, taua, b, ldb,
+ taub, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sggqrf_work( matrix_layout, n, m, p, a, lda, taua, b, ldb,
+ taub, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggqrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggqrf_work.c b/LAPACKE/src/lapacke_sggqrf_work.c
new file mode 100644
index 00000000..8fe05717
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggqrf_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggqrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggqrf_work( int matrix_layout, lapack_int n, lapack_int m,
+ lapack_int p, float* a, lapack_int lda,
+ float* taua, float* b, lapack_int ldb,
+ float* taub, float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggqrf( &n, &m, &p, a, &lda, taua, b, &ldb, taub, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sggqrf_work", info );
+ return info;
+ }
+ if( ldb < p ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sggqrf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sggqrf( &n, &m, &p, a, &lda_t, taua, b, &ldb_t, taub, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,p) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, m, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, p, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggqrf( &n, &m, &p, a_t, &lda_t, taua, b_t, &ldb_t, taub, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, m, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, p, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggqrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sggqrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggrqf.c b/LAPACKE/src/lapacke_sggrqf.c
new file mode 100644
index 00000000..5981fa4a
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggrqf.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggrqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggrqf( int matrix_layout, lapack_int m, lapack_int p,
+ lapack_int n, float* a, lapack_int lda, float* taua,
+ float* b, lapack_int ldb, float* taub )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sggrqf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sggrqf_work( matrix_layout, m, p, n, a, lda, taua, b, ldb,
+ taub, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sggrqf_work( matrix_layout, m, p, n, a, lda, taua, b, ldb,
+ taub, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggrqf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggrqf_work.c b/LAPACKE/src/lapacke_sggrqf_work.c
new file mode 100644
index 00000000..42715ae9
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggrqf_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggrqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggrqf_work( int matrix_layout, lapack_int m, lapack_int p,
+ lapack_int n, float* a, lapack_int lda,
+ float* taua, float* b, lapack_int ldb,
+ float* taub, float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggrqf( &m, &p, &n, a, &lda, taua, b, &ldb, taub, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sggrqf_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sggrqf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sggrqf( &m, &p, &n, a, &lda_t, taua, b, &ldb_t, taub, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggrqf( &m, &p, &n, a_t, &lda_t, taua, b_t, &ldb_t, taub, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggrqf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sggrqf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggsvd.c b/LAPACKE/src/lapacke_sggsvd.c
new file mode 100644
index 00000000..72d84a02
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggsvd.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggsvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggsvd( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int n, lapack_int p,
+ lapack_int* k, lapack_int* l, float* a,
+ lapack_int lda, float* b, lapack_int ldb,
+ float* alpha, float* beta, float* u, lapack_int ldu,
+ float* v, lapack_int ldv, float* q, lapack_int ldq,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sggsvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -10;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,MAX3(3*n,m,p)+n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sggsvd_work( matrix_layout, jobu, jobv, jobq, m, n, p, k, l,
+ a, lda, b, ldb, alpha, beta, u, ldu, v, ldv, q,
+ ldq, work, iwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggsvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggsvd_work.c b/LAPACKE/src/lapacke_sggsvd_work.c
new file mode 100644
index 00000000..321a2818
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggsvd_work.c
@@ -0,0 +1,170 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggsvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggsvd_work( int matrix_layout, char jobu, char jobv,
+ char jobq, lapack_int m, lapack_int n,
+ lapack_int p, lapack_int* k, lapack_int* l,
+ float* a, lapack_int lda, float* b,
+ lapack_int ldb, float* alpha, float* beta,
+ float* u, lapack_int ldu, float* v,
+ lapack_int ldv, float* q, lapack_int ldq,
+ float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggsvd( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a, &lda, b, &ldb,
+ alpha, beta, u, &ldu, v, &ldv, q, &ldq, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldu_t = MAX(1,m);
+ lapack_int ldv_t = MAX(1,p);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ float* u_t = NULL;
+ float* v_t = NULL;
+ float* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sggsvd_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_sggsvd_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -21;
+ LAPACKE_xerbla( "LAPACKE_sggsvd_work", info );
+ return info;
+ }
+ if( ldu < m ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_sggsvd_work", info );
+ return info;
+ }
+ if( ldv < p ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_sggsvd_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ u_t = (float*)LAPACKE_malloc( sizeof(float) * ldu_t * MAX(1,m) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ v_t = (float*)LAPACKE_malloc( sizeof(float) * ldv_t * MAX(1,p) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ q_t = (float*)LAPACKE_malloc( sizeof(float) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggsvd( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a_t, &lda_t, b_t,
+ &ldb_t, alpha, beta, u_t, &ldu_t, v_t, &ldv_t, q_t,
+ &ldq_t, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, p, p, v_t, ldv_t, v, ldv );
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_4:
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_free( v_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggsvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sggsvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggsvp.c b/LAPACKE/src/lapacke_sggsvp.c
new file mode 100644
index 00000000..1dff5e54
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggsvp.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggsvp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggsvp( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int p, lapack_int n, float* a,
+ lapack_int lda, float* b, lapack_int ldb, float tola,
+ float tolb, lapack_int* k, lapack_int* l, float* u,
+ lapack_int ldu, float* v, lapack_int ldv, float* q,
+ lapack_int ldq )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* tau = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sggsvp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
+ return -12;
+ }
+ if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
+ return -13;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ tau = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( tau == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,MAX3(3*n,m,p)) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sggsvp_work( matrix_layout, jobu, jobv, jobq, m, p, n, a, lda,
+ b, ldb, tola, tolb, k, l, u, ldu, v, ldv, q,
+ ldq, iwork, tau, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( tau );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggsvp", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sggsvp_work.c b/LAPACKE/src/lapacke_sggsvp_work.c
new file mode 100644
index 00000000..8128df8c
--- /dev/null
+++ b/LAPACKE/src/lapacke_sggsvp_work.c
@@ -0,0 +1,170 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sggsvp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sggsvp_work( int matrix_layout, char jobu, char jobv,
+ char jobq, lapack_int m, lapack_int p,
+ lapack_int n, float* a, lapack_int lda,
+ float* b, lapack_int ldb, float tola,
+ float tolb, lapack_int* k, lapack_int* l,
+ float* u, lapack_int ldu, float* v,
+ lapack_int ldv, float* q, lapack_int ldq,
+ lapack_int* iwork, float* tau, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggsvp( &jobu, &jobv, &jobq, &m, &p, &n, a, &lda, b, &ldb, &tola,
+ &tolb, k, l, u, &ldu, v, &ldv, q, &ldq, iwork, tau, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldu_t = MAX(1,m);
+ lapack_int ldv_t = MAX(1,p);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ float* u_t = NULL;
+ float* v_t = NULL;
+ float* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sggsvp_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sggsvp_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -21;
+ LAPACKE_xerbla( "LAPACKE_sggsvp_work", info );
+ return info;
+ }
+ if( ldu < m ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_sggsvp_work", info );
+ return info;
+ }
+ if( ldv < m ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_sggsvp_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ u_t = (float*)LAPACKE_malloc( sizeof(float) * ldu_t * MAX(1,m) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ v_t = (float*)LAPACKE_malloc( sizeof(float) * ldv_t * MAX(1,m) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ q_t = (float*)LAPACKE_malloc( sizeof(float) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sggsvp( &jobu, &jobv, &jobq, &m, &p, &n, a_t, &lda_t, b_t,
+ &ldb_t, &tola, &tolb, k, l, u_t, &ldu_t, v_t, &ldv_t,
+ q_t, &ldq_t, iwork, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, p, m, v_t, ldv_t, v, ldv );
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_4:
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_free( v_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sggsvp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sggsvp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgtcon.c b/LAPACKE/src/lapacke_sgtcon.c
new file mode 100644
index 00000000..f3818c57
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgtcon.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 sgtcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgtcon( char norm, lapack_int n, const float* dl,
+ const float* d, const float* du, const float* du2,
+ const lapack_int* ipiv, float anorm, float* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
+ return -3;
+ }
+ if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( n-2, du2, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgtcon_work( norm, n, dl, d, du, du2, ipiv, anorm, rcond,
+ work, iwork );
+ /* 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_sgtcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgtcon_work.c b/LAPACKE/src/lapacke_sgtcon_work.c
new file mode 100644
index 00000000..97fab5a8
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgtcon_work.c
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 sgtcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgtcon_work( char norm, lapack_int n, const float* dl,
+ const float* d, const float* du,
+ const float* du2, const lapack_int* ipiv,
+ float anorm, float* rcond, float* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgtcon( &norm, &n, dl, d, du, du2, ipiv, &anorm, rcond, work, iwork,
+ &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgtrfs.c b/LAPACKE/src/lapacke_sgtrfs.c
new file mode 100644
index 00000000..37eb9efc
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgtrfs.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgtrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgtrfs( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const float* dl, const float* d,
+ const float* du, const float* dlf, const float* df,
+ const float* duf, const float* du2,
+ const lapack_int* ipiv, const float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgtrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_s_nancheck( n, df, 1 ) ) {
+ return -9;
+ }
+ if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( n-1, dlf, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( n-2, du2, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_s_nancheck( n-1, duf, 1 ) ) {
+ return -10;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -15;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgtrfs_work( matrix_layout, trans, n, nrhs, dl, d, du, dlf,
+ df, duf, du2, ipiv, b, ldb, x, ldx, ferr, berr,
+ work, iwork );
+ /* 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_sgtrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgtrfs_work.c b/LAPACKE/src/lapacke_sgtrfs_work.c
new file mode 100644
index 00000000..242cfbde
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgtrfs_work.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgtrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgtrfs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const float* dl,
+ const float* d, const float* du,
+ const float* dlf, const float* df,
+ const float* duf, const float* du2,
+ const lapack_int* ipiv, const float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* ferr, float* berr, float* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgtrfs( &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b,
+ &ldb, x, &ldx, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* b_t = NULL;
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_sgtrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_sgtrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgtrfs( &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2, ipiv,
+ b_t, &ldb_t, x_t, &ldx_t, ferr, berr, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgtrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgtrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgtsv.c b/LAPACKE/src/lapacke_sgtsv.c
new file mode 100644
index 00000000..51b93423
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgtsv.c
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgtsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgtsv( int matrix_layout, lapack_int n, lapack_int nrhs,
+ float* dl, float* d, float* du, float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgtsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_sgtsv_work( matrix_layout, n, nrhs, dl, d, du, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_sgtsv_work.c b/LAPACKE/src/lapacke_sgtsv_work.c
new file mode 100644
index 00000000..a352c192
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgtsv_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgtsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgtsv_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ float* dl, float* d, float* du, float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgtsv( &n, &nrhs, dl, d, du, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sgtsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgtsv( &n, &nrhs, dl, d, du, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgtsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgtsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgtsvx.c b/LAPACKE/src/lapacke_sgtsvx.c
new file mode 100644
index 00000000..5ecdac97
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgtsvx.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgtsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgtsvx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs, const float* dl,
+ const float* d, const float* du, float* dlf,
+ float* df, float* duf, float* du2, lapack_int* ipiv,
+ const float* b, lapack_int ldb, float* x,
+ lapack_int ldx, float* rcond, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgtsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -14;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_s_nancheck( n, df, 1 ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_s_nancheck( n-1, dlf, 1 ) ) {
+ return -9;
+ }
+ }
+ if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_s_nancheck( n-2, du2, 1 ) ) {
+ return -12;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_s_nancheck( n-1, duf, 1 ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sgtsvx_work( matrix_layout, fact, trans, n, nrhs, dl, d, du,
+ dlf, df, duf, du2, ipiv, b, ldb, x, ldx, rcond,
+ ferr, berr, work, iwork );
+ /* 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_sgtsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgtsvx_work.c b/LAPACKE/src/lapacke_sgtsvx_work.c
new file mode 100644
index 00000000..da19c415
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgtsvx_work.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgtsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgtsvx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs, const float* dl,
+ const float* d, const float* du, float* dlf,
+ float* df, float* duf, float* du2,
+ lapack_int* ipiv, const float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr,
+ float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgtsvx( &fact, &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2,
+ ipiv, b, &ldb, x, &ldx, rcond, ferr, berr, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* b_t = NULL;
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_sgtsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_sgtsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgtsvx( &fact, &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2,
+ ipiv, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr, berr, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgtsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgtsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgttrf.c b/LAPACKE/src/lapacke_sgttrf.c
new file mode 100644
index 00000000..3d418a5d
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgttrf.c
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 sgttrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgttrf( lapack_int n, float* dl, float* d, float* du,
+ float* du2, lapack_int* ipiv )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -3;
+ }
+ if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
+ return -2;
+ }
+ if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_sgttrf_work( n, dl, d, du, du2, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_sgttrf_work.c b/LAPACKE/src/lapacke_sgttrf_work.c
new file mode 100644
index 00000000..4e70f3fd
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgttrf_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 sgttrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgttrf_work( lapack_int n, float* dl, float* d, float* du,
+ float* du2, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgttrf( &n, dl, d, du, du2, ipiv, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sgttrs.c b/LAPACKE/src/lapacke_sgttrs.c
new file mode 100644
index 00000000..4a63f787
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgttrs.c
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgttrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgttrs( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const float* dl, const float* d,
+ const float* du, const float* du2,
+ const lapack_int* ipiv, float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sgttrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( n-2, du2, 1 ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_sgttrs_work( matrix_layout, trans, n, nrhs, dl, d, du, du2,
+ ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_sgttrs_work.c b/LAPACKE/src/lapacke_sgttrs_work.c
new file mode 100644
index 00000000..83bb455e
--- /dev/null
+++ b/LAPACKE/src/lapacke_sgttrs_work.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sgttrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sgttrs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const float* dl,
+ const float* d, const float* du,
+ const float* du2, const lapack_int* ipiv,
+ float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgttrs( &trans, &n, &nrhs, dl, d, du, du2, ipiv, b, &ldb,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sgttrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sgttrs( &trans, &n, &nrhs, dl, d, du, du2, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sgttrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sgttrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_shgeqz.c b/LAPACKE/src/lapacke_shgeqz.c
new file mode 100644
index 00000000..c2c1d3bb
--- /dev/null
+++ b/LAPACKE/src/lapacke_shgeqz.c
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 shgeqz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_shgeqz( int matrix_layout, char job, char compq, char compz,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ float* h, lapack_int ldh, float* t, lapack_int ldt,
+ float* alphar, float* alphai, float* beta, float* q,
+ lapack_int ldq, float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_shgeqz", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -15;
+ }
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -17;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_shgeqz_work( matrix_layout, job, compq, compz, n, ilo, ihi, h,
+ ldh, t, ldt, alphar, alphai, beta, q, ldq, z,
+ ldz, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_shgeqz_work( matrix_layout, job, compq, compz, n, ilo, ihi, h,
+ ldh, t, ldt, alphar, alphai, beta, q, ldq, z,
+ ldz, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_shgeqz", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_shgeqz_work.c b/LAPACKE/src/lapacke_shgeqz_work.c
new file mode 100644
index 00000000..29bd1258
--- /dev/null
+++ b/LAPACKE/src/lapacke_shgeqz_work.c
@@ -0,0 +1,161 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 shgeqz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_shgeqz_work( int matrix_layout, char job, char compq,
+ char compz, lapack_int n, lapack_int ilo,
+ lapack_int ihi, float* h, lapack_int ldh,
+ float* t, lapack_int ldt, float* alphar,
+ float* alphai, float* beta, float* q,
+ lapack_int ldq, float* z, lapack_int ldz,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_shgeqz( &job, &compq, &compz, &n, &ilo, &ihi, h, &ldh, t, &ldt,
+ alphar, alphai, beta, q, &ldq, z, &ldz, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldh_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldt_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ float* h_t = NULL;
+ float* t_t = NULL;
+ float* q_t = NULL;
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldh < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_shgeqz_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_shgeqz_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_shgeqz_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -18;
+ LAPACKE_xerbla( "LAPACKE_shgeqz_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_shgeqz( &job, &compq, &compz, &n, &ilo, &ihi, h, &ldh_t, t,
+ &ldt_t, alphar, alphai, beta, q, &ldq_t, z, &ldz_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ h_t = (float*)LAPACKE_malloc( sizeof(float) * ldh_t * MAX(1,n) );
+ if( h_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (float*)LAPACKE_malloc( sizeof(float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ q_t = (float*)LAPACKE_malloc( sizeof(float) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, h, ldh, h_t, ldh_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_shgeqz( &job, &compq, &compz, &n, &ilo, &ihi, h_t, &ldh_t, t_t,
+ &ldt_t, alphar, alphai, beta, q_t, &ldq_t, z_t, &ldz_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, h_t, ldh_t, h, ldh );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( h_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_shgeqz_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_shgeqz_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_shsein.c b/LAPACKE/src/lapacke_shsein.c
new file mode 100644
index 00000000..14377f45
--- /dev/null
+++ b/LAPACKE/src/lapacke_shsein.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 shsein
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_shsein( int matrix_layout, char job, char eigsrc, char initv,
+ lapack_logical* select, lapack_int n, const float* h,
+ lapack_int ldh, float* wr, const float* wi,
+ float* vl, lapack_int ldvl, float* vr,
+ lapack_int ldvr, lapack_int mm, lapack_int* m,
+ lapack_int* ifaill, lapack_int* ifailr )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_shsein", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -13;
+ }
+ }
+ if( LAPACKE_s_nancheck( n, wi, 1 ) ) {
+ return -10;
+ }
+ if( LAPACKE_s_nancheck( n, wr, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) * MAX(1,n+2) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_shsein_work( matrix_layout, job, eigsrc, initv, select, n, h,
+ ldh, wr, wi, vl, ldvl, vr, ldvr, mm, m, work,
+ ifaill, ifailr );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_shsein", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_shsein_work.c b/LAPACKE/src/lapacke_shsein_work.c
new file mode 100644
index 00000000..8aad8811
--- /dev/null
+++ b/LAPACKE/src/lapacke_shsein_work.c
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 shsein
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_shsein_work( int matrix_layout, char job, char eigsrc,
+ char initv, lapack_logical* select,
+ lapack_int n, const float* h, lapack_int ldh,
+ float* wr, const float* wi, float* vl,
+ lapack_int ldvl, float* vr, lapack_int ldvr,
+ lapack_int mm, lapack_int* m, float* work,
+ lapack_int* ifaill, lapack_int* ifailr )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_shsein( &job, &eigsrc, &initv, select, &n, h, &ldh, wr, wi, vl,
+ &ldvl, vr, &ldvr, &mm, m, work, ifaill, ifailr, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldh_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ float* h_t = NULL;
+ float* vl_t = NULL;
+ float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldh < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_shsein_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_shsein_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_shsein_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ h_t = (float*)LAPACKE_malloc( sizeof(float) * ldh_t * MAX(1,n) );
+ if( h_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+ vl_t = (float*)LAPACKE_malloc( sizeof(float) * ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+ vr_t = (float*)LAPACKE_malloc( sizeof(float) * ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, h, ldh, h_t, ldh_t );
+ if( ( LAPACKE_lsame( job, 'l' ) || LAPACKE_lsame( job, 'b' ) ) &&
+ LAPACKE_lsame( initv, 'v' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( ( LAPACKE_lsame( job, 'r' ) || LAPACKE_lsame( job, 'b' ) ) &&
+ LAPACKE_lsame( initv, 'v' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_shsein( &job, &eigsrc, &initv, select, &n, h_t, &ldh_t, wr, wi,
+ vl_t, &ldvl_t, vr_t, &ldvr_t, &mm, m, work, ifaill,
+ ifailr, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, mm, vl_t, ldvl_t, vl,
+ ldvl );
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, mm, vr_t, ldvr_t, vr,
+ ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( h_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_shsein_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_shsein_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_shseqr.c b/LAPACKE/src/lapacke_shseqr.c
new file mode 100644
index 00000000..4402fc18
--- /dev/null
+++ b/LAPACKE/src/lapacke_shseqr.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 shseqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_shseqr( int matrix_layout, char job, char compz, lapack_int n,
+ lapack_int ilo, lapack_int ihi, float* h,
+ lapack_int ldh, float* wr, float* wi, float* z,
+ lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_shseqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_shseqr_work( matrix_layout, job, compz, n, ilo, ihi, h, ldh,
+ wr, wi, z, ldz, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_shseqr_work( matrix_layout, job, compz, n, ilo, ihi, h, ldh,
+ wr, wi, z, ldz, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_shseqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_shseqr_work.c b/LAPACKE/src/lapacke_shseqr_work.c
new file mode 100644
index 00000000..bab4d490
--- /dev/null
+++ b/LAPACKE/src/lapacke_shseqr_work.c
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 shseqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_shseqr_work( int matrix_layout, char job, char compz,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ float* h, lapack_int ldh, float* wr, float* wi,
+ float* z, lapack_int ldz, float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_shseqr( &job, &compz, &n, &ilo, &ihi, h, &ldh, wr, wi, z, &ldz,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldh_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ float* h_t = NULL;
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldh < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_shseqr_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_shseqr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_shseqr( &job, &compz, &n, &ilo, &ihi, h, &ldh_t, wr, wi, z,
+ &ldz_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ h_t = (float*)LAPACKE_malloc( sizeof(float) * ldh_t * MAX(1,n) );
+ if( h_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, h, ldh, h_t, ldh_t );
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_shseqr( &job, &compz, &n, &ilo, &ihi, h_t, &ldh_t, wr, wi, z_t,
+ &ldz_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, h_t, ldh_t, h, ldh );
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( h_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_shseqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_shseqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slacn2.c b/LAPACKE/src/lapacke_slacn2.c
new file mode 100644
index 00000000..15d06d55
--- /dev/null
+++ b/LAPACKE/src/lapacke_slacn2.c
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ Copyright (c) 2010, Intel Corp.
+ 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 slacn2
+* Author: Intel Corporation
+* Generated October, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slacn2( lapack_int n, float* v, float* x, lapack_int* isgn,
+ float* est, lapack_int* kase, lapack_int* isave )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, est, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( n, x, 1 ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_slacn2_work( n, v, x, isgn, est, kase, isave );
+}
diff --git a/LAPACKE/src/lapacke_slacn2_work.c b/LAPACKE/src/lapacke_slacn2_work.c
new file mode 100644
index 00000000..7908d41c
--- /dev/null
+++ b/LAPACKE/src/lapacke_slacn2_work.c
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ Copyright (c) 2010, Intel Corp.
+ 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 slacn2
+* Author: Intel Corporation
+* Generated October, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slacn2_work( lapack_int n, float* v, float* x,
+ lapack_int* isgn, float* est, lapack_int* kase,
+ lapack_int* isave )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_slacn2( &n, v, x, isgn, est, kase, isave );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slacpy.c b/LAPACKE/src/lapacke_slacpy.c
new file mode 100644
index 00000000..02ef8ccc
--- /dev/null
+++ b/LAPACKE/src/lapacke_slacpy.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slacpy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slacpy( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, const float* a, lapack_int lda,
+ float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_slacpy", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_slacpy_work( matrix_layout, uplo, m, n, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_slacpy_work.c b/LAPACKE/src/lapacke_slacpy_work.c
new file mode 100644
index 00000000..6b36530e
--- /dev/null
+++ b/LAPACKE/src/lapacke_slacpy_work.c
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slacpy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slacpy_work( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, const float* a, lapack_int lda,
+ float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_slacpy( &uplo, &m, &n, a, &lda, b, &ldb );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,m);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_slacpy_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_slacpy_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_slacpy( &uplo, &m, &n, a_t, &lda_t, b_t, &ldb_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slacpy_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_slacpy_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slag2d.c b/LAPACKE/src/lapacke_slag2d.c
new file mode 100644
index 00000000..1a0a4a97
--- /dev/null
+++ b/LAPACKE/src/lapacke_slag2d.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slag2d
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slag2d( int matrix_layout, lapack_int m, lapack_int n,
+ const float* sa, lapack_int ldsa, double* a,
+ lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_slag2d", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, sa, ldsa ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_slag2d_work( matrix_layout, m, n, sa, ldsa, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_slag2d_work.c b/LAPACKE/src/lapacke_slag2d_work.c
new file mode 100644
index 00000000..dbed9078
--- /dev/null
+++ b/LAPACKE/src/lapacke_slag2d_work.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slag2d
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slag2d_work( int matrix_layout, lapack_int m, lapack_int n,
+ const float* sa, lapack_int ldsa, double* a,
+ lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_slag2d( &m, &n, sa, &ldsa, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldsa_t = MAX(1,m);
+ float* sa_t = NULL;
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_slag2d_work", info );
+ return info;
+ }
+ if( ldsa < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_slag2d_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ sa_t = (float*)LAPACKE_malloc( sizeof(float) * ldsa_t * MAX(1,n) );
+ if( sa_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, sa, ldsa, sa_t, ldsa_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_slag2d( &m, &n, sa_t, &ldsa_t, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_1:
+ LAPACKE_free( sa_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slag2d_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_slag2d_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slagge.c b/LAPACKE/src/lapacke_slagge.c
new file mode 100644
index 00000000..0f21211f
--- /dev/null
+++ b/LAPACKE/src/lapacke_slagge.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slagge
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slagge( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, const float* d,
+ float* a, lapack_int lda, lapack_int* iseed )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_slagge", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( MIN(m,n), d, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,m+n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_slagge_work( matrix_layout, m, n, kl, ku, d, a, lda, iseed,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slagge", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slagge_work.c b/LAPACKE/src/lapacke_slagge_work.c
new file mode 100644
index 00000000..2f20e421
--- /dev/null
+++ b/LAPACKE/src/lapacke_slagge_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slagge
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slagge_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, const float* d,
+ float* a, lapack_int lda, lapack_int* iseed,
+ float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_slagge( &m, &n, &kl, &ku, d, a, &lda, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_slagge_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_slagge( &m, &n, &kl, &ku, d, a_t, &lda_t, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slagge_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_slagge_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slagsy.c b/LAPACKE/src/lapacke_slagsy.c
new file mode 100644
index 00000000..c7473111
--- /dev/null
+++ b/LAPACKE/src/lapacke_slagsy.c
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slagsy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slagsy( int matrix_layout, lapack_int n, lapack_int k,
+ const float* d, float* a, lapack_int lda,
+ lapack_int* iseed )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_slagsy", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_slagsy_work( matrix_layout, n, k, d, a, lda, iseed, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slagsy", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slagsy_work.c b/LAPACKE/src/lapacke_slagsy_work.c
new file mode 100644
index 00000000..b34800ff
--- /dev/null
+++ b/LAPACKE/src/lapacke_slagsy_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slagsy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slagsy_work( int matrix_layout, lapack_int n, lapack_int k,
+ const float* d, float* a, lapack_int lda,
+ lapack_int* iseed, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_slagsy( &n, &k, d, a, &lda, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_slagsy_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_slagsy( &n, &k, d, a_t, &lda_t, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slagsy_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_slagsy_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slamch.c b/LAPACKE/src/lapacke_slamch.c
new file mode 100644
index 00000000..0f25b2a4
--- /dev/null
+++ b/LAPACKE/src/lapacke_slamch.c
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 slamch
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_slamch( char cmach )
+{
+ return LAPACKE_slamch_work( cmach );
+}
diff --git a/LAPACKE/src/lapacke_slamch_work.c b/LAPACKE/src/lapacke_slamch_work.c
new file mode 100644
index 00000000..ab4767a8
--- /dev/null
+++ b/LAPACKE/src/lapacke_slamch_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 slamch
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_slamch_work( char cmach )
+{
+ lapack_int info = 0;
+ float res;
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_slamch( &cmach );
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_slange.c b/LAPACKE/src/lapacke_slange.c
new file mode 100644
index 00000000..eca4aecd
--- /dev/null
+++ b/LAPACKE/src/lapacke_slange.c
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slange
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_slange( int matrix_layout, char norm, lapack_int m,
+ lapack_int n, const float* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ float res = 0.;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_slange", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) ) {
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,m) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call middle-level interface */
+ res = LAPACKE_slange_work( matrix_layout, norm, m, n, a, lda, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slange", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_slange_work.c b/LAPACKE/src/lapacke_slange_work.c
new file mode 100644
index 00000000..e0b5e540
--- /dev/null
+++ b/LAPACKE/src/lapacke_slange_work.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slange
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_slange_work( int matrix_layout, char norm, lapack_int m,
+ lapack_int n, const float* a, lapack_int lda,
+ float* work )
+{
+ lapack_int info = 0;
+ float res = 0.;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_slange( &norm, &m, &n, a, &lda, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_slange_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_slange( &norm, &m, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slange_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_slange_work", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_slansy.c b/LAPACKE/src/lapacke_slansy.c
new file mode 100644
index 00000000..18866db8
--- /dev/null
+++ b/LAPACKE/src/lapacke_slansy.c
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slansy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_slansy( int matrix_layout, char norm, char uplo, lapack_int n,
+ const float* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ float res = 0.;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_slansy", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call middle-level interface */
+ res = LAPACKE_slansy_work( matrix_layout, norm, uplo, n, a, lda, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slansy", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_slansy_work.c b/LAPACKE/src/lapacke_slansy_work.c
new file mode 100644
index 00000000..ac21166d
--- /dev/null
+++ b/LAPACKE/src/lapacke_slansy_work.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slansy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_slansy_work( int matrix_layout, char norm, char uplo,
+ lapack_int n, const float* a, lapack_int lda,
+ float* work )
+{
+ lapack_int info = 0;
+ float res = 0.;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_slansy( &norm, &uplo, &n, a, &lda, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_slansy_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_slansy( &norm, &uplo, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slansy_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_slansy_work", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_slantr.c b/LAPACKE/src/lapacke_slantr.c
new file mode 100644
index 00000000..5f03ca62
--- /dev/null
+++ b/LAPACKE/src/lapacke_slantr.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slantr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_slantr( int matrix_layout, char norm, char uplo, char diag,
+ lapack_int m, lapack_int n, const float* a,
+ lapack_int lda )
+{
+ lapack_int info = 0;
+ float res = 0.;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_slantr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_str_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,m) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call middle-level interface */
+ res = LAPACKE_slantr_work( matrix_layout, norm, uplo, diag, m, n, a, lda,
+ work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slantr", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_slantr_work.c b/LAPACKE/src/lapacke_slantr_work.c
new file mode 100644
index 00000000..6f5c0ada
--- /dev/null
+++ b/LAPACKE/src/lapacke_slantr_work.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slantr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_slantr_work( int matrix_layout, char norm, char uplo,
+ char diag, lapack_int m, lapack_int n,
+ const float* a, lapack_int lda, float* work )
+{
+ lapack_int info = 0;
+ float res = 0.;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_slantr( &norm, &uplo, &diag, &m, &n, a, &lda, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_slantr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_str_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_slantr( &norm, &uplo, &diag, &m, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slantr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_slantr_work", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_slapmr.c b/LAPACKE/src/lapacke_slapmr.c
new file mode 100644
index 00000000..c3dcad99
--- /dev/null
+++ b/LAPACKE/src/lapacke_slapmr.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slapmr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slapmr( int matrix_layout, lapack_logical forwrd,
+ lapack_int m, lapack_int n, float* x, lapack_int ldx,
+ lapack_int* k )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_slapmr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, x, ldx ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_slapmr_work( matrix_layout, forwrd, m, n, x, ldx, k );
+}
diff --git a/LAPACKE/src/lapacke_slapmr_work.c b/LAPACKE/src/lapacke_slapmr_work.c
new file mode 100644
index 00000000..8c4ebc7c
--- /dev/null
+++ b/LAPACKE/src/lapacke_slapmr_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slapmr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slapmr_work( int matrix_layout, lapack_logical forwrd,
+ lapack_int m, lapack_int n, float* x,
+ lapack_int ldx, lapack_int* k )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_slapmr( &forwrd, &m, &n, x, &ldx, k );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldx_t = MAX(1,m);
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldx < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_slapmr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,n) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_slapmr( &forwrd, &m, &n, x_t, &ldx_t, k );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slapmr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_slapmr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slapy2.c b/LAPACKE/src/lapacke_slapy2.c
new file mode 100644
index 00000000..84108627
--- /dev/null
+++ b/LAPACKE/src/lapacke_slapy2.c
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 slapy2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_slapy2( float x, float y )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &x, 1 ) ) {
+ return -1;
+ }
+ if( LAPACKE_s_nancheck( 1, &y, 1 ) ) {
+ return -2;
+ }
+#endif
+ return LAPACKE_slapy2_work( x, y );
+}
diff --git a/LAPACKE/src/lapacke_slapy2_work.c b/LAPACKE/src/lapacke_slapy2_work.c
new file mode 100644
index 00000000..00507b39
--- /dev/null
+++ b/LAPACKE/src/lapacke_slapy2_work.c
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 slapy2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_slapy2_work( float x, float y )
+{
+ float res = 0.;
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_slapy2( &x, &y );
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_slapy3.c b/LAPACKE/src/lapacke_slapy3.c
new file mode 100644
index 00000000..c6eea251
--- /dev/null
+++ b/LAPACKE/src/lapacke_slapy3.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 slapy3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_slapy3( float x, float y, float z )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &x, 1 ) ) {
+ return -1;
+ }
+ if( LAPACKE_s_nancheck( 1, &y, 1 ) ) {
+ return -2;
+ }
+ if( LAPACKE_s_nancheck( 1, &z, 1 ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_slapy3_work( x, y, z );
+}
diff --git a/LAPACKE/src/lapacke_slapy3_work.c b/LAPACKE/src/lapacke_slapy3_work.c
new file mode 100644
index 00000000..381c579b
--- /dev/null
+++ b/LAPACKE/src/lapacke_slapy3_work.c
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 slapy3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+float LAPACKE_slapy3_work( float x, float y, float z )
+{
+ float res = 0.;
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_slapy3( &x, &y, &z );
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_slarfb.c b/LAPACKE/src/lapacke_slarfb.c
new file mode 100644
index 00000000..660287a6
--- /dev/null
+++ b/LAPACKE/src/lapacke_slarfb.c
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slarfb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slarfb( int matrix_layout, char side, char trans, char direct,
+ char storev, lapack_int m, lapack_int n,
+ lapack_int k, const float* v, lapack_int ldv,
+ const float* t, lapack_int ldt, float* c,
+ lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int ldwork = ( side=='l')?n:(( side=='r')?m:1);
+ float* work = NULL;
+ lapack_int ncols_v, nrows_v;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_slarfb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+ ( ( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( side, 'l' ) ) ? m :
+ ( ( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( side, 'r' ) ) ? n : 1) );
+ nrows_v = ( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( side, 'l' ) ) ? m :
+ ( ( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( side, 'r' ) ) ? n :
+ ( LAPACKE_lsame( storev, 'r' ) ? k : 1) );
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -13;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, k, k, t, ldt ) ) {
+ return -11;
+ }
+ if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'f' ) ) {
+ if( LAPACKE_str_nancheck( matrix_layout, 'l', 'u', k, v, ldv ) )
+ return -9;
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_v-k, ncols_v, &v[k*ldv],
+ ldv ) )
+ return -9;
+ } else if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'b' ) ) {
+ if( k > nrows_v ) {
+ LAPACKE_xerbla( "LAPACKE_slarfb", -8 );
+ return -8;
+ }
+ if( LAPACKE_str_nancheck( matrix_layout, 'u', 'u', k,
+ &v[(nrows_v-k)*ldv], ldv ) )
+ return -9;
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_v-k, ncols_v, v, ldv ) )
+ return -9;
+ } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
+ if( LAPACKE_str_nancheck( matrix_layout, 'u', 'u', k, v, ldv ) )
+ return -9;
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, ncols_v-k, &v[k],
+ ldv ) )
+ return -9;
+ } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
+ if( k > ncols_v ) {
+ LAPACKE_xerbla( "LAPACKE_slarfb", -8 );
+ return -8;
+ }
+ if( LAPACKE_str_nancheck( matrix_layout, 'l', 'u', k, &v[ncols_v-k],
+ ldv ) )
+ return -9;
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, ncols_v-k, v, ldv ) )
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * ldwork * MAX(1,k) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_slarfb_work( matrix_layout, side, trans, direct, storev, m, n,
+ k, v, ldv, t, ldt, c, ldc, work, ldwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slarfb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slarfb_work.c b/LAPACKE/src/lapacke_slarfb_work.c
new file mode 100644
index 00000000..c5af73c9
--- /dev/null
+++ b/LAPACKE/src/lapacke_slarfb_work.c
@@ -0,0 +1,154 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slarfb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slarfb_work( int matrix_layout, char side, char trans,
+ char direct, char storev, lapack_int m,
+ lapack_int n, lapack_int k, const float* v,
+ lapack_int ldv, const float* t, lapack_int ldt,
+ float* c, lapack_int ldc, float* work,
+ lapack_int ldwork )
+{
+ lapack_int info = 0;
+ lapack_int nrows_v, ncols_v;
+ lapack_int ldc_t, ldt_t, ldv_t;
+ float *v_t = NULL, *t_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_slarfb( &side, &trans, &direct, &storev, &m, &n, &k, v, &ldv, t,
+ &ldt, c, &ldc, work, &ldwork );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ nrows_v = ( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( side, 'l' ) ) ? m :
+ ( ( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( side, 'r' ) ) ? n :
+ ( LAPACKE_lsame( storev, 'r' ) ? k : 1) );
+ ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+ ( ( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( side, 'l' ) ) ? m :
+ ( ( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( side, 'r' ) ) ? n : 1) );
+ ldc_t = MAX(1,m);
+ ldt_t = MAX(1,k);
+ ldv_t = MAX(1,nrows_v);
+ /* Check leading dimension(s) */
+ if( ldc < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_slarfb_work", info );
+ return info;
+ }
+ if( ldt < k ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_slarfb_work", info );
+ return info;
+ }
+ if( ldv < ncols_v ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_slarfb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (float*)LAPACKE_malloc( sizeof(float) * ldv_t * MAX(1,ncols_v) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (float*)LAPACKE_malloc( sizeof(float) * ldt_t * MAX(1,k) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ c_t = (float*)LAPACKE_malloc( sizeof(float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'f' ) ) {
+ LAPACKE_str_trans( matrix_layout, 'l', 'u', k, v, ldv, v_t, ldv_t );
+ LAPACKE_sge_trans( matrix_layout, nrows_v-k, ncols_v, &v[k*ldv], ldv,
+ &v_t[k], ldv_t );
+ } else if( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( direct, 'b' ) ) {
+ if( k > nrows_v ) {
+ LAPACKE_xerbla( "LAPACKE_slarfb_work", -8 );
+ return -8;
+ }
+ LAPACKE_str_trans( matrix_layout, 'u', 'u', k, &v[(nrows_v-k)*ldv],
+ ldv, &v_t[nrows_v-k], ldv_t );
+ LAPACKE_sge_trans( matrix_layout, nrows_v-k, ncols_v, v, ldv, v_t,
+ ldv_t );
+ } else if( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( direct, 'f' ) ) {
+ LAPACKE_str_trans( matrix_layout, 'u', 'u', k, v, ldv, v_t, ldv_t );
+ LAPACKE_sge_trans( matrix_layout, nrows_v, ncols_v-k, &v[k], ldv,
+ &v_t[k*ldv_t], ldv_t );
+ } else if( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( direct, 'f' ) ) {
+ if( k > ncols_v ) {
+ LAPACKE_xerbla( "LAPACKE_slarfb_work", -8 );
+ return -8;
+ }
+ LAPACKE_str_trans( matrix_layout, 'l', 'u', k, &v[ncols_v-k], ldv,
+ &v_t[(ncols_v-k)*ldv_t], ldv_t );
+ LAPACKE_sge_trans( matrix_layout, nrows_v, ncols_v-k, v, ldv, v_t,
+ ldv_t );
+ }
+ LAPACKE_sge_trans( matrix_layout, k, k, t, ldt, t_t, ldt_t );
+ LAPACKE_sge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_slarfb( &side, &trans, &direct, &storev, &m, &n, &k, v_t, &ldv_t,
+ t_t, &ldt_t, c_t, &ldc_t, work, &ldwork );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slarfb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_slarfb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slarfg.c b/LAPACKE/src/lapacke_slarfg.c
new file mode 100644
index 00000000..f5a4eb1d
--- /dev/null
+++ b/LAPACKE/src/lapacke_slarfg.c
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 slarfg
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slarfg( lapack_int n, float* alpha, float* x,
+ lapack_int incx, float* tau )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, alpha, 1 ) ) {
+ return -2;
+ }
+ if( LAPACKE_s_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_slarfg_work( n, alpha, x, incx, tau );
+}
diff --git a/LAPACKE/src/lapacke_slarfg_work.c b/LAPACKE/src/lapacke_slarfg_work.c
new file mode 100644
index 00000000..2fd23bf6
--- /dev/null
+++ b/LAPACKE/src/lapacke_slarfg_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 slarfg
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slarfg_work( lapack_int n, float* alpha, float* x,
+ lapack_int incx, float* tau )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_slarfg( &n, alpha, x, &incx, tau );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slarft.c b/LAPACKE/src/lapacke_slarft.c
new file mode 100644
index 00000000..86d74fbd
--- /dev/null
+++ b/LAPACKE/src/lapacke_slarft.c
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slarft
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slarft( int matrix_layout, char direct, char storev,
+ lapack_int n, lapack_int k, const float* v,
+ lapack_int ldv, const float* tau, float* t,
+ lapack_int ldt )
+{
+ lapack_int ncols_v, nrows_v;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_slarft", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+ ( LAPACKE_lsame( storev, 'r' ) ? n : 1);
+ nrows_v = LAPACKE_lsame( storev, 'c' ) ? n :
+ ( LAPACKE_lsame( storev, 'r' ) ? k : 1);
+ if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_slarft_work( matrix_layout, direct, storev, n, k, v, ldv, tau,
+ t, ldt );
+}
diff --git a/LAPACKE/src/lapacke_slarft_work.c b/LAPACKE/src/lapacke_slarft_work.c
new file mode 100644
index 00000000..4801eaf1
--- /dev/null
+++ b/LAPACKE/src/lapacke_slarft_work.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slarft
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slarft_work( int matrix_layout, char direct, char storev,
+ lapack_int n, lapack_int k, const float* v,
+ lapack_int ldv, const float* tau, float* t,
+ lapack_int ldt )
+{
+ lapack_int info = 0;
+ lapack_int nrows_v, ncols_v;
+ lapack_int ldt_t, ldv_t;
+ float *v_t = NULL, *t_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_slarft( &direct, &storev, &n, &k, v, &ldv, tau, t, &ldt );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ nrows_v = LAPACKE_lsame( storev, 'c' ) ? n :
+ ( LAPACKE_lsame( storev, 'r' ) ? k : 1);
+ ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+ ( LAPACKE_lsame( storev, 'r' ) ? n : 1);
+ ldt_t = MAX(1,k);
+ ldv_t = MAX(1,nrows_v);
+ /* Check leading dimension(s) */
+ if( ldt < k ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_slarft_work", info );
+ return info;
+ }
+ if( ldv < ncols_v ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_slarft_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (float*)LAPACKE_malloc( sizeof(float) * ldv_t * MAX(1,ncols_v) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (float*)LAPACKE_malloc( sizeof(float) * ldt_t * MAX(1,k) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, nrows_v, ncols_v, v, ldv, v_t, ldv_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_slarft( &direct, &storev, &n, &k, v_t, &ldv_t, tau, t_t,
+ &ldt_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, k, k, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slarft_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_slarft_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slarfx.c b/LAPACKE/src/lapacke_slarfx.c
new file mode 100644
index 00000000..f6df46d0
--- /dev/null
+++ b/LAPACKE/src/lapacke_slarfx.c
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slarfx
+* Author: Intel Corporation
+* Generated April, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slarfx( int matrix_layout, char side, lapack_int m,
+ lapack_int n, const float* v, float tau, float* c,
+ lapack_int ldc, float* work )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_slarfx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &tau, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_s_nancheck( m, v, 1 ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_slarfx_work( matrix_layout, side, m, n, v, tau, c, ldc,
+ work );
+}
diff --git a/LAPACKE/src/lapacke_slarfx_work.c b/LAPACKE/src/lapacke_slarfx_work.c
new file mode 100644
index 00000000..830ae42b
--- /dev/null
+++ b/LAPACKE/src/lapacke_slarfx_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slarfx
+* Author: Intel Corporation
+* Generated April, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slarfx_work( int matrix_layout, char side, lapack_int m,
+ lapack_int n, const float* v, float tau,
+ float* c, lapack_int ldc, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_slarfx( &side, &m, &n, v, &tau, c, &ldc, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldc_t = MAX(1,m);
+ float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldc < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_slarfx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ c_t = (float*)LAPACKE_malloc( sizeof(float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_slarfx( &side, &m, &n, v, &tau, c_t, &ldc_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slarfx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_slarfx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slarnv.c b/LAPACKE/src/lapacke_slarnv.c
new file mode 100644
index 00000000..aff176dc
--- /dev/null
+++ b/LAPACKE/src/lapacke_slarnv.c
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 slarnv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slarnv( lapack_int idist, lapack_int* iseed, lapack_int n,
+ float* x )
+{
+ return LAPACKE_slarnv_work( idist, iseed, n, x );
+}
diff --git a/LAPACKE/src/lapacke_slarnv_work.c b/LAPACKE/src/lapacke_slarnv_work.c
new file mode 100644
index 00000000..38362b02
--- /dev/null
+++ b/LAPACKE/src/lapacke_slarnv_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 slarnv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slarnv_work( lapack_int idist, lapack_int* iseed,
+ lapack_int n, float* x )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_slarnv( &idist, iseed, &n, x );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slartgp.c b/LAPACKE/src/lapacke_slartgp.c
new file mode 100644
index 00000000..2b48b859
--- /dev/null
+++ b/LAPACKE/src/lapacke_slartgp.c
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 slartgp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slartgp( float f, float g, float* cs, float* sn, float* r )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &f, 1 ) ) {
+ return -1;
+ }
+ if( LAPACKE_s_nancheck( 1, &g, 1 ) ) {
+ return -2;
+ }
+#endif
+ return LAPACKE_slartgp_work( f, g, cs, sn, r );
+}
diff --git a/LAPACKE/src/lapacke_slartgp_work.c b/LAPACKE/src/lapacke_slartgp_work.c
new file mode 100644
index 00000000..26f05aad
--- /dev/null
+++ b/LAPACKE/src/lapacke_slartgp_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 slartgp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slartgp_work( float f, float g, float* cs, float* sn,
+ float* r )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_slartgp( &f, &g, cs, sn, r );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slartgs.c b/LAPACKE/src/lapacke_slartgs.c
new file mode 100644
index 00000000..3da6df1f
--- /dev/null
+++ b/LAPACKE/src/lapacke_slartgs.c
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 slartgs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slartgs( float x, float y, float sigma, float* cs,
+ float* sn )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &sigma, 1 ) ) {
+ return -3;
+ }
+ if( LAPACKE_s_nancheck( 1, &x, 1 ) ) {
+ return -1;
+ }
+ if( LAPACKE_s_nancheck( 1, &y, 1 ) ) {
+ return -2;
+ }
+#endif
+ return LAPACKE_slartgs_work( x, y, sigma, cs, sn );
+}
diff --git a/LAPACKE/src/lapacke_slartgs_work.c b/LAPACKE/src/lapacke_slartgs_work.c
new file mode 100644
index 00000000..a7ac3cfc
--- /dev/null
+++ b/LAPACKE/src/lapacke_slartgs_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 slartgs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slartgs_work( float x, float y, float sigma, float* cs,
+ float* sn )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_slartgs( &x, &y, &sigma, cs, sn );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slaset.c b/LAPACKE/src/lapacke_slaset.c
new file mode 100644
index 00000000..2372913e
--- /dev/null
+++ b/LAPACKE/src/lapacke_slaset.c
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slaset
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slaset( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, float alpha, float beta, float* a,
+ lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_slaset", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &alpha, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( 1, &beta, 1 ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_slaset_work( matrix_layout, uplo, m, n, alpha, beta, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_slaset_work.c b/LAPACKE/src/lapacke_slaset_work.c
new file mode 100644
index 00000000..540ba26f
--- /dev/null
+++ b/LAPACKE/src/lapacke_slaset_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slaset
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slaset_work( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, float alpha, float beta, float* a,
+ lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_slaset( &uplo, &m, &n, &alpha, &beta, a, &lda );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_slaset_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_slaset( &uplo, &m, &n, &alpha, &beta, a_t, &lda_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slaset_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_slaset_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slasrt.c b/LAPACKE/src/lapacke_slasrt.c
new file mode 100644
index 00000000..d426fb2a
--- /dev/null
+++ b/LAPACKE/src/lapacke_slasrt.c
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 slasrt
+* Author: Intel Corporation
+* Generated May, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slasrt( char id, lapack_int n, float* d )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_slasrt_work( id, n, d );
+}
diff --git a/LAPACKE/src/lapacke_slasrt_work.c b/LAPACKE/src/lapacke_slasrt_work.c
new file mode 100644
index 00000000..e9384c05
--- /dev/null
+++ b/LAPACKE/src/lapacke_slasrt_work.c
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 slasrt
+* Author: Intel Corporation
+* Generated May, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slasrt_work( char id, lapack_int n, float* d )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_slasrt( &id, &n, d, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slaswp.c b/LAPACKE/src/lapacke_slaswp.c
new file mode 100644
index 00000000..fffa0cb3
--- /dev/null
+++ b/LAPACKE/src/lapacke_slaswp.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slaswp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slaswp( int matrix_layout, lapack_int n, float* a,
+ lapack_int lda, lapack_int k1, lapack_int k2,
+ const lapack_int* ipiv, lapack_int incx )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_slaswp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, lda, n, a, lda ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_slaswp_work( matrix_layout, n, a, lda, k1, k2, ipiv, incx );
+}
diff --git a/LAPACKE/src/lapacke_slaswp_work.c b/LAPACKE/src/lapacke_slaswp_work.c
new file mode 100644
index 00000000..22c10bd9
--- /dev/null
+++ b/LAPACKE/src/lapacke_slaswp_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slaswp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slaswp_work( int matrix_layout, lapack_int n, float* a,
+ lapack_int lda, lapack_int k1, lapack_int k2,
+ const lapack_int* ipiv, lapack_int incx )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_slaswp( &n, a, &lda, &k1, &k2, ipiv, &incx );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,lda);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -4;
+ LAPACKE_xerbla( "LAPACKE_slaswp_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_slaswp( &n, a_t, &lda_t, &k1, &k2, ipiv, &incx );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slaswp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_slaswp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slatms.c b/LAPACKE/src/lapacke_slatms.c
new file mode 100644
index 00000000..d5ac5d33
--- /dev/null
+++ b/LAPACKE/src/lapacke_slatms.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slatms
+* Author: Intel Corporation
+* Generated April, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slatms( int matrix_layout, lapack_int m, lapack_int n,
+ char dist, lapack_int* iseed, char sym, float* d,
+ lapack_int mode, float cond, float dmax,
+ lapack_int kl, lapack_int ku, char pack, float* a,
+ lapack_int lda )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_slatms", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -14;
+ }
+ if( LAPACKE_s_nancheck( 1, &cond, 1 ) ) {
+ return -9;
+ }
+ if( LAPACKE_s_nancheck( MIN(n,m), d, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &dmax, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*(MAX(n,m))) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_slatms_work( matrix_layout, m, n, dist, iseed, sym, d, mode,
+ cond, dmax, kl, ku, pack, a, lda, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slatms", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slatms_work.c b/LAPACKE/src/lapacke_slatms_work.c
new file mode 100644
index 00000000..e66ac832
--- /dev/null
+++ b/LAPACKE/src/lapacke_slatms_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slatms
+* Author: Intel Corporation
+* Generated April, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slatms_work( int matrix_layout, lapack_int m, lapack_int n,
+ char dist, lapack_int* iseed, char sym,
+ float* d, lapack_int mode, float cond,
+ float dmax, lapack_int kl, lapack_int ku,
+ char pack, float* a, lapack_int lda,
+ float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_slatms( &m, &n, &dist, iseed, &sym, d, &mode, &cond, &dmax, &kl,
+ &ku, &pack, a, &lda, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_slatms_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_slatms( &m, &n, &dist, iseed, &sym, d, &mode, &cond, &dmax, &kl,
+ &ku, &pack, a_t, &lda_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slatms_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_slatms_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_slauum.c b/LAPACKE/src/lapacke_slauum.c
new file mode 100644
index 00000000..aa8e6ee7
--- /dev/null
+++ b/LAPACKE/src/lapacke_slauum.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slauum
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slauum( int matrix_layout, char uplo, lapack_int n, float* a,
+ lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_slauum", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_slauum_work( matrix_layout, uplo, n, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_slauum_work.c b/LAPACKE/src/lapacke_slauum_work.c
new file mode 100644
index 00000000..19290876
--- /dev/null
+++ b/LAPACKE/src/lapacke_slauum_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 slauum
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slauum_work( int matrix_layout, char uplo, lapack_int n,
+ float* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_slauum( &uplo, &n, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_slauum_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_slauum( &uplo, &n, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_slauum_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_slauum_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sopgtr.c b/LAPACKE/src/lapacke_sopgtr.c
new file mode 100644
index 00000000..9d1326c3
--- /dev/null
+++ b/LAPACKE/src/lapacke_sopgtr.c
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sopgtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sopgtr( int matrix_layout, char uplo, lapack_int n,
+ const float* ap, const float* tau, float* q,
+ lapack_int ldq )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sopgtr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssp_nancheck( n, ap ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n-1, tau, 1 ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n-1) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sopgtr_work( matrix_layout, uplo, n, ap, tau, q, ldq, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sopgtr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sopgtr_work.c b/LAPACKE/src/lapacke_sopgtr_work.c
new file mode 100644
index 00000000..ffadbfb2
--- /dev/null
+++ b/LAPACKE/src/lapacke_sopgtr_work.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sopgtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sopgtr_work( int matrix_layout, char uplo, lapack_int n,
+ const float* ap, const float* tau, float* q,
+ lapack_int ldq, float* work )
+{
+ lapack_int info = 0;
+ lapack_int ldq_t;
+ float *q_t = NULL, *ap_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sopgtr( &uplo, &n, ap, tau, q, &ldq, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ ldq_t = MAX(1,n);
+ /* Check leading dimension(s) */
+ if( ldq < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sopgtr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ q_t = (float*)LAPACKE_malloc( sizeof(float) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sopgtr( &uplo, &n, ap_t, tau, q_t, &ldq_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( q_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sopgtr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sopgtr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sopmtr.c b/LAPACKE/src/lapacke_sopmtr.c
new file mode 100644
index 00000000..74fc1416
--- /dev/null
+++ b/LAPACKE/src/lapacke_sopmtr.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sopmtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sopmtr( int matrix_layout, char side, char uplo, char trans,
+ lapack_int m, lapack_int n, const float* ap,
+ const float* tau, float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lwork;
+ float* work = NULL;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sopmtr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_ssp_nancheck( r, ap ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -9;
+ }
+ if( LAPACKE_s_nancheck( m-1, tau, 1 ) ) {
+ return -8;
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( side, 'l' ) ) {
+ lwork = MAX(1,n);
+ } else if( LAPACKE_lsame( side, 'r' ) ) {
+ lwork = MAX(1,m);
+ } else {
+ lwork = 1; /* Any value */
+ }
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sopmtr_work( matrix_layout, side, uplo, trans, m, n, ap, tau,
+ c, ldc, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sopmtr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sopmtr_work.c b/LAPACKE/src/lapacke_sopmtr_work.c
new file mode 100644
index 00000000..8f84ef2b
--- /dev/null
+++ b/LAPACKE/src/lapacke_sopmtr_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sopmtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sopmtr_work( int matrix_layout, char side, char uplo,
+ char trans, lapack_int m, lapack_int n,
+ const float* ap, const float* tau, float* c,
+ lapack_int ldc, float* work )
+{
+ lapack_int info = 0;
+ lapack_int r;
+ lapack_int ldc_t;
+ float *ap_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sopmtr( &side, &uplo, &trans, &m, &n, ap, tau, c, &ldc, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( ldc < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sopmtr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ c_t = (float*)LAPACKE_malloc( sizeof(float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,r) * MAX(2,r+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ LAPACKE_ssp_trans( matrix_layout, uplo, r, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sopmtr( &side, &uplo, &trans, &m, &n, ap_t, tau, c_t, &ldc_t,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( c_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sopmtr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sopmtr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorbdb.c b/LAPACKE/src/lapacke_sorbdb.c
new file mode 100644
index 00000000..295a49e1
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorbdb.c
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorbdb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorbdb( int matrix_layout, char trans, char signs,
+ lapack_int m, lapack_int p, lapack_int q, float* x11,
+ lapack_int ldx11, float* x12, lapack_int ldx12,
+ float* x21, lapack_int ldx21, float* x22,
+ lapack_int ldx22, float* theta, float* phi,
+ float* taup1, float* taup2, float* tauq1,
+ float* tauq2 )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sorbdb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
+ nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
+ nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
+ nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) {
+ return -9;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
+ return -11;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) {
+ return -13;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sorbdb_work( matrix_layout, trans, signs, m, p, q, x11, ldx11,
+ x12, ldx12, x21, ldx21, x22, ldx22, theta, phi,
+ taup1, taup2, tauq1, tauq2, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sorbdb_work( matrix_layout, trans, signs, m, p, q, x11, ldx11,
+ x12, ldx12, x21, ldx21, x22, ldx22, theta, phi,
+ taup1, taup2, tauq1, tauq2, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sorbdb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorbdb_work.c b/LAPACKE/src/lapacke_sorbdb_work.c
new file mode 100644
index 00000000..eb93d97e
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorbdb_work.c
@@ -0,0 +1,158 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorbdb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorbdb_work( int matrix_layout, char trans, char signs,
+ lapack_int m, lapack_int p, lapack_int q,
+ float* x11, lapack_int ldx11, float* x12,
+ lapack_int ldx12, float* x21, lapack_int ldx21,
+ float* x22, lapack_int ldx22, float* theta,
+ float* phi, float* taup1, float* taup2,
+ float* tauq1, float* tauq2, float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorbdb( &trans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12,
+ x21, &ldx21, x22, &ldx22, theta, phi, taup1, taup2,
+ tauq1, tauq2, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
+ lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
+ lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
+ lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
+ lapack_int ldx11_t = MAX(1,nrows_x11);
+ lapack_int ldx12_t = MAX(1,nrows_x12);
+ lapack_int ldx21_t = MAX(1,nrows_x21);
+ lapack_int ldx22_t = MAX(1,nrows_x22);
+ float* x11_t = NULL;
+ float* x12_t = NULL;
+ float* x21_t = NULL;
+ float* x22_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldx11 < q ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sorbdb_work", info );
+ return info;
+ }
+ if( ldx12 < m-q ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sorbdb_work", info );
+ return info;
+ }
+ if( ldx21 < q ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_sorbdb_work", info );
+ return info;
+ }
+ if( ldx22 < m-q ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_sorbdb_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sorbdb( &trans, &signs, &m, &p, &q, x11, &ldx11_t, x12,
+ &ldx12_t, x21, &ldx21_t, x22, &ldx22_t, theta, phi,
+ taup1, taup2, tauq1, tauq2, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ x11_t = (float*)LAPACKE_malloc( sizeof(float) * ldx11_t * MAX(1,q) );
+ if( x11_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x12_t = (float*)LAPACKE_malloc( sizeof(float) * ldx12_t * MAX(1,m-q) );
+ if( x12_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x21_t = (float*)LAPACKE_malloc( sizeof(float) * ldx21_t * MAX(1,q) );
+ if( x21_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x22_t = (float*)LAPACKE_malloc( sizeof(float) * ldx22_t * MAX(1,m-q) );
+ if( x22_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t,
+ ldx11_t );
+ LAPACKE_sge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t,
+ ldx12_t );
+ LAPACKE_sge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t,
+ ldx21_t );
+ LAPACKE_sge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t,
+ ldx22_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorbdb( &trans, &signs, &m, &p, &q, x11_t, &ldx11_t, x12_t,
+ &ldx12_t, x21_t, &ldx21_t, x22_t, &ldx22_t, theta, phi,
+ taup1, taup2, tauq1, tauq2, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11,
+ ldx11 );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t,
+ x12, ldx12 );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21,
+ ldx21 );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t,
+ x22, ldx22 );
+ /* Release memory and exit */
+ LAPACKE_free( x22_t );
+exit_level_3:
+ LAPACKE_free( x21_t );
+exit_level_2:
+ LAPACKE_free( x12_t );
+exit_level_1:
+ LAPACKE_free( x11_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sorbdb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sorbdb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorcsd.c b/LAPACKE/src/lapacke_sorcsd.c
new file mode 100644
index 00000000..642e4e31
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorcsd.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorcsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorcsd( int matrix_layout, char jobu1, char jobu2,
+ char jobv1t, char jobv2t, char trans, char signs,
+ lapack_int m, lapack_int p, lapack_int q, float* x11,
+ lapack_int ldx11, float* x12, lapack_int ldx12,
+ float* x21, lapack_int ldx21, float* x22,
+ lapack_int ldx22, float* theta, float* u1,
+ lapack_int ldu1, float* u2, lapack_int ldu2,
+ float* v1t, lapack_int ldv1t, float* v2t,
+ lapack_int ldv2t )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ float work_query;
+ lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sorcsd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
+ nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
+ nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
+ nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
+ return -11;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) {
+ return -13;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
+ return -15;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) {
+ return -17;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m-MIN(MIN(p,m-p),MIN(q,m-q))) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sorcsd_work( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
+ trans, signs, m, p, q, x11, ldx11, x12, ldx12,
+ x21, ldx21, x22, ldx22, theta, u1, ldu1, u2,
+ ldu2, v1t, ldv1t, v2t, ldv2t, &work_query,
+ lwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_sorcsd_work( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
+ trans, signs, m, p, q, x11, ldx11, x12, ldx12,
+ x21, ldx21, x22, ldx22, theta, u1, ldu1, u2,
+ ldu2, v1t, ldv1t, v2t, ldv2t, work, lwork,
+ iwork );
+ /* 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_sorcsd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorcsd_work.c b/LAPACKE/src/lapacke_sorcsd_work.c
new file mode 100644
index 00000000..9615e8ea
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorcsd_work.c
@@ -0,0 +1,261 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorcsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorcsd_work( int matrix_layout, char jobu1, char jobu2,
+ char jobv1t, char jobv2t, char trans,
+ char signs, lapack_int m, lapack_int p,
+ lapack_int q, float* x11, lapack_int ldx11,
+ float* x12, lapack_int ldx12, float* x21,
+ lapack_int ldx21, float* x22, lapack_int ldx22,
+ float* theta, float* u1, lapack_int ldu1,
+ float* u2, lapack_int ldu2, float* v1t,
+ lapack_int ldv1t, float* v2t, lapack_int ldv2t,
+ float* work, lapack_int lwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p,
+ &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, &ldx22,
+ theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, &ldv2t,
+ work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
+ lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
+ lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
+ lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
+ lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
+ lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
+ lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
+ lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
+ lapack_int ldu1_t = MAX(1,nrows_u1);
+ lapack_int ldu2_t = MAX(1,nrows_u2);
+ lapack_int ldv1t_t = MAX(1,nrows_v1t);
+ lapack_int ldv2t_t = MAX(1,nrows_v2t);
+ lapack_int ldx11_t = MAX(1,nrows_x11);
+ lapack_int ldx12_t = MAX(1,nrows_x12);
+ lapack_int ldx21_t = MAX(1,nrows_x21);
+ lapack_int ldx22_t = MAX(1,nrows_x22);
+ float* x11_t = NULL;
+ float* x12_t = NULL;
+ float* x21_t = NULL;
+ float* x22_t = NULL;
+ float* u1_t = NULL;
+ float* u2_t = NULL;
+ float* v1t_t = NULL;
+ float* v2t_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldu1 < p ) {
+ info = -21;
+ LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
+ return info;
+ }
+ if( ldu2 < m-p ) {
+ info = -23;
+ LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
+ return info;
+ }
+ if( ldv1t < q ) {
+ info = -25;
+ LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
+ return info;
+ }
+ if( ldv2t < m-q ) {
+ info = -27;
+ LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
+ return info;
+ }
+ if( ldx11 < q ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
+ return info;
+ }
+ if( ldx12 < m-q ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
+ return info;
+ }
+ if( ldx21 < q ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
+ return info;
+ }
+ if( ldx22 < m-q ) {
+ info = -18;
+ LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m,
+ &p, &q, x11, &ldx11_t, x12, &ldx12_t, x21, &ldx21_t,
+ x22, &ldx22_t, theta, u1, &ldu1_t, u2, &ldu2_t, v1t,
+ &ldv1t_t, v2t, &ldv2t_t, work, &lwork, iwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ x11_t = (float*)LAPACKE_malloc( sizeof(float) * ldx11_t * MAX(1,q) );
+ if( x11_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x12_t = (float*)LAPACKE_malloc( sizeof(float) * ldx12_t * MAX(1,m-q) );
+ if( x12_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x21_t = (float*)LAPACKE_malloc( sizeof(float) * ldx21_t * MAX(1,q) );
+ if( x21_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x22_t = (float*)LAPACKE_malloc( sizeof(float) * ldx22_t * MAX(1,m-q) );
+ if( x22_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ u1_t = (float*)LAPACKE_malloc( sizeof(float) * ldu1_t * MAX(1,p) );
+ if( u1_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ u2_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldu2_t * MAX(1,m-p) );
+ if( u2_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ v1t_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldv1t_t * MAX(1,q) );
+ if( v1t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_6;
+ }
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ v2t_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldv2t_t * MAX(1,m-q) );
+ if( v2t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_7;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t,
+ ldx11_t );
+ LAPACKE_sge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t,
+ ldx12_t );
+ LAPACKE_sge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t,
+ ldx21_t );
+ LAPACKE_sge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t,
+ ldx22_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p,
+ &q, x11_t, &ldx11_t, x12_t, &ldx12_t, x21_t, &ldx21_t,
+ x22_t, &ldx22_t, theta, u1_t, &ldu1_t, u2_t, &ldu2_t,
+ v1t_t, &ldv1t_t, v2t_t, &ldv2t_t, work, &lwork, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11,
+ ldx11 );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t,
+ x12, ldx12 );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21,
+ ldx21 );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t,
+ x22, ldx22 );
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1,
+ ldu1 );
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t,
+ u2, ldu2 );
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t,
+ v1t, ldv1t );
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t,
+ v2t, ldv2t );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_free( v2t_t );
+ }
+exit_level_7:
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_free( v1t_t );
+ }
+exit_level_6:
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_free( u2_t );
+ }
+exit_level_5:
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_free( u1_t );
+ }
+exit_level_4:
+ LAPACKE_free( x22_t );
+exit_level_3:
+ LAPACKE_free( x21_t );
+exit_level_2:
+ LAPACKE_free( x12_t );
+exit_level_1:
+ LAPACKE_free( x11_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorgbr.c b/LAPACKE/src/lapacke_sorgbr.c
new file mode 100644
index 00000000..99e39675
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorgbr.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorgbr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorgbr( int matrix_layout, char vect, lapack_int m,
+ lapack_int n, lapack_int k, float* a, lapack_int lda,
+ const float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sorgbr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_s_nancheck( MIN(m,k), tau, 1 ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sorgbr_work( matrix_layout, vect, m, n, k, a, lda, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sorgbr_work( matrix_layout, vect, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sorgbr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorgbr_work.c b/LAPACKE/src/lapacke_sorgbr_work.c
new file mode 100644
index 00000000..65d82897
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorgbr_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorgbr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorgbr_work( int matrix_layout, char vect, lapack_int m,
+ lapack_int n, lapack_int k, float* a,
+ lapack_int lda, const float* tau, float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorgbr( &vect, &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sorgbr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sorgbr( &vect, &m, &n, &k, a, &lda_t, tau, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorgbr( &vect, &m, &n, &k, a_t, &lda_t, tau, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sorgbr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sorgbr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorghr.c b/LAPACKE/src/lapacke_sorghr.c
new file mode 100644
index 00000000..5e7481b8
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorghr.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorghr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorghr( int matrix_layout, lapack_int n, lapack_int ilo,
+ lapack_int ihi, float* a, lapack_int lda,
+ const float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sorghr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( n-1, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sorghr_work( matrix_layout, n, ilo, ihi, a, lda, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sorghr_work( matrix_layout, n, ilo, ihi, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sorghr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorghr_work.c b/LAPACKE/src/lapacke_sorghr_work.c
new file mode 100644
index 00000000..52ef963f
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorghr_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorghr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorghr_work( int matrix_layout, lapack_int n, lapack_int ilo,
+ lapack_int ihi, float* a, lapack_int lda,
+ const float* tau, float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorghr( &n, &ilo, &ihi, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sorghr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sorghr( &n, &ilo, &ihi, a, &lda_t, tau, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorghr( &n, &ilo, &ihi, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sorghr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sorghr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorglq.c b/LAPACKE/src/lapacke_sorglq.c
new file mode 100644
index 00000000..4e905caa
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorglq.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorglq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorglq( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, float* a, lapack_int lda,
+ const float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sorglq", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sorglq_work( matrix_layout, m, n, k, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sorglq_work( matrix_layout, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sorglq", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorglq_work.c b/LAPACKE/src/lapacke_sorglq_work.c
new file mode 100644
index 00000000..d9907ef0
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorglq_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorglq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorglq_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, float* a, lapack_int lda,
+ const float* tau, float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorglq( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sorglq_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sorglq( &m, &n, &k, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorglq( &m, &n, &k, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sorglq_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sorglq_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorgql.c b/LAPACKE/src/lapacke_sorgql.c
new file mode 100644
index 00000000..a14b4ffe
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorgql.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorgql
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorgql( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, float* a, lapack_int lda,
+ const float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sorgql", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sorgql_work( matrix_layout, m, n, k, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sorgql_work( matrix_layout, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sorgql", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorgql_work.c b/LAPACKE/src/lapacke_sorgql_work.c
new file mode 100644
index 00000000..86daa4d9
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorgql_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorgql
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorgql_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, float* a, lapack_int lda,
+ const float* tau, float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorgql( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sorgql_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sorgql( &m, &n, &k, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorgql( &m, &n, &k, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sorgql_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sorgql_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorgqr.c b/LAPACKE/src/lapacke_sorgqr.c
new file mode 100644
index 00000000..2cdc3459
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorgqr.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorgqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorgqr( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, float* a, lapack_int lda,
+ const float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sorgqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sorgqr_work( matrix_layout, m, n, k, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sorgqr_work( matrix_layout, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sorgqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorgqr_work.c b/LAPACKE/src/lapacke_sorgqr_work.c
new file mode 100644
index 00000000..d625a173
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorgqr_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorgqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorgqr_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, float* a, lapack_int lda,
+ const float* tau, float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorgqr( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sorgqr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sorgqr( &m, &n, &k, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorgqr( &m, &n, &k, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sorgqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sorgqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorgrq.c b/LAPACKE/src/lapacke_sorgrq.c
new file mode 100644
index 00000000..cb6d5253
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorgrq.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorgrq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorgrq( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, float* a, lapack_int lda,
+ const float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sorgrq", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sorgrq_work( matrix_layout, m, n, k, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sorgrq_work( matrix_layout, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sorgrq", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorgrq_work.c b/LAPACKE/src/lapacke_sorgrq_work.c
new file mode 100644
index 00000000..1720c3c4
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorgrq_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorgrq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorgrq_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, float* a, lapack_int lda,
+ const float* tau, float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorgrq( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sorgrq_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sorgrq( &m, &n, &k, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorgrq( &m, &n, &k, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sorgrq_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sorgrq_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorgtr.c b/LAPACKE/src/lapacke_sorgtr.c
new file mode 100644
index 00000000..220f0a25
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorgtr.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorgtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorgtr( int matrix_layout, char uplo, lapack_int n, float* a,
+ lapack_int lda, const float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sorgtr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n-1, tau, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sorgtr_work( matrix_layout, uplo, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sorgtr_work( matrix_layout, uplo, n, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sorgtr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sorgtr_work.c b/LAPACKE/src/lapacke_sorgtr_work.c
new file mode 100644
index 00000000..20188a33
--- /dev/null
+++ b/LAPACKE/src/lapacke_sorgtr_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sorgtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sorgtr_work( int matrix_layout, char uplo, lapack_int n,
+ float* a, lapack_int lda, const float* tau,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorgtr( &uplo, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_sorgtr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sorgtr( &uplo, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sorgtr( &uplo, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sorgtr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sorgtr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sormbr.c b/LAPACKE/src/lapacke_sormbr.c
new file mode 100644
index 00000000..e4424eb2
--- /dev/null
+++ b/LAPACKE/src/lapacke_sormbr.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sormbr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sormbr( int matrix_layout, char vect, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const float* a, lapack_int lda, const float* tau,
+ float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ lapack_int nq, r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sormbr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nq = LAPACKE_lsame( side, 'l' ) ? m : n;
+ r = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k);
+ if( LAPACKE_sge_nancheck( matrix_layout, r, MIN(nq,k), a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -11;
+ }
+ if( LAPACKE_s_nancheck( MIN(nq,k), tau, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sormbr_work( matrix_layout, vect, side, trans, m, n, k, a,
+ lda, tau, c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sormbr_work( matrix_layout, vect, side, trans, m, n, k, a,
+ lda, tau, c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sormbr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sormbr_work.c b/LAPACKE/src/lapacke_sormbr_work.c
new file mode 100644
index 00000000..425f26f1
--- /dev/null
+++ b/LAPACKE/src/lapacke_sormbr_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sormbr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sormbr_work( int matrix_layout, char vect, char side,
+ char trans, lapack_int m, lapack_int n,
+ lapack_int k, const float* a, lapack_int lda,
+ const float* tau, float* c, lapack_int ldc,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ lapack_int nq, r;
+ lapack_int lda_t, ldc_t;
+ float *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sormbr( &vect, &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ nq = LAPACKE_lsame( side, 'l' ) ? m : n;
+ r = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k);
+ lda_t = MAX(1,r);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( lda < MIN(nq,k) ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sormbr_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_sormbr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sormbr( &vect, &side, &trans, &m, &n, &k, a, &lda_t, tau, c,
+ &ldc_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)
+ LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,MIN(nq,k)) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (float*)LAPACKE_malloc( sizeof(float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, r, MIN(nq,k), a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sormbr( &vect, &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t,
+ &ldc_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sormbr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sormbr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sormhr.c b/LAPACKE/src/lapacke_sormhr.c
new file mode 100644
index 00000000..882ecdfe
--- /dev/null
+++ b/LAPACKE/src/lapacke_sormhr.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sormhr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sormhr( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int ilo,
+ lapack_int ihi, const float* a, lapack_int lda,
+ const float* tau, float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sormhr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_sge_nancheck( matrix_layout, r, r, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -11;
+ }
+ if( LAPACKE_s_nancheck( m-1, tau, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sormhr_work( matrix_layout, side, trans, m, n, ilo, ihi, a,
+ lda, tau, c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sormhr_work( matrix_layout, side, trans, m, n, ilo, ihi, a,
+ lda, tau, c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sormhr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sormhr_work.c b/LAPACKE/src/lapacke_sormhr_work.c
new file mode 100644
index 00000000..be8b451e
--- /dev/null
+++ b/LAPACKE/src/lapacke_sormhr_work.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sormhr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sormhr_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int ilo,
+ lapack_int ihi, const float* a, lapack_int lda,
+ const float* tau, float* c, lapack_int ldc,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ lapack_int r;
+ lapack_int lda_t, ldc_t;
+ float *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sormhr( &side, &trans, &m, &n, &ilo, &ihi, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lda_t = MAX(1,r);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( lda < r ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sormhr_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_sormhr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sormhr( &side, &trans, &m, &n, &ilo, &ihi, a, &lda_t, tau, c,
+ &ldc_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,r) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (float*)LAPACKE_malloc( sizeof(float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, r, r, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sormhr( &side, &trans, &m, &n, &ilo, &ihi, a_t, &lda_t, tau, c_t,
+ &ldc_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sormhr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sormhr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sormlq.c b/LAPACKE/src/lapacke_sormlq.c
new file mode 100644
index 00000000..80641494
--- /dev/null
+++ b/LAPACKE/src/lapacke_sormlq.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sormlq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sormlq( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const float* a, lapack_int lda, const float* tau,
+ float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sormlq", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sormlq_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sormlq_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sormlq", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sormlq_work.c b/LAPACKE/src/lapacke_sormlq_work.c
new file mode 100644
index 00000000..9934f020
--- /dev/null
+++ b/LAPACKE/src/lapacke_sormlq_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sormlq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sormlq_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const float* a, lapack_int lda,
+ const float* tau, float* c, lapack_int ldc,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ lapack_int lda_t, ldc_t;
+ float *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sormlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lda_t = MAX(1,k);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sormlq_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sormlq_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sormlq( &side, &trans, &m, &n, &k, a, &lda_t, tau, c, &ldc_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (float*)LAPACKE_malloc( sizeof(float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sormlq( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sormlq_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sormlq_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sormql.c b/LAPACKE/src/lapacke_sormql.c
new file mode 100644
index 00000000..31874560
--- /dev/null
+++ b/LAPACKE/src/lapacke_sormql.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sormql
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sormql( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const float* a, lapack_int lda, const float* tau,
+ float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sormql", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_sge_nancheck( matrix_layout, r, k, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sormql_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sormql_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sormql", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sormql_work.c b/LAPACKE/src/lapacke_sormql_work.c
new file mode 100644
index 00000000..cb07ef00
--- /dev/null
+++ b/LAPACKE/src/lapacke_sormql_work.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sormql
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sormql_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const float* a, lapack_int lda,
+ const float* tau, float* c, lapack_int ldc,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ lapack_int r;
+ lapack_int lda_t, ldc_t;
+ float *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sormql( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lda_t = MAX(1,r);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( lda < k ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sormql_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sormql_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sormql( &side, &trans, &m, &n, &k, a, &lda_t, tau, c, &ldc_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,k) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (float*)LAPACKE_malloc( sizeof(float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, r, k, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sormql( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sormql_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sormql_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sormqr.c b/LAPACKE/src/lapacke_sormqr.c
new file mode 100644
index 00000000..3d8fcb88
--- /dev/null
+++ b/LAPACKE/src/lapacke_sormqr.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sormqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sormqr( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const float* a, lapack_int lda, const float* tau,
+ float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sormqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_sge_nancheck( matrix_layout, r, k, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sormqr_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sormqr_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sormqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sormqr_work.c b/LAPACKE/src/lapacke_sormqr_work.c
new file mode 100644
index 00000000..753333bb
--- /dev/null
+++ b/LAPACKE/src/lapacke_sormqr_work.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sormqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sormqr_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const float* a, lapack_int lda,
+ const float* tau, float* c, lapack_int ldc,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ lapack_int r;
+ lapack_int lda_t, ldc_t;
+ float *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sormqr( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lda_t = MAX(1,r);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( lda < k ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sormqr_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sormqr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sormqr( &side, &trans, &m, &n, &k, a, &lda_t, tau, c, &ldc_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,k) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (float*)LAPACKE_malloc( sizeof(float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, r, k, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sormqr( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sormqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sormqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sormrq.c b/LAPACKE/src/lapacke_sormrq.c
new file mode 100644
index 00000000..997a7e4c
--- /dev/null
+++ b/LAPACKE/src/lapacke_sormrq.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sormrq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sormrq( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const float* a, lapack_int lda, const float* tau,
+ float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sormrq", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sormrq_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sormrq_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sormrq", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sormrq_work.c b/LAPACKE/src/lapacke_sormrq_work.c
new file mode 100644
index 00000000..8f5c140f
--- /dev/null
+++ b/LAPACKE/src/lapacke_sormrq_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sormrq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sormrq_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const float* a, lapack_int lda,
+ const float* tau, float* c, lapack_int ldc,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ lapack_int lda_t, ldc_t;
+ float *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sormrq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lda_t = MAX(1,k);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sormrq_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sormrq_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sormrq( &side, &trans, &m, &n, &k, a, &lda_t, tau, c, &ldc_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (float*)LAPACKE_malloc( sizeof(float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sormrq( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sormrq_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sormrq_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sormrz.c b/LAPACKE/src/lapacke_sormrz.c
new file mode 100644
index 00000000..6ce4b998
--- /dev/null
+++ b/LAPACKE/src/lapacke_sormrz.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sormrz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sormrz( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int l, const float* a, lapack_int lda,
+ const float* tau, float* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sormrz", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -11;
+ }
+ if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sormrz_work( matrix_layout, side, trans, m, n, k, l, a, lda,
+ tau, c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sormrz_work( matrix_layout, side, trans, m, n, k, l, a, lda,
+ tau, c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sormrz", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sormrz_work.c b/LAPACKE/src/lapacke_sormrz_work.c
new file mode 100644
index 00000000..97da0647
--- /dev/null
+++ b/LAPACKE/src/lapacke_sormrz_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sormrz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sormrz_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int l, const float* a, lapack_int lda,
+ const float* tau, float* c, lapack_int ldc,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ lapack_int lda_t, ldc_t;
+ float *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sormrz( &side, &trans, &m, &n, &k, &l, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lda_t = MAX(1,k);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sormrz_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_sormrz_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sormrz( &side, &trans, &m, &n, &k, &l, a, &lda_t, tau, c,
+ &ldc_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (float*)LAPACKE_malloc( sizeof(float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sormrz( &side, &trans, &m, &n, &k, &l, a_t, &lda_t, tau, c_t,
+ &ldc_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sormrz_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sormrz_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sormtr.c b/LAPACKE/src/lapacke_sormtr.c
new file mode 100644
index 00000000..2d8956f3
--- /dev/null
+++ b/LAPACKE/src/lapacke_sormtr.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sormtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sormtr( int matrix_layout, char side, char uplo, char trans,
+ lapack_int m, lapack_int n, const float* a,
+ lapack_int lda, const float* tau, float* c,
+ lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sormtr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_sge_nancheck( matrix_layout, r, r, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_s_nancheck( m-1, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sormtr_work( matrix_layout, side, uplo, trans, m, n, a, lda,
+ tau, c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sormtr_work( matrix_layout, side, uplo, trans, m, n, a, lda,
+ tau, c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sormtr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sormtr_work.c b/LAPACKE/src/lapacke_sormtr_work.c
new file mode 100644
index 00000000..fd3003bb
--- /dev/null
+++ b/LAPACKE/src/lapacke_sormtr_work.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sormtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sormtr_work( int matrix_layout, char side, char uplo,
+ char trans, lapack_int m, lapack_int n,
+ const float* a, lapack_int lda,
+ const float* tau, float* c, lapack_int ldc,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ lapack_int r, lda_t, ldc_t;
+ float *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sormtr( &side, &uplo, &trans, &m, &n, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lda_t = MAX(1,r);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+ if( lda < r ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sormtr_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sormtr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_sormtr( &side, &uplo, &trans, &m, &n, a, &lda_t, tau, c,
+ &ldc_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,r) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (float*)LAPACKE_malloc( sizeof(float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, r, r, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sormtr( &side, &uplo, &trans, &m, &n, a_t, &lda_t, tau, c_t,
+ &ldc_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sormtr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sormtr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spbcon.c b/LAPACKE/src/lapacke_spbcon.c
new file mode 100644
index 00000000..064239fe
--- /dev/null
+++ b/LAPACKE/src/lapacke_spbcon.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spbcon( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, const float* ab, lapack_int ldab,
+ float anorm, float* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spbcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_spbcon_work( matrix_layout, uplo, n, kd, ab, ldab, anorm,
+ rcond, work, iwork );
+ /* 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_spbcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spbcon_work.c b/LAPACKE/src/lapacke_spbcon_work.c
new file mode 100644
index 00000000..aa26bd24
--- /dev/null
+++ b/LAPACKE/src/lapacke_spbcon_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spbcon_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, const float* ab, lapack_int ldab,
+ float anorm, float* rcond, float* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spbcon( &uplo, &n, &kd, ab, &ldab, &anorm, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ float* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_spbcon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spbcon( &uplo, &n, &kd, ab_t, &ldab_t, &anorm, rcond, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spbcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spbcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spbequ.c b/LAPACKE/src/lapacke_spbequ.c
new file mode 100644
index 00000000..90aa72ad
--- /dev/null
+++ b/LAPACKE/src/lapacke_spbequ.c
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spbequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spbequ( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, const float* ab, lapack_int ldab,
+ float* s, float* scond, float* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spbequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_spbequ_work( matrix_layout, uplo, n, kd, ab, ldab, s, scond,
+ amax );
+}
diff --git a/LAPACKE/src/lapacke_spbequ_work.c b/LAPACKE/src/lapacke_spbequ_work.c
new file mode 100644
index 00000000..02e2494a
--- /dev/null
+++ b/LAPACKE/src/lapacke_spbequ_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spbequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spbequ_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, const float* ab, lapack_int ldab,
+ float* s, float* scond, float* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spbequ( &uplo, &n, &kd, ab, &ldab, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ float* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_spbequ_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spbequ( &uplo, &n, &kd, ab_t, &ldab_t, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spbequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spbequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spbrfs.c b/LAPACKE/src/lapacke_spbrfs.c
new file mode 100644
index 00000000..9800a8fd
--- /dev/null
+++ b/LAPACKE/src/lapacke_spbrfs.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spbrfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs, const float* ab,
+ lapack_int ldab, const float* afb, lapack_int ldafb,
+ const float* b, lapack_int ldb, float* x,
+ lapack_int ldx, float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spbrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
+ return -8;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_spbrfs_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, afb,
+ ldafb, b, ldb, x, ldx, ferr, berr, work,
+ iwork );
+ /* 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_spbrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spbrfs_work.c b/LAPACKE/src/lapacke_spbrfs_work.c
new file mode 100644
index 00000000..e52ff60e
--- /dev/null
+++ b/LAPACKE/src/lapacke_spbrfs_work.c
@@ -0,0 +1,135 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spbrfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs, const float* ab,
+ lapack_int ldab, const float* afb,
+ lapack_int ldafb, const float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* ferr, float* berr, float* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spbrfs( &uplo, &n, &kd, &nrhs, ab, &ldab, afb, &ldafb, b, &ldb,
+ x, &ldx, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldafb_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* afb_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_spbrfs_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_spbrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_spbrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_spbrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (float*)LAPACKE_malloc( sizeof(float) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ LAPACKE_spb_trans( matrix_layout, uplo, n, kd, afb, ldafb, afb_t,
+ ldafb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spbrfs( &uplo, &n, &kd, &nrhs, ab_t, &ldab_t, afb_t, &ldafb_t,
+ b_t, &ldb_t, x_t, &ldx_t, ferr, berr, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spbrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spbrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spbstf.c b/LAPACKE/src/lapacke_spbstf.c
new file mode 100644
index 00000000..719a25e3
--- /dev/null
+++ b/LAPACKE/src/lapacke_spbstf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spbstf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spbstf( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kb, float* bb, lapack_int ldbb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spbstf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_spbstf_work( matrix_layout, uplo, n, kb, bb, ldbb );
+}
diff --git a/LAPACKE/src/lapacke_spbstf_work.c b/LAPACKE/src/lapacke_spbstf_work.c
new file mode 100644
index 00000000..011a643b
--- /dev/null
+++ b/LAPACKE/src/lapacke_spbstf_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spbstf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spbstf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kb, float* bb, lapack_int ldbb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spbstf( &uplo, &n, &kb, bb, &ldbb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldbb_t = MAX(1,kb+1);
+ float* bb_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldbb < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_spbstf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ bb_t = (float*)LAPACKE_malloc( sizeof(float) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spbstf( &uplo, &n, &kb, bb_t, &ldbb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_spb_trans( LAPACK_COL_MAJOR, uplo, n, kb, bb_t, ldbb_t, bb,
+ ldbb );
+ /* Release memory and exit */
+ LAPACKE_free( bb_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spbstf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spbstf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spbsv.c b/LAPACKE/src/lapacke_spbsv.c
new file mode 100644
index 00000000..dba98da0
--- /dev/null
+++ b/LAPACKE/src/lapacke_spbsv.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spbsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spbsv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs, float* ab,
+ lapack_int ldab, float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spbsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_spbsv_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_spbsv_work.c b/LAPACKE/src/lapacke_spbsv_work.c
new file mode 100644
index 00000000..557be7ea
--- /dev/null
+++ b/LAPACKE/src/lapacke_spbsv_work.c
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spbsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spbsv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs, float* ab,
+ lapack_int ldab, float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spbsv( &uplo, &n, &kd, &nrhs, ab, &ldab, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_spbsv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_spbsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spbsv( &uplo, &n, &kd, &nrhs, ab_t, &ldab_t, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_spb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spbsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spbsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spbsvx.c b/LAPACKE/src/lapacke_spbsvx.c
new file mode 100644
index 00000000..59f32c08
--- /dev/null
+++ b/LAPACKE/src/lapacke_spbsvx.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spbsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spbsvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs, float* ab,
+ lapack_int ldab, float* afb, lapack_int ldafb,
+ char* equed, float* s, float* b, lapack_int ldb,
+ float* x, lapack_int ldx, float* rcond, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spbsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
+ return -9;
+ }
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_spbsvx_work( matrix_layout, fact, uplo, n, kd, nrhs, ab, ldab,
+ afb, ldafb, equed, s, b, ldb, x, ldx, rcond,
+ ferr, berr, work, iwork );
+ /* 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_spbsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spbsvx_work.c b/LAPACKE/src/lapacke_spbsvx_work.c
new file mode 100644
index 00000000..5b866db8
--- /dev/null
+++ b/LAPACKE/src/lapacke_spbsvx_work.c
@@ -0,0 +1,146 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spbsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spbsvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int kd, lapack_int nrhs,
+ float* ab, lapack_int ldab, float* afb,
+ lapack_int ldafb, char* equed, float* s,
+ float* b, lapack_int ldb, float* x,
+ lapack_int ldx, float* rcond, float* ferr,
+ float* berr, float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spbsvx( &fact, &uplo, &n, &kd, &nrhs, ab, &ldab, afb, &ldafb,
+ equed, s, b, &ldb, x, &ldx, rcond, ferr, berr, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldafb_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* afb_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_spbsvx_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_spbsvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_spbsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_spbsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (float*)LAPACKE_malloc( sizeof(float) * ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_spb_trans( matrix_layout, uplo, n, kd, afb, ldafb, afb_t,
+ ldafb_t );
+ }
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spbsvx( &fact, &uplo, &n, &kd, &nrhs, ab_t, &ldab_t, afb_t,
+ &ldafb_t, equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond,
+ ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_spb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_spb_trans( LAPACK_COL_MAJOR, uplo, n, kd, afb_t, ldafb_t,
+ afb, ldafb );
+ }
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spbsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spbsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spbtrf.c b/LAPACKE/src/lapacke_spbtrf.c
new file mode 100644
index 00000000..38eb5b5b
--- /dev/null
+++ b/LAPACKE/src/lapacke_spbtrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spbtrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spbtrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, float* ab, lapack_int ldab )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spbtrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_spbtrf_work( matrix_layout, uplo, n, kd, ab, ldab );
+}
diff --git a/LAPACKE/src/lapacke_spbtrf_work.c b/LAPACKE/src/lapacke_spbtrf_work.c
new file mode 100644
index 00000000..32508142
--- /dev/null
+++ b/LAPACKE/src/lapacke_spbtrf_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spbtrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spbtrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, float* ab, lapack_int ldab )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spbtrf( &uplo, &n, &kd, ab, &ldab, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ float* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_spbtrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spbtrf( &uplo, &n, &kd, ab_t, &ldab_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_spb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spbtrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spbtrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spbtrs.c b/LAPACKE/src/lapacke_spbtrs.c
new file mode 100644
index 00000000..0e25b11a
--- /dev/null
+++ b/LAPACKE/src/lapacke_spbtrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spbtrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs, const float* ab,
+ lapack_int ldab, float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spbtrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_spbtrs_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_spbtrs_work.c b/LAPACKE/src/lapacke_spbtrs_work.c
new file mode 100644
index 00000000..f86ec3d3
--- /dev/null
+++ b/LAPACKE/src/lapacke_spbtrs_work.c
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spbtrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs, const float* ab,
+ lapack_int ldab, float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spbtrs( &uplo, &n, &kd, &nrhs, ab, &ldab, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_spbtrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_spbtrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spbtrs( &uplo, &n, &kd, &nrhs, ab_t, &ldab_t, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spbtrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spbtrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spftrf.c b/LAPACKE/src/lapacke_spftrf.c
new file mode 100644
index 00000000..5ec32274
--- /dev/null
+++ b/LAPACKE/src/lapacke_spftrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spftrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spftrf( int matrix_layout, char transr, char uplo,
+ lapack_int n, float* a )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spftrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spf_nancheck( n, a ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_spftrf_work( matrix_layout, transr, uplo, n, a );
+}
diff --git a/LAPACKE/src/lapacke_spftrf_work.c b/LAPACKE/src/lapacke_spftrf_work.c
new file mode 100644
index 00000000..e3179f3c
--- /dev/null
+++ b/LAPACKE/src/lapacke_spftrf_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spftrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spftrf_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, float* a )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spftrf( &transr, &uplo, &n, a, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ float* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spf_trans( matrix_layout, transr, uplo, n, a, a_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spftrf( &transr, &uplo, &n, a_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_spf_trans( LAPACK_COL_MAJOR, transr, uplo, n, a_t, a );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spftrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spftrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spftri.c b/LAPACKE/src/lapacke_spftri.c
new file mode 100644
index 00000000..071a3f18
--- /dev/null
+++ b/LAPACKE/src/lapacke_spftri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spftri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spftri( int matrix_layout, char transr, char uplo,
+ lapack_int n, float* a )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spftri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spf_nancheck( n, a ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_spftri_work( matrix_layout, transr, uplo, n, a );
+}
diff --git a/LAPACKE/src/lapacke_spftri_work.c b/LAPACKE/src/lapacke_spftri_work.c
new file mode 100644
index 00000000..6f5daa49
--- /dev/null
+++ b/LAPACKE/src/lapacke_spftri_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spftri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spftri_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, float* a )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spftri( &transr, &uplo, &n, a, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ float* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spf_trans( matrix_layout, transr, uplo, n, a, a_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spftri( &transr, &uplo, &n, a_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_spf_trans( LAPACK_COL_MAJOR, transr, uplo, n, a_t, a );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spftri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spftri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spftrs.c b/LAPACKE/src/lapacke_spftrs.c
new file mode 100644
index 00000000..8ba991d7
--- /dev/null
+++ b/LAPACKE/src/lapacke_spftrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spftrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spftrs( int matrix_layout, char transr, char uplo,
+ lapack_int n, lapack_int nrhs, const float* a,
+ float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spftrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spf_nancheck( n, a ) ) {
+ return -6;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_spftrs_work( matrix_layout, transr, uplo, n, nrhs, a, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_spftrs_work.c b/LAPACKE/src/lapacke_spftrs_work.c
new file mode 100644
index 00000000..8a6a91cb
--- /dev/null
+++ b/LAPACKE/src/lapacke_spftrs_work.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spftrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spftrs_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, lapack_int nrhs, const float* a,
+ float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spftrs( &transr, &uplo, &n, &nrhs, a, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ float* b_t = NULL;
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_spftrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ a_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_spf_trans( matrix_layout, transr, uplo, n, a, a_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spftrs( &transr, &uplo, &n, &nrhs, a_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spftrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spftrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spocon.c b/LAPACKE/src/lapacke_spocon.c
new file mode 100644
index 00000000..13c0b778
--- /dev/null
+++ b/LAPACKE/src/lapacke_spocon.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spocon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spocon( int matrix_layout, char uplo, lapack_int n,
+ const float* a, lapack_int lda, float anorm,
+ float* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spocon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_spocon_work( matrix_layout, uplo, n, a, lda, anorm, rcond,
+ work, iwork );
+ /* 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_spocon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spocon_work.c b/LAPACKE/src/lapacke_spocon_work.c
new file mode 100644
index 00000000..01a6aa31
--- /dev/null
+++ b/LAPACKE/src/lapacke_spocon_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spocon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spocon_work( int matrix_layout, char uplo, lapack_int n,
+ const float* a, lapack_int lda, float anorm,
+ float* rcond, float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spocon( &uplo, &n, a, &lda, &anorm, rcond, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_spocon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spocon( &uplo, &n, a_t, &lda_t, &anorm, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spocon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spocon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spoequ.c b/LAPACKE/src/lapacke_spoequ.c
new file mode 100644
index 00000000..54a01f6c
--- /dev/null
+++ b/LAPACKE/src/lapacke_spoequ.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spoequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spoequ( int matrix_layout, lapack_int n, const float* a,
+ lapack_int lda, float* s, float* scond, float* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spoequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_spoequ_work( matrix_layout, n, a, lda, s, scond, amax );
+}
diff --git a/LAPACKE/src/lapacke_spoequ_work.c b/LAPACKE/src/lapacke_spoequ_work.c
new file mode 100644
index 00000000..a448699a
--- /dev/null
+++ b/LAPACKE/src/lapacke_spoequ_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spoequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spoequ_work( int matrix_layout, lapack_int n, const float* a,
+ lapack_int lda, float* s, float* scond,
+ float* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spoequ( &n, a, &lda, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -4;
+ LAPACKE_xerbla( "LAPACKE_spoequ_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spoequ( &n, a_t, &lda_t, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spoequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spoequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spoequb.c b/LAPACKE/src/lapacke_spoequb.c
new file mode 100644
index 00000000..9771abcb
--- /dev/null
+++ b/LAPACKE/src/lapacke_spoequb.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spoequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spoequb( int matrix_layout, lapack_int n, const float* a,
+ lapack_int lda, float* s, float* scond,
+ float* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spoequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_spoequb_work( matrix_layout, n, a, lda, s, scond, amax );
+}
diff --git a/LAPACKE/src/lapacke_spoequb_work.c b/LAPACKE/src/lapacke_spoequb_work.c
new file mode 100644
index 00000000..e2b81f45
--- /dev/null
+++ b/LAPACKE/src/lapacke_spoequb_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spoequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spoequb_work( int matrix_layout, lapack_int n, const float* a,
+ lapack_int lda, float* s, float* scond,
+ float* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spoequb( &n, a, &lda, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -4;
+ LAPACKE_xerbla( "LAPACKE_spoequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spoequb( &n, a_t, &lda_t, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spoequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spoequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sporfs.c b/LAPACKE/src/lapacke_sporfs.c
new file mode 100644
index 00000000..ff6da08d
--- /dev/null
+++ b/LAPACKE/src/lapacke_sporfs.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sporfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sporfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* a, lapack_int lda,
+ const float* af, lapack_int ldaf, const float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sporfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -11;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sporfs_work( matrix_layout, uplo, n, nrhs, a, lda, af, ldaf,
+ b, ldb, x, ldx, ferr, berr, work, iwork );
+ /* 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_sporfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sporfs_work.c b/LAPACKE/src/lapacke_sporfs_work.c
new file mode 100644
index 00000000..3d2715d4
--- /dev/null
+++ b/LAPACKE/src/lapacke_sporfs_work.c
@@ -0,0 +1,132 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sporfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sporfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* a, lapack_int lda,
+ const float* af, lapack_int ldaf,
+ const float* b, lapack_int ldb, float* x,
+ lapack_int ldx, float* ferr, float* berr,
+ float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sporfs( &uplo, &n, &nrhs, a, &lda, af, &ldaf, b, &ldb, x, &ldx,
+ ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* a_t = NULL;
+ float* af_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sporfs_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sporfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sporfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_sporfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (float*)LAPACKE_malloc( sizeof(float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_spo_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sporfs( &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sporfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sporfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sporfsx.c b/LAPACKE/src/lapacke_sporfsx.c
new file mode 100644
index 00000000..64bddbec
--- /dev/null
+++ b/LAPACKE/src/lapacke_sporfsx.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sporfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sporfsx( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs, const float* a,
+ lapack_int lda, const float* af, lapack_int ldaf,
+ const float* s, const float* b, lapack_int ldb,
+ float* x, lapack_int ldx, float* rcond, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sporfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -11;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -21;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'y' ) ) {
+ if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -13;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sporfsx_work( matrix_layout, uplo, equed, n, nrhs, a, lda, af,
+ ldaf, s, b, ldb, x, ldx, rcond, berr,
+ n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, iwork );
+ /* 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_sporfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sporfsx_work.c b/LAPACKE/src/lapacke_sporfsx_work.c
new file mode 100644
index 00000000..58452c1c
--- /dev/null
+++ b/LAPACKE/src/lapacke_sporfsx_work.c
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sporfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sporfsx_work( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs, const float* a,
+ lapack_int lda, const float* af,
+ lapack_int ldaf, const float* s,
+ const float* b, lapack_int ldb, float* x,
+ lapack_int ldx, float* rcond, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params, float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sporfsx( &uplo, &equed, &n, &nrhs, a, &lda, af, &ldaf, s, b,
+ &ldb, x, &ldx, rcond, berr, &n_err_bnds, err_bnds_norm,
+ err_bnds_comp, &nparams, params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* a_t = NULL;
+ float* af_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sporfsx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sporfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_sporfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_sporfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (float*)LAPACKE_malloc( sizeof(float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sporfsx( &uplo, &equed, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, s,
+ b_t, &ldb_t, x_t, &ldx_t, rcond, berr, &n_err_bnds,
+ err_bnds_norm_t, err_bnds_comp_t, &nparams, params,
+ work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sporfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sporfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sposv.c b/LAPACKE/src/lapacke_sposv.c
new file mode 100644
index 00000000..e47237ef
--- /dev/null
+++ b/LAPACKE/src/lapacke_sposv.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sposv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sposv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, float* a, lapack_int lda, float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sposv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_sposv_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_sposv_work.c b/LAPACKE/src/lapacke_sposv_work.c
new file mode 100644
index 00000000..2e843a31
--- /dev/null
+++ b/LAPACKE/src/lapacke_sposv_work.c
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sposv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sposv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, float* a, lapack_int lda,
+ float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sposv( &uplo, &n, &nrhs, a, &lda, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_sposv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sposv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sposv( &uplo, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_spo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sposv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sposv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sposvx.c b/LAPACKE/src/lapacke_sposvx.c
new file mode 100644
index 00000000..d6082bfb
--- /dev/null
+++ b/LAPACKE/src/lapacke_sposvx.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sposvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sposvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, float* a, lapack_int lda, float* af,
+ lapack_int ldaf, char* equed, float* s, float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sposvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sposvx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, equed, s, b, ldb, x, ldx, rcond, ferr,
+ berr, work, iwork );
+ /* 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_sposvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sposvx_work.c b/LAPACKE/src/lapacke_sposvx_work.c
new file mode 100644
index 00000000..521c1624
--- /dev/null
+++ b/LAPACKE/src/lapacke_sposvx_work.c
@@ -0,0 +1,143 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sposvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sposvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs, float* a,
+ lapack_int lda, float* af, lapack_int ldaf,
+ char* equed, float* s, float* b, lapack_int ldb,
+ float* x, lapack_int ldx, float* rcond,
+ float* ferr, float* berr, float* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sposvx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, equed, s, b,
+ &ldb, x, &ldx, rcond, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* a_t = NULL;
+ float* af_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sposvx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sposvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_sposvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_sposvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (float*)LAPACKE_malloc( sizeof(float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_spo_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sposvx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr, berr,
+ work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_spo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_spo_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sposvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sposvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sposvxx.c b/LAPACKE/src/lapacke_sposvxx.c
new file mode 100644
index 00000000..201ed1b4
--- /dev/null
+++ b/LAPACKE/src/lapacke_sposvxx.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sposvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sposvxx( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs, float* a,
+ lapack_int lda, float* af, lapack_int ldaf,
+ char* equed, float* s, float* b, lapack_int ldb,
+ float* x, lapack_int ldx, float* rcond,
+ float* rpvgrw, float* berr, lapack_int n_err_bnds,
+ float* err_bnds_norm, float* err_bnds_comp,
+ lapack_int nparams, float* params )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sposvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -23;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sposvxx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, equed, s, b, ldb, x, ldx, rcond, rpvgrw,
+ berr, n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, iwork );
+ /* 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_sposvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sposvxx_work.c b/LAPACKE/src/lapacke_sposvxx_work.c
new file mode 100644
index 00000000..899ec813
--- /dev/null
+++ b/LAPACKE/src/lapacke_sposvxx_work.c
@@ -0,0 +1,170 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sposvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sposvxx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs, float* a,
+ lapack_int lda, float* af, lapack_int ldaf,
+ char* equed, float* s, float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* rcond, float* rpvgrw, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params, float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sposvxx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, equed, s,
+ b, &ldb, x, &ldx, rcond, rpvgrw, berr, &n_err_bnds,
+ err_bnds_norm, err_bnds_comp, &nparams, params, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* a_t = NULL;
+ float* af_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sposvxx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sposvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_sposvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_sposvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (float*)LAPACKE_malloc( sizeof(float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_spo_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sposvxx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond, rpvgrw, berr,
+ &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t, &nparams,
+ params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_spo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_spo_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sposvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sposvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spotrf.c b/LAPACKE/src/lapacke_spotrf.c
new file mode 100644
index 00000000..faa6124b
--- /dev/null
+++ b/LAPACKE/src/lapacke_spotrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spotrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spotrf( int matrix_layout, char uplo, lapack_int n, float* a,
+ lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spotrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_spotrf_work( matrix_layout, uplo, n, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_spotrf_work.c b/LAPACKE/src/lapacke_spotrf_work.c
new file mode 100644
index 00000000..472f088f
--- /dev/null
+++ b/LAPACKE/src/lapacke_spotrf_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spotrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spotrf_work( int matrix_layout, char uplo, lapack_int n,
+ float* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spotrf( &uplo, &n, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_spotrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spotrf( &uplo, &n, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_spo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spotrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spotrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spotri.c b/LAPACKE/src/lapacke_spotri.c
new file mode 100644
index 00000000..b05ae71c
--- /dev/null
+++ b/LAPACKE/src/lapacke_spotri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spotri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spotri( int matrix_layout, char uplo, lapack_int n, float* a,
+ lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spotri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_spotri_work( matrix_layout, uplo, n, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_spotri_work.c b/LAPACKE/src/lapacke_spotri_work.c
new file mode 100644
index 00000000..f923d47f
--- /dev/null
+++ b/LAPACKE/src/lapacke_spotri_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spotri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spotri_work( int matrix_layout, char uplo, lapack_int n,
+ float* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spotri( &uplo, &n, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_spotri_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spotri( &uplo, &n, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_spo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spotri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spotri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spotrs.c b/LAPACKE/src/lapacke_spotrs.c
new file mode 100644
index 00000000..53ef536d
--- /dev/null
+++ b/LAPACKE/src/lapacke_spotrs.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spotrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spotrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* a, lapack_int lda,
+ float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spotrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_spotrs_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_spotrs_work.c b/LAPACKE/src/lapacke_spotrs_work.c
new file mode 100644
index 00000000..657f388c
--- /dev/null
+++ b/LAPACKE/src/lapacke_spotrs_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spotrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spotrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* a, lapack_int lda,
+ float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spotrs( &uplo, &n, &nrhs, a, &lda, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_spotrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_spotrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spotrs( &uplo, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spotrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spotrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sppcon.c b/LAPACKE/src/lapacke_sppcon.c
new file mode 100644
index 00000000..36e79079
--- /dev/null
+++ b/LAPACKE/src/lapacke_sppcon.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sppcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sppcon( int matrix_layout, char uplo, lapack_int n,
+ const float* ap, float anorm, float* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sppcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_spp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sppcon_work( matrix_layout, uplo, n, ap, anorm, rcond, work,
+ iwork );
+ /* 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_sppcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sppcon_work.c b/LAPACKE/src/lapacke_sppcon_work.c
new file mode 100644
index 00000000..f217062e
--- /dev/null
+++ b/LAPACKE/src/lapacke_sppcon_work.c
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sppcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sppcon_work( int matrix_layout, char uplo, lapack_int n,
+ const float* ap, float anorm, float* rcond,
+ float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sppcon( &uplo, &n, ap, &anorm, rcond, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sppcon( &uplo, &n, ap_t, &anorm, rcond, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sppcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sppcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sppequ.c b/LAPACKE/src/lapacke_sppequ.c
new file mode 100644
index 00000000..295bb973
--- /dev/null
+++ b/LAPACKE/src/lapacke_sppequ.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sppequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sppequ( int matrix_layout, char uplo, lapack_int n,
+ const float* ap, float* s, float* scond,
+ float* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sppequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_sppequ_work( matrix_layout, uplo, n, ap, s, scond, amax );
+}
diff --git a/LAPACKE/src/lapacke_sppequ_work.c b/LAPACKE/src/lapacke_sppequ_work.c
new file mode 100644
index 00000000..3ffcd934
--- /dev/null
+++ b/LAPACKE/src/lapacke_sppequ_work.c
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sppequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sppequ_work( int matrix_layout, char uplo, lapack_int n,
+ const float* ap, float* s, float* scond,
+ float* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sppequ( &uplo, &n, ap, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sppequ( &uplo, &n, ap_t, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sppequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sppequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spprfs.c b/LAPACKE/src/lapacke_spprfs.c
new file mode 100644
index 00000000..f40f380c
--- /dev/null
+++ b/LAPACKE/src/lapacke_spprfs.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spprfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* ap, const float* afp,
+ const float* b, lapack_int ldb, float* x,
+ lapack_int ldx, float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spprfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spp_nancheck( n, afp ) ) {
+ return -6;
+ }
+ if( LAPACKE_spp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_spprfs_work( matrix_layout, uplo, n, nrhs, ap, afp, b, ldb, x,
+ ldx, ferr, berr, work, iwork );
+ /* 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_spprfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spprfs_work.c b/LAPACKE/src/lapacke_spprfs_work.c
new file mode 100644
index 00000000..7bbc666f
--- /dev/null
+++ b/LAPACKE/src/lapacke_spprfs_work.c
@@ -0,0 +1,122 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spprfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* ap,
+ const float* afp, const float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* ferr, float* berr, float* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spprfs( &uplo, &n, &nrhs, ap, afp, b, &ldb, x, &ldx, ferr, berr,
+ work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* b_t = NULL;
+ float* x_t = NULL;
+ float* ap_t = NULL;
+ float* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_spprfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_spprfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ LAPACKE_spp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_spp_trans( matrix_layout, uplo, n, afp, afp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spprfs( &uplo, &n, &nrhs, ap_t, afp_t, b_t, &ldb_t, x_t, &ldx_t,
+ ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spprfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spprfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sppsv.c b/LAPACKE/src/lapacke_sppsv.c
new file mode 100644
index 00000000..83074b8d
--- /dev/null
+++ b/LAPACKE/src/lapacke_sppsv.c
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sppsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sppsv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, float* ap, float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sppsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_sppsv_work( matrix_layout, uplo, n, nrhs, ap, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_sppsv_work.c b/LAPACKE/src/lapacke_sppsv_work.c
new file mode 100644
index 00000000..78dcd74a
--- /dev/null
+++ b/LAPACKE/src/lapacke_sppsv_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sppsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sppsv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, float* ap, float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sppsv( &uplo, &n, &nrhs, ap, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ float* b_t = NULL;
+ float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sppsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_spp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sppsv( &uplo, &n, &nrhs, ap_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_spp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sppsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sppsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sppsvx.c b/LAPACKE/src/lapacke_sppsvx.c
new file mode 100644
index 00000000..bb026f84
--- /dev/null
+++ b/LAPACKE/src/lapacke_sppsvx.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sppsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sppsvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, float* ap, float* afp, char* equed,
+ float* s, float* b, lapack_int ldb, float* x,
+ lapack_int ldx, float* rcond, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sppsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_spp_nancheck( n, afp ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_spp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+ return -9;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sppsvx_work( matrix_layout, fact, uplo, n, nrhs, ap, afp,
+ equed, s, b, ldb, x, ldx, rcond, ferr, berr,
+ work, iwork );
+ /* 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_sppsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sppsvx_work.c b/LAPACKE/src/lapacke_sppsvx_work.c
new file mode 100644
index 00000000..353917a2
--- /dev/null
+++ b/LAPACKE/src/lapacke_sppsvx_work.c
@@ -0,0 +1,131 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sppsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sppsvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs, float* ap,
+ float* afp, char* equed, float* s, float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr,
+ float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sppsvx( &fact, &uplo, &n, &nrhs, ap, afp, equed, s, b, &ldb, x,
+ &ldx, rcond, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* b_t = NULL;
+ float* x_t = NULL;
+ float* ap_t = NULL;
+ float* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sppsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_sppsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_spp_trans( matrix_layout, uplo, n, ap, ap_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_spp_trans( matrix_layout, uplo, n, afp, afp_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sppsvx( &fact, &uplo, &n, &nrhs, ap_t, afp_t, equed, s, b_t,
+ &ldb_t, x_t, &ldx_t, rcond, ferr, berr, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_spp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_spp_trans( LAPACK_COL_MAJOR, uplo, n, afp_t, afp );
+ }
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sppsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sppsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spptrf.c b/LAPACKE/src/lapacke_spptrf.c
new file mode 100644
index 00000000..e7e97f1f
--- /dev/null
+++ b/LAPACKE/src/lapacke_spptrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spptrf( int matrix_layout, char uplo, lapack_int n,
+ float* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spptrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_spptrf_work( matrix_layout, uplo, n, ap );
+}
diff --git a/LAPACKE/src/lapacke_spptrf_work.c b/LAPACKE/src/lapacke_spptrf_work.c
new file mode 100644
index 00000000..2c74b8b4
--- /dev/null
+++ b/LAPACKE/src/lapacke_spptrf_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spptrf_work( int matrix_layout, char uplo, lapack_int n,
+ float* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spptrf( &uplo, &n, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spptrf( &uplo, &n, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_spp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spptrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spptrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spptri.c b/LAPACKE/src/lapacke_spptri.c
new file mode 100644
index 00000000..2aabafe6
--- /dev/null
+++ b/LAPACKE/src/lapacke_spptri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spptri( int matrix_layout, char uplo, lapack_int n,
+ float* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spptri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_spptri_work( matrix_layout, uplo, n, ap );
+}
diff --git a/LAPACKE/src/lapacke_spptri_work.c b/LAPACKE/src/lapacke_spptri_work.c
new file mode 100644
index 00000000..a6565736
--- /dev/null
+++ b/LAPACKE/src/lapacke_spptri_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spptri_work( int matrix_layout, char uplo, lapack_int n,
+ float* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spptri( &uplo, &n, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spptri( &uplo, &n, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_spp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spptri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spptri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spptrs.c b/LAPACKE/src/lapacke_spptrs.c
new file mode 100644
index 00000000..ddd9c332
--- /dev/null
+++ b/LAPACKE/src/lapacke_spptrs.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spptrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* ap, float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spptrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_spptrs_work( matrix_layout, uplo, n, nrhs, ap, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_spptrs_work.c b/LAPACKE/src/lapacke_spptrs_work.c
new file mode 100644
index 00000000..416ee18a
--- /dev/null
+++ b/LAPACKE/src/lapacke_spptrs_work.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spptrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* ap, float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spptrs( &uplo, &n, &nrhs, ap, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ float* b_t = NULL;
+ float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_spptrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_spp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spptrs( &uplo, &n, &nrhs, ap_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spptrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spptrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spstrf.c b/LAPACKE/src/lapacke_spstrf.c
new file mode 100644
index 00000000..b5ee7e05
--- /dev/null
+++ b/LAPACKE/src/lapacke_spstrf.c
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spstrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spstrf( int matrix_layout, char uplo, lapack_int n, float* a,
+ lapack_int lda, lapack_int* piv, lapack_int* rank,
+ float tol )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spstrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( 1, &tol, 1 ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_spstrf_work( matrix_layout, uplo, n, a, lda, piv, rank, tol,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spstrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spstrf_work.c b/LAPACKE/src/lapacke_spstrf_work.c
new file mode 100644
index 00000000..40e80fba
--- /dev/null
+++ b/LAPACKE/src/lapacke_spstrf_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spstrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spstrf_work( int matrix_layout, char uplo, lapack_int n,
+ float* a, lapack_int lda, lapack_int* piv,
+ lapack_int* rank, float tol, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spstrf( &uplo, &n, a, &lda, piv, rank, &tol, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_spstrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spstrf( &uplo, &n, a_t, &lda_t, piv, rank, &tol, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_spo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spstrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spstrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sptcon.c b/LAPACKE/src/lapacke_sptcon.c
new file mode 100644
index 00000000..8894593b
--- /dev/null
+++ b/LAPACKE/src/lapacke_sptcon.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 sptcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sptcon( lapack_int n, const float* d, const float* e,
+ float anorm, float* rcond )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -2;
+ }
+ if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+ return -3;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sptcon_work( n, d, e, anorm, rcond, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sptcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sptcon_work.c b/LAPACKE/src/lapacke_sptcon_work.c
new file mode 100644
index 00000000..c1da2df5
--- /dev/null
+++ b/LAPACKE/src/lapacke_sptcon_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 sptcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sptcon_work( lapack_int n, const float* d, const float* e,
+ float anorm, float* rcond, float* work )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_sptcon( &n, d, e, &anorm, rcond, work, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spteqr.c b/LAPACKE/src/lapacke_spteqr.c
new file mode 100644
index 00000000..71dd1fe5
--- /dev/null
+++ b/LAPACKE/src/lapacke_spteqr.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spteqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spteqr( int matrix_layout, char compz, lapack_int n, float* d,
+ float* e, float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lwork;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spteqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -6;
+ }
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( compz, 'n' ) ) {
+ lwork = 1;
+ } else {
+ lwork = MAX(1,4*n-4);
+ }
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_spteqr_work( matrix_layout, compz, n, d, e, z, ldz, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spteqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spteqr_work.c b/LAPACKE/src/lapacke_spteqr_work.c
new file mode 100644
index 00000000..023cece3
--- /dev/null
+++ b/LAPACKE/src/lapacke_spteqr_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spteqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spteqr_work( int matrix_layout, char compz, lapack_int n,
+ float* d, float* e, float* z, lapack_int ldz,
+ float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spteqr( &compz, &n, d, e, z, &ldz, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_spteqr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_spteqr( &compz, &n, d, e, z_t, &ldz_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ /* Release memory and exit */
+ LAPACKE_free( z_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spteqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spteqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sptrfs.c b/LAPACKE/src/lapacke_sptrfs.c
new file mode 100644
index 00000000..0409bfcf
--- /dev/null
+++ b/LAPACKE/src/lapacke_sptrfs.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sptrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sptrfs( int matrix_layout, lapack_int n, lapack_int nrhs,
+ const float* d, const float* e, const float* df,
+ const float* ef, const float* b, lapack_int ldb,
+ float* x, lapack_int ldx, float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sptrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n, df, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( n-1, ef, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sptrfs_work( matrix_layout, n, nrhs, d, e, df, ef, b, ldb, x,
+ ldx, ferr, berr, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sptrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sptrfs_work.c b/LAPACKE/src/lapacke_sptrfs_work.c
new file mode 100644
index 00000000..9b246099
--- /dev/null
+++ b/LAPACKE/src/lapacke_sptrfs_work.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sptrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sptrfs_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ const float* d, const float* e, const float* df,
+ const float* ef, const float* b, lapack_int ldb,
+ float* x, lapack_int ldx, float* ferr,
+ float* berr, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sptrfs( &n, &nrhs, d, e, df, ef, b, &ldb, x, &ldx, ferr, berr,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* b_t = NULL;
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_sptrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_sptrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sptrfs( &n, &nrhs, d, e, df, ef, b_t, &ldb_t, x_t, &ldx_t, ferr,
+ berr, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sptrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sptrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sptsv.c b/LAPACKE/src/lapacke_sptsv.c
new file mode 100644
index 00000000..f94917b3
--- /dev/null
+++ b/LAPACKE/src/lapacke_sptsv.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sptsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sptsv( int matrix_layout, lapack_int n, lapack_int nrhs,
+ float* d, float* e, float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sptsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -6;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_sptsv_work( matrix_layout, n, nrhs, d, e, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_sptsv_work.c b/LAPACKE/src/lapacke_sptsv_work.c
new file mode 100644
index 00000000..d75aef1e
--- /dev/null
+++ b/LAPACKE/src/lapacke_sptsv_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sptsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sptsv_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ float* d, float* e, float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sptsv( &n, &nrhs, d, e, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sptsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sptsv( &n, &nrhs, d, e, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sptsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sptsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sptsvx.c b/LAPACKE/src/lapacke_sptsvx.c
new file mode 100644
index 00000000..d37b3731
--- /dev/null
+++ b/LAPACKE/src/lapacke_sptsvx.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sptsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sptsvx( int matrix_layout, char fact, lapack_int n,
+ lapack_int nrhs, const float* d, const float* e,
+ float* df, float* ef, const float* b, lapack_int ldb,
+ float* x, lapack_int ldx, float* rcond, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sptsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_s_nancheck( n, df, 1 ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_s_nancheck( n-1, ef, 1 ) ) {
+ return -8;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sptsvx_work( matrix_layout, fact, n, nrhs, d, e, df, ef, b,
+ ldb, x, ldx, rcond, ferr, berr, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sptsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sptsvx_work.c b/LAPACKE/src/lapacke_sptsvx_work.c
new file mode 100644
index 00000000..b75a15ed
--- /dev/null
+++ b/LAPACKE/src/lapacke_sptsvx_work.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sptsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sptsvx_work( int matrix_layout, char fact, lapack_int n,
+ lapack_int nrhs, const float* d, const float* e,
+ float* df, float* ef, const float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr,
+ float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sptsvx( &fact, &n, &nrhs, d, e, df, ef, b, &ldb, x, &ldx, rcond,
+ ferr, berr, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* b_t = NULL;
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sptsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_sptsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sptsvx( &fact, &n, &nrhs, d, e, df, ef, b_t, &ldb_t, x_t, &ldx_t,
+ rcond, ferr, berr, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sptsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sptsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spttrf.c b/LAPACKE/src/lapacke_spttrf.c
new file mode 100644
index 00000000..3083eff4
--- /dev/null
+++ b/LAPACKE/src/lapacke_spttrf.c
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 spttrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spttrf( lapack_int n, float* d, float* e )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* 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
+ return LAPACKE_spttrf_work( n, d, e );
+}
diff --git a/LAPACKE/src/lapacke_spttrf_work.c b/LAPACKE/src/lapacke_spttrf_work.c
new file mode 100644
index 00000000..1f511da7
--- /dev/null
+++ b/LAPACKE/src/lapacke_spttrf_work.c
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 spttrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spttrf_work( lapack_int n, float* d, float* e )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_spttrf( &n, d, e, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_spttrs.c b/LAPACKE/src/lapacke_spttrs.c
new file mode 100644
index 00000000..d827f770
--- /dev/null
+++ b/LAPACKE/src/lapacke_spttrs.c
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spttrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spttrs( int matrix_layout, lapack_int n, lapack_int nrhs,
+ const float* d, const float* e, float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_spttrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -6;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_spttrs_work( matrix_layout, n, nrhs, d, e, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_spttrs_work.c b/LAPACKE/src/lapacke_spttrs_work.c
new file mode 100644
index 00000000..40aeccba
--- /dev/null
+++ b/LAPACKE/src/lapacke_spttrs_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 spttrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_spttrs_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ const float* d, const float* e, float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_spttrs( &n, &nrhs, d, e, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_spttrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_spttrs( &n, &nrhs, d, e, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_spttrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_spttrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssbev.c b/LAPACKE/src/lapacke_ssbev.c
new file mode 100644
index 00000000..671797e8
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssbev.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssbev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssbev( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_int kd, float* ab, lapack_int ldab, float* w,
+ float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n-2) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssbev_work( matrix_layout, jobz, uplo, n, kd, ab, ldab, w, z,
+ ldz, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssbev_work.c b/LAPACKE/src/lapacke_ssbev_work.c
new file mode 100644
index 00000000..6a82203a
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssbev_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssbev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssbev_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_int kd, float* ab,
+ lapack_int ldab, float* w, float* z,
+ lapack_int ldz, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssbev( &jobz, &uplo, &n, &kd, ab, &ldab, w, z, &ldz, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldz_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ssbev_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ssbev_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssbev( &jobz, &uplo, &n, &kd, ab_t, &ldab_t, w, z_t, &ldz_t,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssbev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssbevd.c b/LAPACKE/src/lapacke_ssbevd.c
new file mode 100644
index 00000000..74b02ca2
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssbevd.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssbevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssbevd( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_int kd, float* ab, lapack_int ldab, float* w,
+ float* z, lapack_int ldz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbevd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ssbevd_work( matrix_layout, jobz, uplo, n, kd, ab, ldab, w, z,
+ ldz, &work_query, lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_ssbevd_work( matrix_layout, jobz, uplo, n, kd, ab, ldab, w, z,
+ ldz, 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_ssbevd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssbevd_work.c b/LAPACKE/src/lapacke_ssbevd_work.c
new file mode 100644
index 00000000..7fb713a0
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssbevd_work.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssbevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssbevd_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_int kd, float* ab,
+ lapack_int ldab, float* w, float* z,
+ lapack_int ldz, float* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssbevd( &jobz, &uplo, &n, &kd, ab, &ldab, w, z, &ldz, work,
+ &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldz_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ssbevd_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ssbevd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_ssbevd( &jobz, &uplo, &n, &kd, ab, &ldab_t, w, z, &ldz_t,
+ work, &lwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssbevd( &jobz, &uplo, &n, &kd, ab_t, &ldab_t, w, z_t, &ldz_t,
+ work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbevd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssbevd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssbevx.c b/LAPACKE/src/lapacke_ssbevx.c
new file mode 100644
index 00000000..3cde9506
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssbevx.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssbevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssbevx( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, lapack_int kd, float* ab,
+ lapack_int ldab, float* q, lapack_int ldq, float vl,
+ float vu, lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, float* z, lapack_int ldz,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -15;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,7*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssbevx_work( matrix_layout, jobz, range, uplo, n, kd, ab,
+ ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z,
+ ldz, work, iwork, ifail );
+ /* 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_ssbevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssbevx_work.c b/LAPACKE/src/lapacke_ssbevx_work.c
new file mode 100644
index 00000000..7961ad95
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssbevx_work.c
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssbevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssbevx_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n, lapack_int kd,
+ float* ab, lapack_int ldab, float* q,
+ lapack_int ldq, float vl, float vu,
+ lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, float* z,
+ lapack_int ldz, float* work, lapack_int* iwork,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssbevx( &jobz, &range, &uplo, &n, &kd, ab, &ldab, q, &ldq, &vl,
+ &vu, &il, &iu, &abstol, m, w, z, &ldz, work, iwork,
+ ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* q_t = NULL;
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ssbevx_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ssbevx_work", info );
+ return info;
+ }
+ if( ldz < ncols_z ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_ssbevx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ q_t = (float*)LAPACKE_malloc( sizeof(float) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssbevx( &jobz, &range, &uplo, &n, &kd, ab_t, &ldab_t, q_t,
+ &ldq_t, &vl, &vu, &il, &iu, &abstol, m, w, z_t, &ldz_t,
+ work, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssbevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssbgst.c b/LAPACKE/src/lapacke_ssbgst.c
new file mode 100644
index 00000000..782ba40f
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssbgst.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssbgst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssbgst( int matrix_layout, char vect, char uplo, lapack_int n,
+ lapack_int ka, lapack_int kb, float* ab,
+ lapack_int ldab, const float* bb, lapack_int ldbb,
+ float* x, lapack_int ldx )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbgst", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssbgst_work( matrix_layout, vect, uplo, n, ka, kb, ab, ldab,
+ bb, ldbb, x, ldx, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbgst", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssbgst_work.c b/LAPACKE/src/lapacke_ssbgst_work.c
new file mode 100644
index 00000000..d5fc91b6
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssbgst_work.c
@@ -0,0 +1,123 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssbgst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssbgst_work( int matrix_layout, char vect, char uplo,
+ lapack_int n, lapack_int ka, lapack_int kb,
+ float* ab, lapack_int ldab, const float* bb,
+ lapack_int ldbb, float* x, lapack_int ldx,
+ float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssbgst( &vect, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, x,
+ &ldx, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,ka+1);
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_int ldx_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* bb_t = NULL;
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ssbgst_work", info );
+ return info;
+ }
+ if( ldbb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ssbgst_work", info );
+ return info;
+ }
+ if( ldx < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_ssbgst_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bb_t = (float*)LAPACKE_malloc( sizeof(float) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( vect, 'v' ) ) {
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,n) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssb_trans( matrix_layout, uplo, n, ka, ab, ldab, ab_t, ldab_t );
+ LAPACKE_ssb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssbgst( &vect, &uplo, &n, &ka, &kb, ab_t, &ldab_t, bb_t, &ldbb_t,
+ x_t, &ldx_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssb_trans( LAPACK_COL_MAJOR, uplo, n, ka, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, x_t, ldx_t, x, ldx );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_free( x_t );
+ }
+exit_level_2:
+ LAPACKE_free( bb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbgst_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssbgst_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssbgv.c b/LAPACKE/src/lapacke_ssbgv.c
new file mode 100644
index 00000000..6f133c9e
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssbgv.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssbgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssbgv( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_int ka, lapack_int kb, float* ab,
+ lapack_int ldab, float* bb, lapack_int ldbb, float* w,
+ float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbgv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssbgv_work( matrix_layout, jobz, uplo, n, ka, kb, ab, ldab,
+ bb, ldbb, w, z, ldz, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbgv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssbgv_work.c b/LAPACKE/src/lapacke_ssbgv_work.c
new file mode 100644
index 00000000..fe0f28f9
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssbgv_work.c
@@ -0,0 +1,125 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssbgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssbgv_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_int ka, lapack_int kb,
+ float* ab, lapack_int ldab, float* bb,
+ lapack_int ldbb, float* w, float* z,
+ lapack_int ldz, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssbgv( &jobz, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, w, z,
+ &ldz, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,ka+1);
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_int ldz_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* bb_t = NULL;
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ssbgv_work", info );
+ return info;
+ }
+ if( ldbb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ssbgv_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_ssbgv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bb_t = (float*)LAPACKE_malloc( sizeof(float) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssb_trans( matrix_layout, uplo, n, ka, ab, ldab, ab_t, ldab_t );
+ LAPACKE_ssb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssbgv( &jobz, &uplo, &n, &ka, &kb, ab_t, &ldab_t, bb_t, &ldbb_t,
+ w, z_t, &ldz_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssb_trans( LAPACK_COL_MAJOR, uplo, n, ka, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_ssb_trans( LAPACK_COL_MAJOR, uplo, n, kb, bb_t, ldbb_t, bb,
+ ldbb );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_2:
+ LAPACKE_free( bb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbgv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssbgv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssbgvd.c b/LAPACKE/src/lapacke_ssbgvd.c
new file mode 100644
index 00000000..4ecbebce
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssbgvd.c
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssbgvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssbgvd( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_int ka, lapack_int kb, float* ab,
+ lapack_int ldab, float* bb, lapack_int ldbb,
+ float* w, float* z, lapack_int ldz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbgvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ssbgvd_work( matrix_layout, jobz, uplo, n, ka, kb, ab, ldab,
+ bb, ldbb, w, z, ldz, &work_query, lwork,
+ &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_ssbgvd_work( matrix_layout, jobz, uplo, n, ka, kb, ab, ldab,
+ bb, ldbb, w, z, ldz, 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_ssbgvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssbgvd_work.c b/LAPACKE/src/lapacke_ssbgvd_work.c
new file mode 100644
index 00000000..5307bef6
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssbgvd_work.c
@@ -0,0 +1,132 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssbgvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssbgvd_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_int ka, lapack_int kb,
+ float* ab, lapack_int ldab, float* bb,
+ lapack_int ldbb, float* w, float* z,
+ lapack_int ldz, float* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssbgvd( &jobz, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, w, z,
+ &ldz, work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,ka+1);
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_int ldz_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* bb_t = NULL;
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ssbgvd_work", info );
+ return info;
+ }
+ if( ldbb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ssbgvd_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_ssbgvd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_ssbgvd( &jobz, &uplo, &n, &ka, &kb, ab, &ldab_t, bb, &ldbb_t,
+ w, z, &ldz_t, work, &lwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bb_t = (float*)LAPACKE_malloc( sizeof(float) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssb_trans( matrix_layout, uplo, n, ka, ab, ldab, ab_t, ldab_t );
+ LAPACKE_ssb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssbgvd( &jobz, &uplo, &n, &ka, &kb, ab_t, &ldab_t, bb_t, &ldbb_t,
+ w, z_t, &ldz_t, work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssb_trans( LAPACK_COL_MAJOR, uplo, n, ka, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_ssb_trans( LAPACK_COL_MAJOR, uplo, n, kb, bb_t, ldbb_t, bb,
+ ldbb );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_2:
+ LAPACKE_free( bb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbgvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssbgvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssbgvx.c b/LAPACKE/src/lapacke_ssbgvx.c
new file mode 100644
index 00000000..675cf2ae
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssbgvx.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssbgvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssbgvx( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, lapack_int ka, lapack_int kb,
+ float* ab, lapack_int ldab, float* bb,
+ lapack_int ldbb, float* q, lapack_int ldq, float vl,
+ float vu, lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, float* z, lapack_int ldz,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbgvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -18;
+ }
+ if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -14;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -15;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,7*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssbgvx_work( matrix_layout, jobz, range, uplo, n, ka, kb, ab,
+ ldab, bb, ldbb, q, ldq, vl, vu, il, iu, abstol,
+ m, w, z, ldz, work, iwork, ifail );
+ /* 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_ssbgvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssbgvx_work.c b/LAPACKE/src/lapacke_ssbgvx_work.c
new file mode 100644
index 00000000..b67b79e6
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssbgvx_work.c
@@ -0,0 +1,152 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssbgvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssbgvx_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n, lapack_int ka,
+ lapack_int kb, float* ab, lapack_int ldab,
+ float* bb, lapack_int ldbb, float* q,
+ lapack_int ldq, float vl, float vu,
+ lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, float* z,
+ lapack_int ldz, float* work, lapack_int* iwork,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssbgvx( &jobz, &range, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb,
+ q, &ldq, &vl, &vu, &il, &iu, &abstol, m, w, z, &ldz,
+ work, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,ka+1);
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* bb_t = NULL;
+ float* q_t = NULL;
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ssbgvx_work", info );
+ return info;
+ }
+ if( ldbb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ssbgvx_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_ssbgvx_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -22;
+ LAPACKE_xerbla( "LAPACKE_ssbgvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bb_t = (float*)LAPACKE_malloc( sizeof(float) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ q_t = (float*)LAPACKE_malloc( sizeof(float) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssb_trans( matrix_layout, uplo, n, ka, ab, ldab, ab_t, ldab_t );
+ LAPACKE_ssb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssbgvx( &jobz, &range, &uplo, &n, &ka, &kb, ab_t, &ldab_t, bb_t,
+ &ldbb_t, q_t, &ldq_t, &vl, &vu, &il, &iu, &abstol, m, w,
+ z_t, &ldz_t, work, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssb_trans( LAPACK_COL_MAJOR, uplo, n, ka, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_ssb_trans( LAPACK_COL_MAJOR, uplo, n, kb, bb_t, ldbb_t, bb,
+ ldbb );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( bb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbgvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssbgvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssbtrd.c b/LAPACKE/src/lapacke_ssbtrd.c
new file mode 100644
index 00000000..47b4b176
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssbtrd.c
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssbtrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssbtrd( int matrix_layout, char vect, char uplo, lapack_int n,
+ lapack_int kd, float* ab, lapack_int ldab, float* d,
+ float* e, float* q, lapack_int ldq )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbtrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssbtrd_work( matrix_layout, vect, uplo, n, kd, ab, ldab, d, e,
+ q, ldq, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbtrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssbtrd_work.c b/LAPACKE/src/lapacke_ssbtrd_work.c
new file mode 100644
index 00000000..8637d646
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssbtrd_work.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssbtrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssbtrd_work( int matrix_layout, char vect, char uplo,
+ lapack_int n, lapack_int kd, float* ab,
+ lapack_int ldab, float* d, float* e, float* q,
+ lapack_int ldq, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssbtrd( &vect, &uplo, &n, &kd, ab, &ldab, d, e, q, &ldq, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldq_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ssbtrd_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ssbtrd_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ q_t = (float*)LAPACKE_malloc( sizeof(float) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssbtrd( &vect, &uplo, &n, &kd, ab_t, &ldab_t, d, e, q_t, &ldq_t,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssbtrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssbtrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssfrk.c b/LAPACKE/src/lapacke_ssfrk.c
new file mode 100644
index 00000000..fec3e22d
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssfrk.c
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssfrk
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssfrk( int matrix_layout, char transr, char uplo, char trans,
+ lapack_int n, lapack_int k, float alpha,
+ const float* a, lapack_int lda, float beta, float* c )
+{
+ lapack_int ka, na;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssfrk", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ ka = LAPACKE_lsame( trans, 'n' ) ? k : n;
+ na = LAPACKE_lsame( trans, 'n' ) ? n : k;
+ if( LAPACKE_sge_nancheck( matrix_layout, na, ka, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_s_nancheck( 1, &alpha, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &beta, 1 ) ) {
+ return -10;
+ }
+ if( LAPACKE_spf_nancheck( n, c ) ) {
+ return -11;
+ }
+#endif
+ return LAPACKE_ssfrk_work( matrix_layout, transr, uplo, trans, n, k, alpha,
+ a, lda, beta, c );
+}
diff --git a/LAPACKE/src/lapacke_ssfrk_work.c b/LAPACKE/src/lapacke_ssfrk_work.c
new file mode 100644
index 00000000..26b5fae4
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssfrk_work.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssfrk
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssfrk_work( int matrix_layout, char transr, char uplo,
+ char trans, lapack_int n, lapack_int k,
+ float alpha, const float* a, lapack_int lda,
+ float beta, float* c )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssfrk( &transr, &uplo, &trans, &n, &k, &alpha, a, &lda, &beta,
+ c );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int na = LAPACKE_lsame( trans, 'n' ) ? n : k;
+ lapack_int ka = LAPACKE_lsame( trans, 'n' ) ? k : n;
+ lapack_int lda_t = MAX(1,na);
+ float* a_t = NULL;
+ float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < ka ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ssfrk_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,ka) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, na, ka, a, lda, a_t, lda_t );
+ LAPACKE_spf_trans( matrix_layout, transr, uplo, n, c, c_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssfrk( &transr, &uplo, &trans, &n, &k, &alpha, a_t, &lda_t,
+ &beta, c_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_spf_trans( LAPACK_COL_MAJOR, transr, uplo, n, c_t, c );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssfrk_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssfrk_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspcon.c b/LAPACKE/src/lapacke_sspcon.c
new file mode 100644
index 00000000..d203d203
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspcon.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspcon( int matrix_layout, char uplo, lapack_int n,
+ const float* ap, const lapack_int* ipiv, float anorm,
+ float* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sspcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_ssp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sspcon_work( matrix_layout, uplo, n, ap, ipiv, anorm, rcond,
+ work, iwork );
+ /* 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_sspcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspcon_work.c b/LAPACKE/src/lapacke_sspcon_work.c
new file mode 100644
index 00000000..6f2e2f7e
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspcon_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspcon_work( int matrix_layout, char uplo, lapack_int n,
+ const float* ap, const lapack_int* ipiv,
+ float anorm, float* rcond, float* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspcon( &uplo, &n, ap, ipiv, &anorm, rcond, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspcon( &uplo, &n, ap_t, ipiv, &anorm, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sspcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sspcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspev.c b/LAPACKE/src/lapacke_sspev.c
new file mode 100644
index 00000000..d83d61af
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspev.c
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspev( int matrix_layout, char jobz, char uplo, lapack_int n,
+ float* ap, float* w, float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sspev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssp_nancheck( n, ap ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sspev_work( matrix_layout, jobz, uplo, n, ap, w, z, ldz,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sspev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspev_work.c b/LAPACKE/src/lapacke_sspev_work.c
new file mode 100644
index 00000000..f938c58c
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspev_work.c
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspev_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, float* ap, float* w, float* z,
+ lapack_int ldz, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspev( &jobz, &uplo, &n, ap, w, z, &ldz, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ float* z_t = NULL;
+ float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sspev_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspev( &jobz, &uplo, &n, ap_t, w, z_t, &ldz_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ LAPACKE_ssp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sspev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sspev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspevd.c b/LAPACKE/src/lapacke_sspevd.c
new file mode 100644
index 00000000..c9f8f3f2
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspevd.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspevd( int matrix_layout, char jobz, char uplo, lapack_int n,
+ float* ap, float* w, float* z, lapack_int ldz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sspevd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssp_nancheck( n, ap ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sspevd_work( matrix_layout, jobz, uplo, n, ap, w, z, ldz,
+ &work_query, lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_sspevd_work( matrix_layout, jobz, uplo, n, ap, w, z, ldz,
+ 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_sspevd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspevd_work.c b/LAPACKE/src/lapacke_sspevd_work.c
new file mode 100644
index 00000000..37844bcf
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspevd_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspevd_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, float* ap, float* w, float* z,
+ lapack_int ldz, float* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspevd( &jobz, &uplo, &n, ap, w, z, &ldz, work, &lwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ float* z_t = NULL;
+ float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sspevd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_sspevd( &jobz, &uplo, &n, ap, w, z, &ldz_t, work, &lwork,
+ iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspevd( &jobz, &uplo, &n, ap_t, w, z_t, &ldz_t, work, &lwork,
+ iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ LAPACKE_ssp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sspevd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sspevd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspevx.c b/LAPACKE/src/lapacke_sspevx.c
new file mode 100644
index 00000000..1901c196
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspevx.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspevx( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, float* ap, float vl, float vu,
+ lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, float* z, lapack_int ldz,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sspevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_ssp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -8;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,8*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sspevx_work( matrix_layout, jobz, range, uplo, n, ap, vl, vu,
+ il, iu, abstol, m, w, z, ldz, work, iwork,
+ ifail );
+ /* 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_sspevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspevx_work.c b/LAPACKE/src/lapacke_sspevx_work.c
new file mode 100644
index 00000000..c4238e8e
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspevx_work.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspevx_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n, float* ap, float vl,
+ float vu, lapack_int il, lapack_int iu,
+ float abstol, lapack_int* m, float* w, float* z,
+ lapack_int ldz, float* work, lapack_int* iwork,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspevx( &jobz, &range, &uplo, &n, ap, &vl, &vu, &il, &iu,
+ &abstol, m, w, z, &ldz, work, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int ldz_t = MAX(1,n);
+ float* z_t = NULL;
+ float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < ncols_z ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_sspevx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspevx( &jobz, &range, &uplo, &n, ap_t, &vl, &vu, &il, &iu,
+ &abstol, m, w, z_t, &ldz_t, work, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ LAPACKE_ssp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sspevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sspevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspgst.c b/LAPACKE/src/lapacke_sspgst.c
new file mode 100644
index 00000000..bee34a35
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspgst.c
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspgst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspgst( int matrix_layout, lapack_int itype, char uplo,
+ lapack_int n, float* ap, const float* bp )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sspgst", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_ssp_nancheck( n, bp ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_sspgst_work( matrix_layout, itype, uplo, n, ap, bp );
+}
diff --git a/LAPACKE/src/lapacke_sspgst_work.c b/LAPACKE/src/lapacke_sspgst_work.c
new file mode 100644
index 00000000..8c29552f
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspgst_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspgst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspgst_work( int matrix_layout, lapack_int itype, char uplo,
+ lapack_int n, float* ap, const float* bp )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspgst( &itype, &uplo, &n, ap, bp, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ float* ap_t = NULL;
+ float* bp_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( bp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, bp, bp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspgst( &itype, &uplo, &n, ap_t, bp_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( bp_t );
+exit_level_1:
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sspgst_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sspgst_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspgv.c b/LAPACKE/src/lapacke_sspgv.c
new file mode 100644
index 00000000..9509447f
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspgv.c
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspgv( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, float* ap, float* bp,
+ float* w, float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sspgv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_ssp_nancheck( n, bp ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sspgv_work( matrix_layout, itype, jobz, uplo, n, ap, bp, w, z,
+ ldz, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sspgv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspgv_work.c b/LAPACKE/src/lapacke_sspgv_work.c
new file mode 100644
index 00000000..7378fb47
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspgv_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspgv_work( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, float* ap, float* bp,
+ float* w, float* z, lapack_int ldz, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspgv( &itype, &jobz, &uplo, &n, ap, bp, w, z, &ldz, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ float* z_t = NULL;
+ float* ap_t = NULL;
+ float* bp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sspgv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ bp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( bp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, bp, bp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspgv( &itype, &jobz, &uplo, &n, ap_t, bp_t, w, z_t, &ldz_t,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ LAPACKE_ssp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ LAPACKE_ssp_trans( LAPACK_COL_MAJOR, uplo, n, bp_t, bp );
+ /* Release memory and exit */
+ LAPACKE_free( bp_t );
+exit_level_2:
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sspgv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sspgv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspgvd.c b/LAPACKE/src/lapacke_sspgvd.c
new file mode 100644
index 00000000..b64f6624
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspgvd.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspgvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspgvd( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, float* ap, float* bp,
+ float* w, float* z, lapack_int ldz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sspgvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_ssp_nancheck( n, bp ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sspgvd_work( matrix_layout, itype, jobz, uplo, n, ap, bp, w,
+ z, ldz, &work_query, lwork, &iwork_query,
+ liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_sspgvd_work( matrix_layout, itype, jobz, uplo, n, ap, bp, w,
+ z, ldz, 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_sspgvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspgvd_work.c b/LAPACKE/src/lapacke_sspgvd_work.c
new file mode 100644
index 00000000..9bde8fbb
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspgvd_work.c
@@ -0,0 +1,119 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspgvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspgvd_work( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, float* ap, float* bp,
+ float* w, float* z, lapack_int ldz, float* work,
+ lapack_int lwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspgvd( &itype, &jobz, &uplo, &n, ap, bp, w, z, &ldz, work,
+ &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ float* z_t = NULL;
+ float* ap_t = NULL;
+ float* bp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sspgvd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_sspgvd( &itype, &jobz, &uplo, &n, ap, bp, w, z, &ldz_t, work,
+ &lwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ bp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( bp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, bp, bp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspgvd( &itype, &jobz, &uplo, &n, ap_t, bp_t, w, z_t, &ldz_t,
+ work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ LAPACKE_ssp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ LAPACKE_ssp_trans( LAPACK_COL_MAJOR, uplo, n, bp_t, bp );
+ /* Release memory and exit */
+ LAPACKE_free( bp_t );
+exit_level_2:
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sspgvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sspgvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspgvx.c b/LAPACKE/src/lapacke_sspgvx.c
new file mode 100644
index 00000000..2f28da4c
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspgvx.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspgvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspgvx( int matrix_layout, lapack_int itype, char jobz,
+ char range, char uplo, lapack_int n, float* ap,
+ float* bp, float vl, float vu, lapack_int il,
+ lapack_int iu, float abstol, lapack_int* m, float* w,
+ float* z, lapack_int ldz, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sspgvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -13;
+ }
+ if( LAPACKE_ssp_nancheck( n, ap ) ) {
+ return -7;
+ }
+ if( LAPACKE_ssp_nancheck( n, bp ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -9;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,8*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sspgvx_work( matrix_layout, itype, jobz, range, uplo, n, ap,
+ bp, vl, vu, il, iu, abstol, m, w, z, ldz, work,
+ iwork, ifail );
+ /* 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_sspgvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspgvx_work.c b/LAPACKE/src/lapacke_sspgvx_work.c
new file mode 100644
index 00000000..904b4407
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspgvx_work.c
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspgvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspgvx_work( int matrix_layout, lapack_int itype, char jobz,
+ char range, char uplo, lapack_int n, float* ap,
+ float* bp, float vl, float vu, lapack_int il,
+ lapack_int iu, float abstol, lapack_int* m,
+ float* w, float* z, lapack_int ldz, float* work,
+ lapack_int* iwork, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspgvx( &itype, &jobz, &range, &uplo, &n, ap, bp, &vl, &vu, &il,
+ &iu, &abstol, m, w, z, &ldz, work, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int ldz_t = MAX(1,n);
+ float* z_t = NULL;
+ float* ap_t = NULL;
+ float* bp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < ncols_z ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_sspgvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ bp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( bp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, bp, bp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspgvx( &itype, &jobz, &range, &uplo, &n, ap_t, bp_t, &vl, &vu,
+ &il, &iu, &abstol, m, w, z_t, &ldz_t, work, iwork, ifail,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ LAPACKE_ssp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ LAPACKE_ssp_trans( LAPACK_COL_MAJOR, uplo, n, bp_t, bp );
+ /* Release memory and exit */
+ LAPACKE_free( bp_t );
+exit_level_2:
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sspgvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sspgvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssprfs.c b/LAPACKE/src/lapacke_ssprfs.c
new file mode 100644
index 00000000..0408ae5c
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssprfs.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssprfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* ap, const float* afp,
+ const lapack_int* ipiv, const float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssprfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssp_nancheck( n, afp ) ) {
+ return -6;
+ }
+ if( LAPACKE_ssp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssprfs_work( matrix_layout, uplo, n, nrhs, ap, afp, ipiv, b,
+ ldb, x, ldx, ferr, berr, work, iwork );
+ /* 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_ssprfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssprfs_work.c b/LAPACKE/src/lapacke_ssprfs_work.c
new file mode 100644
index 00000000..7afeded6
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssprfs_work.c
@@ -0,0 +1,122 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssprfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* ap,
+ const float* afp, const lapack_int* ipiv,
+ const float* b, lapack_int ldb, float* x,
+ lapack_int ldx, float* ferr, float* berr,
+ float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssprfs( &uplo, &n, &nrhs, ap, afp, ipiv, b, &ldb, x, &ldx, ferr,
+ berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* b_t = NULL;
+ float* x_t = NULL;
+ float* ap_t = NULL;
+ float* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ssprfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ssprfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, afp, afp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssprfs( &uplo, &n, &nrhs, ap_t, afp_t, ipiv, b_t, &ldb_t, x_t,
+ &ldx_t, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssprfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssprfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspsv.c b/LAPACKE/src/lapacke_sspsv.c
new file mode 100644
index 00000000..85e4a16c
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspsv.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspsv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, float* ap, lapack_int* ipiv,
+ float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sspsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_sspsv_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_sspsv_work.c b/LAPACKE/src/lapacke_sspsv_work.c
new file mode 100644
index 00000000..49b5e50a
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspsv_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspsv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, float* ap, lapack_int* ipiv,
+ float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspsv( &uplo, &n, &nrhs, ap, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ float* b_t = NULL;
+ float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sspsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspsv( &uplo, &n, &nrhs, ap_t, ipiv, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_ssp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sspsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sspsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspsvx.c b/LAPACKE/src/lapacke_sspsvx.c
new file mode 100644
index 00000000..05bd32f9
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspsvx.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspsvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, const float* ap, float* afp,
+ lapack_int* ipiv, const float* b, lapack_int ldb,
+ float* x, lapack_int ldx, float* rcond, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sspsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_ssp_nancheck( n, afp ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_ssp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sspsvx_work( matrix_layout, fact, uplo, n, nrhs, ap, afp,
+ ipiv, b, ldb, x, ldx, rcond, ferr, berr, work,
+ iwork );
+ /* 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_sspsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sspsvx_work.c b/LAPACKE/src/lapacke_sspsvx_work.c
new file mode 100644
index 00000000..b74d8757
--- /dev/null
+++ b/LAPACKE/src/lapacke_sspsvx_work.c
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sspsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sspsvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs, const float* ap,
+ float* afp, lapack_int* ipiv, const float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr,
+ float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspsvx( &fact, &uplo, &n, &nrhs, ap, afp, ipiv, b, &ldb, x, &ldx,
+ rcond, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* b_t = NULL;
+ float* x_t = NULL;
+ float* ap_t = NULL;
+ float* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sspsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_sspsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, ap, ap_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, afp, afp_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sspsvx( &fact, &uplo, &n, &nrhs, ap_t, afp_t, ipiv, b_t, &ldb_t,
+ x_t, &ldx_t, rcond, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ if( LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_ssp_trans( LAPACK_COL_MAJOR, uplo, n, afp_t, afp );
+ }
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sspsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sspsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssptrd.c b/LAPACKE/src/lapacke_ssptrd.c
new file mode 100644
index 00000000..aa8b231c
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssptrd.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssptrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssptrd( int matrix_layout, char uplo, lapack_int n, float* ap,
+ float* d, float* e, float* tau )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssptrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_ssptrd_work( matrix_layout, uplo, n, ap, d, e, tau );
+}
diff --git a/LAPACKE/src/lapacke_ssptrd_work.c b/LAPACKE/src/lapacke_ssptrd_work.c
new file mode 100644
index 00000000..cf73dc64
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssptrd_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssptrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssptrd_work( int matrix_layout, char uplo, lapack_int n,
+ float* ap, float* d, float* e, float* tau )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssptrd( &uplo, &n, ap, d, e, tau, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssptrd( &uplo, &n, ap_t, d, e, tau, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssptrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssptrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssptrf.c b/LAPACKE/src/lapacke_ssptrf.c
new file mode 100644
index 00000000..4a5ec9c9
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssptrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssptrf( int matrix_layout, char uplo, lapack_int n, float* ap,
+ lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssptrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_ssptrf_work( matrix_layout, uplo, n, ap, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_ssptrf_work.c b/LAPACKE/src/lapacke_ssptrf_work.c
new file mode 100644
index 00000000..f0d8cfc4
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssptrf_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssptrf_work( int matrix_layout, char uplo, lapack_int n,
+ float* ap, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssptrf( &uplo, &n, ap, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssptrf( &uplo, &n, ap_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssptrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssptrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssptri.c b/LAPACKE/src/lapacke_ssptri.c
new file mode 100644
index 00000000..0dba9d34
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssptri.c
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssptri( int matrix_layout, char uplo, lapack_int n, float* ap,
+ const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssptri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssptri_work( matrix_layout, uplo, n, ap, ipiv, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssptri", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssptri_work.c b/LAPACKE/src/lapacke_ssptri_work.c
new file mode 100644
index 00000000..184ab8ac
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssptri_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssptri_work( int matrix_layout, char uplo, lapack_int n,
+ float* ap, const lapack_int* ipiv, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssptri( &uplo, &n, ap, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssptri( &uplo, &n, ap_t, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssptri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssptri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssptrs.c b/LAPACKE/src/lapacke_ssptrs.c
new file mode 100644
index 00000000..f8ad84eb
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssptrs.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssptrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* ap,
+ const lapack_int* ipiv, float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssptrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_ssptrs_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_ssptrs_work.c b/LAPACKE/src/lapacke_ssptrs_work.c
new file mode 100644
index 00000000..7a86ab36
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssptrs_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssptrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* ap,
+ const lapack_int* ipiv, float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssptrs( &uplo, &n, &nrhs, ap, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ float* b_t = NULL;
+ float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ssptrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_ssp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssptrs( &uplo, &n, &nrhs, ap_t, ipiv, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssptrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssptrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstebz.c b/LAPACKE/src/lapacke_sstebz.c
new file mode 100644
index 00000000..9225729d
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstebz.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 sstebz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sstebz( char range, char order, lapack_int n, float vl,
+ float vu, lapack_int il, lapack_int iu, float abstol,
+ const float* d, const float* e, lapack_int* m,
+ lapack_int* nsplit, float* w, lapack_int* iblock,
+ lapack_int* isplit )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -9;
+ }
+ if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -4;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -5;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,3*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sstebz_work( range, order, n, vl, vu, il, iu, abstol, d, e,
+ m, nsplit, w, iblock, isplit, work, iwork );
+ /* 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_sstebz", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstebz_work.c b/LAPACKE/src/lapacke_sstebz_work.c
new file mode 100644
index 00000000..c1aa94ce
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstebz_work.c
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 sstebz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sstebz_work( char range, char order, lapack_int n, float vl,
+ float vu, lapack_int il, lapack_int iu,
+ float abstol, const float* d, const float* e,
+ lapack_int* m, lapack_int* nsplit, float* w,
+ lapack_int* iblock, lapack_int* isplit,
+ float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_sstebz( &range, &order, &n, &vl, &vu, &il, &iu, &abstol, d, e, m,
+ nsplit, w, iblock, isplit, work, iwork, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstedc.c b/LAPACKE/src/lapacke_sstedc.c
new file mode 100644
index 00000000..f44d74d5
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstedc.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sstedc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sstedc( int matrix_layout, char compz, lapack_int n, float* d,
+ float* e, float* z, lapack_int ldz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sstedc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -6;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sstedc_work( matrix_layout, compz, n, d, e, z, ldz,
+ &work_query, lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_sstedc_work( matrix_layout, compz, n, d, e, z, ldz, 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_sstedc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstedc_work.c b/LAPACKE/src/lapacke_sstedc_work.c
new file mode 100644
index 00000000..152a23f4
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstedc_work.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sstedc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+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,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sstedc( &compz, &n, d, e, z, &ldz, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sstedc_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_sstedc( &compz, &n, d, e, z, &ldz_t, work, &lwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sstedc( &compz, &n, d, e, z_t, &ldz_t, work, &lwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sstedc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sstedc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstegr.c b/LAPACKE/src/lapacke_sstegr.c
new file mode 100644
index 00000000..bd0cb4a4
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstegr.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sstegr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sstegr( int matrix_layout, char jobz, char range,
+ lapack_int n, float* d, float* e, float vl, float vu,
+ lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, float* z, lapack_int ldz,
+ lapack_int* isuppz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sstegr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( n, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -8;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sstegr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, abstol, m, w, z, ldz, isuppz, &work_query,
+ lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_sstegr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, abstol, m, w, z, ldz, isuppz, 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_sstegr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstegr_work.c b/LAPACKE/src/lapacke_sstegr_work.c
new file mode 100644
index 00000000..c57d22e7
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstegr_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sstegr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sstegr_work( int matrix_layout, char jobz, char range,
+ lapack_int n, float* d, float* e, float vl,
+ float vu, lapack_int il, lapack_int iu,
+ float abstol, lapack_int* m, float* w, float* z,
+ lapack_int ldz, lapack_int* isuppz, float* work,
+ lapack_int lwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sstegr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol, m,
+ w, z, &ldz, isuppz, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ( LAPACKE_lsame( jobz, 'v' ) && ( ldz < ldz_t ) ) || ( ldz < 1 ) ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_sstegr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_sstegr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol,
+ m, w, z, &ldz_t, isuppz, work, &lwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ /* Let be always 'n' instead of 'm' */
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sstegr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol, m,
+ w, z_t, &ldz_t, isuppz, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, *m, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sstegr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sstegr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstein.c b/LAPACKE/src/lapacke_sstein.c
new file mode 100644
index 00000000..593b743f
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstein.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sstein
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sstein( int matrix_layout, lapack_int n, const float* d,
+ const float* e, lapack_int m, const float* w,
+ const lapack_int* iblock, const lapack_int* isplit,
+ float* z, lapack_int ldz, lapack_int* ifailv )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sstein", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -3;
+ }
+ if( LAPACKE_s_nancheck( n, e, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n, w, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,5*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sstein_work( matrix_layout, n, d, e, m, w, iblock, isplit, z,
+ ldz, work, iwork, ifailv );
+ /* 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_sstein", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstein_work.c b/LAPACKE/src/lapacke_sstein_work.c
new file mode 100644
index 00000000..0c216054
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstein_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sstein
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sstein_work( int matrix_layout, lapack_int n, const float* d,
+ const float* e, lapack_int m, const float* w,
+ const lapack_int* iblock,
+ const lapack_int* isplit, float* z,
+ lapack_int ldz, float* work, lapack_int* iwork,
+ lapack_int* ifailv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sstein( &n, d, e, &m, w, iblock, isplit, z, &ldz, work, iwork,
+ ifailv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < m ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_sstein_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,m) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sstein( &n, d, e, &m, w, iblock, isplit, z_t, &ldz_t, work,
+ iwork, ifailv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, m, z_t, ldz_t, z, ldz );
+ /* Release memory and exit */
+ LAPACKE_free( z_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sstein_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sstein_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstemr.c b/LAPACKE/src/lapacke_sstemr.c
new file mode 100644
index 00000000..6dce84ef
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstemr.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sstemr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sstemr( int matrix_layout, char jobz, char range,
+ lapack_int n, float* d, float* e, float vl, float vu,
+ lapack_int il, lapack_int iu, lapack_int* m,
+ float* w, float* z, lapack_int ldz, lapack_int nzc,
+ lapack_int* isuppz, lapack_logical* tryrac )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sstemr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sstemr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, m, w, z, ldz, nzc, isuppz, tryrac,
+ &work_query, lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_sstemr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, m, w, z, ldz, nzc, isuppz, tryrac, 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_sstemr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstemr_work.c b/LAPACKE/src/lapacke_sstemr_work.c
new file mode 100644
index 00000000..448b0303
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstemr_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sstemr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sstemr_work( int matrix_layout, char jobz, char range,
+ lapack_int n, float* d, float* e, float vl,
+ float vu, lapack_int il, lapack_int iu,
+ lapack_int* m, float* w, float* z,
+ lapack_int ldz, lapack_int nzc,
+ lapack_int* isuppz, lapack_logical* tryrac,
+ float* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sstemr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, m, w, z,
+ &ldz, &nzc, isuppz, tryrac, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_sstemr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_sstemr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, m, w, z,
+ &ldz_t, &nzc, isuppz, tryrac, work, &lwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sstemr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, m, w, z_t,
+ &ldz_t, &nzc, isuppz, tryrac, work, &lwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sstemr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sstemr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssteqr.c b/LAPACKE/src/lapacke_ssteqr.c
new file mode 100644
index 00000000..0a9385df
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssteqr.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssteqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssteqr( int matrix_layout, char compz, lapack_int n, float* d,
+ float* e, float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lwork;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssteqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -6;
+ }
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( compz, 'n' ) ) {
+ lwork = 1;
+ } else {
+ lwork = MAX(1,2*n-2);
+ }
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssteqr_work( matrix_layout, compz, n, d, e, z, ldz, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssteqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssteqr_work.c b/LAPACKE/src/lapacke_ssteqr_work.c
new file mode 100644
index 00000000..731ad07c
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssteqr_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssteqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssteqr_work( int matrix_layout, char compz, lapack_int n,
+ float* d, float* e, float* z, lapack_int ldz,
+ float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssteqr( &compz, &n, d, e, z, &ldz, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ssteqr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssteqr( &compz, &n, d, e, z_t, &ldz_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssteqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssteqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssterf.c b/LAPACKE/src/lapacke_ssterf.c
new file mode 100644
index 00000000..d42384dc
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssterf.c
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 ssterf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssterf( lapack_int n, float* d, float* e )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* 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
+ return LAPACKE_ssterf_work( n, d, e );
+}
diff --git a/LAPACKE/src/lapacke_ssterf_work.c b/LAPACKE/src/lapacke_ssterf_work.c
new file mode 100644
index 00000000..7e22c2fb
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssterf_work.c
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 ssterf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssterf_work( lapack_int n, float* d, float* e )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssterf( &n, d, e, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstev.c b/LAPACKE/src/lapacke_sstev.c
new file mode 100644
index 00000000..8cfdeb7f
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstev.c
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sstev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sstev( int matrix_layout, char jobz, lapack_int n, float* d,
+ float* e, float* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sstev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n, e, 1 ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n-2) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sstev_work( matrix_layout, jobz, n, d, e, z, ldz, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sstev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstev_work.c b/LAPACKE/src/lapacke_sstev_work.c
new file mode 100644
index 00000000..c148228c
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstev_work.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sstev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sstev_work( int matrix_layout, char jobz, lapack_int n,
+ float* d, float* e, float* z, lapack_int ldz,
+ float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sstev( &jobz, &n, d, e, z, &ldz, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sstev_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sstev( &jobz, &n, d, e, z_t, &ldz_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sstev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sstev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstevd.c b/LAPACKE/src/lapacke_sstevd.c
new file mode 100644
index 00000000..540a1c25
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstevd.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sstevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sstevd( int matrix_layout, char jobz, lapack_int n, float* d,
+ float* e, float* z, lapack_int ldz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sstevd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( n, e, 1 ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sstevd_work( matrix_layout, jobz, n, d, e, z, ldz,
+ &work_query, lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_sstevd_work( matrix_layout, jobz, n, d, e, z, ldz, 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_sstevd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstevd_work.c b/LAPACKE/src/lapacke_sstevd_work.c
new file mode 100644
index 00000000..346eea6e
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstevd_work.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sstevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sstevd_work( int matrix_layout, char jobz, lapack_int n,
+ float* d, float* e, float* z, lapack_int ldz,
+ float* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sstevd( &jobz, &n, d, e, z, &ldz, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_sstevd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_sstevd( &jobz, &n, d, e, z, &ldz_t, work, &lwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sstevd( &jobz, &n, d, e, z_t, &ldz_t, work, &lwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sstevd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sstevd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstevr.c b/LAPACKE/src/lapacke_sstevr.c
new file mode 100644
index 00000000..7759c1c9
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstevr.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sstevr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sstevr( int matrix_layout, char jobz, char range,
+ lapack_int n, float* d, float* e, float vl, float vu,
+ lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, float* z, lapack_int ldz,
+ lapack_int* isuppz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sstevr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -8;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_sstevr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, abstol, m, w, z, ldz, isuppz, &work_query,
+ lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_sstevr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, abstol, m, w, z, ldz, isuppz, 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_sstevr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstevr_work.c b/LAPACKE/src/lapacke_sstevr_work.c
new file mode 100644
index 00000000..62523314
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstevr_work.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sstevr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sstevr_work( int matrix_layout, char jobz, char range,
+ lapack_int n, float* d, float* e, float vl,
+ float vu, lapack_int il, lapack_int iu,
+ float abstol, lapack_int* m, float* w, float* z,
+ lapack_int ldz, lapack_int* isuppz, float* work,
+ lapack_int lwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sstevr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol, m,
+ w, z, &ldz, isuppz, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int ldz_t = MAX(1,n);
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < ncols_z ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_sstevr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_sstevr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol,
+ m, w, z, &ldz_t, isuppz, work, &lwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sstevr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol, m,
+ w, z_t, &ldz_t, isuppz, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sstevr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sstevr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstevx.c b/LAPACKE/src/lapacke_sstevx.c
new file mode 100644
index 00000000..40442708
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstevx.c
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sstevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sstevx( int matrix_layout, char jobz, char range,
+ lapack_int n, float* d, float* e, float vl, float vu,
+ lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, float* z, lapack_int ldz,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_sstevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_s_nancheck( n, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -8;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,5*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_sstevx_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, abstol, m, w, z, ldz, work, iwork, ifail );
+ /* 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_sstevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_sstevx_work.c b/LAPACKE/src/lapacke_sstevx_work.c
new file mode 100644
index 00000000..c118bf92
--- /dev/null
+++ b/LAPACKE/src/lapacke_sstevx_work.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 sstevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_sstevx_work( int matrix_layout, char jobz, char range,
+ lapack_int n, float* d, float* e, float vl,
+ float vu, lapack_int il, lapack_int iu,
+ float abstol, lapack_int* m, float* w, float* z,
+ lapack_int ldz, float* work, lapack_int* iwork,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_sstevx( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol, m,
+ w, z, &ldz, work, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int ldz_t = MAX(1,n);
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < ncols_z ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_sstevx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_sstevx( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol, m,
+ w, z_t, &ldz_t, work, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_sstevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_sstevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssycon.c b/LAPACKE/src/lapacke_ssycon.c
new file mode 100644
index 00000000..c91b84ff
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssycon.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssycon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssycon( int matrix_layout, char uplo, lapack_int n,
+ const float* a, lapack_int lda,
+ const lapack_int* ipiv, float anorm, float* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssycon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssycon_work( matrix_layout, uplo, n, a, lda, ipiv, anorm,
+ rcond, work, iwork );
+ /* 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_ssycon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssycon_work.c b/LAPACKE/src/lapacke_ssycon_work.c
new file mode 100644
index 00000000..cc1b52d4
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssycon_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssycon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssycon_work( int matrix_layout, char uplo, lapack_int n,
+ const float* a, lapack_int lda,
+ const lapack_int* ipiv, float anorm,
+ float* rcond, float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssycon( &uplo, &n, a, &lda, ipiv, &anorm, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_ssycon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssycon( &uplo, &n, a_t, &lda_t, ipiv, &anorm, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssycon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssycon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssyconv.c b/LAPACKE/src/lapacke_ssyconv.c
new file mode 100644
index 00000000..b6c34a55
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyconv.c
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyconv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyconv( int matrix_layout, char uplo, char way, lapack_int n,
+ float* a, lapack_int lda, const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyconv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, lda, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssyconv_work( matrix_layout, uplo, way, n, a, lda, ipiv,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyconv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssyconv_work.c b/LAPACKE/src/lapacke_ssyconv_work.c
new file mode 100644
index 00000000..52121153
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyconv_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyconv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyconv_work( int matrix_layout, char uplo, char way,
+ lapack_int n, float* a, lapack_int lda,
+ const lapack_int* ipiv, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyconv( &uplo, &way, &n, a, &lda, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,lda);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_ssyconv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyconv( &uplo, &way, &n, a_t, &lda_t, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyconv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssyconv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssyequb.c b/LAPACKE/src/lapacke_ssyequb.c
new file mode 100644
index 00000000..5a3ac28b
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyequb.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyequb( int matrix_layout, char uplo, lapack_int n,
+ const float* a, lapack_int lda, float* s,
+ float* scond, float* amax )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssyequb_work( matrix_layout, uplo, n, a, lda, s, scond, amax,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyequb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssyequb_work.c b/LAPACKE/src/lapacke_ssyequb_work.c
new file mode 100644
index 00000000..68c0e452
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyequb_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyequb_work( int matrix_layout, char uplo, lapack_int n,
+ const float* a, lapack_int lda, float* s,
+ float* scond, float* amax, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyequb( &uplo, &n, a, &lda, s, scond, amax, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_ssyequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyequb( &uplo, &n, a_t, &lda_t, s, scond, amax, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssyequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssyev.c b/LAPACKE/src/lapacke_ssyev.c
new file mode 100644
index 00000000..f49437e7
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyev.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyev( int matrix_layout, char jobz, char uplo, lapack_int n,
+ float* a, lapack_int lda, float* w )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ssyev_work( matrix_layout, jobz, uplo, n, a, lda, w,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssyev_work( matrix_layout, jobz, uplo, n, a, lda, w, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssyev_work.c b/LAPACKE/src/lapacke_ssyev_work.c
new file mode 100644
index 00000000..e5a61e14
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyev_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyev_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, float* a, lapack_int lda, float* w,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyev( &jobz, &uplo, &n, a, &lda, w, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_ssyev_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ssyev( &jobz, &uplo, &n, a, &lda_t, w, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyev( &jobz, &uplo, &n, a_t, &lda_t, w, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssyev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssyevd.c b/LAPACKE/src/lapacke_ssyevd.c
new file mode 100644
index 00000000..28f3f321
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyevd.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyevd( int matrix_layout, char jobz, char uplo, lapack_int n,
+ float* a, lapack_int lda, float* w )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyevd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ssyevd_work( matrix_layout, jobz, uplo, n, a, lda, w,
+ &work_query, lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_ssyevd_work( matrix_layout, jobz, uplo, n, a, lda, w, 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_ssyevd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssyevd_work.c b/LAPACKE/src/lapacke_ssyevd_work.c
new file mode 100644
index 00000000..55d8eb42
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyevd_work.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyevd_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, float* a, lapack_int lda,
+ float* w, float* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyevd( &jobz, &uplo, &n, a, &lda, w, work, &lwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_ssyevd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_ssyevd( &jobz, &uplo, &n, a, &lda_t, w, work, &lwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyevd( &jobz, &uplo, &n, a_t, &lda_t, w, work, &lwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyevd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssyevd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssyevr.c b/LAPACKE/src/lapacke_ssyevr.c
new file mode 100644
index 00000000..da74c0b4
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyevr.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyevr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyevr( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, float* a, lapack_int lda, float vl,
+ float vu, lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, float* z, lapack_int ldz,
+ lapack_int* isuppz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyevr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -12;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -9;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ssyevr_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
+ vu, il, iu, abstol, m, w, z, ldz, isuppz,
+ &work_query, lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_ssyevr_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
+ vu, il, iu, abstol, m, w, z, ldz, isuppz, 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_ssyevr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssyevr_work.c b/LAPACKE/src/lapacke_ssyevr_work.c
new file mode 100644
index 00000000..d6be62c8
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyevr_work.c
@@ -0,0 +1,124 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyevr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyevr_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n, float* a,
+ lapack_int lda, float vl, float vu,
+ lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, float* z,
+ lapack_int ldz, lapack_int* isuppz, float* work,
+ lapack_int lwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyevr( &jobz, &range, &uplo, &n, a, &lda, &vl, &vu, &il, &iu,
+ &abstol, m, w, z, &ldz, isuppz, work, &lwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ float* a_t = NULL;
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ssyevr_work", info );
+ return info;
+ }
+ if( ldz < ncols_z ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_ssyevr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_ssyevr( &jobz, &range, &uplo, &n, a, &lda_t, &vl, &vu, &il,
+ &iu, &abstol, m, w, z, &ldz_t, isuppz, work, &lwork,
+ iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyevr( &jobz, &range, &uplo, &n, a_t, &lda_t, &vl, &vu, &il,
+ &iu, &abstol, m, w, z_t, &ldz_t, isuppz, work, &lwork,
+ iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyevr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssyevr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssyevx.c b/LAPACKE/src/lapacke_ssyevx.c
new file mode 100644
index 00000000..b1e2fd6a
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyevx.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyevx( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, float* a, lapack_int lda, float vl,
+ float vu, lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, float* z, lapack_int ldz,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -12;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -9;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ssyevx_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
+ vu, il, iu, abstol, m, w, z, ldz, &work_query,
+ lwork, iwork, ifail );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_ssyevx_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
+ vu, il, iu, abstol, m, w, z, ldz, work, lwork,
+ iwork, ifail );
+ /* 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_ssyevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssyevx_work.c b/LAPACKE/src/lapacke_ssyevx_work.c
new file mode 100644
index 00000000..f900fc76
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyevx_work.c
@@ -0,0 +1,123 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyevx_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n, float* a,
+ lapack_int lda, float vl, float vu,
+ lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, float* z,
+ lapack_int ldz, float* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyevx( &jobz, &range, &uplo, &n, a, &lda, &vl, &vu, &il, &iu,
+ &abstol, m, w, z, &ldz, work, &lwork, iwork, ifail,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ float* a_t = NULL;
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ssyevx_work", info );
+ return info;
+ }
+ if( ldz < ncols_z ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_ssyevx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ssyevx( &jobz, &range, &uplo, &n, a, &lda_t, &vl, &vu, &il,
+ &iu, &abstol, m, w, z, &ldz_t, work, &lwork, iwork,
+ ifail, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyevx( &jobz, &range, &uplo, &n, a_t, &lda_t, &vl, &vu, &il,
+ &iu, &abstol, m, w, z_t, &ldz_t, work, &lwork, iwork,
+ ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssyevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssygst.c b/LAPACKE/src/lapacke_ssygst.c
new file mode 100644
index 00000000..23f02757
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssygst.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssygst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssygst( int matrix_layout, lapack_int itype, char uplo,
+ lapack_int n, float* a, lapack_int lda,
+ const float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssygst", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_ssygst_work( matrix_layout, itype, uplo, n, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_ssygst_work.c b/LAPACKE/src/lapacke_ssygst_work.c
new file mode 100644
index 00000000..2619babd
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssygst_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssygst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssygst_work( int matrix_layout, lapack_int itype, char uplo,
+ lapack_int n, float* a, lapack_int lda,
+ const float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssygst( &itype, &uplo, &n, a, &lda, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_ssygst_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ssygst_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssygst( &itype, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssygst_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssygst_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssygv.c b/LAPACKE/src/lapacke_ssygv.c
new file mode 100644
index 00000000..af299890
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssygv.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssygv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssygv( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, float* a, lapack_int lda,
+ float* b, lapack_int ldb, float* w )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssygv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ssygv_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
+ ldb, w, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssygv_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
+ ldb, w, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssygv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssygv_work.c b/LAPACKE/src/lapacke_ssygv_work.c
new file mode 100644
index 00000000..00e0502f
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssygv_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssygv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssygv_work( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, float* a,
+ lapack_int lda, float* b, lapack_int ldb,
+ float* w, float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssygv( &itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ssygv_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ssygv_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ssygv( &itype, &jobz, &uplo, &n, a, &lda_t, b, &ldb_t, w,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssygv( &itype, &jobz, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, w,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssygv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssygv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssygvd.c b/LAPACKE/src/lapacke_ssygvd.c
new file mode 100644
index 00000000..3304b8cb
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssygvd.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssygvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssygvd( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, float* a, lapack_int lda,
+ float* b, lapack_int ldb, float* w )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssygvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ssygvd_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
+ ldb, w, &work_query, lwork, &iwork_query,
+ liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_ssygvd_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
+ ldb, w, 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_ssygvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssygvd_work.c b/LAPACKE/src/lapacke_ssygvd_work.c
new file mode 100644
index 00000000..2b466c6a
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssygvd_work.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssygvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssygvd_work( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, float* a,
+ lapack_int lda, float* b, lapack_int ldb,
+ float* w, float* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssygvd( &itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work,
+ &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ssygvd_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ssygvd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_ssygvd( &itype, &jobz, &uplo, &n, a, &lda_t, b, &ldb_t, w,
+ work, &lwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssygvd( &itype, &jobz, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, w,
+ work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssygvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssygvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssygvx.c b/LAPACKE/src/lapacke_ssygvx.c
new file mode 100644
index 00000000..1ad39fc7
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssygvx.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssygvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssygvx( int matrix_layout, lapack_int itype, char jobz,
+ char range, char uplo, lapack_int n, float* a,
+ lapack_int lda, float* b, lapack_int ldb, float vl,
+ float vu, lapack_int il, lapack_int iu, float abstol,
+ lapack_int* m, float* w, float* z, lapack_int ldz,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssygvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+ return -15;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ssygvx_work( matrix_layout, itype, jobz, range, uplo, n, a,
+ lda, b, ldb, vl, vu, il, iu, abstol, m, w, z,
+ ldz, &work_query, lwork, iwork, ifail );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_ssygvx_work( matrix_layout, itype, jobz, range, uplo, n, a,
+ lda, b, ldb, vl, vu, il, iu, abstol, m, w, z,
+ ldz, work, lwork, iwork, ifail );
+ /* 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_ssygvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssygvx_work.c b/LAPACKE/src/lapacke_ssygvx_work.c
new file mode 100644
index 00000000..5d1cb1d6
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssygvx_work.c
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssygvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssygvx_work( int matrix_layout, lapack_int itype, char jobz,
+ char range, char uplo, lapack_int n, float* a,
+ lapack_int lda, float* b, lapack_int ldb,
+ float vl, float vu, lapack_int il,
+ lapack_int iu, float abstol, lapack_int* m,
+ float* w, float* z, lapack_int ldz, float* work,
+ lapack_int lwork, lapack_int* iwork,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssygvx( &itype, &jobz, &range, &uplo, &n, a, &lda, b, &ldb, &vl,
+ &vu, &il, &iu, &abstol, m, w, z, &ldz, work, &lwork,
+ iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ssygvx_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ssygvx_work", info );
+ return info;
+ }
+ if( ldz < ncols_z ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_ssygvx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ssygvx( &itype, &jobz, &range, &uplo, &n, a, &lda_t, b,
+ &ldb_t, &vl, &vu, &il, &iu, &abstol, m, w, z, &ldz_t,
+ work, &lwork, iwork, ifail, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssygvx( &itype, &jobz, &range, &uplo, &n, a_t, &lda_t, b_t,
+ &ldb_t, &vl, &vu, &il, &iu, &abstol, m, w, z_t, &ldz_t,
+ work, &lwork, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssygvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssygvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssyrfs.c b/LAPACKE/src/lapacke_ssyrfs.c
new file mode 100644
index 00000000..da76a7b0
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyrfs.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyrfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* a, lapack_int lda,
+ const float* af, lapack_int ldaf,
+ const lapack_int* ipiv, const float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssyrfs_work( matrix_layout, uplo, n, nrhs, a, lda, af, ldaf,
+ ipiv, b, ldb, x, ldx, ferr, berr, work, iwork );
+ /* 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_ssyrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssyrfs_work.c b/LAPACKE/src/lapacke_ssyrfs_work.c
new file mode 100644
index 00000000..6e8c764d
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyrfs_work.c
@@ -0,0 +1,133 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyrfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* a, lapack_int lda,
+ const float* af, lapack_int ldaf,
+ const lapack_int* ipiv, const float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* ferr, float* berr, float* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyrfs( &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b, &ldb, x,
+ &ldx, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* a_t = NULL;
+ float* af_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_ssyrfs_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ssyrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ssyrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_ssyrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (float*)LAPACKE_malloc( sizeof(float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyrfs( &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, ipiv, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssyrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssyrfsx.c b/LAPACKE/src/lapacke_ssyrfsx.c
new file mode 100644
index 00000000..65a3526b
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyrfsx.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyrfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyrfsx( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs, const float* a,
+ lapack_int lda, const float* af, lapack_int ldaf,
+ const lapack_int* ipiv, const float* s,
+ const float* b, lapack_int ldb, float* x,
+ lapack_int ldx, float* rcond, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyrfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -22;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'y' ) ) {
+ if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -14;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssyrfsx_work( matrix_layout, uplo, equed, n, nrhs, a, lda, af,
+ ldaf, ipiv, s, b, ldb, x, ldx, rcond, berr,
+ n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, iwork );
+ /* 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_ssyrfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssyrfsx_work.c b/LAPACKE/src/lapacke_ssyrfsx_work.c
new file mode 100644
index 00000000..a46f759e
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyrfsx_work.c
@@ -0,0 +1,162 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyrfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyrfsx_work( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs, const float* a,
+ lapack_int lda, const float* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const float* s, const float* b, lapack_int ldb,
+ float* x, lapack_int ldx, float* rcond,
+ float* berr, lapack_int n_err_bnds,
+ float* err_bnds_norm, float* err_bnds_comp,
+ lapack_int nparams, float* params, float* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyrfsx( &uplo, &equed, &n, &nrhs, a, &lda, af, &ldaf, ipiv, s,
+ b, &ldb, x, &ldx, rcond, berr, &n_err_bnds,
+ err_bnds_norm, err_bnds_comp, &nparams, params, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* a_t = NULL;
+ float* af_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ssyrfsx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ssyrfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_ssyrfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_ssyrfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (float*)LAPACKE_malloc( sizeof(float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyrfsx( &uplo, &equed, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, s, b_t, &ldb_t, x_t, &ldx_t, rcond, berr,
+ &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t, &nparams,
+ params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyrfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssyrfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssysv.c b/LAPACKE/src/lapacke_ssysv.c
new file mode 100644
index 00000000..7da099b6
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssysv.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssysv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssysv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, float* a, lapack_int lda,
+ lapack_int* ipiv, float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssysv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ssysv_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssysv_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssysv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssysv_rook.c b/LAPACKE/src/lapacke_ssysv_rook.c
new file mode 100644
index 00000000..952bc8a3
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssysv_rook.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssysv_rook
+* Author: Intel Corporation
+* Generated January, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssysv_rook( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, float* a, lapack_int lda,
+ lapack_int* ipiv, float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssysv_rook", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ssysv_rook_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv,
+ b, ldb, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssysv_rook_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv,
+ b, ldb, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssysv_rook", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssysv_rook_work.c b/LAPACKE/src/lapacke_ssysv_rook_work.c
new file mode 100644
index 00000000..4a9c1ead
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssysv_rook_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssysv_rook
+* Author: Intel Corporation
+* Generated January, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssysv_rook_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, float* a, lapack_int lda,
+ lapack_int* ipiv, float* b, lapack_int ldb,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssysv_rook( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_ssysv_rook_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ssysv_rook_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ssysv_rook( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssysv_rook( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssysv_rook_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssysv_rook_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssysv_work.c b/LAPACKE/src/lapacke_ssysv_work.c
new file mode 100644
index 00000000..65365e30
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssysv_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssysv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssysv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, float* a, lapack_int lda,
+ lapack_int* ipiv, float* b, lapack_int ldb,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssysv( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_ssysv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ssysv_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ssysv( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssysv( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssysv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssysv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssysvx.c b/LAPACKE/src/lapacke_ssysvx.c
new file mode 100644
index 00000000..c9499f3c
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssysvx.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssysvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssysvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, const float* a, lapack_int lda,
+ float* af, lapack_int ldaf, lapack_int* ipiv,
+ const float* b, lapack_int ldb, float* x,
+ lapack_int ldx, float* rcond, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssysvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -11;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ssysvx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr,
+ &work_query, lwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_ssysvx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr,
+ work, lwork, iwork );
+ /* 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_ssysvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssysvx_work.c b/LAPACKE/src/lapacke_ssysvx_work.c
new file mode 100644
index 00000000..629f3389
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssysvx_work.c
@@ -0,0 +1,148 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssysvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssysvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs, const float* a,
+ lapack_int lda, float* af, lapack_int ldaf,
+ lapack_int* ipiv, const float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* rcond, float* ferr, float* berr,
+ float* work, lapack_int lwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssysvx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b,
+ &ldb, x, &ldx, rcond, ferr, berr, work, &lwork, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* a_t = NULL;
+ float* af_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ssysvx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ssysvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_ssysvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_ssysvx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ssysvx( &fact, &uplo, &n, &nrhs, a, &lda_t, af, &ldaf_t,
+ ipiv, b, &ldb_t, x, &ldx_t, rcond, ferr, berr, work,
+ &lwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (float*)LAPACKE_malloc( sizeof(float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssysvx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr, berr, work,
+ &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssysvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssysvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssysvxx.c b/LAPACKE/src/lapacke_ssysvxx.c
new file mode 100644
index 00000000..214da9b1
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssysvxx.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssysvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssysvxx( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs, float* a,
+ lapack_int lda, float* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, float* s, float* b,
+ lapack_int ldb, float* x, lapack_int ldx,
+ float* rcond, float* rpvgrw, float* berr,
+ lapack_int n_err_bnds, float* err_bnds_norm,
+ float* err_bnds_comp, lapack_int nparams,
+ float* params )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssysvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+ return -24;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssysvxx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, equed, s, b, ldb, x, ldx, rcond,
+ rpvgrw, berr, n_err_bnds, err_bnds_norm,
+ err_bnds_comp, nparams, params, work, iwork );
+ /* 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_ssysvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssysvxx_work.c b/LAPACKE/src/lapacke_ssysvxx_work.c
new file mode 100644
index 00000000..e8b8199b
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssysvxx_work.c
@@ -0,0 +1,173 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssysvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssysvxx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs, float* a,
+ lapack_int lda, float* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, float* s,
+ float* b, lapack_int ldb, float* x,
+ lapack_int ldx, float* rcond, float* rpvgrw,
+ float* berr, lapack_int n_err_bnds,
+ float* err_bnds_norm, float* err_bnds_comp,
+ lapack_int nparams, float* params, float* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssysvxx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv,
+ equed, s, b, &ldb, x, &ldx, rcond, rpvgrw, berr,
+ &n_err_bnds, err_bnds_norm, err_bnds_comp, &nparams,
+ params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* a_t = NULL;
+ float* af_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ float* err_bnds_norm_t = NULL;
+ float* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ssysvxx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ssysvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_ssysvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_ssysvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (float*)LAPACKE_malloc( sizeof(float) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (float*)
+ LAPACKE_malloc( sizeof(float) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssysvxx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond, rpvgrw,
+ berr, &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t,
+ &nparams, params, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssysvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssysvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssyswapr.c b/LAPACKE/src/lapacke_ssyswapr.c
new file mode 100644
index 00000000..d395023a
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyswapr.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyswapr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyswapr( int matrix_layout, char uplo, lapack_int n,
+ float* a, lapack_int i1, lapack_int i2 )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyswapr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, n ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_ssyswapr_work( matrix_layout, uplo, n, a, i1, i2 );
+}
diff --git a/LAPACKE/src/lapacke_ssyswapr_work.c b/LAPACKE/src/lapacke_ssyswapr_work.c
new file mode 100644
index 00000000..f6cd9355
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssyswapr_work.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssyswapr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssyswapr_work( int matrix_layout, char uplo, lapack_int n,
+ float* a, lapack_int i1, lapack_int i2 )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyswapr( &uplo, &n, a, &i1, &i2 );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ float* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * n * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, n, a_t, n );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssyswapr( &uplo, &n, a_t, &i1, &i2 );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, n, a, n );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssyswapr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssyswapr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssytrd.c b/LAPACKE/src/lapacke_ssytrd.c
new file mode 100644
index 00000000..006e75da
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssytrd.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssytrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytrd( int matrix_layout, char uplo, lapack_int n, float* a,
+ lapack_int lda, float* d, float* e, float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ssytrd_work( matrix_layout, uplo, n, a, lda, d, e, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssytrd_work( matrix_layout, uplo, n, a, lda, d, e, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssytrd_work.c b/LAPACKE/src/lapacke_ssytrd_work.c
new file mode 100644
index 00000000..6733e256
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssytrd_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssytrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytrd_work( int matrix_layout, char uplo, lapack_int n,
+ float* a, lapack_int lda, float* d, float* e,
+ float* tau, float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssytrd( &uplo, &n, a, &lda, d, e, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_ssytrd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ssytrd( &uplo, &n, a, &lda_t, d, e, tau, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssytrd( &uplo, &n, a_t, &lda_t, d, e, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssytrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssytrf.c b/LAPACKE/src/lapacke_ssytrf.c
new file mode 100644
index 00000000..6592e156
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssytrf.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssytrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytrf( int matrix_layout, char uplo, lapack_int n, float* a,
+ lapack_int lda, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ssytrf_work( matrix_layout, uplo, n, a, lda, ipiv,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssytrf_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssytrf_work.c b/LAPACKE/src/lapacke_ssytrf_work.c
new file mode 100644
index 00000000..137350b4
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssytrf_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssytrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytrf_work( int matrix_layout, char uplo, lapack_int n,
+ float* a, lapack_int lda, lapack_int* ipiv,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssytrf( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_ssytrf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ssytrf( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssytrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssytrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssytri.c b/LAPACKE/src/lapacke_ssytri.c
new file mode 100644
index 00000000..2ca5bf83
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssytri.c
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssytri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytri( int matrix_layout, char uplo, lapack_int n, float* a,
+ lapack_int lda, const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssytri_work( matrix_layout, uplo, n, a, lda, ipiv, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytri", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssytri2.c b/LAPACKE/src/lapacke_ssytri2.c
new file mode 100644
index 00000000..08aa8fa6
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssytri2.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssytri2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytri2( int matrix_layout, char uplo, lapack_int n, float* a,
+ lapack_int lda, const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_float* work = NULL;
+ lapack_complex_float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytri2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ssytri2_work( matrix_layout, uplo, n, a, lda, ipiv,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_C2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssytri2_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytri2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssytri2_work.c b/LAPACKE/src/lapacke_ssytri2_work.c
new file mode 100644
index 00000000..ef28d0fd
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssytri2_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssytri2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytri2_work( int matrix_layout, char uplo, lapack_int n,
+ float* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssytri2( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_ssytri2_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ssytri2( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssytri2( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytri2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssytri2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssytri2x.c b/LAPACKE/src/lapacke_ssytri2x.c
new file mode 100644
index 00000000..c09a1468
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssytri2x.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssytri2x
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytri2x( int matrix_layout, char uplo, lapack_int n,
+ float* a, lapack_int lda, const lapack_int* ipiv,
+ lapack_int nb )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytri2x", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n+nb+1)*(+1) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssytri2x_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ nb );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytri2x", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssytri2x_work.c b/LAPACKE/src/lapacke_ssytri2x_work.c
new file mode 100644
index 00000000..84c578d7
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssytri2x_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssytri2x
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytri2x_work( int matrix_layout, char uplo, lapack_int n,
+ float* a, lapack_int lda,
+ const lapack_int* ipiv, float* work,
+ lapack_int nb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssytri2x( &uplo, &n, a, &lda, ipiv, work, &nb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_ssytri2x_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssytri2x( &uplo, &n, a_t, &lda_t, ipiv, work, &nb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytri2x_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssytri2x_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssytri_work.c b/LAPACKE/src/lapacke_ssytri_work.c
new file mode 100644
index 00000000..4fcd84f3
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssytri_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssytri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytri_work( int matrix_layout, char uplo, lapack_int n,
+ float* a, lapack_int lda,
+ const lapack_int* ipiv, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssytri( &uplo, &n, a, &lda, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_ssytri_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssytri( &uplo, &n, a_t, &lda_t, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssytri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssytrs.c b/LAPACKE/src/lapacke_ssytrs.c
new file mode 100644
index 00000000..ab7cdb6f
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssytrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssytrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* a, lapack_int lda,
+ const lapack_int* ipiv, float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_ssytrs_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_ssytrs2.c b/LAPACKE/src/lapacke_ssytrs2.c
new file mode 100644
index 00000000..cf9c2dcc
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssytrs2.c
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssytrs2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytrs2( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* a, lapack_int lda,
+ const lapack_int* ipiv, float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytrs2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ssytrs2_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytrs2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssytrs2_work.c b/LAPACKE/src/lapacke_ssytrs2_work.c
new file mode 100644
index 00000000..1ff64ce1
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssytrs2_work.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssytrs2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytrs2_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* a,
+ lapack_int lda, const lapack_int* ipiv,
+ float* b, lapack_int ldb, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssytrs2( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_ssytrs2_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ssytrs2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssytrs2( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytrs2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssytrs2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ssytrs_work.c b/LAPACKE/src/lapacke_ssytrs_work.c
new file mode 100644
index 00000000..e25c6e15
--- /dev/null
+++ b/LAPACKE/src/lapacke_ssytrs_work.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ssytrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const float* a, lapack_int lda,
+ const lapack_int* ipiv, float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssytrs( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_ssytrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ssytrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ssytrs( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ssytrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ssytrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stbcon.c b/LAPACKE/src/lapacke_stbcon.c
new file mode 100644
index 00000000..0e4143f4
--- /dev/null
+++ b/LAPACKE/src/lapacke_stbcon.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stbcon( int matrix_layout, char norm, char uplo, char diag,
+ lapack_int n, lapack_int kd, const float* ab,
+ lapack_int ldab, float* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stbcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_stb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_stbcon_work( matrix_layout, norm, uplo, diag, n, kd, ab, ldab,
+ rcond, work, iwork );
+ /* 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_stbcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stbcon_work.c b/LAPACKE/src/lapacke_stbcon_work.c
new file mode 100644
index 00000000..f8295d75
--- /dev/null
+++ b/LAPACKE/src/lapacke_stbcon_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stbcon_work( int matrix_layout, char norm, char uplo,
+ char diag, lapack_int n, lapack_int kd,
+ const float* ab, lapack_int ldab, float* rcond,
+ float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stbcon( &norm, &uplo, &diag, &n, &kd, ab, &ldab, rcond, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ float* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_stbcon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_stb_trans( matrix_layout, uplo, diag, n, kd, ab, ldab, ab_t,
+ ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stbcon( &norm, &uplo, &diag, &n, &kd, ab_t, &ldab_t, rcond, work,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stbcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stbcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stbrfs.c b/LAPACKE/src/lapacke_stbrfs.c
new file mode 100644
index 00000000..194b7e0c
--- /dev/null
+++ b/LAPACKE/src/lapacke_stbrfs.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stbrfs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int kd, lapack_int nrhs,
+ const float* ab, lapack_int ldab, const float* b,
+ lapack_int ldb, const float* x, lapack_int ldx,
+ float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stbrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_stb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_stbrfs_work( matrix_layout, uplo, trans, diag, n, kd, nrhs,
+ ab, ldab, b, ldb, x, ldx, ferr, berr, work,
+ iwork );
+ /* 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_stbrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stbrfs_work.c b/LAPACKE/src/lapacke_stbrfs_work.c
new file mode 100644
index 00000000..b03dd64d
--- /dev/null
+++ b/LAPACKE/src/lapacke_stbrfs_work.c
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stbrfs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int kd,
+ lapack_int nrhs, const float* ab,
+ lapack_int ldab, const float* b, lapack_int ldb,
+ const float* x, lapack_int ldx, float* ferr,
+ float* berr, float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stbrfs( &uplo, &trans, &diag, &n, &kd, &nrhs, ab, &ldab, b, &ldb,
+ x, &ldx, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_stbrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_stbrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_stbrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_stb_trans( matrix_layout, uplo, diag, n, kd, ab, ldab, ab_t,
+ ldab_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stbrfs( &uplo, &trans, &diag, &n, &kd, &nrhs, ab_t, &ldab_t, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stbrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stbrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stbtrs.c b/LAPACKE/src/lapacke_stbtrs.c
new file mode 100644
index 00000000..411662d0
--- /dev/null
+++ b/LAPACKE/src/lapacke_stbtrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stbtrs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int kd, lapack_int nrhs,
+ const float* ab, lapack_int ldab, float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stbtrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_stb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+#endif
+ return LAPACKE_stbtrs_work( matrix_layout, uplo, trans, diag, n, kd, nrhs,
+ ab, ldab, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_stbtrs_work.c b/LAPACKE/src/lapacke_stbtrs_work.c
new file mode 100644
index 00000000..b4716872
--- /dev/null
+++ b/LAPACKE/src/lapacke_stbtrs_work.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stbtrs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int kd,
+ lapack_int nrhs, const float* ab,
+ lapack_int ldab, float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stbtrs( &uplo, &trans, &diag, &n, &kd, &nrhs, ab, &ldab, b, &ldb,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ float* ab_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_stbtrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_stbtrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (float*)LAPACKE_malloc( sizeof(float) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_stb_trans( matrix_layout, uplo, diag, n, kd, ab, ldab, ab_t,
+ ldab_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stbtrs( &uplo, &trans, &diag, &n, &kd, &nrhs, ab_t, &ldab_t, b_t,
+ &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stbtrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stbtrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stfsm.c b/LAPACKE/src/lapacke_stfsm.c
new file mode 100644
index 00000000..c1a84b29
--- /dev/null
+++ b/LAPACKE/src/lapacke_stfsm.c
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stfsm
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stfsm( int matrix_layout, char transr, char side, char uplo,
+ char trans, char diag, lapack_int m, lapack_int n,
+ float alpha, const float* a, float* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stfsm", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( IS_S_NONZERO(alpha) ) {
+ if( LAPACKE_stf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_s_nancheck( 1, &alpha, 1 ) ) {
+ return -9;
+ }
+ if( IS_S_NONZERO(alpha) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -11;
+ }
+ }
+#endif
+ return LAPACKE_stfsm_work( matrix_layout, transr, side, uplo, trans, diag, m,
+ n, alpha, a, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_stfsm_work.c b/LAPACKE/src/lapacke_stfsm_work.c
new file mode 100644
index 00000000..34ef782c
--- /dev/null
+++ b/LAPACKE/src/lapacke_stfsm_work.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stfsm
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stfsm_work( int matrix_layout, char transr, char side,
+ char uplo, char trans, char diag, lapack_int m,
+ lapack_int n, float alpha, const float* a,
+ float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stfsm( &transr, &side, &uplo, &trans, &diag, &m, &n, &alpha, a,
+ b, &ldb );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,m);
+ float* b_t = NULL;
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_stfsm_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( IS_S_NONZERO(alpha) ) {
+ a_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ if( IS_S_NONZERO(alpha) ) {
+ LAPACKE_sge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ }
+ if( IS_S_NONZERO(alpha) ) {
+ LAPACKE_stf_trans( matrix_layout, transr, uplo, diag, n, a, a_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_stfsm( &transr, &side, &uplo, &trans, &diag, &m, &n, &alpha, a_t,
+ b_t, &ldb_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ if( IS_S_NONZERO(alpha) ) {
+ LAPACKE_free( a_t );
+ }
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stfsm_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stfsm_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stftri.c b/LAPACKE/src/lapacke_stftri.c
new file mode 100644
index 00000000..31a7c5fa
--- /dev/null
+++ b/LAPACKE/src/lapacke_stftri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stftri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stftri( int matrix_layout, char transr, char uplo, char diag,
+ lapack_int n, float* a )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stftri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_stf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_stftri_work( matrix_layout, transr, uplo, diag, n, a );
+}
diff --git a/LAPACKE/src/lapacke_stftri_work.c b/LAPACKE/src/lapacke_stftri_work.c
new file mode 100644
index 00000000..772ed8b2
--- /dev/null
+++ b/LAPACKE/src/lapacke_stftri_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stftri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stftri_work( int matrix_layout, char transr, char uplo,
+ char diag, lapack_int n, float* a )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stftri( &transr, &uplo, &diag, &n, a, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ float* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_stf_trans( matrix_layout, transr, uplo, diag, n, a, a_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stftri( &transr, &uplo, &diag, &n, a_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_stf_trans( LAPACK_COL_MAJOR, transr, uplo, diag, n, a_t, a );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stftri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stftri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stfttp.c b/LAPACKE/src/lapacke_stfttp.c
new file mode 100644
index 00000000..84b361ab
--- /dev/null
+++ b/LAPACKE/src/lapacke_stfttp.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stfttp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stfttp( int matrix_layout, char transr, char uplo,
+ lapack_int n, const float* arf, float* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stfttp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spf_nancheck( n, arf ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_stfttp_work( matrix_layout, transr, uplo, n, arf, ap );
+}
diff --git a/LAPACKE/src/lapacke_stfttp_work.c b/LAPACKE/src/lapacke_stfttp_work.c
new file mode 100644
index 00000000..bd58aca3
--- /dev/null
+++ b/LAPACKE/src/lapacke_stfttp_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stfttp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stfttp_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, const float* arf, float* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stfttp( &transr, &uplo, &n, arf, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ float* ap_t = NULL;
+ float* arf_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ arf_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( arf_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spf_trans( matrix_layout, transr, uplo, n, arf, arf_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stfttp( &transr, &uplo, &n, arf_t, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_spp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( arf_t );
+exit_level_1:
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stfttp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stfttp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stfttr.c b/LAPACKE/src/lapacke_stfttr.c
new file mode 100644
index 00000000..f20a439e
--- /dev/null
+++ b/LAPACKE/src/lapacke_stfttr.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stfttr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stfttr( int matrix_layout, char transr, char uplo,
+ lapack_int n, const float* arf, float* a,
+ lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stfttr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spf_nancheck( n, arf ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_stfttr_work( matrix_layout, transr, uplo, n, arf, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_stfttr_work.c b/LAPACKE/src/lapacke_stfttr_work.c
new file mode 100644
index 00000000..a10bb583
--- /dev/null
+++ b/LAPACKE/src/lapacke_stfttr_work.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stfttr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stfttr_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, const float* arf, float* a,
+ lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stfttr( &transr, &uplo, &n, arf, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ float* arf_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_stfttr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ arf_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( arf_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spf_trans( matrix_layout, transr, uplo, n, arf, arf_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stfttr( &transr, &uplo, &n, arf_t, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( arf_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stfttr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stfttr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stgevc.c b/LAPACKE/src/lapacke_stgevc.c
new file mode 100644
index 00000000..7ef65dd7
--- /dev/null
+++ b/LAPACKE/src/lapacke_stgevc.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stgevc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stgevc( int matrix_layout, char side, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const float* s, lapack_int lds, const float* p,
+ lapack_int ldp, float* vl, lapack_int ldvl,
+ float* vr, lapack_int ldvr, lapack_int mm,
+ lapack_int* m )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stgevc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, p, ldp ) ) {
+ return -8;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, s, lds ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,6*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_stgevc_work( matrix_layout, side, howmny, select, n, s, lds,
+ p, ldp, vl, ldvl, vr, ldvr, mm, m, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stgevc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stgevc_work.c b/LAPACKE/src/lapacke_stgevc_work.c
new file mode 100644
index 00000000..c5cbbf20
--- /dev/null
+++ b/LAPACKE/src/lapacke_stgevc_work.c
@@ -0,0 +1,153 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stgevc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stgevc_work( int matrix_layout, char side, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const float* s, lapack_int lds, const float* p,
+ lapack_int ldp, float* vl, lapack_int ldvl,
+ float* vr, lapack_int ldvr, lapack_int mm,
+ lapack_int* m, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stgevc( &side, &howmny, select, &n, s, &lds, p, &ldp, vl, &ldvl,
+ vr, &ldvr, &mm, m, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldp_t = MAX(1,n);
+ lapack_int lds_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ float* s_t = NULL;
+ float* p_t = NULL;
+ float* vl_t = NULL;
+ float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldp < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_stgevc_work", info );
+ return info;
+ }
+ if( lds < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_stgevc_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_stgevc_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_stgevc_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ s_t = (float*)LAPACKE_malloc( sizeof(float) * lds_t * MAX(1,n) );
+ if( s_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ p_t = (float*)LAPACKE_malloc( sizeof(float) * ldp_t * MAX(1,n) );
+ if( p_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ vl_t = (float*)LAPACKE_malloc( sizeof(float) * ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ vr_t = (float*)LAPACKE_malloc( sizeof(float) * ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, s, lds, s_t, lds_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, p, ldp, p_t, ldp_t );
+ if( ( LAPACKE_lsame( side, 'l' ) || LAPACKE_lsame( side, 'b' ) ) &&
+ LAPACKE_lsame( howmny, 'b' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( ( LAPACKE_lsame( side, 'r' ) || LAPACKE_lsame( side, 'b' ) ) &&
+ LAPACKE_lsame( howmny, 'b' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_stgevc( &side, &howmny, select, &n, s_t, &lds_t, p_t, &ldp_t,
+ vl_t, &ldvl_t, vr_t, &ldvr_t, &mm, m, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, mm, vl_t, ldvl_t, vl,
+ ldvl );
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, mm, vr_t, ldvr_t, vr,
+ ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_2:
+ LAPACKE_free( p_t );
+exit_level_1:
+ LAPACKE_free( s_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stgevc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stgevc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stgexc.c b/LAPACKE/src/lapacke_stgexc.c
new file mode 100644
index 00000000..95f83797
--- /dev/null
+++ b/LAPACKE/src/lapacke_stgexc.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stgexc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stgexc( int matrix_layout, lapack_logical wantq,
+ lapack_logical wantz, lapack_int n, float* a,
+ lapack_int lda, float* b, lapack_int ldb, float* q,
+ lapack_int ldq, float* z, lapack_int ldz,
+ lapack_int* ifst, lapack_int* ilst )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stgexc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -7;
+ }
+ if( wantq ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -9;
+ }
+ }
+ if( wantz ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_stgexc_work( matrix_layout, wantq, wantz, n, a, lda, b, ldb,
+ q, ldq, z, ldz, ifst, ilst, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_stgexc_work( matrix_layout, wantq, wantz, n, a, lda, b, ldb,
+ q, ldq, z, ldz, ifst, ilst, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stgexc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stgexc_work.c b/LAPACKE/src/lapacke_stgexc_work.c
new file mode 100644
index 00000000..df540b09
--- /dev/null
+++ b/LAPACKE/src/lapacke_stgexc_work.c
@@ -0,0 +1,158 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stgexc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stgexc_work( int matrix_layout, lapack_logical wantq,
+ lapack_logical wantz, lapack_int n, float* a,
+ lapack_int lda, float* b, lapack_int ldb,
+ float* q, lapack_int ldq, float* z,
+ lapack_int ldz, lapack_int* ifst,
+ lapack_int* ilst, float* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stgexc( &wantq, &wantz, &n, a, &lda, b, &ldb, q, &ldq, z, &ldz,
+ ifst, ilst, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ float* q_t = NULL;
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_stgexc_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_stgexc_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_stgexc_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_stgexc_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_stgexc( &wantq, &wantz, &n, a, &lda_t, b, &ldb_t, q, &ldq_t,
+ z, &ldz_t, ifst, ilst, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( wantq ) {
+ q_t = (float*)LAPACKE_malloc( sizeof(float) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( wantz ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ if( wantq ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ if( wantz ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_stgexc( &wantq, &wantz, &n, a_t, &lda_t, b_t, &ldb_t, q_t,
+ &ldq_t, z_t, &ldz_t, ifst, ilst, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( wantq ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( wantz ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( wantz ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( wantq ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stgexc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stgexc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stgsen.c b/LAPACKE/src/lapacke_stgsen.c
new file mode 100644
index 00000000..b1217d06
--- /dev/null
+++ b/LAPACKE/src/lapacke_stgsen.c
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stgsen
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stgsen( int matrix_layout, lapack_int ijob,
+ lapack_logical wantq, lapack_logical wantz,
+ const lapack_logical* select, lapack_int n, float* a,
+ lapack_int lda, float* b, lapack_int ldb,
+ float* alphar, float* alphai, float* beta, float* q,
+ lapack_int ldq, float* z, lapack_int ldz,
+ lapack_int* m, float* pl, float* pr, float* dif )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stgsen", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+ if( wantq ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -14;
+ }
+ }
+ if( wantz ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -16;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_stgsen_work( matrix_layout, ijob, wantq, wantz, select, n, a,
+ lda, b, ldb, alphar, alphai, beta, q, ldq, z,
+ ldz, m, pl, pr, dif, &work_query, lwork,
+ &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ if( ijob != 0 ) {
+ 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_stgsen_work( matrix_layout, ijob, wantq, wantz, select, n, a,
+ lda, b, ldb, alphar, alphai, beta, q, ldq, z,
+ ldz, m, pl, pr, dif, work, lwork, iwork,
+ liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ if( ijob != 0 ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stgsen", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stgsen_work.c b/LAPACKE/src/lapacke_stgsen_work.c
new file mode 100644
index 00000000..d5075b30
--- /dev/null
+++ b/LAPACKE/src/lapacke_stgsen_work.c
@@ -0,0 +1,165 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stgsen
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stgsen_work( int matrix_layout, lapack_int ijob,
+ lapack_logical wantq, lapack_logical wantz,
+ const lapack_logical* select, lapack_int n,
+ float* a, lapack_int lda, float* b,
+ lapack_int ldb, float* alphar, float* alphai,
+ float* beta, float* q, lapack_int ldq, float* z,
+ lapack_int ldz, lapack_int* m, float* pl,
+ float* pr, float* dif, float* work,
+ lapack_int lwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stgsen( &ijob, &wantq, &wantz, select, &n, a, &lda, b, &ldb,
+ alphar, alphai, beta, q, &ldq, z, &ldz, m, pl, pr, dif,
+ work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ float* q_t = NULL;
+ float* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_stgsen_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_stgsen_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_stgsen_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_stgsen_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_stgsen( &ijob, &wantq, &wantz, select, &n, a, &lda_t, b,
+ &ldb_t, alphar, alphai, beta, q, &ldq_t, z, &ldz_t,
+ m, pl, pr, dif, work, &lwork, iwork, &liwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( wantq ) {
+ q_t = (float*)LAPACKE_malloc( sizeof(float) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( wantz ) {
+ z_t = (float*)LAPACKE_malloc( sizeof(float) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ if( wantq ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ if( wantz ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_stgsen( &ijob, &wantq, &wantz, select, &n, a_t, &lda_t, b_t,
+ &ldb_t, alphar, alphai, beta, q_t, &ldq_t, z_t, &ldz_t,
+ m, pl, pr, dif, work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( wantq ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( wantz ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( wantz ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( wantq ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stgsen_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stgsen_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stgsja.c b/LAPACKE/src/lapacke_stgsja.c
new file mode 100644
index 00000000..10a8d267
--- /dev/null
+++ b/LAPACKE/src/lapacke_stgsja.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stgsja
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stgsja( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int p, lapack_int n,
+ lapack_int k, lapack_int l, float* a, lapack_int lda,
+ float* b, lapack_int ldb, float tola, float tolb,
+ float* alpha, float* beta, float* u, lapack_int ldu,
+ float* v, lapack_int ldv, float* q, lapack_int ldq,
+ lapack_int* ncycle )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stgsja", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -10;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -12;
+ }
+ if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -22;
+ }
+ }
+ if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
+ return -14;
+ }
+ if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
+ return -15;
+ }
+ if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, m, m, u, ldu ) ) {
+ return -18;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, p, p, v, ldv ) ) {
+ return -20;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_stgsja_work( matrix_layout, jobu, jobv, jobq, m, p, n, k, l,
+ a, lda, b, ldb, tola, tolb, alpha, beta, u, ldu,
+ v, ldv, q, ldq, work, ncycle );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stgsja", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stgsja_work.c b/LAPACKE/src/lapacke_stgsja_work.c
new file mode 100644
index 00000000..d2b55feb
--- /dev/null
+++ b/LAPACKE/src/lapacke_stgsja_work.c
@@ -0,0 +1,180 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stgsja
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stgsja_work( int matrix_layout, char jobu, char jobv,
+ char jobq, lapack_int m, lapack_int p,
+ lapack_int n, lapack_int k, lapack_int l,
+ float* a, lapack_int lda, float* b,
+ lapack_int ldb, float tola, float tolb,
+ float* alpha, float* beta, float* u,
+ lapack_int ldu, float* v, lapack_int ldv,
+ float* q, lapack_int ldq, float* work,
+ lapack_int* ncycle )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stgsja( &jobu, &jobv, &jobq, &m, &p, &n, &k, &l, a, &lda, b,
+ &ldb, &tola, &tolb, alpha, beta, u, &ldu, v, &ldv, q,
+ &ldq, work, ncycle, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldu_t = MAX(1,m);
+ lapack_int ldv_t = MAX(1,p);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ float* u_t = NULL;
+ float* v_t = NULL;
+ float* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_stgsja_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_stgsja_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -23;
+ LAPACKE_xerbla( "LAPACKE_stgsja_work", info );
+ return info;
+ }
+ if( ldu < m ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_stgsja_work", info );
+ return info;
+ }
+ if( ldv < p ) {
+ info = -21;
+ LAPACKE_xerbla( "LAPACKE_stgsja_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+ u_t = (float*)LAPACKE_malloc( sizeof(float) * ldu_t * MAX(1,m) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ v_t = (float*)LAPACKE_malloc( sizeof(float) * ldv_t * MAX(1,p) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+ q_t = (float*)LAPACKE_malloc( sizeof(float) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_sge_trans( matrix_layout, m, m, u, ldu, u_t, ldu_t );
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_sge_trans( matrix_layout, p, p, v, ldv, v_t, ldv_t );
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_stgsja( &jobu, &jobv, &jobq, &m, &p, &n, &k, &l, a_t, &lda_t,
+ b_t, &ldb_t, &tola, &tolb, alpha, beta, u_t, &ldu_t, v_t,
+ &ldv_t, q_t, &ldq_t, work, ncycle, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
+ }
+ if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, p, p, v_t, ldv_t, v, ldv );
+ }
+ if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_4:
+ if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_free( v_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stgsja_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stgsja_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stgsna.c b/LAPACKE/src/lapacke_stgsna.c
new file mode 100644
index 00000000..d4666a3d
--- /dev/null
+++ b/LAPACKE/src/lapacke_stgsna.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stgsna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stgsna( int matrix_layout, char job, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const float* a, lapack_int lda, const float* b,
+ lapack_int ldb, const float* vl, lapack_int ldvl,
+ const float* vr, lapack_int ldvr, float* s,
+ float* dif, lapack_int mm, lapack_int* m )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stgsna", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n+6) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_stgsna_work( matrix_layout, job, howmny, select, n, a, lda, b,
+ ldb, vl, ldvl, vr, ldvr, s, dif, mm, m,
+ &work_query, lwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ 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_stgsna_work( matrix_layout, job, howmny, select, n, a, lda, b,
+ ldb, vl, ldvl, vr, ldvr, s, dif, mm, m, work,
+ lwork, iwork );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stgsna", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stgsna_work.c b/LAPACKE/src/lapacke_stgsna_work.c
new file mode 100644
index 00000000..ac6960b5
--- /dev/null
+++ b/LAPACKE/src/lapacke_stgsna_work.c
@@ -0,0 +1,152 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stgsna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stgsna_work( int matrix_layout, char job, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const float* a, lapack_int lda, const float* b,
+ lapack_int ldb, const float* vl,
+ lapack_int ldvl, const float* vr,
+ lapack_int ldvr, float* s, float* dif,
+ lapack_int mm, lapack_int* m, float* work,
+ lapack_int lwork, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stgsna( &job, &howmny, select, &n, a, &lda, b, &ldb, vl, &ldvl,
+ vr, &ldvr, s, dif, &mm, m, work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ float* vl_t = NULL;
+ float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_stgsna_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_stgsna_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_stgsna_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_stgsna_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_stgsna( &job, &howmny, select, &n, a, &lda_t, b, &ldb_t, vl,
+ &ldvl_t, vr, &ldvr_t, s, dif, &mm, m, work, &lwork,
+ iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ vl_t = (float*)LAPACKE_malloc( sizeof(float) * ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ vr_t = (float*)LAPACKE_malloc( sizeof(float) * ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_stgsna( &job, &howmny, select, &n, a_t, &lda_t, b_t, &ldb_t,
+ vl_t, &ldvl_t, vr_t, &ldvr_t, s, dif, &mm, m, work,
+ &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stgsna_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stgsna_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stgsyl.c b/LAPACKE/src/lapacke_stgsyl.c
new file mode 100644
index 00000000..d4a639c0
--- /dev/null
+++ b/LAPACKE/src/lapacke_stgsyl.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stgsyl
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stgsyl( int matrix_layout, char trans, lapack_int ijob,
+ lapack_int m, lapack_int n, const float* a,
+ lapack_int lda, const float* b, lapack_int ldb,
+ float* c, lapack_int ldc, const float* d,
+ lapack_int ldd, const float* e, lapack_int lde,
+ float* f, lapack_int ldf, float* scale, float* dif )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stgsyl", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, m, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, m, d, ldd ) ) {
+ return -12;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, e, lde ) ) {
+ return -14;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, f, ldf ) ) {
+ return -16;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m+n+6) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_stgsyl_work( matrix_layout, trans, ijob, m, n, a, lda, b, ldb,
+ c, ldc, d, ldd, e, lde, f, ldf, scale, dif,
+ &work_query, lwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ 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_stgsyl_work( matrix_layout, trans, ijob, m, n, a, lda, b, ldb,
+ c, ldc, d, ldd, e, lde, f, ldf, scale, dif,
+ work, lwork, iwork );
+ /* 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_stgsyl", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stgsyl_work.c b/LAPACKE/src/lapacke_stgsyl_work.c
new file mode 100644
index 00000000..5ed0eba4
--- /dev/null
+++ b/LAPACKE/src/lapacke_stgsyl_work.c
@@ -0,0 +1,174 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stgsyl
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stgsyl_work( int matrix_layout, char trans, lapack_int ijob,
+ lapack_int m, lapack_int n, const float* a,
+ lapack_int lda, const float* b, lapack_int ldb,
+ float* c, lapack_int ldc, const float* d,
+ lapack_int ldd, const float* e, lapack_int lde,
+ float* f, lapack_int ldf, float* scale,
+ float* dif, float* work, lapack_int lwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stgsyl( &trans, &ijob, &m, &n, a, &lda, b, &ldb, c, &ldc, d,
+ &ldd, e, &lde, f, &ldf, scale, dif, work, &lwork, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_int ldd_t = MAX(1,m);
+ lapack_int lde_t = MAX(1,n);
+ lapack_int ldf_t = MAX(1,m);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ float* c_t = NULL;
+ float* d_t = NULL;
+ float* e_t = NULL;
+ float* f_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_stgsyl_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_stgsyl_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_stgsyl_work", info );
+ return info;
+ }
+ if( ldd < m ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_stgsyl_work", info );
+ return info;
+ }
+ if( lde < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_stgsyl_work", info );
+ return info;
+ }
+ if( ldf < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_stgsyl_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_stgsyl( &trans, &ijob, &m, &n, a, &lda_t, b, &ldb_t, c,
+ &ldc_t, d, &ldd_t, e, &lde_t, f, &ldf_t, scale, dif,
+ work, &lwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ c_t = (float*)LAPACKE_malloc( sizeof(float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ d_t = (float*)LAPACKE_malloc( sizeof(float) * ldd_t * MAX(1,m) );
+ if( d_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ e_t = (float*)LAPACKE_malloc( sizeof(float) * lde_t * MAX(1,n) );
+ if( e_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ f_t = (float*)LAPACKE_malloc( sizeof(float) * ldf_t * MAX(1,n) );
+ if( f_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, m, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ LAPACKE_sge_trans( matrix_layout, m, m, d, ldd, d_t, ldd_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, e, lde, e_t, lde_t );
+ LAPACKE_sge_trans( matrix_layout, m, n, f, ldf, f_t, ldf_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stgsyl( &trans, &ijob, &m, &n, a_t, &lda_t, b_t, &ldb_t, c_t,
+ &ldc_t, d_t, &ldd_t, e_t, &lde_t, f_t, &ldf_t, scale,
+ dif, work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, f_t, ldf_t, f, ldf );
+ /* Release memory and exit */
+ LAPACKE_free( f_t );
+exit_level_5:
+ LAPACKE_free( e_t );
+exit_level_4:
+ LAPACKE_free( d_t );
+exit_level_3:
+ LAPACKE_free( c_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stgsyl_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stgsyl_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stpcon.c b/LAPACKE/src/lapacke_stpcon.c
new file mode 100644
index 00000000..4a725e31
--- /dev/null
+++ b/LAPACKE/src/lapacke_stpcon.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stpcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stpcon( int matrix_layout, char norm, char uplo, char diag,
+ lapack_int n, const float* ap, float* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stpcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_stp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_stpcon_work( matrix_layout, norm, uplo, diag, n, ap, rcond,
+ work, iwork );
+ /* 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_stpcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stpcon_work.c b/LAPACKE/src/lapacke_stpcon_work.c
new file mode 100644
index 00000000..15102650
--- /dev/null
+++ b/LAPACKE/src/lapacke_stpcon_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stpcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stpcon_work( int matrix_layout, char norm, char uplo,
+ char diag, lapack_int n, const float* ap,
+ float* rcond, float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stpcon( &norm, &uplo, &diag, &n, ap, rcond, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_stp_trans( matrix_layout, uplo, diag, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stpcon( &norm, &uplo, &diag, &n, ap_t, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stpcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stpcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stpmqrt.c b/LAPACKE/src/lapacke_stpmqrt.c
new file mode 100644
index 00000000..7e1a1442
--- /dev/null
+++ b/LAPACKE/src/lapacke_stpmqrt.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stpmqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stpmqrt( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int l, lapack_int nb, const float* v,
+ lapack_int ldv, const float* t, lapack_int ldt,
+ float* a, lapack_int lda, float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stpmqrt", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -13;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -15;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) {
+ return -11;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,m) * MAX(1,nb) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_stpmqrt_work( matrix_layout, side, trans, m, n, k, l, nb, v,
+ ldv, t, ldt, a, lda, b, ldb, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stpmqrt", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stpmqrt_work.c b/LAPACKE/src/lapacke_stpmqrt_work.c
new file mode 100644
index 00000000..1bf2f02b
--- /dev/null
+++ b/LAPACKE/src/lapacke_stpmqrt_work.c
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stpmqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stpmqrt_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int l, lapack_int nb, const float* v,
+ lapack_int ldv, const float* t, lapack_int ldt,
+ float* a, lapack_int lda, float* b,
+ lapack_int ldb, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stpmqrt( &side, &trans, &m, &n, &k, &l, &nb, v, &ldv, t, &ldt, a,
+ &lda, b, &ldb, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'r' ) ? k : k;
+ lapack_int lda_t = MAX(1,k);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,ldt);
+ lapack_int ldv_t = MAX(1,ldv);
+ float* v_t = NULL;
+ float* t_t = NULL;
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_stpmqrt_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_stpmqrt_work", info );
+ return info;
+ }
+ if( ldt < nb ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_stpmqrt_work", info );
+ return info;
+ }
+ if( ldv < k ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_stpmqrt_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (float*)LAPACKE_malloc( sizeof(float) * ldv_t * MAX(1,k) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (float*)LAPACKE_malloc( sizeof(float) * ldt_t * MAX(1,nb) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, ldv, k, v, ldv, v_t, ldv_t );
+ LAPACKE_sge_trans( matrix_layout, ldt, nb, t, ldt, t_t, ldt_t );
+ LAPACKE_sge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stpmqrt( &side, &trans, &m, &n, &k, &l, &nb, v_t, &ldv_t, t_t,
+ &ldt_t, a_t, &lda_t, b_t, &ldb_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, k, m, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_3:
+ LAPACKE_free( a_t );
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stpmqrt_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stpmqrt_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stpqrt.c b/LAPACKE/src/lapacke_stpqrt.c
new file mode 100644
index 00000000..1d638dc1
--- /dev/null
+++ b/LAPACKE/src/lapacke_stpqrt.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stpqrt( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int l, lapack_int nb, float* a,
+ lapack_int lda, float* b, lapack_int ldb, float* t,
+ lapack_int ldt )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stpqrt", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,nb) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_stpqrt_work( matrix_layout, m, n, l, nb, a, lda, b, ldb, t,
+ ldt, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stpqrt", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stpqrt2.c b/LAPACKE/src/lapacke_stpqrt2.c
new file mode 100644
index 00000000..2d074332
--- /dev/null
+++ b/LAPACKE/src/lapacke_stpqrt2.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stpqrt2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stpqrt2( int matrix_layout,
+ lapack_int m, lapack_int n, lapack_int l,
+ float* a, lapack_int lda, float* b, lapack_int ldb,
+ float* t, lapack_int ldt )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stpqrt2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_stpqrt2_work( matrix_layout, m, n, l, a, lda, b, ldb, t, ldt );
+}
diff --git a/LAPACKE/src/lapacke_stpqrt2_work.c b/LAPACKE/src/lapacke_stpqrt2_work.c
new file mode 100644
index 00000000..860a900d
--- /dev/null
+++ b/LAPACKE/src/lapacke_stpqrt2_work.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stpqrt2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stpqrt2_work( int matrix_layout,
+ lapack_int m, lapack_int n, lapack_int l,
+ float* a, lapack_int lda, float* b,
+ lapack_int ldb, float* t, lapack_int ldt )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stpqrt2( &m, &n, &l, a, &lda, b, &ldb, t, &ldt, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ float* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_stpqrt2_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_stpqrt2_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_stpqrt2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ t_t = (float*)LAPACKE_malloc( sizeof(float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stpqrt2( &m, &n, &l, a_t, &lda_t, b_t, &ldb_t, t_t, &ldt_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stpqrt2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stpqrt2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stpqrt_work.c b/LAPACKE/src/lapacke_stpqrt_work.c
new file mode 100644
index 00000000..64353191
--- /dev/null
+++ b/LAPACKE/src/lapacke_stpqrt_work.c
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stpqrt_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int l, lapack_int nb, float* a,
+ lapack_int lda, float* b, lapack_int ldb,
+ float* t, lapack_int ldt, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stpqrt( &m, &n, &l, &nb, a, &lda, b, &ldb, t, &ldt, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,nb);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ float* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_stpqrt_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_stpqrt_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_stpqrt_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ t_t = (float*)LAPACKE_malloc( sizeof(float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stpqrt( &m, &n, &l, &nb, a_t, &lda_t, b_t, &ldb_t, t_t, &ldt_t,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nb, n, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stpqrt_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stpqrt_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stprfb.c b/LAPACKE/src/lapacke_stprfb.c
new file mode 100644
index 00000000..28a2cbab
--- /dev/null
+++ b/LAPACKE/src/lapacke_stprfb.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stprfb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stprfb( int matrix_layout, char side, char trans, char direct,
+ char storev, lapack_int m, lapack_int n,
+ lapack_int k, lapack_int l, const float* v,
+ lapack_int ldv, const float* t, lapack_int ldt,
+ float* a, lapack_int lda, float* b, lapack_int ldb)
+{
+ lapack_int info = 0;
+ lapack_int ldwork;
+ lapack_int work_size;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stprfb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -14;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -16;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, ldt, k, t, ldt ) ) {
+ return -12;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ return -10;
+ }
+#endif
+ if (side=='l' || side=='L') {
+ ldwork = k;
+ work_size = MAX(1,ldwork) * MAX(1,n);
+ }
+ else {
+ ldwork = m;
+ work_size = MAX(1,ldwork) * MAX(1,k);
+ }
+ /* Allocate memory for working array(s) */
+ work = (float*)
+ LAPACKE_malloc( sizeof(float) * work_size );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_stprfb_work( matrix_layout, side, trans, direct, storev, m, n,
+ k, l, v, ldv, t, ldt, a, lda, b, ldb, work,
+ ldwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stprfb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stprfb_work.c b/LAPACKE/src/lapacke_stprfb_work.c
new file mode 100644
index 00000000..b03a5728
--- /dev/null
+++ b/LAPACKE/src/lapacke_stprfb_work.c
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stprfb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stprfb_work( int matrix_layout, char side, char trans,
+ char direct, char storev, lapack_int m,
+ lapack_int n, lapack_int k, lapack_int l,
+ const float* v, lapack_int ldv, const float* t,
+ lapack_int ldt, float* a, lapack_int lda,
+ float* b, lapack_int ldb, const float* work,
+ lapack_int ldwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stprfb( &side, &trans, &direct, &storev, &m, &n, &k, &l, v, &ldv,
+ t, &ldt, a, &lda, b, &ldb, work, &ldwork );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'r' ) ? k : k;
+ lapack_int lda_t = MAX(1,k);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,ldt);
+ lapack_int ldv_t = MAX(1,ldv);
+ float* v_t = NULL;
+ float* t_t = NULL;
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_stprfb_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_stprfb_work", info );
+ return info;
+ }
+ if( ldt < k ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_stprfb_work", info );
+ return info;
+ }
+ if( ldv < k ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_stprfb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (float*)LAPACKE_malloc( sizeof(float) * ldv_t * MAX(1,k) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (float*)LAPACKE_malloc( sizeof(float) * ldt_t * MAX(1,k) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, ldv, k, v, ldv, v_t, ldv_t );
+ LAPACKE_sge_trans( matrix_layout, ldt, k, t, ldt, t_t, ldt_t );
+ LAPACKE_sge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stprfb( &side, &trans, &direct, &storev, &m, &n, &k, &l, v_t,
+ &ldv_t, t_t, &ldt_t, a_t, &lda_t, b_t, &ldb_t, work,
+ &ldwork );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, k, m, a_t, lda_t, a, lda );
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_3:
+ LAPACKE_free( a_t );
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stprfb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stprfb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stprfs.c b/LAPACKE/src/lapacke_stprfs.c
new file mode 100644
index 00000000..e0e18347
--- /dev/null
+++ b/LAPACKE/src/lapacke_stprfs.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stprfs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int nrhs, const float* ap,
+ const float* b, lapack_int ldb, const float* x,
+ lapack_int ldx, float* ferr, float* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stprfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_stp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_stprfs_work( matrix_layout, uplo, trans, diag, n, nrhs, ap, b,
+ ldb, x, ldx, ferr, berr, work, iwork );
+ /* 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_stprfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stprfs_work.c b/LAPACKE/src/lapacke_stprfs_work.c
new file mode 100644
index 00000000..d761acbb
--- /dev/null
+++ b/LAPACKE/src/lapacke_stprfs_work.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stprfs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int nrhs,
+ const float* ap, const float* b, lapack_int ldb,
+ const float* x, lapack_int ldx, float* ferr,
+ float* berr, float* work, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stprfs( &uplo, &trans, &diag, &n, &nrhs, ap, b, &ldb, x, &ldx,
+ ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* b_t = NULL;
+ float* x_t = NULL;
+ float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_stprfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_stprfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ LAPACKE_stp_trans( matrix_layout, uplo, diag, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stprfs( &uplo, &trans, &diag, &n, &nrhs, ap_t, b_t, &ldb_t, x_t,
+ &ldx_t, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stprfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stprfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stptri.c b/LAPACKE/src/lapacke_stptri.c
new file mode 100644
index 00000000..f600c2a3
--- /dev/null
+++ b/LAPACKE/src/lapacke_stptri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stptri( int matrix_layout, char uplo, char diag, lapack_int n,
+ float* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stptri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_stp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_stptri_work( matrix_layout, uplo, diag, n, ap );
+}
diff --git a/LAPACKE/src/lapacke_stptri_work.c b/LAPACKE/src/lapacke_stptri_work.c
new file mode 100644
index 00000000..11e6b5d2
--- /dev/null
+++ b/LAPACKE/src/lapacke_stptri_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stptri_work( int matrix_layout, char uplo, char diag,
+ lapack_int n, float* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stptri( &uplo, &diag, &n, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ float* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_stp_trans( matrix_layout, uplo, diag, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stptri( &uplo, &diag, &n, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_stp_trans( LAPACK_COL_MAJOR, uplo, diag, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stptri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stptri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stptrs.c b/LAPACKE/src/lapacke_stptrs.c
new file mode 100644
index 00000000..3977e175
--- /dev/null
+++ b/LAPACKE/src/lapacke_stptrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stptrs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int nrhs, const float* ap,
+ float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stptrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_stp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_stptrs_work( matrix_layout, uplo, trans, diag, n, nrhs, ap, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_stptrs_work.c b/LAPACKE/src/lapacke_stptrs_work.c
new file mode 100644
index 00000000..31540192
--- /dev/null
+++ b/LAPACKE/src/lapacke_stptrs_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stptrs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int nrhs,
+ const float* ap, float* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stptrs( &uplo, &trans, &diag, &n, &nrhs, ap, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ float* b_t = NULL;
+ float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_stptrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_stp_trans( matrix_layout, uplo, diag, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stptrs( &uplo, &trans, &diag, &n, &nrhs, ap_t, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stptrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stptrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stpttf.c b/LAPACKE/src/lapacke_stpttf.c
new file mode 100644
index 00000000..a6cc9a7a
--- /dev/null
+++ b/LAPACKE/src/lapacke_stpttf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stpttf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stpttf( int matrix_layout, char transr, char uplo,
+ lapack_int n, const float* ap, float* arf )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stpttf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spp_nancheck( n, ap ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_stpttf_work( matrix_layout, transr, uplo, n, ap, arf );
+}
diff --git a/LAPACKE/src/lapacke_stpttf_work.c b/LAPACKE/src/lapacke_stpttf_work.c
new file mode 100644
index 00000000..ef4cb041
--- /dev/null
+++ b/LAPACKE/src/lapacke_stpttf_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stpttf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stpttf_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, const float* ap, float* arf )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stpttf( &transr, &uplo, &n, ap, arf, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ float* ap_t = NULL;
+ float* arf_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ arf_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( arf_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stpttf( &transr, &uplo, &n, ap_t, arf_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_spf_trans( LAPACK_COL_MAJOR, transr, uplo, n, arf_t, arf );
+ /* Release memory and exit */
+ LAPACKE_free( arf_t );
+exit_level_1:
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stpttf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stpttf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stpttr.c b/LAPACKE/src/lapacke_stpttr.c
new file mode 100644
index 00000000..01cf6a37
--- /dev/null
+++ b/LAPACKE/src/lapacke_stpttr.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stpttr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stpttr( int matrix_layout, char uplo, lapack_int n,
+ const float* ap, float* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stpttr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_spp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_stpttr_work( matrix_layout, uplo, n, ap, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_stpttr_work.c b/LAPACKE/src/lapacke_stpttr_work.c
new file mode 100644
index 00000000..5d8c7811
--- /dev/null
+++ b/LAPACKE/src/lapacke_stpttr_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stpttr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stpttr_work( int matrix_layout, char uplo, lapack_int n,
+ const float* ap, float* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stpttr( &uplo, &n, ap, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_stpttr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_spp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stpttr( &uplo, &n, ap_t, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stpttr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stpttr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_strcon.c b/LAPACKE/src/lapacke_strcon.c
new file mode 100644
index 00000000..2d44f4e0
--- /dev/null
+++ b/LAPACKE/src/lapacke_strcon.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strcon( int matrix_layout, char norm, char uplo, char diag,
+ lapack_int n, const float* a, lapack_int lda,
+ float* rcond )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_strcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_str_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_strcon_work( matrix_layout, norm, uplo, diag, n, a, lda,
+ rcond, work, iwork );
+ /* 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_strcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_strcon_work.c b/LAPACKE/src/lapacke_strcon_work.c
new file mode 100644
index 00000000..b7a10f93
--- /dev/null
+++ b/LAPACKE/src/lapacke_strcon_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strcon_work( int matrix_layout, char norm, char uplo,
+ char diag, lapack_int n, const float* a,
+ lapack_int lda, float* rcond, float* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_strcon( &norm, &uplo, &diag, &n, a, &lda, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_strcon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_str_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_strcon( &norm, &uplo, &diag, &n, a_t, &lda_t, rcond, work, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_strcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_strcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_strevc.c b/LAPACKE/src/lapacke_strevc.c
new file mode 100644
index 00000000..75f81abf
--- /dev/null
+++ b/LAPACKE/src/lapacke_strevc.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strevc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strevc( int matrix_layout, char side, char howmny,
+ lapack_logical* select, lapack_int n, const float* t,
+ lapack_int ldt, float* vl, lapack_int ldvl,
+ float* vr, lapack_int ldvr, lapack_int mm,
+ lapack_int* m )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_strevc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_strevc_work( matrix_layout, side, howmny, select, n, t, ldt,
+ vl, ldvl, vr, ldvr, mm, m, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_strevc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_strevc_work.c b/LAPACKE/src/lapacke_strevc_work.c
new file mode 100644
index 00000000..8439852d
--- /dev/null
+++ b/LAPACKE/src/lapacke_strevc_work.c
@@ -0,0 +1,137 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strevc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strevc_work( int matrix_layout, char side, char howmny,
+ lapack_logical* select, lapack_int n,
+ const float* t, lapack_int ldt, float* vl,
+ lapack_int ldvl, float* vr, lapack_int ldvr,
+ lapack_int mm, lapack_int* m, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_strevc( &side, &howmny, select, &n, t, &ldt, vl, &ldvl, vr,
+ &ldvr, &mm, m, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldt_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ float* t_t = NULL;
+ float* vl_t = NULL;
+ float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_strevc_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_strevc_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_strevc_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ t_t = (float*)LAPACKE_malloc( sizeof(float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ vl_t = (float*)LAPACKE_malloc( sizeof(float) * ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ vr_t = (float*)LAPACKE_malloc( sizeof(float) * ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( ( LAPACKE_lsame( side, 'l' ) || LAPACKE_lsame( side, 'b' ) ) &&
+ LAPACKE_lsame( howmny, 'b' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( ( LAPACKE_lsame( side, 'r' ) || LAPACKE_lsame( side, 'b' ) ) &&
+ LAPACKE_lsame( howmny, 'b' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_strevc( &side, &howmny, select, &n, t_t, &ldt_t, vl_t, &ldvl_t,
+ vr_t, &ldvr_t, &mm, m, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, mm, vl_t, ldvl_t, vl,
+ ldvl );
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, mm, vr_t, ldvr_t, vr,
+ ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( t_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_strevc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_strevc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_strexc.c b/LAPACKE/src/lapacke_strexc.c
new file mode 100644
index 00000000..a938b65e
--- /dev/null
+++ b/LAPACKE/src/lapacke_strexc.c
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strexc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strexc( int matrix_layout, char compq, lapack_int n, float* t,
+ lapack_int ldt, float* q, lapack_int ldq,
+ lapack_int* ifst, lapack_int* ilst )
+{
+ lapack_int info = 0;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_strexc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -6;
+ }
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_strexc_work( matrix_layout, compq, n, t, ldt, q, ldq, ifst,
+ ilst, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_strexc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_strexc_work.c b/LAPACKE/src/lapacke_strexc_work.c
new file mode 100644
index 00000000..cee4fd97
--- /dev/null
+++ b/LAPACKE/src/lapacke_strexc_work.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strexc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strexc_work( int matrix_layout, char compq, lapack_int n,
+ float* t, lapack_int ldt, float* q,
+ lapack_int ldq, lapack_int* ifst,
+ lapack_int* ilst, float* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_strexc( &compq, &n, t, &ldt, q, &ldq, ifst, ilst, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldt_t = MAX(1,n);
+ float* t_t = NULL;
+ float* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldq < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_strexc_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_strexc_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ t_t = (float*)LAPACKE_malloc( sizeof(float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ q_t = (float*)LAPACKE_malloc( sizeof(float) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_strexc( &compq, &n, t_t, &ldt_t, q_t, &ldq_t, ifst, ilst, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( t_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_strexc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_strexc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_strrfs.c b/LAPACKE/src/lapacke_strrfs.c
new file mode 100644
index 00000000..8b2e7e62
--- /dev/null
+++ b/LAPACKE/src/lapacke_strrfs.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strrfs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int nrhs, const float* a,
+ lapack_int lda, const float* b, lapack_int ldb,
+ const float* x, lapack_int ldx, float* ferr,
+ float* berr )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_strrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_str_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -11;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_strrfs_work( matrix_layout, uplo, trans, diag, n, nrhs, a,
+ lda, b, ldb, x, ldx, ferr, berr, work, iwork );
+ /* 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_strrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_strrfs_work.c b/LAPACKE/src/lapacke_strrfs_work.c
new file mode 100644
index 00000000..25862561
--- /dev/null
+++ b/LAPACKE/src/lapacke_strrfs_work.c
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strrfs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int nrhs,
+ const float* a, lapack_int lda, const float* b,
+ lapack_int ldb, const float* x, lapack_int ldx,
+ float* ferr, float* berr, float* work,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_strrfs( &uplo, &trans, &diag, &n, &nrhs, a, &lda, b, &ldb, x,
+ &ldx, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ float* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_strrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_strrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_strrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x_t = (float*)LAPACKE_malloc( sizeof(float) * ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_str_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_strrfs( &uplo, &trans, &diag, &n, &nrhs, a_t, &lda_t, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_strrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_strrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_strsen.c b/LAPACKE/src/lapacke_strsen.c
new file mode 100644
index 00000000..bbda54e8
--- /dev/null
+++ b/LAPACKE/src/lapacke_strsen.c
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strsen
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strsen( int matrix_layout, char job, char compq,
+ const lapack_logical* select, lapack_int n, float* t,
+ lapack_int ldt, float* q, lapack_int ldq, float* wr,
+ float* wi, lapack_int* m, float* s, float* sep )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_strsen", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -6;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_strsen_work( matrix_layout, job, compq, select, n, t, ldt, q,
+ ldq, wr, wi, m, s, sep, &work_query, lwork,
+ &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ 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_strsen_work( matrix_layout, job, compq, select, n, t, ldt, q,
+ ldq, wr, wi, m, s, sep, work, lwork, iwork,
+ liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_strsen", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_strsen_work.c b/LAPACKE/src/lapacke_strsen_work.c
new file mode 100644
index 00000000..369c72e7
--- /dev/null
+++ b/LAPACKE/src/lapacke_strsen_work.c
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strsen
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strsen_work( int matrix_layout, char job, char compq,
+ const lapack_logical* select, lapack_int n,
+ float* t, lapack_int ldt, float* q,
+ lapack_int ldq, float* wr, float* wi,
+ lapack_int* m, float* s, float* sep,
+ float* work, lapack_int lwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_strsen( &job, &compq, select, &n, t, &ldt, q, &ldq, wr, wi, m, s,
+ sep, work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldt_t = MAX(1,n);
+ float* t_t = NULL;
+ float* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldq < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_strsen_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_strsen_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array T */
+ t_t = (float*)LAPACKE_malloc( sizeof(float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrix T */
+ LAPACKE_sge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_strsen( &job, &compq, select, &n, t_t, &ldt_t, q, &ldq_t, wr,
+ wi, m, s, sep, work, &lwork, iwork, &liwork, &info );
+ LAPACKE_free( t_t );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ q_t = (float*)LAPACKE_malloc( sizeof(float) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_strsen( &job, &compq, select, &n, t_t, &ldt_t, q_t, &ldq_t, wr,
+ wi, m, s, sep, work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( t_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_strsen_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_strsen_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_strsna.c b/LAPACKE/src/lapacke_strsna.c
new file mode 100644
index 00000000..a2e3d022
--- /dev/null
+++ b/LAPACKE/src/lapacke_strsna.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strsna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strsna( int matrix_layout, char job, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const float* t, lapack_int ldt, const float* vl,
+ lapack_int ldvl, const float* vr, lapack_int ldvr,
+ float* s, float* sep, lapack_int mm, lapack_int* m )
+{
+ lapack_int info = 0;
+ lapack_int ldwork = LAPACKE_lsame( job, 'e' ) ? 1 : MAX(1,n) ;
+ lapack_int* iwork = NULL;
+ float* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_strsna", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ iwork = (lapack_int*)
+ LAPACKE_malloc( sizeof(lapack_int) * MAX(1,2*(n-1)) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ work = (float*)LAPACKE_malloc( sizeof(float) * ldwork * MAX(1,n+6) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_strsna_work( matrix_layout, job, howmny, select, n, t, ldt,
+ vl, ldvl, vr, ldvr, s, sep, mm, m, work, ldwork,
+ iwork );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_strsna", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_strsna_work.c b/LAPACKE/src/lapacke_strsna_work.c
new file mode 100644
index 00000000..084a1357
--- /dev/null
+++ b/LAPACKE/src/lapacke_strsna_work.c
@@ -0,0 +1,129 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strsna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strsna_work( int matrix_layout, char job, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const float* t, lapack_int ldt, const float* vl,
+ lapack_int ldvl, const float* vr,
+ lapack_int ldvr, float* s, float* sep,
+ lapack_int mm, lapack_int* m, float* work,
+ lapack_int ldwork, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_strsna( &job, &howmny, select, &n, t, &ldt, vl, &ldvl, vr, &ldvr,
+ s, sep, &mm, m, work, &ldwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldt_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ float* t_t = NULL;
+ float* vl_t = NULL;
+ float* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_strsna_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_strsna_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_strsna_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ t_t = (float*)LAPACKE_malloc( sizeof(float) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ vl_t = (float*)LAPACKE_malloc( sizeof(float) * ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ vr_t = (float*)LAPACKE_malloc( sizeof(float) * ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_sge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_strsna( &job, &howmny, select, &n, t_t, &ldt_t, vl_t, &ldvl_t,
+ vr_t, &ldvr_t, s, sep, &mm, m, work, &ldwork, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( t_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_strsna_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_strsna_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_strsyl.c b/LAPACKE/src/lapacke_strsyl.c
new file mode 100644
index 00000000..78440413
--- /dev/null
+++ b/LAPACKE/src/lapacke_strsyl.c
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strsyl
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strsyl( int matrix_layout, char trana, char tranb,
+ lapack_int isgn, lapack_int m, lapack_int n,
+ const float* a, lapack_int lda, const float* b,
+ lapack_int ldb, float* c, lapack_int ldc,
+ float* scale )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_strsyl", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, m, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -11;
+ }
+#endif
+ return LAPACKE_strsyl_work( matrix_layout, trana, tranb, isgn, m, n, a, lda,
+ b, ldb, c, ldc, scale );
+}
diff --git a/LAPACKE/src/lapacke_strsyl_work.c b/LAPACKE/src/lapacke_strsyl_work.c
new file mode 100644
index 00000000..90d9b535
--- /dev/null
+++ b/LAPACKE/src/lapacke_strsyl_work.c
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strsyl
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strsyl_work( int matrix_layout, char trana, char tranb,
+ lapack_int isgn, lapack_int m, lapack_int n,
+ const float* a, lapack_int lda, const float* b,
+ lapack_int ldb, float* c, lapack_int ldc,
+ float* scale )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_strsyl( &trana, &tranb, &isgn, &m, &n, a, &lda, b, &ldb, c, &ldc,
+ scale, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldc_t = MAX(1,m);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ float* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_strsyl_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_strsyl_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_strsyl_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ c_t = (float*)LAPACKE_malloc( sizeof(float) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, m, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ LAPACKE_sge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_strsyl( &trana, &tranb, &isgn, &m, &n, a_t, &lda_t, b_t, &ldb_t,
+ c_t, &ldc_t, scale, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_strsyl_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_strsyl_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_strtri.c b/LAPACKE/src/lapacke_strtri.c
new file mode 100644
index 00000000..a2d864f3
--- /dev/null
+++ b/LAPACKE/src/lapacke_strtri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strtri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strtri( int matrix_layout, char uplo, char diag, lapack_int n,
+ float* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_strtri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_str_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_strtri_work( matrix_layout, uplo, diag, n, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_strtri_work.c b/LAPACKE/src/lapacke_strtri_work.c
new file mode 100644
index 00000000..d0cec27c
--- /dev/null
+++ b/LAPACKE/src/lapacke_strtri_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strtri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strtri_work( int matrix_layout, char uplo, char diag,
+ lapack_int n, float* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_strtri( &uplo, &diag, &n, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_strtri_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_str_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_strtri( &uplo, &diag, &n, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_str_trans( LAPACK_COL_MAJOR, uplo, diag, n, a_t, lda_t, a,
+ lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_strtri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_strtri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_strtrs.c b/LAPACKE/src/lapacke_strtrs.c
new file mode 100644
index 00000000..35ccd7fc
--- /dev/null
+++ b/LAPACKE/src/lapacke_strtrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strtrs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int nrhs, const float* a,
+ lapack_int lda, float* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_strtrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_str_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ return LAPACKE_strtrs_work( matrix_layout, uplo, trans, diag, n, nrhs, a,
+ lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_strtrs_work.c b/LAPACKE/src/lapacke_strtrs_work.c
new file mode 100644
index 00000000..5d0a7194
--- /dev/null
+++ b/LAPACKE/src/lapacke_strtrs_work.c
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strtrs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int nrhs,
+ const float* a, lapack_int lda, float* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_strtrs( &uplo, &trans, &diag, &n, &nrhs, a, &lda, b, &ldb,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ float* a_t = NULL;
+ float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_strtrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_strtrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_str_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_strtrs( &uplo, &trans, &diag, &n, &nrhs, a_t, &lda_t, b_t,
+ &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_strtrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_strtrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_strttf.c b/LAPACKE/src/lapacke_strttf.c
new file mode 100644
index 00000000..8bd7b17c
--- /dev/null
+++ b/LAPACKE/src/lapacke_strttf.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strttf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strttf( int matrix_layout, char transr, char uplo,
+ lapack_int n, const float* a, lapack_int lda,
+ float* arf )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_strttf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_strttf_work( matrix_layout, transr, uplo, n, a, lda, arf );
+}
diff --git a/LAPACKE/src/lapacke_strttf_work.c b/LAPACKE/src/lapacke_strttf_work.c
new file mode 100644
index 00000000..fa8697fe
--- /dev/null
+++ b/LAPACKE/src/lapacke_strttf_work.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strttf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strttf_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, const float* a, lapack_int lda,
+ float* arf )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_strttf( &transr, &uplo, &n, a, &lda, arf, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ float* arf_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_strttf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ arf_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( arf_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_strttf( &transr, &uplo, &n, a_t, &lda_t, arf_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_spf_trans( LAPACK_COL_MAJOR, transr, uplo, n, arf_t, arf );
+ /* Release memory and exit */
+ LAPACKE_free( arf_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_strttf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_strttf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_strttp.c b/LAPACKE/src/lapacke_strttp.c
new file mode 100644
index 00000000..789aa45c
--- /dev/null
+++ b/LAPACKE/src/lapacke_strttp.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strttp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strttp( int matrix_layout, char uplo, lapack_int n,
+ const float* a, lapack_int lda, float* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_strttp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_strttp_work( matrix_layout, uplo, n, a, lda, ap );
+}
diff --git a/LAPACKE/src/lapacke_strttp_work.c b/LAPACKE/src/lapacke_strttp_work.c
new file mode 100644
index 00000000..343b9dd5
--- /dev/null
+++ b/LAPACKE/src/lapacke_strttp_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 strttp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_strttp_work( int matrix_layout, char uplo, lapack_int n,
+ const float* a, lapack_int lda, float* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_strttp( &uplo, &n, a, &lda, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ float* a_t = NULL;
+ float* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_strttp_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (float*)
+ LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_strttp( &uplo, &n, a_t, &lda_t, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_spp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_strttp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_strttp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stzrzf.c b/LAPACKE/src/lapacke_stzrzf.c
new file mode 100644
index 00000000..59ecb02a
--- /dev/null
+++ b/LAPACKE/src/lapacke_stzrzf.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stzrzf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stzrzf( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ float* work = NULL;
+ float work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_stzrzf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_stzrzf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = (lapack_int)work_query;
+ /* Allocate memory for work arrays */
+ work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_stzrzf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stzrzf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_stzrzf_work.c b/LAPACKE/src/lapacke_stzrzf_work.c
new file mode 100644
index 00000000..084e8eeb
--- /dev/null
+++ b/LAPACKE/src/lapacke_stzrzf_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 stzrzf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_stzrzf_work( int matrix_layout, lapack_int m, lapack_int n,
+ float* a, lapack_int lda, float* tau,
+ float* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_stzrzf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_stzrzf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_stzrzf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_stzrzf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_stzrzf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_stzrzf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zbbcsd.c b/LAPACKE/src/lapacke_zbbcsd.c
new file mode 100644
index 00000000..161ec691
--- /dev/null
+++ b/LAPACKE/src/lapacke_zbbcsd.c
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zbbcsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+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,
+ lapack_int ldu1, lapack_complex_double* u2,
+ lapack_int ldu2, lapack_complex_double* v1t,
+ lapack_int ldv1t, lapack_complex_double* v2t,
+ lapack_int ldv2t, double* b11d, double* b11e,
+ double* b12d, double* b12e, double* b21d,
+ double* b21e, double* b22d, double* b22e )
+{
+ lapack_int info = 0;
+ lapack_int lrwork = -1;
+ double* rwork = NULL;
+ double rwork_query;
+ lapack_int nrows_u1, nrows_u2, nrows_v1t, nrows_v2t;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zbbcsd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
+ nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
+ nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
+ nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
+ if( LAPACKE_d_nancheck( q-1, phi, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_d_nancheck( q, theta, 1 ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_u1, p, u1, ldu1 ) ) {
+ return -12;
+ }
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_u2, m-p, u2, ldu2 ) ) {
+ return -14;
+ }
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_v1t, q, v1t, ldv1t ) ) {
+ return -16;
+ }
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ 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_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 );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lrwork = (lapack_int)rwork_query;
+ /* Allocate memory for work arrays */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ 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 );
+ /* Release memory and exit */
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zbbcsd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zbbcsd_work.c b/LAPACKE/src/lapacke_zbbcsd_work.c
new file mode 100644
index 00000000..08617db0
--- /dev/null
+++ b/LAPACKE/src/lapacke_zbbcsd_work.c
@@ -0,0 +1,205 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zbbcsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zbbcsd_work( 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, lapack_int ldu1,
+ lapack_complex_double* u2, lapack_int ldu2,
+ lapack_complex_double* v1t, lapack_int ldv1t,
+ lapack_complex_double* v2t, lapack_int ldv2t,
+ double* b11d, double* b11e, double* b12d,
+ double* b12e, double* b21d, double* b21e,
+ double* b22d, double* b22e, double* rwork,
+ lapack_int lrwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zbbcsd( &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, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
+ lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
+ lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
+ lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
+ lapack_int ldu1_t = MAX(1,nrows_u1);
+ lapack_int ldu2_t = MAX(1,nrows_u2);
+ lapack_int ldv1t_t = MAX(1,nrows_v1t);
+ lapack_int ldv2t_t = MAX(1,nrows_v2t);
+ lapack_complex_double* u1_t = NULL;
+ lapack_complex_double* u2_t = NULL;
+ lapack_complex_double* v1t_t = NULL;
+ lapack_complex_double* v2t_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldu1 < p ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info );
+ return info;
+ }
+ if( ldu2 < m-p ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info );
+ return info;
+ }
+ if( ldv1t < q ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info );
+ return info;
+ }
+ if( ldv2t < m-q ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lrwork == -1 ) {
+ LAPACK_zbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
+ theta, phi, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t,
+ v2t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d, b21e,
+ b22d, b22e, rwork, &lrwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ u1_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldu1_t * MAX(1,p) );
+ if( u1_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ u2_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldu2_t * MAX(1,m-p) );
+ if( u2_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ v1t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldv1t_t * MAX(1,q) );
+ if( v1t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ v2t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldv2t_t * MAX(1,m-q) );
+ if( v2t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_zge_trans( matrix_layout, nrows_u1, p, u1, ldu1, u1_t,
+ ldu1_t );
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_zge_trans( matrix_layout, nrows_u2, m-p, u2, ldu2, u2_t,
+ ldu2_t );
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_zge_trans( matrix_layout, nrows_v1t, q, v1t, ldv1t, v1t_t,
+ ldv1t_t );
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_zge_trans( matrix_layout, nrows_v2t, m-q, v2t, ldv2t, v2t_t,
+ ldv2t_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
+ theta, phi, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t,
+ &ldv1t_t, v2t_t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d,
+ b21e, b22d, b22e, rwork, &lrwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1,
+ ldu1 );
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t,
+ u2, ldu2 );
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t,
+ v1t, ldv1t );
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t,
+ v2t, ldv2t );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_free( v2t_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_free( v1t_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_free( u2_t );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_free( u1_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zbdsqr.c b/LAPACKE/src/lapacke_zbdsqr.c
new file mode 100644
index 00000000..1c0909f7
--- /dev/null
+++ b/LAPACKE/src/lapacke_zbdsqr.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zbdsqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zbdsqr( int matrix_layout, char uplo, lapack_int n,
+ lapack_int ncvt, lapack_int nru, lapack_int ncc,
+ double* d, double* e, lapack_complex_double* vt,
+ lapack_int ldvt, lapack_complex_double* u,
+ lapack_int ldu, lapack_complex_double* c,
+ lapack_int ldc )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zbdsqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( ncc != 0 ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, ncc, c, ldc ) ) {
+ return -13;
+ }
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+ return -8;
+ }
+ if( nru != 0 ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, nru, n, u, ldu ) ) {
+ return -11;
+ }
+ }
+ if( ncvt != 0 ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, ncvt, vt, ldvt ) ) {
+ return -9;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,4*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zbdsqr_work( matrix_layout, uplo, n, ncvt, nru, ncc, d, e, vt,
+ ldvt, u, ldu, c, ldc, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zbdsqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zbdsqr_work.c b/LAPACKE/src/lapacke_zbdsqr_work.c
new file mode 100644
index 00000000..3c93a976
--- /dev/null
+++ b/LAPACKE/src/lapacke_zbdsqr_work.c
@@ -0,0 +1,150 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zbdsqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zbdsqr_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int ncvt, lapack_int nru, lapack_int ncc,
+ double* d, double* e, lapack_complex_double* vt,
+ lapack_int ldvt, lapack_complex_double* u,
+ lapack_int ldu, lapack_complex_double* c,
+ lapack_int ldc, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zbdsqr( &uplo, &n, &ncvt, &nru, &ncc, d, e, vt, &ldvt, u, &ldu,
+ c, &ldc, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldc_t = MAX(1,n);
+ lapack_int ldu_t = MAX(1,nru);
+ lapack_int ldvt_t = MAX(1,n);
+ lapack_complex_double* vt_t = NULL;
+ lapack_complex_double* u_t = NULL;
+ lapack_complex_double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldc < ncc ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_zbdsqr_work", info );
+ return info;
+ }
+ if( ldu < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zbdsqr_work", info );
+ return info;
+ }
+ if( ldvt < ncvt ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zbdsqr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( ncvt != 0 ) {
+ vt_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvt_t * MAX(1,ncvt) );
+ if( vt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( nru != 0 ) {
+ u_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldu_t * MAX(1,n) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( ncc != 0 ) {
+ c_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldc_t * MAX(1,ncc) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ if( ncvt != 0 ) {
+ LAPACKE_zge_trans( matrix_layout, n, ncvt, vt, ldvt, vt_t, ldvt_t );
+ }
+ if( nru != 0 ) {
+ LAPACKE_zge_trans( matrix_layout, nru, n, u, ldu, u_t, ldu_t );
+ }
+ if( ncc != 0 ) {
+ LAPACKE_zge_trans( matrix_layout, n, ncc, c, ldc, c_t, ldc_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zbdsqr( &uplo, &n, &ncvt, &nru, &ncc, d, e, vt_t, &ldvt_t, u_t,
+ &ldu_t, c_t, &ldc_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( ncvt != 0 ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, ncvt, vt_t, ldvt_t, vt,
+ ldvt );
+ }
+ if( nru != 0 ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nru, n, u_t, ldu_t, u, ldu );
+ }
+ if( ncc != 0 ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, ncc, c_t, ldc_t, c, ldc );
+ }
+ /* Release memory and exit */
+ if( ncc != 0 ) {
+ LAPACKE_free( c_t );
+ }
+exit_level_2:
+ if( nru != 0 ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_1:
+ if( ncvt != 0 ) {
+ LAPACKE_free( vt_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zbdsqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zbdsqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zcgesv.c b/LAPACKE/src/lapacke_zcgesv.c
new file mode 100644
index 00000000..9c865f48
--- /dev/null
+++ b/LAPACKE/src/lapacke_zcgesv.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zcgesv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zcgesv( int matrix_layout, lapack_int n, lapack_int nrhs,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* ipiv, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* x,
+ lapack_int ldx, lapack_int* iter )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_float* swork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zcgesv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ swork = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ MAX(1,n) * MAX(1,n+nrhs) );
+ if( swork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ MAX(1,n) * MAX(1,nrhs) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zcgesv_work( matrix_layout, n, nrhs, a, lda, ipiv, b, ldb, x,
+ ldx, work, swork, rwork, iter );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( swork );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zcgesv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zcgesv_work.c b/LAPACKE/src/lapacke_zcgesv_work.c
new file mode 100644
index 00000000..2def2179
--- /dev/null
+++ b/LAPACKE/src/lapacke_zcgesv_work.c
@@ -0,0 +1,124 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zcgesv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zcgesv_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* ipiv, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* x,
+ lapack_int ldx, lapack_complex_double* work,
+ lapack_complex_float* swork, double* rwork,
+ lapack_int* iter )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zcgesv( &n, &nrhs, a, &lda, ipiv, b, &ldb, x, &ldx, work, swork,
+ rwork, iter, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zcgesv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zcgesv_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zcgesv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zcgesv( &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, x_t, &ldx_t,
+ work, swork, rwork, iter, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zcgesv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zcgesv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zcposv.c b/LAPACKE/src/lapacke_zcposv.c
new file mode 100644
index 00000000..d1606e90
--- /dev/null
+++ b/LAPACKE/src/lapacke_zcposv.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zcposv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zcposv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* x,
+ lapack_int ldx, lapack_int* iter )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_float* swork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zcposv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ swork = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ MAX(1,n) * MAX(1,n+nrhs) );
+ if( swork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ MAX(1,n) * MAX(1,nrhs) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zcposv_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb, x,
+ ldx, work, swork, rwork, iter );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( swork );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zcposv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zcposv_work.c b/LAPACKE/src/lapacke_zcposv_work.c
new file mode 100644
index 00000000..15774ff0
--- /dev/null
+++ b/LAPACKE/src/lapacke_zcposv_work.c
@@ -0,0 +1,124 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zcposv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zcposv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* x,
+ lapack_int ldx, lapack_complex_double* work,
+ lapack_complex_float* swork, double* rwork,
+ lapack_int* iter )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zcposv( &uplo, &n, &nrhs, a, &lda, b, &ldb, x, &ldx, work, swork,
+ rwork, iter, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zcposv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zcposv_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zcposv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zcposv( &uplo, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, x_t, &ldx_t,
+ work, swork, rwork, iter, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zcposv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zcposv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgbbrd.c b/LAPACKE/src/lapacke_zgbbrd.c
new file mode 100644
index 00000000..9124811d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbbrd.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbbrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbbrd( int matrix_layout, char vect, lapack_int m,
+ lapack_int n, lapack_int ncc, lapack_int kl,
+ lapack_int ku, lapack_complex_double* ab,
+ lapack_int ldab, double* d, double* e,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_complex_double* pt, lapack_int ldpt,
+ lapack_complex_double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbbrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+ return -8;
+ }
+ if( ncc != 0 ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, m, ncc, c, ldc ) ) {
+ return -16;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,MAX(m,n)) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,MAX(m,n)) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgbbrd_work( matrix_layout, vect, m, n, ncc, kl, ku, ab, ldab,
+ d, e, q, ldq, pt, ldpt, c, ldc, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbbrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgbbrd_work.c b/LAPACKE/src/lapacke_zgbbrd_work.c
new file mode 100644
index 00000000..67254441
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbbrd_work.c
@@ -0,0 +1,163 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbbrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbbrd_work( int matrix_layout, char vect, lapack_int m,
+ lapack_int n, lapack_int ncc, lapack_int kl,
+ lapack_int ku, lapack_complex_double* ab,
+ lapack_int ldab, double* d, double* e,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_complex_double* pt, lapack_int ldpt,
+ lapack_complex_double* c, lapack_int ldc,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbbrd( &vect, &m, &n, &ncc, &kl, &ku, ab, &ldab, d, e, q, &ldq,
+ pt, &ldpt, c, &ldc, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_int ldpt_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,m);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* q_t = NULL;
+ lapack_complex_double* pt_t = NULL;
+ lapack_complex_double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zgbbrd_work", info );
+ return info;
+ }
+ if( ldc < ncc ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_zgbbrd_work", info );
+ return info;
+ }
+ if( ldpt < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_zgbbrd_work", info );
+ return info;
+ }
+ if( ldq < m ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zgbbrd_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'q' ) ) {
+ q_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldq_t * MAX(1,m) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'p' ) ) {
+ pt_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldpt_t * MAX(1,n) );
+ if( pt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( ncc != 0 ) {
+ c_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldc_t * MAX(1,ncc) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zgb_trans( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ if( ncc != 0 ) {
+ LAPACKE_zge_trans( matrix_layout, m, ncc, c, ldc, c_t, ldc_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbbrd( &vect, &m, &n, &ncc, &kl, &ku, ab_t, &ldab_t, d, e, q_t,
+ &ldq_t, pt_t, &ldpt_t, c_t, &ldc_t, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zgb_trans( LAPACK_COL_MAJOR, m, n, kl, ku, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'q' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, m, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'p' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, pt_t, ldpt_t, pt, ldpt );
+ }
+ if( ncc != 0 ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, ncc, c_t, ldc_t, c, ldc );
+ }
+ /* Release memory and exit */
+ if( ncc != 0 ) {
+ LAPACKE_free( c_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'p' ) ) {
+ LAPACKE_free( pt_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'q' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbbrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgbbrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgbcon.c b/LAPACKE/src/lapacke_zgbcon.c
new file mode 100644
index 00000000..d867c326
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbcon.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbcon( int matrix_layout, char norm, lapack_int n,
+ lapack_int kl, lapack_int ku,
+ const lapack_complex_double* ab, lapack_int ldab,
+ const lapack_int* ipiv, double anorm, double* rcond )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgbcon_work( matrix_layout, norm, n, kl, ku, ab, ldab, ipiv,
+ anorm, rcond, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgbcon_work.c b/LAPACKE/src/lapacke_zgbcon_work.c
new file mode 100644
index 00000000..85b9fefb
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbcon_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbcon_work( int matrix_layout, char norm, lapack_int n,
+ lapack_int kl, lapack_int ku,
+ const lapack_complex_double* ab,
+ lapack_int ldab, const lapack_int* ipiv,
+ double anorm, double* rcond,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbcon( &norm, &n, &kl, &ku, ab, &ldab, ipiv, &anorm, rcond,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,2*kl+ku+1);
+ lapack_complex_double* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zgbcon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zgb_trans( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
+ ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbcon( &norm, &n, &kl, &ku, ab_t, &ldab_t, ipiv, &anorm, rcond,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgbcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgbequ.c b/LAPACKE/src/lapacke_zgbequ.c
new file mode 100644
index 00000000..a8188117
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbequ.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbequ( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku,
+ const lapack_complex_double* ab, lapack_int ldab,
+ double* r, double* c, double* rowcnd, double* colcnd,
+ double* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_zgbequ_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
+ rowcnd, colcnd, amax );
+}
diff --git a/LAPACKE/src/lapacke_zgbequ_work.c b/LAPACKE/src/lapacke_zgbequ_work.c
new file mode 100644
index 00000000..2f8e7ffb
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbequ_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbequ_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku,
+ const lapack_complex_double* ab,
+ lapack_int ldab, double* r, double* c,
+ double* rowcnd, double* colcnd, double* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbequ( &m, &n, &kl, &ku, ab, &ldab, r, c, rowcnd, colcnd, amax,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_complex_double* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zgbequ_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zgb_trans( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbequ( &m, &n, &kl, &ku, ab_t, &ldab_t, r, c, rowcnd, colcnd,
+ amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgbequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgbequb.c b/LAPACKE/src/lapacke_zgbequb.c
new file mode 100644
index 00000000..4609363f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbequb.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbequb( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku,
+ const lapack_complex_double* ab, lapack_int ldab,
+ double* r, double* c, double* rowcnd,
+ double* colcnd, double* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_zgbequb_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
+ rowcnd, colcnd, amax );
+}
diff --git a/LAPACKE/src/lapacke_zgbequb_work.c b/LAPACKE/src/lapacke_zgbequb_work.c
new file mode 100644
index 00000000..cf557bee
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbequb_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbequb_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku,
+ const lapack_complex_double* ab,
+ lapack_int ldab, double* r, double* c,
+ double* rowcnd, double* colcnd, double* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbequb( &m, &n, &kl, &ku, ab, &ldab, r, c, rowcnd, colcnd, amax,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_complex_double* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zgbequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zgb_trans( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbequb( &m, &n, &kl, &ku, ab_t, &ldab_t, r, c, rowcnd, colcnd,
+ amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgbequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgbrfs.c b/LAPACKE/src/lapacke_zgbrfs.c
new file mode 100644
index 00000000..ef1dd998
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbrfs.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbrfs( int matrix_layout, char trans, lapack_int n,
+ lapack_int kl, lapack_int ku, lapack_int nrhs,
+ const lapack_complex_double* ab, lapack_int ldab,
+ const lapack_complex_double* afb, lapack_int ldafb,
+ const lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
+ return -9;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -14;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgbrfs_work( matrix_layout, trans, n, kl, ku, nrhs, ab, ldab,
+ afb, ldafb, ipiv, b, ldb, x, ldx, ferr, berr,
+ work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgbrfs_work.c b/LAPACKE/src/lapacke_zgbrfs_work.c
new file mode 100644
index 00000000..df7386e9
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbrfs_work.c
@@ -0,0 +1,145 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbrfs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int kl, lapack_int ku, lapack_int nrhs,
+ const lapack_complex_double* ab,
+ lapack_int ldab,
+ const lapack_complex_double* afb,
+ lapack_int ldafb, const lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbrfs( &trans, &n, &kl, &ku, &nrhs, ab, &ldab, afb, &ldafb,
+ ipiv, b, &ldb, x, &ldx, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldafb_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* afb_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zgbrfs_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zgbrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zgbrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_zgbrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ LAPACKE_zgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
+ ldafb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbrfs( &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t, afb_t,
+ &ldafb_t, ipiv, b_t, &ldb_t, x_t, &ldx_t, ferr, berr,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgbrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgbrfsx.c b/LAPACKE/src/lapacke_zgbrfsx.c
new file mode 100644
index 00000000..5c59e657
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbrfsx.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbrfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbrfsx( int matrix_layout, char trans, char equed,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, const lapack_complex_double* ab,
+ lapack_int ldab, const lapack_complex_double* afb,
+ lapack_int ldafb, const lapack_int* ipiv,
+ const double* r, const double* c,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* berr, lapack_int n_err_bnds,
+ double* err_bnds_norm, double* err_bnds_comp,
+ lapack_int nparams, double* params )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbrfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
+ return -10;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -15;
+ }
+ if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
+ if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+ return -14;
+ }
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -25;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
+ if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+ return -13;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -17;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgbrfsx_work( matrix_layout, trans, equed, n, kl, ku, nrhs,
+ ab, ldab, afb, ldafb, ipiv, r, c, b, ldb, x,
+ ldx, rcond, berr, n_err_bnds, err_bnds_norm,
+ err_bnds_comp, nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbrfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgbrfsx_work.c b/LAPACKE/src/lapacke_zgbrfsx_work.c
new file mode 100644
index 00000000..610aef6a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbrfsx_work.c
@@ -0,0 +1,175 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbrfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbrfsx_work( int matrix_layout, char trans, char equed,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs,
+ const lapack_complex_double* ab,
+ lapack_int ldab,
+ const lapack_complex_double* afb,
+ lapack_int ldafb, const lapack_int* ipiv,
+ const double* r, const double* c,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbrfsx( &trans, &equed, &n, &kl, &ku, &nrhs, ab, &ldab, afb,
+ &ldafb, ipiv, r, c, b, &ldb, x, &ldx, rcond, berr,
+ &n_err_bnds, err_bnds_norm, err_bnds_comp, &nparams,
+ params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldafb_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* afb_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zgbrfsx_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zgbrfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_zgbrfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -18;
+ LAPACKE_xerbla( "LAPACKE_zgbrfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ LAPACKE_zgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
+ ldafb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbrfsx( &trans, &equed, &n, &kl, &ku, &nrhs, ab_t, &ldab_t,
+ afb_t, &ldafb_t, ipiv, r, c, b_t, &ldb_t, x_t, &ldx_t,
+ rcond, berr, &n_err_bnds, err_bnds_norm_t,
+ err_bnds_comp_t, &nparams, params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbrfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgbrfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgbsv.c b/LAPACKE/src/lapacke_zgbsv.c
new file mode 100644
index 00000000..4442c8e6
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbsv.c
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbsv( int matrix_layout, lapack_int n, lapack_int kl,
+ lapack_int ku, lapack_int nrhs,
+ lapack_complex_double* ab, lapack_int ldab,
+ lapack_int* ipiv, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ return LAPACKE_zgbsv_work( matrix_layout, n, kl, ku, nrhs, ab, ldab, ipiv, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_zgbsv_work.c b/LAPACKE/src/lapacke_zgbsv_work.c
new file mode 100644
index 00000000..d3bb6e39
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbsv_work.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbsv_work( int matrix_layout, lapack_int n, lapack_int kl,
+ lapack_int ku, lapack_int nrhs,
+ lapack_complex_double* ab, lapack_int ldab,
+ lapack_int* ipiv, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbsv( &n, &kl, &ku, &nrhs, ab, &ldab, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zgbsv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zgbsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zgb_trans( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
+ ldab_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbsv( &n, &kl, &ku, &nrhs, ab_t, &ldab_t, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zgb_trans( LAPACK_COL_MAJOR, n, n, kl, kl+ku, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgbsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgbsvx.c b/LAPACKE/src/lapacke_zgbsvx.c
new file mode 100644
index 00000000..4ee83e1d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbsvx.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbsvx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, lapack_complex_double* ab,
+ lapack_int ldab, lapack_complex_double* afb,
+ lapack_int ldafb, lapack_int* ipiv, char* equed,
+ double* r, double* c, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* x,
+ lapack_int ldx, double* rcond, double* ferr,
+ double* berr, double* rpivot )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
+ ldafb ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -16;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) ) ) {
+ if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+ return -15;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'r' ) ) ) {
+ if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+ return -14;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgbsvx_work( matrix_layout, fact, trans, n, kl, ku, nrhs, ab,
+ ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x,
+ ldx, rcond, ferr, berr, work, rwork );
+ /* Backup significant data from working array(s) */
+ *rpivot = rwork[0];
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgbsvx_work.c b/LAPACKE/src/lapacke_zgbsvx_work.c
new file mode 100644
index 00000000..48d5c738
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbsvx_work.c
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbsvx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, lapack_complex_double* ab,
+ lapack_int ldab, lapack_complex_double* afb,
+ lapack_int ldafb, lapack_int* ipiv, char* equed,
+ double* r, double* c, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* x,
+ lapack_int ldx, double* rcond, double* ferr,
+ double* berr, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbsvx( &fact, &trans, &n, &kl, &ku, &nrhs, ab, &ldab, afb,
+ &ldafb, ipiv, equed, r, c, b, &ldb, x, &ldx, rcond, ferr,
+ berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldafb_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* afb_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zgbsvx_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zgbsvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_zgbsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_zgbsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_zgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
+ ldafb_t );
+ }
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbsvx( &fact, &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t, afb_t,
+ &ldafb_t, ipiv, equed, r, c, b_t, &ldb_t, x_t, &ldx_t,
+ rcond, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_zgb_trans( LAPACK_COL_MAJOR, n, n, kl, ku, ab_t, ldab_t, ab,
+ ldab );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_zgb_trans( LAPACK_COL_MAJOR, n, n, kl, kl+ku, afb_t,
+ ldafb_t, afb, ldafb );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgbsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgbsvxx.c b/LAPACKE/src/lapacke_zgbsvxx.c
new file mode 100644
index 00000000..379f7a28
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbsvxx.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbsvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbsvxx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, lapack_complex_double* ab,
+ lapack_int ldab, lapack_complex_double* afb,
+ lapack_int ldafb, lapack_int* ipiv, char* equed,
+ double* r, double* c, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* x,
+ lapack_int ldx, double* rcond, double* rpvgrw,
+ double* berr, lapack_int n_err_bnds,
+ double* err_bnds_norm, double* err_bnds_comp,
+ lapack_int nparams, double* params )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbsvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
+ ldafb ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -16;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) ) ) {
+ if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+ return -15;
+ }
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -27;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'r' ) ) ) {
+ if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+ return -14;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgbsvxx_work( matrix_layout, fact, trans, n, kl, ku, nrhs, ab,
+ ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x,
+ ldx, rcond, rpvgrw, berr, n_err_bnds,
+ err_bnds_norm, err_bnds_comp, nparams, params,
+ work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbsvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgbsvxx_work.c b/LAPACKE/src/lapacke_zgbsvxx_work.c
new file mode 100644
index 00000000..9f8b1314
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbsvxx_work.c
@@ -0,0 +1,188 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbsvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbsvxx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int kl, lapack_int ku,
+ lapack_int nrhs, lapack_complex_double* ab,
+ lapack_int ldab, lapack_complex_double* afb,
+ lapack_int ldafb, lapack_int* ipiv,
+ char* equed, double* r, double* c,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* rpvgrw, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbsvxx( &fact, &trans, &n, &kl, &ku, &nrhs, ab, &ldab, afb,
+ &ldafb, ipiv, equed, r, c, b, &ldb, x, &ldx, rcond,
+ rpvgrw, berr, &n_err_bnds, err_bnds_norm, err_bnds_comp,
+ &nparams, params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kl+ku+1);
+ lapack_int ldafb_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* afb_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zgbsvxx_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zgbsvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_zgbsvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_zgbsvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_zgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
+ ldafb_t );
+ }
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbsvxx( &fact, &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t,
+ afb_t, &ldafb_t, ipiv, equed, r, c, b_t, &ldb_t, x_t,
+ &ldx_t, rcond, rpvgrw, berr, &n_err_bnds,
+ err_bnds_norm_t, err_bnds_comp_t, &nparams, params,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_zgb_trans( LAPACK_COL_MAJOR, n, n, kl, ku, ab_t, ldab_t, ab,
+ ldab );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_zgb_trans( LAPACK_COL_MAJOR, n, n, kl, kl+ku, afb_t,
+ ldafb_t, afb, ldafb );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbsvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgbsvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgbtrf.c b/LAPACKE/src/lapacke_zgbtrf.c
new file mode 100644
index 00000000..5373a0e1
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbtrf.c
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbtrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbtrf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku,
+ lapack_complex_double* ab, lapack_int ldab,
+ lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbtrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, kl+ku, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_zgbtrf_work( matrix_layout, m, n, kl, ku, ab, ldab, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_zgbtrf_work.c b/LAPACKE/src/lapacke_zgbtrf_work.c
new file mode 100644
index 00000000..7119c573
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbtrf_work.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbtrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbtrf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku,
+ lapack_complex_double* ab, lapack_int ldab,
+ lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbtrf( &m, &n, &kl, &ku, ab, &ldab, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,2*kl+ku+1);
+ lapack_complex_double* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zgbtrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zgb_trans( matrix_layout, m, n, kl, kl+ku, ab, ldab, ab_t,
+ ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbtrf( &m, &n, &kl, &ku, ab_t, &ldab_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zgb_trans( LAPACK_COL_MAJOR, m, n, kl, kl+ku, ab_t, ldab_t, ab,
+ ldab );
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbtrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgbtrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgbtrs.c b/LAPACKE/src/lapacke_zgbtrs.c
new file mode 100644
index 00000000..b0474e49
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbtrs.c
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbtrs( int matrix_layout, char trans, lapack_int n,
+ lapack_int kl, lapack_int ku, lapack_int nrhs,
+ const lapack_complex_double* ab, lapack_int ldab,
+ const lapack_int* ipiv, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbtrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+#endif
+ return LAPACKE_zgbtrs_work( matrix_layout, trans, n, kl, ku, nrhs, ab, ldab,
+ ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_zgbtrs_work.c b/LAPACKE/src/lapacke_zgbtrs_work.c
new file mode 100644
index 00000000..22e6d193
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgbtrs_work.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgbtrs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int kl, lapack_int ku, lapack_int nrhs,
+ const lapack_complex_double* ab,
+ lapack_int ldab, const lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbtrs( &trans, &n, &kl, &ku, &nrhs, ab, &ldab, ipiv, b, &ldb,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,2*kl+ku+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zgbtrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zgbtrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zgb_trans( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
+ ldab_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgbtrs( &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t, ipiv, b_t,
+ &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgbtrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgbtrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgebak.c b/LAPACKE/src/lapacke_zgebak.c
new file mode 100644
index 00000000..6b8a42ff
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgebak.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgebak
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgebak( int matrix_layout, char job, char side, lapack_int n,
+ lapack_int ilo, lapack_int ihi, const double* scale,
+ lapack_int m, lapack_complex_double* v,
+ lapack_int ldv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgebak", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, scale, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, m, v, ldv ) ) {
+ return -9;
+ }
+#endif
+ return LAPACKE_zgebak_work( matrix_layout, job, side, n, ilo, ihi, scale, m,
+ v, ldv );
+}
diff --git a/LAPACKE/src/lapacke_zgebak_work.c b/LAPACKE/src/lapacke_zgebak_work.c
new file mode 100644
index 00000000..a9b2dc5a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgebak_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgebak
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgebak_work( int matrix_layout, char job, char side,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ const double* scale, lapack_int m,
+ lapack_complex_double* v, lapack_int ldv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgebak( &job, &side, &n, &ilo, &ihi, scale, &m, v, &ldv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldv_t = MAX(1,n);
+ lapack_complex_double* v_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldv < m ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zgebak_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldv_t * MAX(1,m) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, m, v, ldv, v_t, ldv_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgebak( &job, &side, &n, &ilo, &ihi, scale, &m, v_t, &ldv_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, m, v_t, ldv_t, v, ldv );
+ /* Release memory and exit */
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgebak_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgebak_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgebal.c b/LAPACKE/src/lapacke_zgebal.c
new file mode 100644
index 00000000..3d372e74
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgebal.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgebal
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgebal( int matrix_layout, char job, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* ilo, lapack_int* ihi, double* scale )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgebal", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ }
+#endif
+ return LAPACKE_zgebal_work( matrix_layout, job, n, a, lda, ilo, ihi, scale );
+}
diff --git a/LAPACKE/src/lapacke_zgebal_work.c b/LAPACKE/src/lapacke_zgebal_work.c
new file mode 100644
index 00000000..f79b3573
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgebal_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgebal
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgebal_work( int matrix_layout, char job, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* ilo, lapack_int* ihi,
+ double* scale )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgebal( &job, &n, a, &lda, ilo, ihi, scale, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgebal_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgebal( &job, &n, a_t, &lda_t, ilo, ihi, scale, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+ LAPACKE_lsame( job, 's' ) ) {
+ LAPACKE_free( a_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgebal_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgebal_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgebrd.c b/LAPACKE/src/lapacke_zgebrd.c
new file mode 100644
index 00000000..8efdb01a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgebrd.c
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgebrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgebrd( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda, double* d,
+ double* e, lapack_complex_double* tauq,
+ lapack_complex_double* taup )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgebrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgebrd_work( matrix_layout, m, n, a, lda, d, e, tauq, taup,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgebrd_work( matrix_layout, m, n, a, lda, d, e, tauq, taup,
+ work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgebrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgebrd_work.c b/LAPACKE/src/lapacke_zgebrd_work.c
new file mode 100644
index 00000000..be5e9fa0
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgebrd_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgebrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgebrd_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ double* d, double* e,
+ lapack_complex_double* tauq,
+ lapack_complex_double* taup,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgebrd( &m, &n, a, &lda, d, e, tauq, taup, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgebrd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgebrd( &m, &n, a, &lda_t, d, e, tauq, taup, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgebrd( &m, &n, a_t, &lda_t, d, e, tauq, taup, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgebrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgebrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgecon.c b/LAPACKE/src/lapacke_zgecon.c
new file mode 100644
index 00000000..1b83aa93
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgecon.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgecon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgecon( int matrix_layout, char norm, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double anorm, double* rcond )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgecon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgecon_work( matrix_layout, norm, n, a, lda, anorm, rcond,
+ work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgecon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgecon_work.c b/LAPACKE/src/lapacke_zgecon_work.c
new file mode 100644
index 00000000..263b5425
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgecon_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgecon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgecon_work( int matrix_layout, char norm, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double anorm, double* rcond,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgecon( &norm, &n, a, &lda, &anorm, rcond, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgecon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgecon( &norm, &n, a_t, &lda_t, &anorm, rcond, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgecon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgecon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeequ.c b/LAPACKE/src/lapacke_zgeequ.c
new file mode 100644
index 00000000..53f1edd3
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeequ.c
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeequ( int matrix_layout, lapack_int m, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double* r, double* c, double* rowcnd, double* colcnd,
+ double* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zgeequ_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
+ colcnd, amax );
+}
diff --git a/LAPACKE/src/lapacke_zgeequ_work.c b/LAPACKE/src/lapacke_zgeequ_work.c
new file mode 100644
index 00000000..242775f0
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeequ_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeequ_work( int matrix_layout, lapack_int m, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double* r, double* c, double* rowcnd,
+ double* colcnd, double* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeequ( &m, &n, a, &lda, r, c, rowcnd, colcnd, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgeequ_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeequ( &m, &n, a_t, &lda_t, r, c, rowcnd, colcnd, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgeequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeequb.c b/LAPACKE/src/lapacke_zgeequb.c
new file mode 100644
index 00000000..cdc48036
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeequb.c
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeequb( int matrix_layout, lapack_int m, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double* r, double* c, double* rowcnd,
+ double* colcnd, double* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zgeequb_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
+ colcnd, amax );
+}
diff --git a/LAPACKE/src/lapacke_zgeequb_work.c b/LAPACKE/src/lapacke_zgeequb_work.c
new file mode 100644
index 00000000..0937909d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeequb_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeequb_work( int matrix_layout, lapack_int m, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double* r, double* c, double* rowcnd,
+ double* colcnd, double* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeequb( &m, &n, a, &lda, r, c, rowcnd, colcnd, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgeequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeequb( &m, &n, a_t, &lda_t, r, c, rowcnd, colcnd, amax,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgeequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgees.c b/LAPACKE/src/lapacke_zgees.c
new file mode 100644
index 00000000..c39f6935
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgees.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgees
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgees( int matrix_layout, char jobvs, char sort,
+ LAPACK_Z_SELECT1 select, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* sdim, lapack_complex_double* w,
+ lapack_complex_double* vs, lapack_int ldvs )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgees", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgees_work( matrix_layout, jobvs, sort, select, n, a, lda,
+ sdim, w, vs, ldvs, &work_query, lwork, rwork,
+ bwork );
+ if( info != 0 ) {
+ goto exit_level_2;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgees_work( matrix_layout, jobvs, sort, select, n, a, lda,
+ sdim, w, vs, ldvs, work, lwork, rwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgees", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgees_work.c b/LAPACKE/src/lapacke_zgees_work.c
new file mode 100644
index 00000000..95055cc7
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgees_work.c
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgees
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgees_work( int matrix_layout, char jobvs, char sort,
+ LAPACK_Z_SELECT1 select, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* sdim, lapack_complex_double* w,
+ lapack_complex_double* vs, lapack_int ldvs,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork, lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgees( &jobvs, &sort, select, &n, a, &lda, sdim, w, vs, &ldvs,
+ work, &lwork, rwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldvs_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* vs_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zgees_work", info );
+ return info;
+ }
+ if( ldvs < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zgees_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgees( &jobvs, &sort, select, &n, a, &lda_t, sdim, w, vs,
+ &ldvs_t, work, &lwork, rwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ vs_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvs_t * MAX(1,n) );
+ if( vs_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgees( &jobvs, &sort, select, &n, a_t, &lda_t, sdim, w, vs_t,
+ &ldvs_t, work, &lwork, rwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, vs_t, ldvs_t, vs, ldvs );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ LAPACKE_free( vs_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgees_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgees_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeesx.c b/LAPACKE/src/lapacke_zgeesx.c
new file mode 100644
index 00000000..6d5cf037
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeesx.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeesx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeesx( int matrix_layout, char jobvs, char sort,
+ LAPACK_Z_SELECT1 select, char sense, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* sdim, lapack_complex_double* w,
+ lapack_complex_double* vs, lapack_int ldvs,
+ double* rconde, double* rcondv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeesx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgeesx_work( matrix_layout, jobvs, sort, select, sense, n, a,
+ lda, sdim, w, vs, ldvs, rconde, rcondv,
+ &work_query, lwork, rwork, bwork );
+ if( info != 0 ) {
+ goto exit_level_2;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgeesx_work( matrix_layout, jobvs, sort, select, sense, n, a,
+ lda, sdim, w, vs, ldvs, rconde, rcondv, work,
+ lwork, rwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeesx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeesx_work.c b/LAPACKE/src/lapacke_zgeesx_work.c
new file mode 100644
index 00000000..b7aadbb4
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeesx_work.c
@@ -0,0 +1,123 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeesx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeesx_work( int matrix_layout, char jobvs, char sort,
+ LAPACK_Z_SELECT1 select, char sense,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, lapack_int* sdim,
+ lapack_complex_double* w,
+ lapack_complex_double* vs, lapack_int ldvs,
+ double* rconde, double* rcondv,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork, lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeesx( &jobvs, &sort, select, &sense, &n, a, &lda, sdim, w, vs,
+ &ldvs, rconde, rcondv, work, &lwork, rwork, bwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldvs_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* vs_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zgeesx_work", info );
+ return info;
+ }
+ if( ldvs < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zgeesx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgeesx( &jobvs, &sort, select, &sense, &n, a, &lda_t, sdim,
+ w, vs, &ldvs_t, rconde, rcondv, work, &lwork, rwork,
+ bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ vs_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvs_t * MAX(1,n) );
+ if( vs_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeesx( &jobvs, &sort, select, &sense, &n, a_t, &lda_t, sdim, w,
+ vs_t, &ldvs_t, rconde, rcondv, work, &lwork, rwork,
+ bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, vs_t, ldvs_t, vs, ldvs );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvs, 'v' ) ) {
+ LAPACKE_free( vs_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeesx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgeesx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeev.c b/LAPACKE/src/lapacke_zgeev.c
new file mode 100644
index 00000000..dba9c037
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeev.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeev( int matrix_layout, char jobvl, char jobvr,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* w,
+ lapack_complex_double* vl, lapack_int ldvl,
+ lapack_complex_double* vr, lapack_int ldvr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgeev_work( matrix_layout, jobvl, jobvr, n, a, lda, w, vl,
+ ldvl, vr, ldvr, &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgeev_work( matrix_layout, jobvl, jobvr, n, a, lda, w, vl,
+ ldvl, vr, ldvr, work, lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeev_work.c b/LAPACKE/src/lapacke_zgeev_work.c
new file mode 100644
index 00000000..787992c3
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeev_work.c
@@ -0,0 +1,141 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeev_work( int matrix_layout, char jobvl, char jobvr,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* w,
+ lapack_complex_double* vl, lapack_int ldvl,
+ lapack_complex_double* vr, lapack_int ldvr,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeev( &jobvl, &jobvr, &n, a, &lda, w, vl, &ldvl, vr, &ldvr,
+ work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* vl_t = NULL;
+ lapack_complex_double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zgeev_work", info );
+ return info;
+ }
+ if( ldvl < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zgeev_work", info );
+ return info;
+ }
+ if( ldvr < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zgeev_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgeev( &jobvl, &jobvr, &n, a, &lda_t, w, vl, &ldvl_t, vr,
+ &ldvr_t, work, &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ vl_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvl_t * MAX(1,n) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ vr_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvr_t * MAX(1,n) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeev( &jobvl, &jobvr, &n, a_t, &lda_t, w, vl_t, &ldvl_t, vr_t,
+ &ldvr_t, work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, vl_t, ldvl_t, vl, ldvl );
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, vr_t, ldvr_t, vr, ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgeev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeevx.c b/LAPACKE/src/lapacke_zgeevx.c
new file mode 100644
index 00000000..0f061dd4
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeevx.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeevx( int matrix_layout, char balanc, char jobvl,
+ char jobvr, char sense, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* w, lapack_complex_double* vl,
+ lapack_int ldvl, lapack_complex_double* vr,
+ lapack_int ldvr, lapack_int* ilo, lapack_int* ihi,
+ double* scale, double* abnrm, double* rconde,
+ double* rcondv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgeevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
+ lda, w, vl, ldvl, vr, ldvr, ilo, ihi, scale,
+ abnrm, rconde, rcondv, &work_query, lwork,
+ rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgeevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
+ lda, w, vl, ldvl, vr, ldvr, ilo, ihi, scale,
+ abnrm, rconde, rcondv, work, lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeevx_work.c b/LAPACKE/src/lapacke_zgeevx_work.c
new file mode 100644
index 00000000..61ed2c13
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeevx_work.c
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeevx_work( int matrix_layout, char balanc, char jobvl,
+ char jobvr, char sense, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* w,
+ lapack_complex_double* vl, lapack_int ldvl,
+ lapack_complex_double* vr, lapack_int ldvr,
+ lapack_int* ilo, lapack_int* ihi, double* scale,
+ double* abnrm, double* rconde, double* rcondv,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeevx( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda, w, vl,
+ &ldvl, vr, &ldvr, ilo, ihi, scale, abnrm, rconde, rcondv,
+ work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* vl_t = NULL;
+ lapack_complex_double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zgeevx_work", info );
+ return info;
+ }
+ if( ldvl < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zgeevx_work", info );
+ return info;
+ }
+ if( ldvr < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zgeevx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgeevx( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda_t, w,
+ vl, &ldvl_t, vr, &ldvr_t, ilo, ihi, scale, abnrm,
+ rconde, rcondv, work, &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ vl_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvl_t * MAX(1,n) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ vr_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvr_t * MAX(1,n) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeevx( &balanc, &jobvl, &jobvr, &sense, &n, a_t, &lda_t, w,
+ vl_t, &ldvl_t, vr_t, &ldvr_t, ilo, ihi, scale, abnrm,
+ rconde, rcondv, work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, vl_t, ldvl_t, vl, ldvl );
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, vr_t, ldvr_t, vr, ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgeevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgehrd.c b/LAPACKE/src/lapacke_zgehrd.c
new file mode 100644
index 00000000..432428b2
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgehrd.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgehrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgehrd( int matrix_layout, lapack_int n, lapack_int ilo,
+ lapack_int ihi, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgehrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgehrd_work( matrix_layout, n, ilo, ihi, a, lda, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgehrd_work( matrix_layout, n, ilo, ihi, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgehrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgehrd_work.c b/LAPACKE/src/lapacke_zgehrd_work.c
new file mode 100644
index 00000000..f5b35403
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgehrd_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgehrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgehrd_work( int matrix_layout, lapack_int n, lapack_int ilo,
+ lapack_int ihi, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* tau,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgehrd( &n, &ilo, &ihi, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zgehrd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgehrd( &n, &ilo, &ihi, a, &lda_t, tau, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgehrd( &n, &ilo, &ihi, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgehrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgehrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgelq2.c b/LAPACKE/src/lapacke_zgelq2.c
new file mode 100644
index 00000000..769ab445
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgelq2.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgelq2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgelq2( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgelq2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,m) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgelq2_work( matrix_layout, m, n, a, lda, tau, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgelq2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgelq2_work.c b/LAPACKE/src/lapacke_zgelq2_work.c
new file mode 100644
index 00000000..5f165168
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgelq2_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgelq2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgelq2_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* tau,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgelq2( &m, &n, a, &lda, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgelq2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgelq2( &m, &n, a_t, &lda_t, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgelq2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgelq2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgelqf.c b/LAPACKE/src/lapacke_zgelqf.c
new file mode 100644
index 00000000..7a557b79
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgelqf.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgelqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgelqf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgelqf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgelqf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgelqf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgelqf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgelqf_work.c b/LAPACKE/src/lapacke_zgelqf_work.c
new file mode 100644
index 00000000..cbc71653
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgelqf_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgelqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgelqf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* tau,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgelqf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgelqf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgelqf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgelqf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgelqf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgelqf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgels.c b/LAPACKE/src/lapacke_zgels.c
new file mode 100644
index 00000000..87db4600
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgels.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgels
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgels( int matrix_layout, char trans, lapack_int m,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgels", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgels_work( matrix_layout, trans, m, n, nrhs, a, lda, b, ldb,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgels_work( matrix_layout, trans, m, n, nrhs, a, lda, b, ldb,
+ work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgels", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgels_work.c b/LAPACKE/src/lapacke_zgels_work.c
new file mode 100644
index 00000000..556883d4
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgels_work.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgels
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgels_work( int matrix_layout, char trans, lapack_int m,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgels( &trans, &m, &n, &nrhs, a, &lda, b, &ldb, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,MAX(m,n));
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zgels_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zgels_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgels( &trans, &m, &n, &nrhs, a, &lda_t, b, &ldb_t, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgels( &trans, &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
+ ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgels_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgels_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgelsd.c b/LAPACKE/src/lapacke_zgelsd.c
new file mode 100644
index 00000000..7719cf49
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgelsd.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgelsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgelsd( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, double* s, double rcond,
+ lapack_int* rank )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ /* Additional scalars declarations for work arrays */
+ lapack_int liwork;
+ lapack_int lrwork;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_int iwork_query;
+ double rwork_query;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgelsd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgelsd_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
+ rcond, rank, &work_query, lwork, &rwork_query,
+ &iwork_query );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_Z2INT( 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;
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgelsd_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
+ rcond, rank, work, lwork, rwork, iwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgelsd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgelsd_work.c b/LAPACKE/src/lapacke_zgelsd_work.c
new file mode 100644
index 00000000..14b2a407
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgelsd_work.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgelsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgelsd_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, double* s, double rcond,
+ lapack_int* rank, lapack_complex_double* work,
+ lapack_int lwork, double* rwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgelsd( &m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, rank, work,
+ &lwork, rwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,MAX(m,n));
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zgelsd_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zgelsd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgelsd( &m, &n, &nrhs, a, &lda_t, b, &ldb_t, s, &rcond, rank,
+ work, &lwork, rwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgelsd( &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, s, &rcond, rank,
+ work, &lwork, rwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
+ ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgelsd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgelsd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgelss.c b/LAPACKE/src/lapacke_zgelss.c
new file mode 100644
index 00000000..34490c9f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgelss.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgelss
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgelss( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, double* s, double rcond,
+ lapack_int* rank )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgelss", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,5*MIN(m,n)) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgelss_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
+ rcond, rank, &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgelss_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
+ rcond, rank, work, lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgelss", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgelss_work.c b/LAPACKE/src/lapacke_zgelss_work.c
new file mode 100644
index 00000000..ee95acb9
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgelss_work.c
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgelss
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgelss_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, double* s, double rcond,
+ lapack_int* rank, lapack_complex_double* work,
+ lapack_int lwork, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgelss( &m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, rank, work,
+ &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,MAX(m,n));
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zgelss_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zgelss_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgelss( &m, &n, &nrhs, a, &lda_t, b, &ldb_t, s, &rcond, rank,
+ work, &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgelss( &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, s, &rcond, rank,
+ work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
+ ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgelss_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgelss_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgelsy.c b/LAPACKE/src/lapacke_zgelsy.c
new file mode 100644
index 00000000..484a3b0b
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgelsy.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgelsy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgelsy( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, lapack_int* jpvt, double rcond,
+ lapack_int* rank )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgelsy", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgelsy_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, jpvt,
+ rcond, rank, &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgelsy_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, jpvt,
+ rcond, rank, work, lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgelsy", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgelsy_work.c b/LAPACKE/src/lapacke_zgelsy_work.c
new file mode 100644
index 00000000..11a8382d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgelsy_work.c
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgelsy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgelsy_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, lapack_int* jpvt, double rcond,
+ lapack_int* rank, lapack_complex_double* work,
+ lapack_int lwork, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgelsy( &m, &n, &nrhs, a, &lda, b, &ldb, jpvt, &rcond, rank,
+ work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,MAX(m,n));
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zgelsy_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zgelsy_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgelsy( &m, &n, &nrhs, a, &lda_t, b, &ldb_t, jpvt, &rcond,
+ rank, work, &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgelsy( &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, jpvt, &rcond,
+ rank, work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
+ ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgelsy_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgelsy_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgemqrt.c b/LAPACKE/src/lapacke_zgemqrt.c
new file mode 100644
index 00000000..0e12e964
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgemqrt.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgemqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgemqrt( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int nb, const lapack_complex_double* v,
+ lapack_int ldv, const lapack_complex_double* t,
+ lapack_int ldt, lapack_complex_double* c,
+ lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgemqrt", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -12;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) {
+ return -10;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,m) * MAX(1,nb) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgemqrt_work( matrix_layout, side, trans, m, n, k, nb, v, ldv,
+ t, ldt, c, ldc, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgemqrt", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgemqrt_work.c b/LAPACKE/src/lapacke_zgemqrt_work.c
new file mode 100644
index 00000000..83cbbf68
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgemqrt_work.c
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgemqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgemqrt_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int nb, const lapack_complex_double* v,
+ lapack_int ldv, const lapack_complex_double* t,
+ lapack_int ldt, lapack_complex_double* c,
+ lapack_int ldc, lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgemqrt( &side, &trans, &m, &n, &k, &nb, v, &ldv, t, &ldt, c,
+ &ldc, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldc_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,ldt);
+ lapack_int ldv_t = MAX(1,ldv);
+ lapack_complex_double* v_t = NULL;
+ lapack_complex_double* t_t = NULL;
+ lapack_complex_double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldc < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zgemqrt_work", info );
+ return info;
+ }
+ if( ldt < nb ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zgemqrt_work", info );
+ return info;
+ }
+ if( ldv < k ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zgemqrt_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldv_t * MAX(1,k) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldt_t * MAX(1,nb) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ c_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, ldv, k, v, ldv, v_t, ldv_t );
+ LAPACKE_zge_trans( matrix_layout, ldt, nb, t, ldt, t_t, ldt_t );
+ LAPACKE_zge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgemqrt( &side, &trans, &m, &n, &k, &nb, v_t, &ldv_t, t_t,
+ &ldt_t, c_t, &ldc_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgemqrt_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgemqrt_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeqlf.c b/LAPACKE/src/lapacke_zgeqlf.c
new file mode 100644
index 00000000..70b6f6cc
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqlf.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqlf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqlf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqlf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgeqlf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgeqlf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqlf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeqlf_work.c b/LAPACKE/src/lapacke_zgeqlf_work.c
new file mode 100644
index 00000000..673aa321
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqlf_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqlf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqlf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* tau,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqlf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgeqlf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgeqlf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqlf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqlf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgeqlf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeqp3.c b/LAPACKE/src/lapacke_zgeqp3.c
new file mode 100644
index 00000000..492d7d4a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqp3.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqp3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqp3( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* jpvt, lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqp3", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgeqp3_work( matrix_layout, m, n, a, lda, jpvt, tau,
+ &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgeqp3_work( matrix_layout, m, n, a, lda, jpvt, tau, work,
+ lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqp3", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeqp3_work.c b/LAPACKE/src/lapacke_zgeqp3_work.c
new file mode 100644
index 00000000..955fc41b
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqp3_work.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqp3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqp3_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* jpvt, lapack_complex_double* tau,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqp3( &m, &n, a, &lda, jpvt, tau, work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgeqp3_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgeqp3( &m, &n, a, &lda_t, jpvt, tau, work, &lwork, rwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqp3( &m, &n, a_t, &lda_t, jpvt, tau, work, &lwork, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqp3_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgeqp3_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeqpf.c b/LAPACKE/src/lapacke_zgeqpf.c
new file mode 100644
index 00000000..2c89e985
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqpf.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqpf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqpf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* jpvt, lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqpf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgeqpf_work( matrix_layout, m, n, a, lda, jpvt, tau, work,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqpf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeqpf_work.c b/LAPACKE/src/lapacke_zgeqpf_work.c
new file mode 100644
index 00000000..2131db68
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqpf_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqpf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqpf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* jpvt, lapack_complex_double* tau,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqpf( &m, &n, a, &lda, jpvt, tau, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgeqpf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqpf( &m, &n, a_t, &lda_t, jpvt, tau, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqpf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgeqpf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeqr2.c b/LAPACKE/src/lapacke_zgeqr2.c
new file mode 100644
index 00000000..3c8168eb
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqr2.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqr2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqr2( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqr2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgeqr2_work( matrix_layout, m, n, a, lda, tau, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqr2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeqr2_work.c b/LAPACKE/src/lapacke_zgeqr2_work.c
new file mode 100644
index 00000000..2de90639
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqr2_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqr2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqr2_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* tau,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqr2( &m, &n, a, &lda, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgeqr2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqr2( &m, &n, a_t, &lda_t, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqr2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgeqr2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeqrf.c b/LAPACKE/src/lapacke_zgeqrf.c
new file mode 100644
index 00000000..60777439
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqrf.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqrf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgeqrf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgeqrf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeqrf_work.c b/LAPACKE/src/lapacke_zgeqrf_work.c
new file mode 100644
index 00000000..b5cd907f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqrf_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqrf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* tau,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqrf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgeqrf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgeqrf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqrf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgeqrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeqrfp.c b/LAPACKE/src/lapacke_zgeqrfp.c
new file mode 100644
index 00000000..cbc02b65
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqrfp.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqrfp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqrfp( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqrfp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgeqrfp_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgeqrfp_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqrfp", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeqrfp_work.c b/LAPACKE/src/lapacke_zgeqrfp_work.c
new file mode 100644
index 00000000..eaa8bf55
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqrfp_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqrfp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqrfp_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* tau,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqrfp( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgeqrfp_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgeqrfp( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqrfp( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqrfp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgeqrfp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeqrt.c b/LAPACKE/src/lapacke_zgeqrt.c
new file mode 100644
index 00000000..cc06789e
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqrt.c
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqrt( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nb, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* t,
+ lapack_int ldt )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqrt", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,nb) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgeqrt_work( matrix_layout, m, n, nb, a, lda, t, ldt, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqrt", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeqrt2.c b/LAPACKE/src/lapacke_zgeqrt2.c
new file mode 100644
index 00000000..5d69e243
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqrt2.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqrt2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqrt2( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* t, lapack_int ldt )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqrt2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zgeqrt2_work( matrix_layout, m, n, a, lda, t, ldt );
+}
diff --git a/LAPACKE/src/lapacke_zgeqrt2_work.c b/LAPACKE/src/lapacke_zgeqrt2_work.c
new file mode 100644
index 00000000..764d842e
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqrt2_work.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqrt2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqrt2_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* t, lapack_int ldt )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqrt2( &m, &n, a, &lda, t, &ldt, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgeqrt2_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zgeqrt2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqrt2( &m, &n, a_t, &lda_t, t_t, &ldt_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqrt2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgeqrt2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeqrt3.c b/LAPACKE/src/lapacke_zgeqrt3.c
new file mode 100644
index 00000000..cffabe56
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqrt3.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqrt3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqrt3( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* t, lapack_int ldt )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqrt3", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zgeqrt3_work( matrix_layout, m, n, a, lda, t, ldt );
+}
diff --git a/LAPACKE/src/lapacke_zgeqrt3_work.c b/LAPACKE/src/lapacke_zgeqrt3_work.c
new file mode 100644
index 00000000..82e48e65
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqrt3_work.c
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqrt3
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqrt3_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* t, lapack_int ldt )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqrt3( &m, &n, a, &lda, t, &ldt, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgeqrt3_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zgeqrt3_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqrt3( &m, &n, a_t, &lda_t, t_t, &ldt_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqrt3_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgeqrt3_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgeqrt_work.c b/LAPACKE/src/lapacke_zgeqrt_work.c
new file mode 100644
index 00000000..a0358720
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgeqrt_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgeqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgeqrt_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int nb, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* t,
+ lapack_int ldt, lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqrt( &m, &n, &nb, a, &lda, t, &ldt, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,ldt);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zgeqrt_work", info );
+ return info;
+ }
+ if( ldt < MIN(m,n) ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zgeqrt_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldt_t * MAX(1,MIN(m,n)) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgeqrt( &m, &n, &nb, a_t, &lda_t, t_t, &ldt_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, ldt, MIN(m,n), t_t, ldt_t, t,
+ ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgeqrt_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgeqrt_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgerfs.c b/LAPACKE/src/lapacke_zgerfs.c
new file mode 100644
index 00000000..b603d817
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgerfs.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgerfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgerfs( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgerfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgerfs_work( matrix_layout, trans, n, nrhs, a, lda, af, ldaf,
+ ipiv, b, ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgerfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgerfs_work.c b/LAPACKE/src/lapacke_zgerfs_work.c
new file mode 100644
index 00000000..865fc578
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgerfs_work.c
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgerfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgerfs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgerfs( &trans, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b, &ldb, x,
+ &ldx, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* af_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zgerfs_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zgerfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zgerfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zgerfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgerfs( &trans, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, ipiv, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgerfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgerfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgerfsx.c b/LAPACKE/src/lapacke_zgerfsx.c
new file mode 100644
index 00000000..d12d06ea
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgerfsx.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgerfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgerfsx( int matrix_layout, char trans, char equed,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* af, lapack_int ldaf,
+ const lapack_int* ipiv, const double* r,
+ const double* c, const lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* x,
+ lapack_int ldx, double* rcond, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgerfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
+ if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+ return -12;
+ }
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -23;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
+ if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -15;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgerfsx_work( matrix_layout, trans, equed, n, nrhs, a, lda,
+ af, ldaf, ipiv, r, c, b, ldb, x, ldx, rcond,
+ berr, n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgerfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgerfsx_work.c b/LAPACKE/src/lapacke_zgerfsx_work.c
new file mode 100644
index 00000000..e118f922
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgerfsx_work.c
@@ -0,0 +1,171 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgerfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgerfsx_work( int matrix_layout, char trans, char equed,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const double* r, const double* c,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgerfsx( &trans, &equed, &n, &nrhs, a, &lda, af, &ldaf, ipiv, r,
+ c, b, &ldb, x, &ldx, rcond, berr, &n_err_bnds,
+ err_bnds_norm, err_bnds_comp, &nparams, params, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* af_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zgerfsx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zgerfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_zgerfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_zgerfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgerfsx( &trans, &equed, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, r, c, b_t, &ldb_t, x_t, &ldx_t, rcond, berr,
+ &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t, &nparams,
+ params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgerfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgerfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgerqf.c b/LAPACKE/src/lapacke_zgerqf.c
new file mode 100644
index 00000000..70d31d90
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgerqf.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgerqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgerqf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgerqf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgerqf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgerqf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgerqf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgerqf_work.c b/LAPACKE/src/lapacke_zgerqf_work.c
new file mode 100644
index 00000000..de70a7a7
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgerqf_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgerqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgerqf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* tau,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgerqf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgerqf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgerqf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgerqf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgerqf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgerqf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgesdd.c b/LAPACKE/src/lapacke_zgesdd.c
new file mode 100644
index 00000000..0c645061
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgesdd.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgesdd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgesdd( int matrix_layout, char jobz, lapack_int m,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, double* s, lapack_complex_double* u,
+ lapack_int ldu, lapack_complex_double* vt,
+ lapack_int ldvt )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ /* Additional scalars declarations for work arrays */
+ size_t lrwork;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgesdd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( jobz, 'n' ) ) {
+ lrwork = MAX(1,5*MIN(m,n));
+ } else {
+ lrwork = (size_t)5*MAX(1,MIN(m,n))*MAX(1,MIN(m,n))+7*MIN(m,n);
+ }
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)
+ LAPACKE_malloc( sizeof(lapack_int) * MAX(1,8*MIN(m,n)) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgesdd_work( matrix_layout, jobz, m, n, a, lda, s, u, ldu, vt,
+ ldvt, &work_query, lwork, rwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_2;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgesdd_work( matrix_layout, jobz, m, n, a, lda, s, u, ldu, vt,
+ ldvt, work, lwork, rwork, iwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgesdd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgesdd_work.c b/LAPACKE/src/lapacke_zgesdd_work.c
new file mode 100644
index 00000000..9b20890c
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgesdd_work.c
@@ -0,0 +1,158 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgesdd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgesdd_work( int matrix_layout, char jobz, lapack_int m,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, double* s,
+ lapack_complex_double* u, lapack_int ldu,
+ lapack_complex_double* vt, lapack_int ldvt,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork, lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgesdd( &jobz, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt, work,
+ &lwork, rwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_u = ( LAPACKE_lsame( jobz, 'a' ) ||
+ LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && m<n) ) ? m : 1;
+ lapack_int ncols_u = ( LAPACKE_lsame( jobz, 'a' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && m<n) ) ? m :
+ ( LAPACKE_lsame( jobz, 's' ) ? MIN(m,n) : 1);
+ lapack_int nrows_vt = ( LAPACKE_lsame( jobz, 'a' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && m>=n) ) ? n :
+ ( LAPACKE_lsame( jobz, 's' ) ? MIN(m,n) : 1);
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldu_t = MAX(1,nrows_u);
+ lapack_int ldvt_t = MAX(1,nrows_vt);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* u_t = NULL;
+ lapack_complex_double* vt_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zgesdd_work", info );
+ return info;
+ }
+ if( ldu < ncols_u ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zgesdd_work", info );
+ return info;
+ }
+ if( ldvt < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zgesdd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgesdd( &jobz, &m, &n, a, &lda_t, s, u, &ldu_t, vt, &ldvt_t,
+ work, &lwork, rwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m<n) ) ) {
+ u_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldu_t * MAX(1,ncols_u) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m>=n) ) ) {
+ vt_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvt_t * MAX(1,n) );
+ if( vt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgesdd( &jobz, &m, &n, a_t, &lda_t, s, u_t, &ldu_t, vt_t,
+ &ldvt_t, work, &lwork, rwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m<n) ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t,
+ u, ldu );
+ }
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m>=n) ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt,
+ ldvt );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m>=n) ) ) {
+ LAPACKE_free( vt_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobz, 'a' ) || LAPACKE_lsame( jobz, 's' ) ||
+ ( LAPACKE_lsame( jobz, 'o' ) && (m<n) ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgesdd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgesdd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgesv.c b/LAPACKE/src/lapacke_zgesv.c
new file mode 100644
index 00000000..9825ff66
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgesv.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgesv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgesv( int matrix_layout, lapack_int n, lapack_int nrhs,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* ipiv, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgesv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_zgesv_work( matrix_layout, n, nrhs, a, lda, ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_zgesv_work.c b/LAPACKE/src/lapacke_zgesv_work.c
new file mode 100644
index 00000000..ca789669
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgesv_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgesv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgesv_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* ipiv, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgesv( &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgesv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zgesv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgesv( &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgesv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgesv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgesvd.c b/LAPACKE/src/lapacke_zgesvd.c
new file mode 100644
index 00000000..e2d7033a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgesvd.c
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgesvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgesvd( int matrix_layout, char jobu, char jobvt,
+ lapack_int m, lapack_int n, lapack_complex_double* a,
+ lapack_int lda, double* s, lapack_complex_double* u,
+ lapack_int ldu, lapack_complex_double* vt,
+ lapack_int ldvt, double* superb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ lapack_int i;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgesvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,5*MIN(m,n)) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgesvd_work( matrix_layout, jobu, jobvt, m, n, a, lda, s, u,
+ ldu, vt, ldvt, &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgesvd_work( matrix_layout, jobu, jobvt, m, n, a, lda, s, u,
+ ldu, vt, ldvt, work, lwork, rwork );
+ /* Backup significant data from working array(s) */
+ for( i=0; i<MIN(m,n)-1; i++ ) {
+ superb[i] = rwork[i];
+ }
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgesvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgesvd_work.c b/LAPACKE/src/lapacke_zgesvd_work.c
new file mode 100644
index 00000000..d66ed8c2
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgesvd_work.c
@@ -0,0 +1,149 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgesvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgesvd_work( int matrix_layout, char jobu, char jobvt,
+ lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ double* s, lapack_complex_double* u,
+ lapack_int ldu, lapack_complex_double* vt,
+ lapack_int ldvt, lapack_complex_double* work,
+ lapack_int lwork, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgesvd( &jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt,
+ work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_u = ( LAPACKE_lsame( jobu, 'a' ) ||
+ LAPACKE_lsame( jobu, 's' ) ) ? m : 1;
+ lapack_int ncols_u = LAPACKE_lsame( jobu, 'a' ) ? m :
+ ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1);
+ lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n :
+ ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1);
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldu_t = MAX(1,nrows_u);
+ lapack_int ldvt_t = MAX(1,nrows_vt);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* u_t = NULL;
+ lapack_complex_double* vt_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zgesvd_work", info );
+ return info;
+ }
+ if( ldu < ncols_u ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zgesvd_work", info );
+ return info;
+ }
+ if( ldvt < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zgesvd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgesvd( &jobu, &jobvt, &m, &n, a, &lda_t, s, u, &ldu_t, vt,
+ &ldvt_t, work, &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ u_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldu_t * MAX(1,ncols_u) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ vt_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvt_t * MAX(1,n) );
+ if( vt_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgesvd( &jobu, &jobvt, &m, &n, a_t, &lda_t, s, u_t, &ldu_t, vt_t,
+ &ldvt_t, work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t,
+ u, ldu );
+ }
+ if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt,
+ ldvt );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ LAPACKE_free( vt_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgesvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgesvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgesvx.c b/LAPACKE/src/lapacke_zgesvx.c
new file mode 100644
index 00000000..ae6c6bb2
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgesvx.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgesvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgesvx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, double* r, double* c,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr,
+ double* rpivot )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgesvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -14;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) ) ) {
+ if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+ return -13;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'r' ) ) ) {
+ if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgesvx_work( matrix_layout, fact, trans, n, nrhs, a, lda, af,
+ ldaf, ipiv, equed, r, c, b, ldb, x, ldx, rcond,
+ ferr, berr, work, rwork );
+ /* Backup significant data from working array(s) */
+ *rpivot = rwork[0];
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgesvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgesvx_work.c b/LAPACKE/src/lapacke_zgesvx_work.c
new file mode 100644
index 00000000..6b843125
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgesvx_work.c
@@ -0,0 +1,156 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgesvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgesvx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, double* r,
+ double* c, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* x,
+ lapack_int ldx, double* rcond, double* ferr,
+ double* berr, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgesvx( &fact, &trans, &n, &nrhs, a, &lda, af, &ldaf, ipiv,
+ equed, r, c, b, &ldb, x, &ldx, rcond, ferr, berr, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* af_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zgesvx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zgesvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_zgesvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_zgesvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgesvx( &fact, &trans, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, equed, r, c, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr,
+ berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, af_t, ldaf_t, af, ldaf );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgesvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgesvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgesvxx.c b/LAPACKE/src/lapacke_zgesvxx.c
new file mode 100644
index 00000000..e4300016
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgesvxx.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgesvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgesvxx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, double* r, double* c,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* rpvgrw, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgesvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -14;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) ) ) {
+ if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+ return -13;
+ }
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -25;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'r' ) ) ) {
+ if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgesvxx_work( matrix_layout, fact, trans, n, nrhs, a, lda, af,
+ ldaf, ipiv, equed, r, c, b, ldb, x, ldx, rcond,
+ rpvgrw, berr, n_err_bnds, err_bnds_norm,
+ err_bnds_comp, nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgesvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgesvxx_work.c b/LAPACKE/src/lapacke_zgesvxx_work.c
new file mode 100644
index 00000000..c1d3b0d7
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgesvxx_work.c
@@ -0,0 +1,182 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgesvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgesvxx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, double* r,
+ double* c, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* x,
+ lapack_int ldx, double* rcond, double* rpvgrw,
+ double* berr, lapack_int n_err_bnds,
+ double* err_bnds_norm, double* err_bnds_comp,
+ lapack_int nparams, double* params,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgesvxx( &fact, &trans, &n, &nrhs, a, &lda, af, &ldaf, ipiv,
+ equed, r, c, b, &ldb, x, &ldx, rcond, rpvgrw, berr,
+ &n_err_bnds, err_bnds_norm, err_bnds_comp, &nparams,
+ params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* af_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zgesvxx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zgesvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_zgesvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_zgesvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgesvxx( &fact, &trans, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, equed, r, c, b_t, &ldb_t, x_t, &ldx_t, rcond,
+ rpvgrw, berr, &n_err_bnds, err_bnds_norm_t,
+ err_bnds_comp_t, &nparams, params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, af_t, ldaf_t, af, ldaf );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+ LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgesvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgesvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgetf2.c b/LAPACKE/src/lapacke_zgetf2.c
new file mode 100644
index 00000000..1be777fc
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgetf2.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgetf2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgetf2( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgetf2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zgetf2_work( matrix_layout, m, n, a, lda, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_zgetf2_work.c b/LAPACKE/src/lapacke_zgetf2_work.c
new file mode 100644
index 00000000..cc493ff0
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgetf2_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgetf2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgetf2_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgetf2( &m, &n, a, &lda, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgetf2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgetf2( &m, &n, a_t, &lda_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgetf2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgetf2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgetrf.c b/LAPACKE/src/lapacke_zgetrf.c
new file mode 100644
index 00000000..e3e532ee
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgetrf.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgetrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgetrf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgetrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zgetrf_work( matrix_layout, m, n, a, lda, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_zgetrf_work.c b/LAPACKE/src/lapacke_zgetrf_work.c
new file mode 100644
index 00000000..584a2920
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgetrf_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgetrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgetrf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgetrf( &m, &n, a, &lda, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zgetrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgetrf( &m, &n, a_t, &lda_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgetrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgetrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgetri.c b/LAPACKE/src/lapacke_zgetri.c
new file mode 100644
index 00000000..0b2194aa
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgetri.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgetri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgetri( int matrix_layout, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgetri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -3;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgetri_work( matrix_layout, n, a, lda, ipiv, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgetri_work( matrix_layout, n, a, lda, ipiv, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgetri", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgetri_work.c b/LAPACKE/src/lapacke_zgetri_work.c
new file mode 100644
index 00000000..8287ecca
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgetri_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgetri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgetri_work( int matrix_layout, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgetri( &n, a, &lda, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -4;
+ LAPACKE_xerbla( "LAPACKE_zgetri_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgetri( &n, a, &lda_t, ipiv, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgetri( &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgetri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgetri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgetrs.c b/LAPACKE/src/lapacke_zgetrs.c
new file mode 100644
index 00000000..bdd052b1
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgetrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgetrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgetrs( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgetrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_zgetrs_work( matrix_layout, trans, n, nrhs, a, lda, ipiv, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_zgetrs_work.c b/LAPACKE/src/lapacke_zgetrs_work.c
new file mode 100644
index 00000000..0ebe96c9
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgetrs_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgetrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgetrs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgetrs( &trans, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zgetrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zgetrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgetrs( &trans, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgetrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgetrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggbak.c b/LAPACKE/src/lapacke_zggbak.c
new file mode 100644
index 00000000..ff5f2462
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggbak.c
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggbak
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggbak( int matrix_layout, char job, char side, lapack_int n,
+ lapack_int ilo, lapack_int ihi, const double* lscale,
+ const double* rscale, lapack_int m,
+ lapack_complex_double* v, lapack_int ldv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zggbak", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, lscale, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( n, rscale, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, m, v, ldv ) ) {
+ return -10;
+ }
+#endif
+ return LAPACKE_zggbak_work( matrix_layout, job, side, n, ilo, ihi, lscale,
+ rscale, m, v, ldv );
+}
diff --git a/LAPACKE/src/lapacke_zggbak_work.c b/LAPACKE/src/lapacke_zggbak_work.c
new file mode 100644
index 00000000..e13049d9
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggbak_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggbak
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggbak_work( int matrix_layout, char job, char side,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ const double* lscale, const double* rscale,
+ lapack_int m, lapack_complex_double* v,
+ lapack_int ldv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggbak( &job, &side, &n, &ilo, &ihi, lscale, rscale, &m, v, &ldv,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldv_t = MAX(1,n);
+ lapack_complex_double* v_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldv < m ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zggbak_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldv_t * MAX(1,m) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, m, v, ldv, v_t, ldv_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggbak( &job, &side, &n, &ilo, &ihi, lscale, rscale, &m, v_t,
+ &ldv_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, m, v_t, ldv_t, v, ldv );
+ /* Release memory and exit */
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggbak_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zggbak_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggbal.c b/LAPACKE/src/lapacke_zggbal.c
new file mode 100644
index 00000000..bbf623dc
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggbal.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggbal
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggbal( int matrix_layout, char job, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_int* ilo, lapack_int* ihi, double* lscale,
+ double* rscale )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lwork;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zggbal", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ }
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -6;
+ }
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( job, 's' ) || LAPACKE_lsame( job, 'b' ) ) {
+ lwork = MAX(1,6*n);
+ } else {
+ lwork = 1;
+ }
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zggbal_work( matrix_layout, job, n, a, lda, b, ldb, ilo, ihi,
+ lscale, rscale, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggbal", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggbal_work.c b/LAPACKE/src/lapacke_zggbal_work.c
new file mode 100644
index 00000000..7b0bbc64
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggbal_work.c
@@ -0,0 +1,130 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggbal
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggbal_work( int matrix_layout, char job, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_int* ilo, lapack_int* ihi,
+ double* lscale, double* rscale, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggbal( &job, &n, a, &lda, b, &ldb, ilo, ihi, lscale, rscale,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zggbal_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zggbal_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ }
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggbal( &job, &n, a_t, &lda_t, b_t, &ldb_t, ilo, ihi, lscale,
+ rscale, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_free( b_t );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+ LAPACKE_lsame( job, 'b' ) ) {
+ LAPACKE_free( a_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggbal_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zggbal_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgges.c b/LAPACKE/src/lapacke_zgges.c
new file mode 100644
index 00000000..e4a705d2
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgges.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgges
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgges( int matrix_layout, char jobvsl, char jobvsr, char sort,
+ LAPACK_Z_SELECT2 selctg, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_int* sdim, lapack_complex_double* alpha,
+ lapack_complex_double* beta,
+ lapack_complex_double* vsl, lapack_int ldvsl,
+ lapack_complex_double* vsr, lapack_int ldvsr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgges", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,8*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgges_work( matrix_layout, jobvsl, jobvsr, sort, selctg, n, a,
+ lda, b, ldb, sdim, alpha, beta, vsl, ldvsl, vsr,
+ ldvsr, &work_query, lwork, rwork, bwork );
+ if( info != 0 ) {
+ goto exit_level_2;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgges_work( matrix_layout, jobvsl, jobvsr, sort, selctg, n, a,
+ lda, b, ldb, sdim, alpha, beta, vsl, ldvsl, vsr,
+ ldvsr, work, lwork, rwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgges", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgges_work.c b/LAPACKE/src/lapacke_zgges_work.c
new file mode 100644
index 00000000..18d2127d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgges_work.c
@@ -0,0 +1,166 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgges
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgges_work( int matrix_layout, char jobvsl, char jobvsr,
+ char sort, LAPACK_Z_SELECT2 selctg, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_int* sdim, lapack_complex_double* alpha,
+ lapack_complex_double* beta,
+ lapack_complex_double* vsl, lapack_int ldvsl,
+ lapack_complex_double* vsr, lapack_int ldvsr,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork, lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgges( &jobvsl, &jobvsr, &sort, selctg, &n, a, &lda, b, &ldb,
+ sdim, alpha, beta, vsl, &ldvsl, vsr, &ldvsr, work, &lwork,
+ rwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvsl_t = MAX(1,n);
+ lapack_int ldvsr_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* vsl_t = NULL;
+ lapack_complex_double* vsr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zgges_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zgges_work", info );
+ return info;
+ }
+ if( ldvsl < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_zgges_work", info );
+ return info;
+ }
+ if( ldvsr < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_zgges_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgges( &jobvsl, &jobvsr, &sort, selctg, &n, a, &lda_t, b,
+ &ldb_t, sdim, alpha, beta, vsl, &ldvsl_t, vsr,
+ &ldvsr_t, work, &lwork, rwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ vsl_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvsl_t * MAX(1,n) );
+ if( vsl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ vsr_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvsr_t * MAX(1,n) );
+ if( vsr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgges( &jobvsl, &jobvsr, &sort, selctg, &n, a_t, &lda_t, b_t,
+ &ldb_t, sdim, alpha, beta, vsl_t, &ldvsl_t, vsr_t,
+ &ldvsr_t, work, &lwork, rwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, vsl_t, ldvsl_t, vsl,
+ ldvsl );
+ }
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, vsr_t, ldvsr_t, vsr,
+ ldvsr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ LAPACKE_free( vsr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ LAPACKE_free( vsl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgges_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgges_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggesx.c b/LAPACKE/src/lapacke_zggesx.c
new file mode 100644
index 00000000..c1341a16
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggesx.c
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggesx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggesx( int matrix_layout, char jobvsl, char jobvsr,
+ char sort, LAPACK_Z_SELECT2 selctg, char sense,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, lapack_int* sdim,
+ lapack_complex_double* alpha,
+ lapack_complex_double* beta,
+ lapack_complex_double* vsl, lapack_int ldvsl,
+ lapack_complex_double* vsr, lapack_int ldvsr,
+ double* rconde, double* rcondv )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lwork = -1;
+ lapack_logical* bwork = NULL;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_int iwork_query;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zggesx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,8*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zggesx_work( matrix_layout, jobvsl, jobvsr, sort, selctg,
+ sense, n, a, lda, b, ldb, sdim, alpha, beta,
+ vsl, ldvsl, vsr, ldvsr, rconde, rcondv,
+ &work_query, lwork, rwork, &iwork_query, liwork,
+ bwork );
+ if( info != 0 ) {
+ goto exit_level_2;
+ }
+ liwork = (lapack_int)iwork_query;
+ lwork = LAPACK_Z2INT( 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_2;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zggesx_work( matrix_layout, jobvsl, jobvsr, sort, selctg,
+ sense, n, a, lda, b, ldb, sdim, alpha, beta,
+ vsl, ldvsl, vsr, ldvsr, rconde, rcondv, work,
+ lwork, rwork, iwork, liwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_3:
+ LAPACKE_free( iwork );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ if( LAPACKE_lsame( sort, 's' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggesx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggesx_work.c b/LAPACKE/src/lapacke_zggesx_work.c
new file mode 100644
index 00000000..9c222e5f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggesx_work.c
@@ -0,0 +1,172 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggesx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggesx_work( int matrix_layout, char jobvsl, char jobvsr,
+ char sort, LAPACK_Z_SELECT2 selctg, char sense,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, lapack_int* sdim,
+ lapack_complex_double* alpha,
+ lapack_complex_double* beta,
+ lapack_complex_double* vsl, lapack_int ldvsl,
+ lapack_complex_double* vsr, lapack_int ldvsr,
+ double* rconde, double* rcondv,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork, lapack_int* iwork,
+ lapack_int liwork, lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggesx( &jobvsl, &jobvsr, &sort, selctg, &sense, &n, a, &lda, b,
+ &ldb, sdim, alpha, beta, vsl, &ldvsl, vsr, &ldvsr,
+ rconde, rcondv, work, &lwork, rwork, iwork, &liwork,
+ bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvsl_t = MAX(1,n);
+ lapack_int ldvsr_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* vsl_t = NULL;
+ lapack_complex_double* vsr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zggesx_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zggesx_work", info );
+ return info;
+ }
+ if( ldvsl < n ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_zggesx_work", info );
+ return info;
+ }
+ if( ldvsr < n ) {
+ info = -18;
+ LAPACKE_xerbla( "LAPACKE_zggesx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_zggesx( &jobvsl, &jobvsr, &sort, selctg, &sense, &n, a,
+ &lda_t, b, &ldb_t, sdim, alpha, beta, vsl, &ldvsl_t,
+ vsr, &ldvsr_t, rconde, rcondv, work, &lwork, rwork,
+ iwork, &liwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ vsl_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvsl_t * MAX(1,n) );
+ if( vsl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ vsr_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvsr_t * MAX(1,n) );
+ if( vsr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggesx( &jobvsl, &jobvsr, &sort, selctg, &sense, &n, a_t, &lda_t,
+ b_t, &ldb_t, sdim, alpha, beta, vsl_t, &ldvsl_t, vsr_t,
+ &ldvsr_t, rconde, rcondv, work, &lwork, rwork, iwork,
+ &liwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, vsl_t, ldvsl_t, vsl,
+ ldvsl );
+ }
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, vsr_t, ldvsr_t, vsr,
+ ldvsr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvsr, 'v' ) ) {
+ LAPACKE_free( vsr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobvsl, 'v' ) ) {
+ LAPACKE_free( vsl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggesx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zggesx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggev.c b/LAPACKE/src/lapacke_zggev.c
new file mode 100644
index 00000000..e9c7466f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggev.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggev( int matrix_layout, char jobvl, char jobvr,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* alpha,
+ lapack_complex_double* beta,
+ lapack_complex_double* vl, lapack_int ldvl,
+ lapack_complex_double* vr, lapack_int ldvr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zggev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,8*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zggev_work( matrix_layout, jobvl, jobvr, n, a, lda, b, ldb,
+ alpha, beta, vl, ldvl, vr, ldvr, &work_query,
+ lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zggev_work( matrix_layout, jobvl, jobvr, n, a, lda, b, ldb,
+ alpha, beta, vl, ldvl, vr, ldvr, work, lwork,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggev_work.c b/LAPACKE/src/lapacke_zggev_work.c
new file mode 100644
index 00000000..39473c17
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggev_work.c
@@ -0,0 +1,168 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggev_work( int matrix_layout, char jobvl, char jobvr,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* alpha,
+ lapack_complex_double* beta,
+ lapack_complex_double* vl, lapack_int ldvl,
+ lapack_complex_double* vr, lapack_int ldvr,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggev( &jobvl, &jobvr, &n, a, &lda, b, &ldb, alpha, beta, vl,
+ &ldvl, vr, &ldvr, work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_vl = LAPACKE_lsame( jobvl, 'v' ) ? n : 1;
+ lapack_int ncols_vl = LAPACKE_lsame( jobvl, 'v' ) ? n : 1;
+ lapack_int nrows_vr = LAPACKE_lsame( jobvr, 'v' ) ? n : 1;
+ lapack_int ncols_vr = LAPACKE_lsame( jobvr, 'v' ) ? n : 1;
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,nrows_vl);
+ lapack_int ldvr_t = MAX(1,nrows_vr);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* vl_t = NULL;
+ lapack_complex_double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zggev_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zggev_work", info );
+ return info;
+ }
+ if( ldvl < ncols_vl ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zggev_work", info );
+ return info;
+ }
+ if( ldvr < ncols_vr ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_zggev_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zggev( &jobvl, &jobvr, &n, a, &lda_t, b, &ldb_t, alpha, beta,
+ vl, &ldvl_t, vr, &ldvr_t, work, &lwork, rwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ vl_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvl_t * MAX(1,ncols_vl) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ vr_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvr_t * MAX(1,ncols_vr) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggev( &jobvl, &jobvr, &n, a_t, &lda_t, b_t, &ldb_t, alpha, beta,
+ vl_t, &ldvl_t, vr_t, &ldvr_t, work, &lwork, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_vl, ncols_vl, vl_t,
+ ldvl_t, vl, ldvl );
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_vr, ncols_vr, vr_t,
+ ldvr_t, vr, ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zggev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggevx.c b/LAPACKE/src/lapacke_zggevx.c
new file mode 100644
index 00000000..6f4df519
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggevx.c
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggevx( int matrix_layout, char balanc, char jobvl,
+ char jobvr, char sense, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* alpha,
+ lapack_complex_double* beta,
+ lapack_complex_double* vl, lapack_int ldvl,
+ lapack_complex_double* vr, lapack_int ldvr,
+ lapack_int* ilo, lapack_int* ihi, double* lscale,
+ double* rscale, double* abnrm, double* bbnrm,
+ double* rconde, double* rcondv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lrwork;
+ lapack_logical* bwork = NULL;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zggevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( balanc, 's' ) || LAPACKE_lsame( balanc, 'b' ) ) {
+ lrwork = MAX(1,6*n);
+ } else {
+ lrwork = MAX(1,2*n);
+ }
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'e' ) ||
+ LAPACKE_lsame( sense, 'v' ) ) {
+ bwork = (lapack_logical*)
+ LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
+ if( bwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'n' ) ||
+ LAPACKE_lsame( sense, 'v' ) ) {
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n+2) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zggevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
+ lda, b, ldb, alpha, beta, vl, ldvl, vr, ldvr,
+ ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde,
+ rcondv, &work_query, lwork, rwork, iwork,
+ bwork );
+ if( info != 0 ) {
+ goto exit_level_3;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zggevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
+ lda, b, ldb, alpha, beta, vl, ldvl, vr, ldvr,
+ ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde,
+ rcondv, work, lwork, rwork, iwork, bwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_3:
+ LAPACKE_free( rwork );
+exit_level_2:
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'n' ) ||
+ LAPACKE_lsame( sense, 'v' ) ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( sense, 'b' ) || LAPACKE_lsame( sense, 'e' ) ||
+ LAPACKE_lsame( sense, 'v' ) ) {
+ LAPACKE_free( bwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggevx_work.c b/LAPACKE/src/lapacke_zggevx_work.c
new file mode 100644
index 00000000..389655a9
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggevx_work.c
@@ -0,0 +1,171 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggevx_work( int matrix_layout, char balanc, char jobvl,
+ char jobvr, char sense, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* alpha,
+ lapack_complex_double* beta,
+ lapack_complex_double* vl, lapack_int ldvl,
+ lapack_complex_double* vr, lapack_int ldvr,
+ lapack_int* ilo, lapack_int* ihi,
+ double* lscale, double* rscale, double* abnrm,
+ double* bbnrm, double* rconde, double* rcondv,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork, lapack_int* iwork,
+ lapack_logical* bwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggevx( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda, b, &ldb,
+ alpha, beta, vl, &ldvl, vr, &ldvr, ilo, ihi, lscale,
+ rscale, abnrm, bbnrm, rconde, rcondv, work, &lwork,
+ rwork, iwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* vl_t = NULL;
+ lapack_complex_double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zggevx_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zggevx_work", info );
+ return info;
+ }
+ if( ldvl < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_zggevx_work", info );
+ return info;
+ }
+ if( ldvr < n ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_zggevx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zggevx( &balanc, &jobvl, &jobvr, &sense, &n, a, &lda_t, b,
+ &ldb_t, alpha, beta, vl, &ldvl_t, vr, &ldvr_t, ilo,
+ ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv,
+ work, &lwork, rwork, iwork, bwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ vl_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvl_t * MAX(1,n) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ vr_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvr_t * MAX(1,n) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggevx( &balanc, &jobvl, &jobvr, &sense, &n, a_t, &lda_t, b_t,
+ &ldb_t, alpha, beta, vl_t, &ldvl_t, vr_t, &ldvr_t, ilo,
+ ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv, work,
+ &lwork, rwork, iwork, bwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, vl_t, ldvl_t, vl, ldvl );
+ }
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, vr_t, ldvr_t, vr, ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobvr, 'v' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobvl, 'v' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zggevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggglm.c b/LAPACKE/src/lapacke_zggglm.c
new file mode 100644
index 00000000..a6d90926
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggglm.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggglm
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggglm( int matrix_layout, lapack_int n, lapack_int m,
+ lapack_int p, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* d,
+ lapack_complex_double* x, lapack_complex_double* y )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zggglm", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, m, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, p, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_z_nancheck( n, d, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zggglm_work( matrix_layout, n, m, p, a, lda, b, ldb, d, x, y,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zggglm_work( matrix_layout, n, m, p, a, lda, b, ldb, d, x, y,
+ work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggglm", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggglm_work.c b/LAPACKE/src/lapacke_zggglm_work.c
new file mode 100644
index 00000000..8844bc54
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggglm_work.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggglm
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggglm_work( int matrix_layout, lapack_int n, lapack_int m,
+ lapack_int p, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* d,
+ lapack_complex_double* x,
+ lapack_complex_double* y,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggglm( &n, &m, &p, a, &lda, b, &ldb, d, x, y, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zggglm_work", info );
+ return info;
+ }
+ if( ldb < p ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zggglm_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zggglm( &n, &m, &p, a, &lda_t, b, &ldb_t, d, x, y, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,p) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, m, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, p, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggglm( &n, &m, &p, a_t, &lda_t, b_t, &ldb_t, d, x, y, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, m, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, p, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggglm_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zggglm_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgghrd.c b/LAPACKE/src/lapacke_zgghrd.c
new file mode 100644
index 00000000..d01ab945
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgghrd.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgghrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgghrd( int matrix_layout, char compq, char compz,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_complex_double* z, lapack_int ldz )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgghrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -13;
+ }
+ }
+#endif
+ return LAPACKE_zgghrd_work( matrix_layout, compq, compz, n, ilo, ihi, a, lda,
+ b, ldb, q, ldq, z, ldz );
+}
diff --git a/LAPACKE/src/lapacke_zgghrd_work.c b/LAPACKE/src/lapacke_zgghrd_work.c
new file mode 100644
index 00000000..12501597
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgghrd_work.c
@@ -0,0 +1,157 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgghrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgghrd_work( int matrix_layout, char compq, char compz,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_complex_double* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgghrd( &compq, &compz, &n, &ilo, &ihi, a, &lda, b, &ldb, q,
+ &ldq, z, &ldz, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* q_t = NULL;
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zgghrd_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zgghrd_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zgghrd_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_zgghrd_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ q_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgghrd( &compq, &compz, &n, &ilo, &ihi, a_t, &lda_t, b_t, &ldb_t,
+ q_t, &ldq_t, z_t, &ldz_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgghrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgghrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgglse.c b/LAPACKE/src/lapacke_zgglse.c
new file mode 100644
index 00000000..89c5037f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgglse.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgglse
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgglse( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int p, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* c,
+ lapack_complex_double* d, lapack_complex_double* x )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgglse", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_z_nancheck( m, c, 1 ) ) {
+ return -9;
+ }
+ if( LAPACKE_z_nancheck( p, d, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zgglse_work( matrix_layout, m, n, p, a, lda, b, ldb, c, d, x,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgglse_work( matrix_layout, m, n, p, a, lda, b, ldb, c, d, x,
+ work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgglse", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgglse_work.c b/LAPACKE/src/lapacke_zgglse_work.c
new file mode 100644
index 00000000..bdd58582
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgglse_work.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgglse
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgglse_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int p, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* c,
+ lapack_complex_double* d,
+ lapack_complex_double* x,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgglse( &m, &n, &p, a, &lda, b, &ldb, c, d, x, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zgglse_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zgglse_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zgglse( &m, &n, &p, a, &lda_t, b, &ldb_t, c, d, x, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgglse( &m, &n, &p, a_t, &lda_t, b_t, &ldb_t, c, d, x, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgglse_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgglse_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggqrf.c b/LAPACKE/src/lapacke_zggqrf.c
new file mode 100644
index 00000000..8de8c160
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggqrf.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggqrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggqrf( int matrix_layout, lapack_int n, lapack_int m,
+ lapack_int p, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* taua,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* taub )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zggqrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, m, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, p, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zggqrf_work( matrix_layout, n, m, p, a, lda, taua, b, ldb,
+ taub, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zggqrf_work( matrix_layout, n, m, p, a, lda, taua, b, ldb,
+ taub, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggqrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggqrf_work.c b/LAPACKE/src/lapacke_zggqrf_work.c
new file mode 100644
index 00000000..1f9192e3
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggqrf_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggqrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggqrf_work( int matrix_layout, lapack_int n, lapack_int m,
+ lapack_int p, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* taua,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* taub,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggqrf( &n, &m, &p, a, &lda, taua, b, &ldb, taub, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zggqrf_work", info );
+ return info;
+ }
+ if( ldb < p ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zggqrf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zggqrf( &n, &m, &p, a, &lda_t, taua, b, &ldb_t, taub, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,p) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, m, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, p, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggqrf( &n, &m, &p, a_t, &lda_t, taua, b_t, &ldb_t, taub, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, m, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, p, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggqrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zggqrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggrqf.c b/LAPACKE/src/lapacke_zggrqf.c
new file mode 100644
index 00000000..2f9874e5
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggrqf.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggrqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggrqf( int matrix_layout, lapack_int m, lapack_int p,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* taua,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* taub )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zggrqf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zggrqf_work( matrix_layout, m, p, n, a, lda, taua, b, ldb,
+ taub, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zggrqf_work( matrix_layout, m, p, n, a, lda, taua, b, ldb,
+ taub, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggrqf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggrqf_work.c b/LAPACKE/src/lapacke_zggrqf_work.c
new file mode 100644
index 00000000..fab4cb8f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggrqf_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggrqf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggrqf_work( int matrix_layout, lapack_int m, lapack_int p,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* taua,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* taub,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggrqf( &m, &p, &n, a, &lda, taua, b, &ldb, taub, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zggrqf_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zggrqf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zggrqf( &m, &p, &n, a, &lda_t, taua, b, &ldb_t, taub, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggrqf( &m, &p, &n, a_t, &lda_t, taua, b_t, &ldb_t, taub, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggrqf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zggrqf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggsvd.c b/LAPACKE/src/lapacke_zggsvd.c
new file mode 100644
index 00000000..1fb5d10c
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggsvd.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggsvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggsvd( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int n, lapack_int p,
+ lapack_int* k, lapack_int* l,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ double* alpha, double* beta,
+ lapack_complex_double* u, lapack_int ldu,
+ lapack_complex_double* v, lapack_int ldv,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zggsvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -10;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ MAX(1,MAX3(3*n,m,p)+n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zggsvd_work( matrix_layout, jobu, jobv, jobq, m, n, p, k, l,
+ a, lda, b, ldb, alpha, beta, u, ldu, v, ldv, q,
+ ldq, work, rwork, iwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggsvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggsvd_work.c b/LAPACKE/src/lapacke_zggsvd_work.c
new file mode 100644
index 00000000..e41059de
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggsvd_work.c
@@ -0,0 +1,181 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggsvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggsvd_work( int matrix_layout, char jobu, char jobv,
+ char jobq, lapack_int m, lapack_int n,
+ lapack_int p, lapack_int* k, lapack_int* l,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ double* alpha, double* beta,
+ lapack_complex_double* u, lapack_int ldu,
+ lapack_complex_double* v, lapack_int ldv,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_complex_double* work, double* rwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggsvd( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a, &lda, b, &ldb,
+ alpha, beta, u, &ldu, v, &ldv, q, &ldq, work, rwork,
+ iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldu_t = MAX(1,m);
+ lapack_int ldv_t = MAX(1,p);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* u_t = NULL;
+ lapack_complex_double* v_t = NULL;
+ lapack_complex_double* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zggsvd_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zggsvd_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -21;
+ LAPACKE_xerbla( "LAPACKE_zggsvd_work", info );
+ return info;
+ }
+ if( ldu < m ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_zggsvd_work", info );
+ return info;
+ }
+ if( ldv < p ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_zggsvd_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ u_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldu_t * MAX(1,m) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ v_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldv_t * MAX(1,p) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ q_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggsvd( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a_t, &lda_t, b_t,
+ &ldb_t, alpha, beta, u_t, &ldu_t, v_t, &ldv_t, q_t,
+ &ldq_t, work, rwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, p, p, v_t, ldv_t, v, ldv );
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_4:
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_free( v_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggsvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zggsvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggsvp.c b/LAPACKE/src/lapacke_zggsvp.c
new file mode 100644
index 00000000..a21d5f71
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggsvp.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggsvp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggsvp( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int p, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ double tola, double tolb, lapack_int* k,
+ lapack_int* l, lapack_complex_double* u,
+ lapack_int ldu, lapack_complex_double* v,
+ lapack_int ldv, lapack_complex_double* q,
+ lapack_int ldq )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* tau = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zggsvp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_d_nancheck( 1, &tola, 1 ) ) {
+ return -12;
+ }
+ if( LAPACKE_d_nancheck( 1, &tolb, 1 ) ) {
+ return -13;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ tau = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n) );
+ if( tau == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,MAX3(3*n,m,p)) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zggsvp_work( matrix_layout, jobu, jobv, jobq, m, p, n, a, lda,
+ b, ldb, tola, tolb, k, l, u, ldu, v, ldv, q,
+ ldq, iwork, rwork, tau, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_3:
+ LAPACKE_free( tau );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggsvp", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zggsvp_work.c b/LAPACKE/src/lapacke_zggsvp_work.c
new file mode 100644
index 00000000..5c4e8345
--- /dev/null
+++ b/LAPACKE/src/lapacke_zggsvp_work.c
@@ -0,0 +1,182 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zggsvp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zggsvp_work( int matrix_layout, char jobu, char jobv,
+ char jobq, lapack_int m, lapack_int p,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, double tola, double tolb,
+ lapack_int* k, lapack_int* l,
+ lapack_complex_double* u, lapack_int ldu,
+ lapack_complex_double* v, lapack_int ldv,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_int* iwork, double* rwork,
+ lapack_complex_double* tau,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggsvp( &jobu, &jobv, &jobq, &m, &p, &n, a, &lda, b, &ldb, &tola,
+ &tolb, k, l, u, &ldu, v, &ldv, q, &ldq, iwork, rwork,
+ tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldu_t = MAX(1,m);
+ lapack_int ldv_t = MAX(1,p);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* u_t = NULL;
+ lapack_complex_double* v_t = NULL;
+ lapack_complex_double* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zggsvp_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zggsvp_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -21;
+ LAPACKE_xerbla( "LAPACKE_zggsvp_work", info );
+ return info;
+ }
+ if( ldu < m ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_zggsvp_work", info );
+ return info;
+ }
+ if( ldv < m ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_zggsvp_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ u_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldu_t * MAX(1,m) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ v_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldv_t * MAX(1,m) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ q_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zggsvp( &jobu, &jobv, &jobq, &m, &p, &n, a_t, &lda_t, b_t,
+ &ldb_t, &tola, &tolb, k, l, u_t, &ldu_t, v_t, &ldv_t,
+ q_t, &ldq_t, iwork, rwork, tau, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, p, m, v_t, ldv_t, v, ldv );
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_4:
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_free( v_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zggsvp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zggsvp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgtcon.c b/LAPACKE/src/lapacke_zgtcon.c
new file mode 100644
index 00000000..bde0c83b
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgtcon.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 zgtcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgtcon( char norm, lapack_int n,
+ const lapack_complex_double* dl,
+ const lapack_complex_double* d,
+ const lapack_complex_double* du,
+ const lapack_complex_double* du2,
+ const lapack_int* ipiv, double anorm, double* rcond )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_z_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
+ return -3;
+ }
+ if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_z_nancheck( n-2, du2, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgtcon_work( norm, n, dl, d, du, du2, ipiv, anorm, rcond,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgtcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgtcon_work.c b/LAPACKE/src/lapacke_zgtcon_work.c
new file mode 100644
index 00000000..39bc40e4
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgtcon_work.c
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 zgtcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgtcon_work( char norm, lapack_int n,
+ const lapack_complex_double* dl,
+ const lapack_complex_double* d,
+ const lapack_complex_double* du,
+ const lapack_complex_double* du2,
+ const lapack_int* ipiv, double anorm,
+ double* rcond, lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgtcon( &norm, &n, dl, d, du, du2, ipiv, &anorm, rcond, work,
+ &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgtrfs.c b/LAPACKE/src/lapacke_zgtrfs.c
new file mode 100644
index 00000000..605a5e6f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgtrfs.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgtrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgtrfs( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* dl,
+ const lapack_complex_double* d,
+ const lapack_complex_double* du,
+ const lapack_complex_double* dlf,
+ const lapack_complex_double* df,
+ const lapack_complex_double* duf,
+ const lapack_complex_double* du2,
+ const lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgtrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( LAPACKE_z_nancheck( n, d, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_z_nancheck( n, df, 1 ) ) {
+ return -9;
+ }
+ if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_z_nancheck( n-1, dlf, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_z_nancheck( n-2, du2, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_z_nancheck( n-1, duf, 1 ) ) {
+ return -10;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -15;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgtrfs_work( matrix_layout, trans, n, nrhs, dl, d, du, dlf,
+ df, duf, du2, ipiv, b, ldb, x, ldx, ferr, berr,
+ work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgtrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgtrfs_work.c b/LAPACKE/src/lapacke_zgtrfs_work.c
new file mode 100644
index 00000000..495d2738
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgtrfs_work.c
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgtrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgtrfs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs,
+ const lapack_complex_double* dl,
+ const lapack_complex_double* d,
+ const lapack_complex_double* du,
+ const lapack_complex_double* dlf,
+ const lapack_complex_double* df,
+ const lapack_complex_double* duf,
+ const lapack_complex_double* du2,
+ const lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgtrfs( &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b,
+ &ldb, x, &ldx, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_zgtrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_zgtrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgtrfs( &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2, ipiv,
+ b_t, &ldb_t, x_t, &ldx_t, ferr, berr, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgtrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgtrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgtsv.c b/LAPACKE/src/lapacke_zgtsv.c
new file mode 100644
index 00000000..b9acdac0
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgtsv.c
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgtsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgtsv( int matrix_layout, lapack_int n, lapack_int nrhs,
+ lapack_complex_double* dl, lapack_complex_double* d,
+ lapack_complex_double* du, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgtsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_z_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_zgtsv_work( matrix_layout, n, nrhs, dl, d, du, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_zgtsv_work.c b/LAPACKE/src/lapacke_zgtsv_work.c
new file mode 100644
index 00000000..fb78ab07
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgtsv_work.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgtsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgtsv_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ lapack_complex_double* dl,
+ lapack_complex_double* d,
+ lapack_complex_double* du,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgtsv( &n, &nrhs, dl, d, du, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zgtsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgtsv( &n, &nrhs, dl, d, du, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgtsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgtsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgtsvx.c b/LAPACKE/src/lapacke_zgtsvx.c
new file mode 100644
index 00000000..da0be954
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgtsvx.c
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgtsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgtsvx( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* dl,
+ const lapack_complex_double* d,
+ const lapack_complex_double* du,
+ lapack_complex_double* dlf,
+ lapack_complex_double* df,
+ lapack_complex_double* duf,
+ lapack_complex_double* du2, lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgtsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -14;
+ }
+ if( LAPACKE_z_nancheck( n, d, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_z_nancheck( n, df, 1 ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_z_nancheck( n-1, dlf, 1 ) ) {
+ return -9;
+ }
+ }
+ if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_z_nancheck( n-2, du2, 1 ) ) {
+ return -12;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_z_nancheck( n-1, duf, 1 ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zgtsvx_work( matrix_layout, fact, trans, n, nrhs, dl, d, du,
+ dlf, df, duf, du2, ipiv, b, ldb, x, ldx, rcond,
+ ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgtsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgtsvx_work.c b/LAPACKE/src/lapacke_zgtsvx_work.c
new file mode 100644
index 00000000..388e8ac0
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgtsvx_work.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgtsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgtsvx_work( int matrix_layout, char fact, char trans,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* dl,
+ const lapack_complex_double* d,
+ const lapack_complex_double* du,
+ lapack_complex_double* dlf,
+ lapack_complex_double* df,
+ lapack_complex_double* duf,
+ lapack_complex_double* du2, lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgtsvx( &fact, &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2,
+ ipiv, b, &ldb, x, &ldx, rcond, ferr, berr, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_zgtsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_zgtsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgtsvx( &fact, &trans, &n, &nrhs, dl, d, du, dlf, df, duf, du2,
+ ipiv, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr, berr, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgtsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgtsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgttrf.c b/LAPACKE/src/lapacke_zgttrf.c
new file mode 100644
index 00000000..2afda6aa
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgttrf.c
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 zgttrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgttrf( lapack_int n, lapack_complex_double* dl,
+ lapack_complex_double* d, lapack_complex_double* du,
+ lapack_complex_double* du2, lapack_int* ipiv )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_z_nancheck( n, d, 1 ) ) {
+ return -3;
+ }
+ if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
+ return -2;
+ }
+ if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zgttrf_work( n, dl, d, du, du2, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_zgttrf_work.c b/LAPACKE/src/lapacke_zgttrf_work.c
new file mode 100644
index 00000000..9034e537
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgttrf_work.c
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 zgttrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgttrf_work( lapack_int n, lapack_complex_double* dl,
+ lapack_complex_double* d,
+ lapack_complex_double* du,
+ lapack_complex_double* du2, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgttrf( &n, dl, d, du, du2, ipiv, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zgttrs.c b/LAPACKE/src/lapacke_zgttrs.c
new file mode 100644
index 00000000..425e5f87
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgttrs.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgttrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgttrs( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* dl,
+ const lapack_complex_double* d,
+ const lapack_complex_double* du,
+ const lapack_complex_double* du2,
+ const lapack_int* ipiv, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zgttrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_z_nancheck( n, d, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_z_nancheck( n-2, du2, 1 ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_zgttrs_work( matrix_layout, trans, n, nrhs, dl, d, du, du2,
+ ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_zgttrs_work.c b/LAPACKE/src/lapacke_zgttrs_work.c
new file mode 100644
index 00000000..712348c5
--- /dev/null
+++ b/LAPACKE/src/lapacke_zgttrs_work.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zgttrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zgttrs_work( int matrix_layout, char trans, lapack_int n,
+ lapack_int nrhs,
+ const lapack_complex_double* dl,
+ const lapack_complex_double* d,
+ const lapack_complex_double* du,
+ const lapack_complex_double* du2,
+ const lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgttrs( &trans, &n, &nrhs, dl, d, du, du2, ipiv, b, &ldb,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zgttrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zgttrs( &trans, &n, &nrhs, dl, d, du, du2, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zgttrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zgttrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhbev.c b/LAPACKE/src/lapacke_zhbev.c
new file mode 100644
index 00000000..41e1f56c
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhbev.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhbev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhbev( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_int kd, lapack_complex_double* ab,
+ lapack_int ldab, double* w, lapack_complex_double* z,
+ lapack_int ldz )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n-2) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhbev_work( matrix_layout, jobz, uplo, n, kd, ab, ldab, w, z,
+ ldz, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhbev_work.c b/LAPACKE/src/lapacke_zhbev_work.c
new file mode 100644
index 00000000..8244f11d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhbev_work.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhbev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhbev_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_int kd,
+ lapack_complex_double* ab, lapack_int ldab,
+ double* w, lapack_complex_double* z,
+ lapack_int ldz, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhbev( &jobz, &uplo, &n, &kd, ab, &ldab, w, z, &ldz, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zhbev_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zhbev_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhbev( &jobz, &uplo, &n, &kd, ab_t, &ldab_t, w, z_t, &ldz_t,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhbev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhbevd.c b/LAPACKE/src/lapacke_zhbevd.c
new file mode 100644
index 00000000..c3a18360
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhbevd.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhbevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhbevd( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_int kd, lapack_complex_double* ab,
+ lapack_int ldab, double* w, lapack_complex_double* z,
+ lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_int iwork_query;
+ double rwork_query;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbevd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zhbevd_work( matrix_layout, jobz, uplo, n, kd, ab, ldab, w, z,
+ ldz, &work_query, lwork, &rwork_query, lrwork,
+ &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_Z2INT( 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;
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhbevd_work( matrix_layout, jobz, uplo, n, kd, ab, ldab, w, z,
+ ldz, work, lwork, rwork, lrwork, iwork,
+ liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbevd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhbevd_work.c b/LAPACKE/src/lapacke_zhbevd_work.c
new file mode 100644
index 00000000..48d05217
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhbevd_work.c
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhbevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhbevd_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_int kd,
+ lapack_complex_double* ab, lapack_int ldab,
+ double* w, lapack_complex_double* z,
+ lapack_int ldz, lapack_complex_double* work,
+ lapack_int lwork, double* rwork,
+ lapack_int lrwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhbevd( &jobz, &uplo, &n, &kd, ab, &ldab, w, z, &ldz, work,
+ &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zhbevd_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zhbevd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lrwork == -1 || lwork == -1 ) {
+ LAPACK_zhbevd( &jobz, &uplo, &n, &kd, ab, &ldab_t, w, z, &ldz_t,
+ work, &lwork, rwork, &lrwork, iwork, &liwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhbevd( &jobz, &uplo, &n, &kd, ab_t, &ldab_t, w, z_t, &ldz_t,
+ work, &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbevd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhbevd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhbevx.c b/LAPACKE/src/lapacke_zhbevx.c
new file mode 100644
index 00000000..0cbb72fc
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhbevx.c
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhbevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhbevx( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, lapack_int kd,
+ lapack_complex_double* ab, lapack_int ldab,
+ lapack_complex_double* q, lapack_int ldq, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -15;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,7*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhbevx_work( matrix_layout, jobz, range, uplo, n, kd, ab,
+ ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z,
+ ldz, work, rwork, iwork, ifail );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhbevx_work.c b/LAPACKE/src/lapacke_zhbevx_work.c
new file mode 100644
index 00000000..606c9bee
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhbevx_work.c
@@ -0,0 +1,145 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhbevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhbevx_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n, lapack_int kd,
+ lapack_complex_double* ab, lapack_int ldab,
+ lapack_complex_double* q, lapack_int ldq,
+ double vl, double vu, lapack_int il,
+ lapack_int iu, double abstol, lapack_int* m,
+ double* w, lapack_complex_double* z,
+ lapack_int ldz, lapack_complex_double* work,
+ double* rwork, lapack_int* iwork,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhbevx( &jobz, &range, &uplo, &n, &kd, ab, &ldab, q, &ldq, &vl,
+ &vu, &il, &iu, &abstol, m, w, z, &ldz, work, rwork,
+ iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* q_t = NULL;
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zhbevx_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zhbevx_work", info );
+ return info;
+ }
+ if( ldz < ncols_z ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_zhbevx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ q_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhbevx( &jobz, &range, &uplo, &n, &kd, ab_t, &ldab_t, q_t,
+ &ldq_t, &vl, &vu, &il, &iu, &abstol, m, w, z_t, &ldz_t,
+ work, rwork, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhbevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhbgst.c b/LAPACKE/src/lapacke_zhbgst.c
new file mode 100644
index 00000000..aff08d11
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhbgst.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhbgst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhbgst( int matrix_layout, char vect, char uplo, lapack_int n,
+ lapack_int ka, lapack_int kb,
+ lapack_complex_double* ab, lapack_int ldab,
+ const lapack_complex_double* bb, lapack_int ldbb,
+ lapack_complex_double* x, lapack_int ldx )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbgst", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhbgst_work( matrix_layout, vect, uplo, n, ka, kb, ab, ldab,
+ bb, ldbb, x, ldx, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbgst", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhbgst_work.c b/LAPACKE/src/lapacke_zhbgst_work.c
new file mode 100644
index 00000000..0e202422
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhbgst_work.c
@@ -0,0 +1,129 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhbgst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhbgst_work( int matrix_layout, char vect, char uplo,
+ lapack_int n, lapack_int ka, lapack_int kb,
+ lapack_complex_double* ab, lapack_int ldab,
+ const lapack_complex_double* bb,
+ lapack_int ldbb, lapack_complex_double* x,
+ lapack_int ldx, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhbgst( &vect, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, x,
+ &ldx, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,ka+1);
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* bb_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zhbgst_work", info );
+ return info;
+ }
+ if( ldbb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zhbgst_work", info );
+ return info;
+ }
+ if( ldx < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zhbgst_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bb_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( vect, 'v' ) ) {
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,n) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhb_trans( matrix_layout, uplo, n, ka, ab, ldab, ab_t, ldab_t );
+ LAPACKE_zhb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhbgst( &vect, &uplo, &n, &ka, &kb, ab_t, &ldab_t, bb_t, &ldbb_t,
+ x_t, &ldx_t, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhb_trans( LAPACK_COL_MAJOR, uplo, n, ka, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, x_t, ldx_t, x, ldx );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_free( x_t );
+ }
+exit_level_2:
+ LAPACKE_free( bb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbgst_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhbgst_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhbgv.c b/LAPACKE/src/lapacke_zhbgv.c
new file mode 100644
index 00000000..05771a7a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhbgv.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhbgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhbgv( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_int ka, lapack_int kb,
+ lapack_complex_double* ab, lapack_int ldab,
+ lapack_complex_double* bb, lapack_int ldbb, double* w,
+ lapack_complex_double* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbgv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhbgv_work( matrix_layout, jobz, uplo, n, ka, kb, ab, ldab,
+ bb, ldbb, w, z, ldz, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbgv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhbgv_work.c b/LAPACKE/src/lapacke_zhbgv_work.c
new file mode 100644
index 00000000..6845600f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhbgv_work.c
@@ -0,0 +1,131 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhbgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhbgv_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_int ka, lapack_int kb,
+ lapack_complex_double* ab, lapack_int ldab,
+ lapack_complex_double* bb, lapack_int ldbb,
+ double* w, lapack_complex_double* z,
+ lapack_int ldz, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhbgv( &jobz, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, w, z,
+ &ldz, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,ka+1);
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* bb_t = NULL;
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zhbgv_work", info );
+ return info;
+ }
+ if( ldbb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zhbgv_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zhbgv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bb_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhb_trans( matrix_layout, uplo, n, ka, ab, ldab, ab_t, ldab_t );
+ LAPACKE_zhb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhbgv( &jobz, &uplo, &n, &ka, &kb, ab_t, &ldab_t, bb_t, &ldbb_t,
+ w, z_t, &ldz_t, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhb_trans( LAPACK_COL_MAJOR, uplo, n, ka, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_zhb_trans( LAPACK_COL_MAJOR, uplo, n, kb, bb_t, ldbb_t, bb,
+ ldbb );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_2:
+ LAPACKE_free( bb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbgv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhbgv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhbgvd.c b/LAPACKE/src/lapacke_zhbgvd.c
new file mode 100644
index 00000000..abc02ec0
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhbgvd.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhbgvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhbgvd( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_int ka, lapack_int kb,
+ lapack_complex_double* ab, lapack_int ldab,
+ lapack_complex_double* bb, lapack_int ldbb,
+ double* w, lapack_complex_double* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_int iwork_query;
+ double rwork_query;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbgvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zhbgvd_work( matrix_layout, jobz, uplo, n, ka, kb, ab, ldab,
+ bb, ldbb, w, z, ldz, &work_query, lwork,
+ &rwork_query, lrwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_Z2INT( 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;
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhbgvd_work( matrix_layout, jobz, uplo, n, ka, kb, ab, ldab,
+ bb, ldbb, w, z, ldz, work, lwork, rwork, lrwork,
+ iwork, liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbgvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhbgvd_work.c b/LAPACKE/src/lapacke_zhbgvd_work.c
new file mode 100644
index 00000000..56c312fa
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhbgvd_work.c
@@ -0,0 +1,142 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhbgvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhbgvd_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_int ka, lapack_int kb,
+ lapack_complex_double* ab, lapack_int ldab,
+ lapack_complex_double* bb, lapack_int ldbb,
+ double* w, lapack_complex_double* z,
+ lapack_int ldz, lapack_complex_double* work,
+ lapack_int lwork, double* rwork,
+ lapack_int lrwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhbgvd( &jobz, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb, w, z,
+ &ldz, work, &lwork, rwork, &lrwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,ka+1);
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* bb_t = NULL;
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zhbgvd_work", info );
+ return info;
+ }
+ if( ldbb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zhbgvd_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zhbgvd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lrwork == -1 || lwork == -1 ) {
+ LAPACK_zhbgvd( &jobz, &uplo, &n, &ka, &kb, ab, &ldab_t, bb, &ldbb_t,
+ w, z, &ldz_t, work, &lwork, rwork, &lrwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bb_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhb_trans( matrix_layout, uplo, n, ka, ab, ldab, ab_t, ldab_t );
+ LAPACKE_zhb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhbgvd( &jobz, &uplo, &n, &ka, &kb, ab_t, &ldab_t, bb_t, &ldbb_t,
+ w, z_t, &ldz_t, work, &lwork, rwork, &lrwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhb_trans( LAPACK_COL_MAJOR, uplo, n, ka, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_zhb_trans( LAPACK_COL_MAJOR, uplo, n, kb, bb_t, ldbb_t, bb,
+ ldbb );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_2:
+ LAPACKE_free( bb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbgvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhbgvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhbgvx.c b/LAPACKE/src/lapacke_zhbgvx.c
new file mode 100644
index 00000000..778b388c
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhbgvx.c
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhbgvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhbgvx( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, lapack_int ka, lapack_int kb,
+ lapack_complex_double* ab, lapack_int ldab,
+ lapack_complex_double* bb, lapack_int ldbb,
+ lapack_complex_double* q, lapack_int ldq, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbgvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -18;
+ }
+ if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -14;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -15;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,7*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhbgvx_work( matrix_layout, jobz, range, uplo, n, ka, kb, ab,
+ ldab, bb, ldbb, q, ldq, vl, vu, il, iu, abstol,
+ m, w, z, ldz, work, rwork, iwork, ifail );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbgvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhbgvx_work.c b/LAPACKE/src/lapacke_zhbgvx_work.c
new file mode 100644
index 00000000..9b338172
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhbgvx_work.c
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhbgvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhbgvx_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n, lapack_int ka,
+ lapack_int kb, lapack_complex_double* ab,
+ lapack_int ldab, lapack_complex_double* bb,
+ lapack_int ldbb, lapack_complex_double* q,
+ lapack_int ldq, double vl, double vu,
+ lapack_int il, lapack_int iu, double abstol,
+ lapack_int* m, double* w,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_complex_double* work, double* rwork,
+ lapack_int* iwork, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhbgvx( &jobz, &range, &uplo, &n, &ka, &kb, ab, &ldab, bb, &ldbb,
+ q, &ldq, &vl, &vu, &il, &iu, &abstol, m, w, z, &ldz,
+ work, rwork, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,ka+1);
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* bb_t = NULL;
+ lapack_complex_double* q_t = NULL;
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zhbgvx_work", info );
+ return info;
+ }
+ if( ldbb < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zhbgvx_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zhbgvx_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -22;
+ LAPACKE_xerbla( "LAPACKE_zhbgvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bb_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ q_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhb_trans( matrix_layout, uplo, n, ka, ab, ldab, ab_t, ldab_t );
+ LAPACKE_zhb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhbgvx( &jobz, &range, &uplo, &n, &ka, &kb, ab_t, &ldab_t, bb_t,
+ &ldbb_t, q_t, &ldq_t, &vl, &vu, &il, &iu, &abstol, m, w,
+ z_t, &ldz_t, work, rwork, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhb_trans( LAPACK_COL_MAJOR, uplo, n, ka, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_zhb_trans( LAPACK_COL_MAJOR, uplo, n, kb, bb_t, ldbb_t, bb,
+ ldbb );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( bb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbgvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhbgvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhbtrd.c b/LAPACKE/src/lapacke_zhbtrd.c
new file mode 100644
index 00000000..fff41878
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhbtrd.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhbtrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhbtrd( int matrix_layout, char vect, char uplo, lapack_int n,
+ lapack_int kd, lapack_complex_double* ab,
+ lapack_int ldab, double* d, double* e,
+ lapack_complex_double* q, lapack_int ldq )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbtrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhbtrd_work( matrix_layout, vect, uplo, n, kd, ab, ldab, d, e,
+ q, ldq, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbtrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhbtrd_work.c b/LAPACKE/src/lapacke_zhbtrd_work.c
new file mode 100644
index 00000000..581c48ef
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhbtrd_work.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhbtrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhbtrd_work( int matrix_layout, char vect, char uplo,
+ lapack_int n, lapack_int kd,
+ lapack_complex_double* ab, lapack_int ldab,
+ double* d, double* e, lapack_complex_double* q,
+ lapack_int ldq, lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhbtrd( &vect, &uplo, &n, &kd, ab, &ldab, d, e, q, &ldq, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zhbtrd_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zhbtrd_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ q_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhbtrd( &vect, &uplo, &n, &kd, ab_t, &ldab_t, d, e, q_t, &ldq_t,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhbtrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhbtrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhecon.c b/LAPACKE/src/lapacke_zhecon.c
new file mode 100644
index 00000000..7c6e737a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhecon.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhecon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhecon( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv, double anorm, double* rcond )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhecon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhecon_work( matrix_layout, uplo, n, a, lda, ipiv, anorm,
+ rcond, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhecon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhecon_work.c b/LAPACKE/src/lapacke_zhecon_work.c
new file mode 100644
index 00000000..090a9eb1
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhecon_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhecon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhecon_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv, double anorm,
+ double* rcond, lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhecon( &uplo, &n, a, &lda, ipiv, &anorm, rcond, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zhecon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhecon( &uplo, &n, a_t, &lda_t, ipiv, &anorm, rcond, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhecon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhecon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zheequb.c b/LAPACKE/src/lapacke_zheequb.c
new file mode 100644
index 00000000..64041f63
--- /dev/null
+++ b/LAPACKE/src/lapacke_zheequb.c
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zheequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zheequb( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double* s, double* scond, double* amax )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zheequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zheequb_work( matrix_layout, uplo, n, a, lda, s, scond, amax,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zheequb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zheequb_work.c b/LAPACKE/src/lapacke_zheequb_work.c
new file mode 100644
index 00000000..ef720c8c
--- /dev/null
+++ b/LAPACKE/src/lapacke_zheequb_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zheequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zheequb_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double* s, double* scond, double* amax,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zheequb( &uplo, &n, a, &lda, s, scond, amax, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zheequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zheequb( &uplo, &n, a_t, &lda_t, s, scond, amax, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zheequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zheequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zheev.c b/LAPACKE/src/lapacke_zheev.c
new file mode 100644
index 00000000..1cc151b7
--- /dev/null
+++ b/LAPACKE/src/lapacke_zheev.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zheev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zheev( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda, double* w )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zheev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n-2) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zheev_work( matrix_layout, jobz, uplo, n, a, lda, w,
+ &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zheev_work( matrix_layout, jobz, uplo, n, a, lda, w, work,
+ lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zheev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zheev_work.c b/LAPACKE/src/lapacke_zheev_work.c
new file mode 100644
index 00000000..eb9aff17
--- /dev/null
+++ b/LAPACKE/src/lapacke_zheev_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zheev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zheev_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, double* w,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zheev( &jobz, &uplo, &n, a, &lda, w, work, &lwork, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zheev_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zheev( &jobz, &uplo, &n, a, &lda_t, w, work, &lwork, rwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zheev( &jobz, &uplo, &n, a_t, &lda_t, w, work, &lwork, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zheev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zheev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zheevd.c b/LAPACKE/src/lapacke_zheevd.c
new file mode 100644
index 00000000..e1e021b2
--- /dev/null
+++ b/LAPACKE/src/lapacke_zheevd.c
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zheevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zheevd( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda, double* w )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_int iwork_query;
+ double rwork_query;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zheevd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zheevd_work( matrix_layout, jobz, uplo, n, a, lda, w,
+ &work_query, lwork, &rwork_query, lrwork,
+ &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_Z2INT( 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;
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zheevd_work( matrix_layout, jobz, uplo, n, a, lda, w, work,
+ lwork, rwork, lrwork, iwork, liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zheevd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zheevd_work.c b/LAPACKE/src/lapacke_zheevd_work.c
new file mode 100644
index 00000000..641d0eb5
--- /dev/null
+++ b/LAPACKE/src/lapacke_zheevd_work.c
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zheevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zheevd_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, double* w,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork, lapack_int lrwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zheevd( &jobz, &uplo, &n, a, &lda, w, work, &lwork, rwork,
+ &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zheevd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lrwork == -1 || lwork == -1 ) {
+ LAPACK_zheevd( &jobz, &uplo, &n, a, &lda_t, w, work, &lwork, rwork,
+ &lrwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zheevd( &jobz, &uplo, &n, a_t, &lda_t, w, work, &lwork, rwork,
+ &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zheevd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zheevd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zheevr.c b/LAPACKE/src/lapacke_zheevr.c
new file mode 100644
index 00000000..97fe5e27
--- /dev/null
+++ b/LAPACKE/src/lapacke_zheevr.c
@@ -0,0 +1,119 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zheevr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zheevr( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, double vl, double vu, lapack_int il,
+ lapack_int iu, double abstol, lapack_int* m,
+ double* w, lapack_complex_double* z, lapack_int ldz,
+ lapack_int* isuppz )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_int iwork_query;
+ double rwork_query;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zheevr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -12;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -9;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zheevr_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
+ vu, il, iu, abstol, m, w, z, ldz, isuppz,
+ &work_query, lwork, &rwork_query, lrwork,
+ &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_Z2INT( 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;
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zheevr_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
+ vu, il, iu, abstol, m, w, z, ldz, isuppz, work,
+ lwork, rwork, lrwork, iwork, liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zheevr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zheevr_work.c b/LAPACKE/src/lapacke_zheevr_work.c
new file mode 100644
index 00000000..3e5b0cc9
--- /dev/null
+++ b/LAPACKE/src/lapacke_zheevr_work.c
@@ -0,0 +1,128 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zheevr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zheevr_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ double vl, double vu, lapack_int il,
+ lapack_int iu, double abstol, lapack_int* m,
+ double* w, lapack_complex_double* z,
+ lapack_int ldz, lapack_int* isuppz,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork, lapack_int lrwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zheevr( &jobz, &range, &uplo, &n, a, &lda, &vl, &vu, &il, &iu,
+ &abstol, m, w, z, &ldz, isuppz, work, &lwork, rwork,
+ &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zheevr_work", info );
+ return info;
+ }
+ if( ldz < ncols_z ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_zheevr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lrwork == -1 || lwork == -1 ) {
+ LAPACK_zheevr( &jobz, &range, &uplo, &n, a, &lda_t, &vl, &vu, &il,
+ &iu, &abstol, m, w, z, &ldz_t, isuppz, work, &lwork,
+ rwork, &lrwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zheevr( &jobz, &range, &uplo, &n, a_t, &lda_t, &vl, &vu, &il,
+ &iu, &abstol, m, w, z_t, &ldz_t, isuppz, work, &lwork,
+ rwork, &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zheevr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zheevr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zheevx.c b/LAPACKE/src/lapacke_zheevx.c
new file mode 100644
index 00000000..dd1315b5
--- /dev/null
+++ b/LAPACKE/src/lapacke_zheevx.c
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zheevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zheevx( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, double vl, double vu, lapack_int il,
+ lapack_int iu, double abstol, lapack_int* m,
+ double* w, lapack_complex_double* z, lapack_int ldz,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zheevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -12;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -9;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,7*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zheevx_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
+ vu, il, iu, abstol, m, w, z, ldz, &work_query,
+ lwork, rwork, iwork, ifail );
+ if( info != 0 ) {
+ goto exit_level_2;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zheevx_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
+ vu, il, iu, abstol, m, w, z, ldz, work, lwork,
+ rwork, iwork, ifail );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zheevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zheevx_work.c b/LAPACKE/src/lapacke_zheevx_work.c
new file mode 100644
index 00000000..2ee5de37
--- /dev/null
+++ b/LAPACKE/src/lapacke_zheevx_work.c
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zheevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zheevx_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ double vl, double vu, lapack_int il,
+ lapack_int iu, double abstol, lapack_int* m,
+ double* w, lapack_complex_double* z,
+ lapack_int ldz, lapack_complex_double* work,
+ lapack_int lwork, double* rwork,
+ lapack_int* iwork, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zheevx( &jobz, &range, &uplo, &n, a, &lda, &vl, &vu, &il, &iu,
+ &abstol, m, w, z, &ldz, work, &lwork, rwork, iwork,
+ ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zheevx_work", info );
+ return info;
+ }
+ if( ldz < ncols_z ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_zheevx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zheevx( &jobz, &range, &uplo, &n, a, &lda_t, &vl, &vu, &il,
+ &iu, &abstol, m, w, z, &ldz_t, work, &lwork, rwork,
+ iwork, ifail, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zheevx( &jobz, &range, &uplo, &n, a_t, &lda_t, &vl, &vu, &il,
+ &iu, &abstol, m, w, z_t, &ldz_t, work, &lwork, rwork,
+ iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zheevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zheevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhegst.c b/LAPACKE/src/lapacke_zhegst.c
new file mode 100644
index 00000000..bb2cadec
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhegst.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhegst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhegst( int matrix_layout, lapack_int itype, char uplo,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhegst", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_zhegst_work( matrix_layout, itype, uplo, n, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_zhegst_work.c b/LAPACKE/src/lapacke_zhegst_work.c
new file mode 100644
index 00000000..36a614d4
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhegst_work.c
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhegst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhegst_work( int matrix_layout, lapack_int itype, char uplo,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhegst( &itype, &uplo, &n, a, &lda, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zhegst_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zhegst_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhegst( &itype, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhegst_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhegst_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhegv.c b/LAPACKE/src/lapacke_zhegv.c
new file mode 100644
index 00000000..45ca5b84
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhegv.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhegv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhegv( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, double* w )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhegv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n-2) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zhegv_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
+ ldb, w, &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhegv_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
+ ldb, w, work, lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhegv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhegv_work.c b/LAPACKE/src/lapacke_zhegv_work.c
new file mode 100644
index 00000000..e6d928da
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhegv_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhegv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhegv_work( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ double* w, lapack_complex_double* work,
+ lapack_int lwork, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhegv( &itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work,
+ &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zhegv_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zhegv_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zhegv( &itype, &jobz, &uplo, &n, a, &lda_t, b, &ldb_t, w,
+ work, &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhegv( &itype, &jobz, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, w,
+ work, &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhegv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhegv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhegvd.c b/LAPACKE/src/lapacke_zhegvd.c
new file mode 100644
index 00000000..f9661593
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhegvd.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhegvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhegvd( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, double* w )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_int iwork_query;
+ double rwork_query;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhegvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zhegvd_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
+ ldb, w, &work_query, lwork, &rwork_query,
+ lrwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_Z2INT( 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;
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhegvd_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
+ ldb, w, work, lwork, rwork, lrwork, iwork,
+ liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhegvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhegvd_work.c b/LAPACKE/src/lapacke_zhegvd_work.c
new file mode 100644
index 00000000..c1b9651b
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhegvd_work.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhegvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhegvd_work( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ double* w, lapack_complex_double* work,
+ lapack_int lwork, double* rwork,
+ lapack_int lrwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhegvd( &itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work,
+ &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zhegvd_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zhegvd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lrwork == -1 || lwork == -1 ) {
+ LAPACK_zhegvd( &itype, &jobz, &uplo, &n, a, &lda_t, b, &ldb_t, w,
+ work, &lwork, rwork, &lrwork, iwork, &liwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhegvd( &itype, &jobz, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, w,
+ work, &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhegvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhegvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhegvx.c b/LAPACKE/src/lapacke_zhegvx.c
new file mode 100644
index 00000000..b09f00bd
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhegvx.c
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhegvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhegvx( int matrix_layout, lapack_int itype, char jobz,
+ char range, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhegvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -15;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,7*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zhegvx_work( matrix_layout, itype, jobz, range, uplo, n, a,
+ lda, b, ldb, vl, vu, il, iu, abstol, m, w, z,
+ ldz, &work_query, lwork, rwork, iwork, ifail );
+ if( info != 0 ) {
+ goto exit_level_2;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhegvx_work( matrix_layout, itype, jobz, range, uplo, n, a,
+ lda, b, ldb, vl, vu, il, iu, abstol, m, w, z,
+ ldz, work, lwork, rwork, iwork, ifail );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhegvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhegvx_work.c b/LAPACKE/src/lapacke_zhegvx_work.c
new file mode 100644
index 00000000..1cfa6094
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhegvx_work.c
@@ -0,0 +1,145 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhegvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhegvx_work( int matrix_layout, lapack_int itype, char jobz,
+ char range, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ double vl, double vu, lapack_int il,
+ lapack_int iu, double abstol, lapack_int* m,
+ double* w, lapack_complex_double* z,
+ lapack_int ldz, lapack_complex_double* work,
+ lapack_int lwork, double* rwork,
+ lapack_int* iwork, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhegvx( &itype, &jobz, &range, &uplo, &n, a, &lda, b, &ldb, &vl,
+ &vu, &il, &iu, &abstol, m, w, z, &ldz, work, &lwork,
+ rwork, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zhegvx_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zhegvx_work", info );
+ return info;
+ }
+ if( ldz < ncols_z ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_zhegvx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zhegvx( &itype, &jobz, &range, &uplo, &n, a, &lda_t, b,
+ &ldb_t, &vl, &vu, &il, &iu, &abstol, m, w, z, &ldz_t,
+ work, &lwork, rwork, iwork, ifail, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhegvx( &itype, &jobz, &range, &uplo, &n, a_t, &lda_t, b_t,
+ &ldb_t, &vl, &vu, &il, &iu, &abstol, m, w, z_t, &ldz_t,
+ work, &lwork, rwork, iwork, ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhegvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhegvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zherfs.c b/LAPACKE/src/lapacke_zherfs.c
new file mode 100644
index 00000000..fa727722
--- /dev/null
+++ b/LAPACKE/src/lapacke_zherfs.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zherfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zherfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zherfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zherfs_work( matrix_layout, uplo, n, nrhs, a, lda, af, ldaf,
+ ipiv, b, ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zherfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zherfs_work.c b/LAPACKE/src/lapacke_zherfs_work.c
new file mode 100644
index 00000000..2ea10a5b
--- /dev/null
+++ b/LAPACKE/src/lapacke_zherfs_work.c
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zherfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zherfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zherfs( &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b, &ldb, x,
+ &ldx, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* af_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zherfs_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zherfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zherfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zherfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zherfs( &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, ipiv, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zherfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zherfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zherfsx.c b/LAPACKE/src/lapacke_zherfsx.c
new file mode 100644
index 00000000..d0e31ffe
--- /dev/null
+++ b/LAPACKE/src/lapacke_zherfsx.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zherfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zherfsx( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* af, lapack_int ldaf,
+ const lapack_int* ipiv, const double* s,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* berr, lapack_int n_err_bnds,
+ double* err_bnds_norm, double* err_bnds_comp,
+ lapack_int nparams, double* params )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zherfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -22;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'y' ) ) {
+ if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -14;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zherfsx_work( matrix_layout, uplo, equed, n, nrhs, a, lda, af,
+ ldaf, ipiv, s, b, ldb, x, ldx, rcond, berr,
+ n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zherfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zherfsx_work.c b/LAPACKE/src/lapacke_zherfsx_work.c
new file mode 100644
index 00000000..b2ca13d6
--- /dev/null
+++ b/LAPACKE/src/lapacke_zherfsx_work.c
@@ -0,0 +1,171 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zherfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zherfsx_work( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const double* s,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zherfsx( &uplo, &equed, &n, &nrhs, a, &lda, af, &ldaf, ipiv, s,
+ b, &ldb, x, &ldx, rcond, berr, &n_err_bnds,
+ err_bnds_norm, err_bnds_comp, &nparams, params, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* af_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zherfsx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zherfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zherfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_zherfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zherfsx( &uplo, &equed, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, s, b_t, &ldb_t, x_t, &ldx_t, rcond, berr,
+ &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t, &nparams,
+ params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zherfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zherfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhesv.c b/LAPACKE/src/lapacke_zhesv.c
new file mode 100644
index 00000000..fdd39e67
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhesv.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhesv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhesv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* a,
+ lapack_int lda, lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhesv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zhesv_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhesv_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhesv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhesv_work.c b/LAPACKE/src/lapacke_zhesv_work.c
new file mode 100644
index 00000000..5256fe55
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhesv_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhesv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhesv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* a,
+ lapack_int lda, lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhesv( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zhesv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zhesv_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zhesv( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhesv( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhesv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhesv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhesvx.c b/LAPACKE/src/lapacke_zhesvx.c
new file mode 100644
index 00000000..1c0a7f1e
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhesvx.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhesvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhesvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* af,
+ lapack_int ldaf, lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhesvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -11;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zhesvx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr,
+ &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhesvx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr,
+ work, lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhesvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhesvx_work.c b/LAPACKE/src/lapacke_zhesvx_work.c
new file mode 100644
index 00000000..fca5b96d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhesvx_work.c
@@ -0,0 +1,156 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhesvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhesvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* af, lapack_int ldaf,
+ lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhesvx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b,
+ &ldb, x, &ldx, rcond, ferr, berr, work, &lwork, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* af_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zhesvx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zhesvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zhesvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_zhesvx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zhesvx( &fact, &uplo, &n, &nrhs, a, &lda_t, af, &ldaf_t,
+ ipiv, b, &ldb_t, x, &ldx_t, rcond, ferr, berr, work,
+ &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhesvx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr, berr, work,
+ &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhesvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhesvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhesvxx.c b/LAPACKE/src/lapacke_zhesvxx.c
new file mode 100644
index 00000000..6ddcfedf
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhesvxx.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhesvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhesvxx( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, double* s,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* rpvgrw, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhesvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -24;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhesvxx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, equed, s, b, ldb, x, ldx, rcond,
+ rpvgrw, berr, n_err_bnds, err_bnds_norm,
+ err_bnds_comp, nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhesvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhesvxx_work.c b/LAPACKE/src/lapacke_zhesvxx_work.c
new file mode 100644
index 00000000..1658b24b
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhesvxx_work.c
@@ -0,0 +1,181 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhesvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhesvxx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, double* s,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* rpvgrw, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhesvxx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv,
+ equed, s, b, &ldb, x, &ldx, rcond, rpvgrw, berr,
+ &n_err_bnds, err_bnds_norm, err_bnds_comp, &nparams,
+ params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* af_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zhesvxx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zhesvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_zhesvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_zhesvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhesvxx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond, rpvgrw,
+ berr, &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t,
+ &nparams, params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhesvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhesvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zheswapr.c b/LAPACKE/src/lapacke_zheswapr.c
new file mode 100644
index 00000000..e49f7f1f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zheswapr.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zheswapr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zheswapr( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int i1,
+ lapack_int i2 )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zheswapr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, n ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zheswapr_work( matrix_layout, uplo, n, a, i1, i2 );
+}
diff --git a/LAPACKE/src/lapacke_zheswapr_work.c b/LAPACKE/src/lapacke_zheswapr_work.c
new file mode 100644
index 00000000..bf16e5c2
--- /dev/null
+++ b/LAPACKE/src/lapacke_zheswapr_work.c
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zheswapr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zheswapr_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int i1,
+ lapack_int i2 )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zheswapr( &uplo, &n, a, &i1, &i2 );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * n * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, n, a_t, n );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zheswapr( &uplo, &n, a_t, &i1, &i2 );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, n, a, n );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zheswapr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zheswapr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhetrd.c b/LAPACKE/src/lapacke_zhetrd.c
new file mode 100644
index 00000000..988d248f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhetrd.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhetrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetrd( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda, double* d,
+ double* e, lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zhetrd_work( matrix_layout, uplo, n, a, lda, d, e, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhetrd_work( matrix_layout, uplo, n, a, lda, d, e, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetrd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhetrd_work.c b/LAPACKE/src/lapacke_zhetrd_work.c
new file mode 100644
index 00000000..7d25b76c
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhetrd_work.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhetrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetrd_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ double* d, double* e,
+ lapack_complex_double* tau,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhetrd( &uplo, &n, a, &lda, d, e, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zhetrd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zhetrd( &uplo, &n, a, &lda_t, d, e, tau, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhetrd( &uplo, &n, a_t, &lda_t, d, e, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhetrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhetrf.c b/LAPACKE/src/lapacke_zhetrf.c
new file mode 100644
index 00000000..03d0a6f4
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhetrf.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhetrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zhetrf_work( matrix_layout, uplo, n, a, lda, ipiv,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhetrf_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhetrf_work.c b/LAPACKE/src/lapacke_zhetrf_work.c
new file mode 100644
index 00000000..7600894f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhetrf_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhetrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* ipiv, lapack_complex_double* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhetrf( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zhetrf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zhetrf( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhetrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhetrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhetri.c b/LAPACKE/src/lapacke_zhetri.c
new file mode 100644
index 00000000..495e5bae
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhetri.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhetri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetri( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhetri_work( matrix_layout, uplo, n, a, lda, ipiv, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetri", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhetri2.c b/LAPACKE/src/lapacke_zhetri2.c
new file mode 100644
index 00000000..0e8083e5
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhetri2.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhetri2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetri2( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetri2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zhetri2_work( matrix_layout, uplo, n, a, lda, ipiv,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhetri2_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetri2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhetri2_work.c b/LAPACKE/src/lapacke_zhetri2_work.c
new file mode 100644
index 00000000..7cd6ce85
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhetri2_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhetri2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetri2_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhetri2( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zhetri2_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zhetri2( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhetri2( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetri2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhetri2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhetri2x.c b/LAPACKE/src/lapacke_zhetri2x.c
new file mode 100644
index 00000000..0aac8cda
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhetri2x.c
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhetri2x
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetri2x( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv, lapack_int nb )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetri2x", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, lda, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n+nb+1)*(+1) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhetri2x_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ nb );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetri2x", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhetri2x_work.c b/LAPACKE/src/lapacke_zhetri2x_work.c
new file mode 100644
index 00000000..1737cd39
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhetri2x_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhetri2x
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetri2x_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_double* work, lapack_int nb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhetri2x( &uplo, &n, a, &lda, ipiv, work, &nb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,lda);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zhetri2x_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhetri2x( &uplo, &n, a_t, &lda_t, ipiv, work, &nb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetri2x_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhetri2x_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhetri_work.c b/LAPACKE/src/lapacke_zhetri_work.c
new file mode 100644
index 00000000..0e8d0d2c
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhetri_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhetri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetri_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhetri( &uplo, &n, a, &lda, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zhetri_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhetri( &uplo, &n, a_t, &lda_t, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhetri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhetrs.c b/LAPACKE/src/lapacke_zhetrs.c
new file mode 100644
index 00000000..14a22ad8
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhetrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhetrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_zhetrs_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_zhetrs2.c b/LAPACKE/src/lapacke_zhetrs2.c
new file mode 100644
index 00000000..62ef644a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhetrs2.c
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhetrs2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetrs2( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetrs2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhetrs2_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetrs2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhetrs2_work.c b/LAPACKE/src/lapacke_zhetrs2_work.c
new file mode 100644
index 00000000..7218ba4f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhetrs2_work.c
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhetrs2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetrs2_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhetrs2( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zhetrs2_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zhetrs2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhetrs2( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetrs2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhetrs2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhetrs_work.c b/LAPACKE/src/lapacke_zhetrs_work.c
new file mode 100644
index 00000000..62d75aad
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhetrs_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhetrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhetrs( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zhetrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zhetrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhetrs( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhetrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhetrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhfrk.c b/LAPACKE/src/lapacke_zhfrk.c
new file mode 100644
index 00000000..af8457f0
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhfrk.c
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhfrk
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhfrk( int matrix_layout, char transr, char uplo, char trans,
+ lapack_int n, lapack_int k, double alpha,
+ const lapack_complex_double* a, lapack_int lda,
+ double beta, lapack_complex_double* c )
+{
+ lapack_int ka, na;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhfrk", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ ka = LAPACKE_lsame( trans, 'n' ) ? k : n;
+ na = LAPACKE_lsame( trans, 'n' ) ? n : k;
+ if( LAPACKE_zge_nancheck( matrix_layout, na, ka, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_d_nancheck( 1, &alpha, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &beta, 1 ) ) {
+ return -10;
+ }
+ if( LAPACKE_zpf_nancheck( n, c ) ) {
+ return -11;
+ }
+#endif
+ return LAPACKE_zhfrk_work( matrix_layout, transr, uplo, trans, n, k, alpha,
+ a, lda, beta, c );
+}
diff --git a/LAPACKE/src/lapacke_zhfrk_work.c b/LAPACKE/src/lapacke_zhfrk_work.c
new file mode 100644
index 00000000..c0c631ef
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhfrk_work.c
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhfrk
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhfrk_work( int matrix_layout, char transr, char uplo,
+ char trans, lapack_int n, lapack_int k,
+ double alpha, const lapack_complex_double* a,
+ lapack_int lda, double beta,
+ lapack_complex_double* c )
+{
+ lapack_int info = 0;
+ lapack_int na, ka, lda_t;
+ lapack_complex_double *a_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhfrk( &transr, &uplo, &trans, &n, &k, &alpha, a, &lda, &beta,
+ c );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ na = LAPACKE_lsame( trans, 'n' ) ? n : k;
+ ka = LAPACKE_lsame( trans, 'n' ) ? k : n;
+ lda_t = MAX(1,na);
+ /* Check leading dimension(s) */
+ if( lda < ka ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zhfrk_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,ka) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, na, ka, a, lda, a_t, lda_t );
+ LAPACKE_zpf_trans( matrix_layout, transr, uplo, n, c, c_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhfrk( &transr, &uplo, &trans, &n, &k, &alpha, a_t, &lda_t,
+ &beta, c_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_zpf_trans( LAPACK_COL_MAJOR, transr, uplo, n, c_t, c );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhfrk_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhfrk_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhgeqz.c b/LAPACKE/src/lapacke_zhgeqz.c
new file mode 100644
index 00000000..c76fa18a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhgeqz.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhgeqz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhgeqz( int matrix_layout, char job, char compq, char compz,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ lapack_complex_double* h, lapack_int ldh,
+ lapack_complex_double* t, lapack_int ldt,
+ lapack_complex_double* alpha,
+ lapack_complex_double* beta,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_complex_double* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhgeqz", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -14;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -16;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zhgeqz_work( matrix_layout, job, compq, compz, n, ilo, ihi, h,
+ ldh, t, ldt, alpha, beta, q, ldq, z, ldz,
+ &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhgeqz_work( matrix_layout, job, compq, compz, n, ilo, ihi, h,
+ ldh, t, ldt, alpha, beta, q, ldq, z, ldz, work,
+ lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhgeqz", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhgeqz_work.c b/LAPACKE/src/lapacke_zhgeqz_work.c
new file mode 100644
index 00000000..0e1a9f47
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhgeqz_work.c
@@ -0,0 +1,170 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhgeqz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhgeqz_work( int matrix_layout, char job, char compq,
+ char compz, lapack_int n, lapack_int ilo,
+ lapack_int ihi, lapack_complex_double* h,
+ lapack_int ldh, lapack_complex_double* t,
+ lapack_int ldt, lapack_complex_double* alpha,
+ lapack_complex_double* beta,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhgeqz( &job, &compq, &compz, &n, &ilo, &ihi, h, &ldh, t, &ldt,
+ alpha, beta, q, &ldq, z, &ldz, work, &lwork, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldh_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldt_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* h_t = NULL;
+ lapack_complex_double* t_t = NULL;
+ lapack_complex_double* q_t = NULL;
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldh < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zhgeqz_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_zhgeqz_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zhgeqz_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_zhgeqz_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zhgeqz( &job, &compq, &compz, &n, &ilo, &ihi, h, &ldh_t, t,
+ &ldt_t, alpha, beta, q, &ldq_t, z, &ldz_t, work,
+ &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ h_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldh_t * MAX(1,n) );
+ if( h_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ q_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, h, ldh, h_t, ldh_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhgeqz( &job, &compq, &compz, &n, &ilo, &ihi, h_t, &ldh_t, t_t,
+ &ldt_t, alpha, beta, q_t, &ldq_t, z_t, &ldz_t, work,
+ &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, h_t, ldh_t, h, ldh );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( h_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhgeqz_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhgeqz_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpcon.c b/LAPACKE/src/lapacke_zhpcon.c
new file mode 100644
index 00000000..d0101b35
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpcon.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpcon( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* ap,
+ const lapack_int* ipiv, double anorm, double* rcond )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_zhp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhpcon_work( matrix_layout, uplo, n, ap, ipiv, anorm, rcond,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpcon_work.c b/LAPACKE/src/lapacke_zhpcon_work.c
new file mode 100644
index 00000000..d2f645cf
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpcon_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpcon_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* ap,
+ const lapack_int* ipiv, double anorm,
+ double* rcond, lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpcon( &uplo, &n, ap, ipiv, &anorm, rcond, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpcon( &uplo, &n, ap_t, ipiv, &anorm, rcond, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhpcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpev.c b/LAPACKE/src/lapacke_zhpev.c
new file mode 100644
index 00000000..7538295d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpev.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpev( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_complex_double* ap, double* w,
+ lapack_complex_double* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpev", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhp_nancheck( n, ap ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n-2) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n-1) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhpev_work( matrix_layout, jobz, uplo, n, ap, w, z, ldz, work,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpev", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpev_work.c b/LAPACKE/src/lapacke_zhpev_work.c
new file mode 100644
index 00000000..890e2bec
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpev_work.c
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpev
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpev_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_complex_double* ap,
+ double* w, lapack_complex_double* z,
+ lapack_int ldz, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpev( &jobz, &uplo, &n, ap, w, z, &ldz, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* z_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zhpev_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpev( &jobz, &uplo, &n, ap_t, w, z_t, &ldz_t, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpev_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhpev_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpevd.c b/LAPACKE/src/lapacke_zhpevd.c
new file mode 100644
index 00000000..ffa6fd92
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpevd.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpevd( int matrix_layout, char jobz, char uplo, lapack_int n,
+ lapack_complex_double* ap, double* w,
+ lapack_complex_double* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_int iwork_query;
+ double rwork_query;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpevd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhp_nancheck( n, ap ) ) {
+ return -5;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zhpevd_work( matrix_layout, jobz, uplo, n, ap, w, z, ldz,
+ &work_query, lwork, &rwork_query, lrwork,
+ &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_Z2INT( 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;
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhpevd_work( matrix_layout, jobz, uplo, n, ap, w, z, ldz,
+ work, lwork, rwork, lrwork, iwork, liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpevd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpevd_work.c b/LAPACKE/src/lapacke_zhpevd_work.c
new file mode 100644
index 00000000..df5c2dd9
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpevd_work.c
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpevd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpevd_work( int matrix_layout, char jobz, char uplo,
+ lapack_int n, lapack_complex_double* ap,
+ double* w, lapack_complex_double* z,
+ lapack_int ldz, lapack_complex_double* work,
+ lapack_int lwork, double* rwork,
+ lapack_int lrwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpevd( &jobz, &uplo, &n, ap, w, z, &ldz, work, &lwork, rwork,
+ &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* z_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zhpevd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lrwork == -1 || lwork == -1 ) {
+ LAPACK_zhpevd( &jobz, &uplo, &n, ap, w, z, &ldz_t, work, &lwork,
+ rwork, &lrwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpevd( &jobz, &uplo, &n, ap_t, w, z_t, &ldz_t, work, &lwork,
+ rwork, &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpevd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhpevd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpevx.c b/LAPACKE/src/lapacke_zhpevx.c
new file mode 100644
index 00000000..0e4b40fb
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpevx.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpevx( int matrix_layout, char jobz, char range, char uplo,
+ lapack_int n, lapack_complex_double* ap, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpevx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_zhp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -8;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,7*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhpevx_work( matrix_layout, jobz, range, uplo, n, ap, vl, vu,
+ il, iu, abstol, m, w, z, ldz, work, rwork,
+ iwork, ifail );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpevx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpevx_work.c b/LAPACKE/src/lapacke_zhpevx_work.c
new file mode 100644
index 00000000..2b53ec01
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpevx_work.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpevx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpevx_work( int matrix_layout, char jobz, char range,
+ char uplo, lapack_int n,
+ lapack_complex_double* ap, double vl, double vu,
+ lapack_int il, lapack_int iu, double abstol,
+ lapack_int* m, double* w,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_complex_double* work, double* rwork,
+ lapack_int* iwork, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpevx( &jobz, &range, &uplo, &n, ap, &vl, &vu, &il, &iu,
+ &abstol, m, w, z, &ldz, work, rwork, iwork, ifail,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* z_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < ncols_z ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_zhpevx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpevx( &jobz, &range, &uplo, &n, ap_t, &vl, &vu, &il, &iu,
+ &abstol, m, w, z_t, &ldz_t, work, rwork, iwork, ifail,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpevx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhpevx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpgst.c b/LAPACKE/src/lapacke_zhpgst.c
new file mode 100644
index 00000000..8baa3c4e
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpgst.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpgst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpgst( int matrix_layout, lapack_int itype, char uplo,
+ lapack_int n, lapack_complex_double* ap,
+ const lapack_complex_double* bp )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpgst", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_zhp_nancheck( n, bp ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_zhpgst_work( matrix_layout, itype, uplo, n, ap, bp );
+}
diff --git a/LAPACKE/src/lapacke_zhpgst_work.c b/LAPACKE/src/lapacke_zhpgst_work.c
new file mode 100644
index 00000000..103c10c8
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpgst_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpgst
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpgst_work( int matrix_layout, lapack_int itype, char uplo,
+ lapack_int n, lapack_complex_double* ap,
+ const lapack_complex_double* bp )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpgst( &itype, &uplo, &n, ap, bp, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* ap_t = NULL;
+ lapack_complex_double* bp_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ bp_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( bp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, bp, bp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpgst( &itype, &uplo, &n, ap_t, bp_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( bp_t );
+exit_level_1:
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpgst_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhpgst_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpgv.c b/LAPACKE/src/lapacke_zhpgv.c
new file mode 100644
index 00000000..1975b29f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpgv.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpgv( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, lapack_complex_double* ap,
+ lapack_complex_double* bp, double* w,
+ lapack_complex_double* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpgv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_zhp_nancheck( n, bp ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n-2) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n-1) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhpgv_work( matrix_layout, itype, jobz, uplo, n, ap, bp, w, z,
+ ldz, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpgv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpgv_work.c b/LAPACKE/src/lapacke_zhpgv_work.c
new file mode 100644
index 00000000..bb2fa534
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpgv_work.c
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpgv_work( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n,
+ lapack_complex_double* ap,
+ lapack_complex_double* bp, double* w,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpgv( &itype, &jobz, &uplo, &n, ap, bp, w, z, &ldz, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* z_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ lapack_complex_double* bp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zhpgv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ bp_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( bp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, bp, bp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpgv( &itype, &jobz, &uplo, &n, ap_t, bp_t, w, z_t, &ldz_t,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, bp_t, bp );
+ /* Release memory and exit */
+ LAPACKE_free( bp_t );
+exit_level_2:
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpgv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhpgv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpgvd.c b/LAPACKE/src/lapacke_zhpgvd.c
new file mode 100644
index 00000000..03888a96
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpgvd.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpgvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpgvd( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n, lapack_complex_double* ap,
+ lapack_complex_double* bp, double* w,
+ lapack_complex_double* z, lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_int iwork_query;
+ double rwork_query;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpgvd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_zhp_nancheck( n, bp ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zhpgvd_work( matrix_layout, itype, jobz, uplo, n, ap, bp, w,
+ z, ldz, &work_query, lwork, &rwork_query,
+ lrwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_Z2INT( 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;
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhpgvd_work( matrix_layout, itype, jobz, uplo, n, ap, bp, w,
+ z, ldz, work, lwork, rwork, lrwork, iwork,
+ liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpgvd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpgvd_work.c b/LAPACKE/src/lapacke_zhpgvd_work.c
new file mode 100644
index 00000000..304f5c7d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpgvd_work.c
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpgvd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpgvd_work( int matrix_layout, lapack_int itype, char jobz,
+ char uplo, lapack_int n,
+ lapack_complex_double* ap,
+ lapack_complex_double* bp, double* w,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork, lapack_int lrwork,
+ lapack_int* iwork, lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpgvd( &itype, &jobz, &uplo, &n, ap, bp, w, z, &ldz, work,
+ &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* z_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ lapack_complex_double* bp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zhpgvd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lrwork == -1 || lwork == -1 ) {
+ LAPACK_zhpgvd( &itype, &jobz, &uplo, &n, ap, bp, w, z, &ldz_t, work,
+ &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ bp_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( bp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, bp, bp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpgvd( &itype, &jobz, &uplo, &n, ap_t, bp_t, w, z_t, &ldz_t,
+ work, &lwork, rwork, &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, bp_t, bp );
+ /* Release memory and exit */
+ LAPACKE_free( bp_t );
+exit_level_2:
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpgvd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhpgvd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpgvx.c b/LAPACKE/src/lapacke_zhpgvx.c
new file mode 100644
index 00000000..807a3e5d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpgvx.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpgvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpgvx( int matrix_layout, lapack_int itype, char jobz,
+ char range, char uplo, lapack_int n,
+ lapack_complex_double* ap, lapack_complex_double* bp,
+ double vl, double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_int* ifail )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpgvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -13;
+ }
+ if( LAPACKE_zhp_nancheck( n, ap ) ) {
+ return -7;
+ }
+ if( LAPACKE_zhp_nancheck( n, bp ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -9;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,7*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhpgvx_work( matrix_layout, itype, jobz, range, uplo, n, ap,
+ bp, vl, vu, il, iu, abstol, m, w, z, ldz, work,
+ rwork, iwork, ifail );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpgvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpgvx_work.c b/LAPACKE/src/lapacke_zhpgvx_work.c
new file mode 100644
index 00000000..7ffc928e
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpgvx_work.c
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpgvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpgvx_work( int matrix_layout, lapack_int itype, char jobz,
+ char range, char uplo, lapack_int n,
+ lapack_complex_double* ap,
+ lapack_complex_double* bp, double vl, double vu,
+ lapack_int il, lapack_int iu, double abstol,
+ lapack_int* m, double* w,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_complex_double* work, double* rwork,
+ lapack_int* iwork, lapack_int* ifail )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpgvx( &itype, &jobz, &range, &uplo, &n, ap, bp, &vl, &vu, &il,
+ &iu, &abstol, m, w, z, &ldz, work, rwork, iwork, ifail,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
+ LAPACKE_lsame( range, 'v' ) ) ? n :
+ ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* z_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ lapack_complex_double* bp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < ncols_z ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_zhpgvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,ncols_z) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ bp_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( bp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, bp, bp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpgvx( &itype, &jobz, &range, &uplo, &n, ap_t, bp_t, &vl, &vu,
+ &il, &iu, &abstol, m, w, z_t, &ldz_t, work, rwork, iwork,
+ ifail, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z,
+ ldz );
+ }
+ LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, bp_t, bp );
+ /* Release memory and exit */
+ LAPACKE_free( bp_t );
+exit_level_2:
+ LAPACKE_free( ap_t );
+exit_level_1:
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpgvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhpgvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhprfs.c b/LAPACKE/src/lapacke_zhprfs.c
new file mode 100644
index 00000000..3d61ef5a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhprfs.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhprfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* ap,
+ const lapack_complex_double* afp,
+ const lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhprfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhp_nancheck( n, afp ) ) {
+ return -6;
+ }
+ if( LAPACKE_zhp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhprfs_work( matrix_layout, uplo, n, nrhs, ap, afp, ipiv, b,
+ ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhprfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhprfs_work.c b/LAPACKE/src/lapacke_zhprfs_work.c
new file mode 100644
index 00000000..8e3c216d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhprfs_work.c
@@ -0,0 +1,131 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhprfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs,
+ const lapack_complex_double* ap,
+ const lapack_complex_double* afp,
+ const lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhprfs( &uplo, &n, &nrhs, ap, afp, ipiv, b, &ldb, x, &ldx, ferr,
+ berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ lapack_complex_double* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zhprfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zhprfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, afp, afp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhprfs( &uplo, &n, &nrhs, ap_t, afp_t, ipiv, b_t, &ldb_t, x_t,
+ &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhprfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhprfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpsv.c b/LAPACKE/src/lapacke_zhpsv.c
new file mode 100644
index 00000000..60097612
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpsv.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpsv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* ap,
+ lapack_int* ipiv, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_zhpsv_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_zhpsv_work.c b/LAPACKE/src/lapacke_zhpsv_work.c
new file mode 100644
index 00000000..49d8b9b4
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpsv_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpsv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* ap,
+ lapack_int* ipiv, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpsv( &uplo, &n, &nrhs, ap, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zhpsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpsv( &uplo, &n, &nrhs, ap_t, ipiv, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhpsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpsvx.c b/LAPACKE/src/lapacke_zhpsvx.c
new file mode 100644
index 00000000..a4e80a23
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpsvx.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpsvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* ap,
+ lapack_complex_double* afp, lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_zhp_nancheck( n, afp ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_zhp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhpsvx_work( matrix_layout, fact, uplo, n, nrhs, ap, afp,
+ ipiv, b, ldb, x, ldx, rcond, ferr, berr, work,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhpsvx_work.c b/LAPACKE/src/lapacke_zhpsvx_work.c
new file mode 100644
index 00000000..44bada6f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhpsvx_work.c
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhpsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhpsvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* ap,
+ lapack_complex_double* afp, lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpsvx( &fact, &uplo, &n, &nrhs, ap, afp, ipiv, b, &ldb, x, &ldx,
+ rcond, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ lapack_complex_double* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zhpsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zhpsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, ap, ap_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, afp, afp_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhpsvx( &fact, &uplo, &n, &nrhs, ap_t, afp_t, ipiv, b_t, &ldb_t,
+ x_t, &ldx_t, rcond, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ if( LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, afp_t, afp );
+ }
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhpsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhpsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhptrd.c b/LAPACKE/src/lapacke_zhptrd.c
new file mode 100644
index 00000000..e350921a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhptrd.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhptrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhptrd( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* ap, double* d, double* e,
+ lapack_complex_double* tau )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhptrd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zhptrd_work( matrix_layout, uplo, n, ap, d, e, tau );
+}
diff --git a/LAPACKE/src/lapacke_zhptrd_work.c b/LAPACKE/src/lapacke_zhptrd_work.c
new file mode 100644
index 00000000..411d4fe3
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhptrd_work.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhptrd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhptrd_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* ap, double* d, double* e,
+ lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhptrd( &uplo, &n, ap, d, e, tau, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhptrd( &uplo, &n, ap_t, d, e, tau, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhptrd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhptrd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhptrf.c b/LAPACKE/src/lapacke_zhptrf.c
new file mode 100644
index 00000000..4abf5dc9
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhptrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhptrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* ap, lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhptrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zhptrf_work( matrix_layout, uplo, n, ap, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_zhptrf_work.c b/LAPACKE/src/lapacke_zhptrf_work.c
new file mode 100644
index 00000000..5c7e95d6
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhptrf_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhptrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* ap, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhptrf( &uplo, &n, ap, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhptrf( &uplo, &n, ap_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhptrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhptrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhptri.c b/LAPACKE/src/lapacke_zhptri.c
new file mode 100644
index 00000000..e5d254b4
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhptri.c
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhptri( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* ap, const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhptri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhptri_work( matrix_layout, uplo, n, ap, ipiv, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhptri", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhptri_work.c b/LAPACKE/src/lapacke_zhptri_work.c
new file mode 100644
index 00000000..9a4c1706
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhptri_work.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhptri_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* ap,
+ const lapack_int* ipiv,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhptri( &uplo, &n, ap, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhptri( &uplo, &n, ap_t, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhptri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhptri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhptrs.c b/LAPACKE/src/lapacke_zhptrs.c
new file mode 100644
index 00000000..60bb2d1c
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhptrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhptrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* ap,
+ const lapack_int* ipiv, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhptrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_zhptrs_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_zhptrs_work.c b/LAPACKE/src/lapacke_zhptrs_work.c
new file mode 100644
index 00000000..2489fb2f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhptrs_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhptrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs,
+ const lapack_complex_double* ap,
+ const lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhptrs( &uplo, &n, &nrhs, ap, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zhptrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zhp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhptrs( &uplo, &n, &nrhs, ap_t, ipiv, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhptrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhptrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhsein.c b/LAPACKE/src/lapacke_zhsein.c
new file mode 100644
index 00000000..68417e49
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhsein.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhsein
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhsein( int matrix_layout, char job, char eigsrc, char initv,
+ const lapack_logical* select, lapack_int n,
+ const lapack_complex_double* h, lapack_int ldh,
+ lapack_complex_double* w, lapack_complex_double* vl,
+ lapack_int ldvl, lapack_complex_double* vr,
+ lapack_int ldvr, lapack_int mm, lapack_int* m,
+ lapack_int* ifaill, lapack_int* ifailr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhsein", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -12;
+ }
+ }
+ if( LAPACKE_z_nancheck( n, w, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhsein_work( matrix_layout, job, eigsrc, initv, select, n, h,
+ ldh, w, vl, ldvl, vr, ldvr, mm, m, work, rwork,
+ ifaill, ifailr );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhsein", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhsein_work.c b/LAPACKE/src/lapacke_zhsein_work.c
new file mode 100644
index 00000000..cd905afe
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhsein_work.c
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhsein
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhsein_work( int matrix_layout, char job, char eigsrc,
+ char initv, const lapack_logical* select,
+ lapack_int n, const lapack_complex_double* h,
+ lapack_int ldh, lapack_complex_double* w,
+ lapack_complex_double* vl, lapack_int ldvl,
+ lapack_complex_double* vr, lapack_int ldvr,
+ lapack_int mm, lapack_int* m,
+ lapack_complex_double* work, double* rwork,
+ lapack_int* ifaill, lapack_int* ifailr )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhsein( &job, &eigsrc, &initv, select, &n, h, &ldh, w, vl, &ldvl,
+ vr, &ldvr, &mm, m, work, rwork, ifaill, ifailr, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldh_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ lapack_complex_double* h_t = NULL;
+ lapack_complex_double* vl_t = NULL;
+ lapack_complex_double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldh < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zhsein_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zhsein_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zhsein_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ h_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldh_t * MAX(1,n) );
+ if( h_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+ vl_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+ vr_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, h, ldh, h_t, ldh_t );
+ if( ( LAPACKE_lsame( job, 'l' ) || LAPACKE_lsame( job, 'b' ) ) &&
+ LAPACKE_lsame( initv, 'v' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( ( LAPACKE_lsame( job, 'r' ) || LAPACKE_lsame( job, 'b' ) ) &&
+ LAPACKE_lsame( initv, 'v' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhsein( &job, &eigsrc, &initv, select, &n, h_t, &ldh_t, w, vl_t,
+ &ldvl_t, vr_t, &ldvr_t, &mm, m, work, rwork, ifaill,
+ ifailr, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, mm, vl_t, ldvl_t, vl,
+ ldvl );
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, mm, vr_t, ldvr_t, vr,
+ ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( h_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhsein_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhsein_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhseqr.c b/LAPACKE/src/lapacke_zhseqr.c
new file mode 100644
index 00000000..ca1450aa
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhseqr.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhseqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhseqr( int matrix_layout, char job, char compz, lapack_int n,
+ lapack_int ilo, lapack_int ihi,
+ lapack_complex_double* h, lapack_int ldh,
+ lapack_complex_double* w, lapack_complex_double* z,
+ lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zhseqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zhseqr_work( matrix_layout, job, compz, n, ilo, ihi, h, ldh,
+ w, z, ldz, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zhseqr_work( matrix_layout, job, compz, n, ilo, ihi, h, ldh,
+ w, z, ldz, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhseqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zhseqr_work.c b/LAPACKE/src/lapacke_zhseqr_work.c
new file mode 100644
index 00000000..6c6b05ed
--- /dev/null
+++ b/LAPACKE/src/lapacke_zhseqr_work.c
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zhseqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhseqr_work( int matrix_layout, char job, char compz,
+ lapack_int n, lapack_int ilo, lapack_int ihi,
+ lapack_complex_double* h, lapack_int ldh,
+ lapack_complex_double* w,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhseqr( &job, &compz, &n, &ilo, &ihi, h, &ldh, w, z, &ldz, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldh_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* h_t = NULL;
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldh < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zhseqr_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zhseqr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zhseqr( &job, &compz, &n, &ilo, &ihi, h, &ldh_t, w, z,
+ &ldz_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ h_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldh_t * MAX(1,n) );
+ if( h_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, h, ldh, h_t, ldh_t );
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zhseqr( &job, &compz, &n, &ilo, &ihi, h_t, &ldh_t, w, z_t,
+ &ldz_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, h_t, ldh_t, h, ldh );
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_1:
+ LAPACKE_free( h_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zhseqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zhseqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlacgv.c b/LAPACKE/src/lapacke_zlacgv.c
new file mode 100644
index 00000000..b2316d6f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlacgv.c
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 zlacgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlacgv( lapack_int n, lapack_complex_double* x,
+ lapack_int incx )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_z_nancheck( 1+(n-1)*ABS(incx), x, incx ) ) {
+ return -2;
+ }
+#endif
+ return LAPACKE_zlacgv_work( n, x, incx );
+}
diff --git a/LAPACKE/src/lapacke_zlacgv_work.c b/LAPACKE/src/lapacke_zlacgv_work.c
new file mode 100644
index 00000000..00bb7cff
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlacgv_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 zlacgv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlacgv_work( lapack_int n, lapack_complex_double* x,
+ lapack_int incx )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlacgv( &n, x, &incx );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlacn2.c b/LAPACKE/src/lapacke_zlacn2.c
new file mode 100644
index 00000000..e64c0716
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlacn2.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2010, Intel Corp.
+ 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 zlacn2
+* Author: Intel Corporation
+* Generated October, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlacn2( lapack_int n, lapack_complex_double* v,
+ lapack_complex_double* x,
+ double* est, lapack_int* kase, lapack_int* isave )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, est, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_z_nancheck( n, x, 1 ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_zlacn2_work( n, v, x, est, kase, isave );
+}
diff --git a/LAPACKE/src/lapacke_zlacn2_work.c b/LAPACKE/src/lapacke_zlacn2_work.c
new file mode 100644
index 00000000..6babae5a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlacn2_work.c
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ Copyright (c) 2010, Intel Corp.
+ 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 zlacn2
+* Author: Intel Corporation
+* Generated October, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlacn2_work( lapack_int n, lapack_complex_double* v,
+ lapack_complex_double* x,
+ double* est, lapack_int* kase,
+ lapack_int* isave )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlacn2( &n, v, x, est, kase, isave );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlacp2.c b/LAPACKE/src/lapacke_zlacp2.c
new file mode 100644
index 00000000..d80fbaf5
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlacp2.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlacp2
+* Author: Intel Corporation
+* Generated January, 2013
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlacp2( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, const double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlacp2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_zlacp2_work( matrix_layout, uplo, m, n, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_zlacp2_work.c b/LAPACKE/src/lapacke_zlacp2_work.c
new file mode 100644
index 00000000..5196d7a3
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlacp2_work.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlacp2
+* Author: Intel Corporation
+* Generated January, 2013
+*****************************************************************************/
+
+#include "lapacke.h"
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlacp2_work( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, const double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlacp2( &uplo, &m, &n, a, &lda, b, &ldb );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,m);
+ double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zlacp2_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zlacp2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlacp2( &uplo, &m, &n, a_t, &lda_t, b_t, &ldb_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlacp2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlacp2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlacpy.c b/LAPACKE/src/lapacke_zlacpy.c
new file mode 100644
index 00000000..787bfa2c
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlacpy.c
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlacpy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlacpy( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, const lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlacpy", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_zlacpy_work( matrix_layout, uplo, m, n, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_zlacpy_work.c b/LAPACKE/src/lapacke_zlacpy_work.c
new file mode 100644
index 00000000..ad5d32f0
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlacpy_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlacpy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlacpy_work( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, const lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlacpy( &uplo, &m, &n, a, &lda, b, &ldb );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zlacpy_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zlacpy_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlacpy( &uplo, &m, &n, a_t, &lda_t, b_t, &ldb_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlacpy_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlacpy_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlag2c.c b/LAPACKE/src/lapacke_zlag2c.c
new file mode 100644
index 00000000..6008da5a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlag2c.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlag2c
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlag2c( int matrix_layout, lapack_int m, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ lapack_complex_float* sa, lapack_int ldsa )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlag2c", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zlag2c_work( matrix_layout, m, n, a, lda, sa, ldsa );
+}
diff --git a/LAPACKE/src/lapacke_zlag2c_work.c b/LAPACKE/src/lapacke_zlag2c_work.c
new file mode 100644
index 00000000..cb9751ac
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlag2c_work.c
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlag2c
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlag2c_work( int matrix_layout, lapack_int m, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ lapack_complex_float* sa, lapack_int ldsa )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlag2c( &m, &n, a, &lda, sa, &ldsa, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldsa_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_float* sa_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zlag2c_work", info );
+ return info;
+ }
+ if( ldsa < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zlag2c_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ sa_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) * ldsa_t * MAX(1,n) );
+ if( sa_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlag2c( &m, &n, a_t, &lda_t, sa_t, &ldsa_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, sa_t, ldsa_t, sa, ldsa );
+ /* Release memory and exit */
+ LAPACKE_free( sa_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlag2c_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlag2c_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlagge.c b/LAPACKE/src/lapacke_zlagge.c
new file mode 100644
index 00000000..86c1ab12
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlagge.c
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlagge
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlagge( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, const double* d,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* iseed )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlagge", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( MIN(m,n), d, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,m+n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zlagge_work( matrix_layout, m, n, kl, ku, d, a, lda, iseed,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlagge", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlagge_work.c b/LAPACKE/src/lapacke_zlagge_work.c
new file mode 100644
index 00000000..6b56103b
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlagge_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlagge
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlagge_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int kl, lapack_int ku, const double* d,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* iseed, lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlagge( &m, &n, &kl, &ku, d, a, &lda, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zlagge_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlagge( &m, &n, &kl, &ku, d, a_t, &lda_t, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlagge_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlagge_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlaghe.c b/LAPACKE/src/lapacke_zlaghe.c
new file mode 100644
index 00000000..e1319d1a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlaghe.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlaghe
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlaghe( int matrix_layout, lapack_int n, lapack_int k,
+ const double* d, lapack_complex_double* a,
+ lapack_int lda, lapack_int* iseed )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlaghe", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zlaghe_work( matrix_layout, n, k, d, a, lda, iseed, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlaghe", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlaghe_work.c b/LAPACKE/src/lapacke_zlaghe_work.c
new file mode 100644
index 00000000..5f343388
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlaghe_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlaghe
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlaghe_work( int matrix_layout, lapack_int n, lapack_int k,
+ const double* d, lapack_complex_double* a,
+ lapack_int lda, lapack_int* iseed,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlaghe( &n, &k, d, a, &lda, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zlaghe_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlaghe( &n, &k, d, a_t, &lda_t, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlaghe_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlaghe_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlagsy.c b/LAPACKE/src/lapacke_zlagsy.c
new file mode 100644
index 00000000..0478ff58
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlagsy.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlagsy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlagsy( int matrix_layout, lapack_int n, lapack_int k,
+ const double* d, lapack_complex_double* a,
+ lapack_int lda, lapack_int* iseed )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlagsy", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zlagsy_work( matrix_layout, n, k, d, a, lda, iseed, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlagsy", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlagsy_work.c b/LAPACKE/src/lapacke_zlagsy_work.c
new file mode 100644
index 00000000..8b6a0b36
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlagsy_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlagsy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlagsy_work( int matrix_layout, lapack_int n, lapack_int k,
+ const double* d, lapack_complex_double* a,
+ lapack_int lda, lapack_int* iseed,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlagsy( &n, &k, d, a, &lda, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zlagsy_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlagsy( &n, &k, d, a_t, &lda_t, iseed, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlagsy_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlagsy_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlange.c b/LAPACKE/src/lapacke_zlange.c
new file mode 100644
index 00000000..c7945126
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlange.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlange
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_zlange( int matrix_layout, char norm, lapack_int m,
+ lapack_int n, const lapack_complex_double* a,
+ lapack_int lda )
+{
+ lapack_int info = 0;
+ double res = 0.;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlange", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) ) {
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,m) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call middle-level interface */
+ res = LAPACKE_zlange_work( matrix_layout, norm, m, n, a, lda, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlange", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_zlange_work.c b/LAPACKE/src/lapacke_zlange_work.c
new file mode 100644
index 00000000..6eb40083
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlange_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlange
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_zlange_work( int matrix_layout, char norm, lapack_int m,
+ lapack_int n, const lapack_complex_double* a,
+ lapack_int lda, double* work )
+{
+ lapack_int info = 0;
+ double res = 0.;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_zlange( &norm, &m, &n, a, &lda, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zlange_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_zlange( &norm, &m, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlange_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlange_work", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_zlanhe.c b/LAPACKE/src/lapacke_zlanhe.c
new file mode 100644
index 00000000..b125218d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlanhe.c
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlanhe
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_zlanhe( int matrix_layout, char norm, char uplo, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ double res = 0.;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlanhe", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call middle-level interface */
+ res = LAPACKE_zlanhe_work( matrix_layout, norm, uplo, n, a, lda, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlanhe", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_zlanhe_work.c b/LAPACKE/src/lapacke_zlanhe_work.c
new file mode 100644
index 00000000..4b4b6098
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlanhe_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlanhe
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_zlanhe_work( int matrix_layout, char norm, char uplo,
+ lapack_int n, const lapack_complex_double* a,
+ lapack_int lda, double* work )
+{
+ lapack_int info = 0;
+ double res = 0.;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_zlanhe( &norm, &uplo, &n, a, &lda, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zlanhe_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_zlanhe( &norm, &uplo, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlanhe_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlanhe_work", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_zlansy.c b/LAPACKE/src/lapacke_zlansy.c
new file mode 100644
index 00000000..6935933f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlansy.c
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlansy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_zlansy( int matrix_layout, char norm, char uplo, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ double res = 0.;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlansy", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call middle-level interface */
+ res = LAPACKE_zlansy_work( matrix_layout, norm, uplo, n, a, lda, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlansy", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_zlansy_work.c b/LAPACKE/src/lapacke_zlansy_work.c
new file mode 100644
index 00000000..2cdd2211
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlansy_work.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlansy
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_zlansy_work( int matrix_layout, char norm, char uplo,
+ lapack_int n, const lapack_complex_double* a,
+ lapack_int lda, double* work )
+{
+ lapack_int info = 0;
+ double res = 0.;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_zlansy( &norm, &uplo, &n, a, &lda, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zlansy_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_zlansy( &norm, &uplo, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlansy_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlansy_work", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_zlantr.c b/LAPACKE/src/lapacke_zlantr.c
new file mode 100644
index 00000000..27c77dc3
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlantr.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlantr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_zlantr( int matrix_layout, char norm, char uplo, char diag,
+ lapack_int m, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ double res = 0.;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlantr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ztr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,m) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call middle-level interface */
+ res = LAPACKE_zlantr_work( matrix_layout, norm, uplo, diag, m, n, a, lda,
+ work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, '0' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlantr", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_zlantr_work.c b/LAPACKE/src/lapacke_zlantr_work.c
new file mode 100644
index 00000000..e9f00361
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlantr_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlantr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+double LAPACKE_zlantr_work( int matrix_layout, char norm, char uplo,
+ char diag, lapack_int m, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double* work )
+{
+ lapack_int info = 0;
+ double res = 0.;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_zlantr( &norm, &uplo, &diag, &m, &n, a, &lda, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zlantr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ztr_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_zlantr( &norm, &uplo, &diag, &m, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlantr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlantr_work", info );
+ }
+ return res;
+}
diff --git a/LAPACKE/src/lapacke_zlapmr.c b/LAPACKE/src/lapacke_zlapmr.c
new file mode 100644
index 00000000..28c5ebea
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlapmr.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlapmr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlapmr( int matrix_layout, lapack_logical forwrd,
+ lapack_int m, lapack_int n, lapack_complex_double* x,
+ lapack_int ldx, lapack_int* k )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlapmr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, x, ldx ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_zlapmr_work( matrix_layout, forwrd, m, n, x, ldx, k );
+}
diff --git a/LAPACKE/src/lapacke_zlapmr_work.c b/LAPACKE/src/lapacke_zlapmr_work.c
new file mode 100644
index 00000000..1cc32052
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlapmr_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlapmr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlapmr_work( int matrix_layout, lapack_logical forwrd,
+ lapack_int m, lapack_int n,
+ lapack_complex_double* x, lapack_int ldx,
+ lapack_int* k )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlapmr( &forwrd, &m, &n, x, &ldx, k );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldx_t = MAX(1,m);
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldx < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zlapmr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldx_t * MAX(1,n) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlapmr( &forwrd, &m, &n, x_t, &ldx_t, k );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlapmr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlapmr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlarfb.c b/LAPACKE/src/lapacke_zlarfb.c
new file mode 100644
index 00000000..6a910ee3
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlarfb.c
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlarfb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlarfb( int matrix_layout, char side, char trans, char direct,
+ char storev, lapack_int m, lapack_int n,
+ lapack_int k, const lapack_complex_double* v,
+ lapack_int ldv, const lapack_complex_double* t,
+ lapack_int ldt, lapack_complex_double* c,
+ lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int ldwork = ( side=='l')?n:(( side=='r')?m:1);
+ lapack_complex_double* work = NULL;
+ lapack_int ncols_v, nrows_v;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlarfb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+ ( ( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( side, 'l' ) ) ? m :
+ ( ( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( side, 'r' ) ) ? n : 1) );
+ nrows_v = ( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( side, 'l' ) ) ? m :
+ ( ( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( side, 'r' ) ) ? n :
+ ( LAPACKE_lsame( storev, 'r' ) ? k : 1) );
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -13;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, k, k, t, ldt ) ) {
+ return -11;
+ }
+ if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'f' ) ) {
+ if( LAPACKE_ztr_nancheck( matrix_layout, 'l', 'u', k, v, ldv ) )
+ return -9;
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_v-k, ncols_v, &v[k*ldv],
+ ldv ) )
+ return -9;
+ } else if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'b' ) ) {
+ if( k > nrows_v ) {
+ LAPACKE_xerbla( "LAPACKE_zlarfb", -8 );
+ return -8;
+ }
+ if( LAPACKE_ztr_nancheck( matrix_layout, 'u', 'u', k,
+ &v[(nrows_v-k)*ldv], ldv ) )
+ return -9;
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_v-k, ncols_v, v, ldv ) )
+ return -9;
+ } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
+ if( LAPACKE_ztr_nancheck( matrix_layout, 'u', 'u', k, v, ldv ) )
+ return -9;
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, ncols_v-k, &v[k],
+ ldv ) )
+ return -9;
+ } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
+ if( k > ncols_v ) {
+ LAPACKE_xerbla( "LAPACKE_zlarfb", -8 );
+ return -8;
+ }
+ if( LAPACKE_ztr_nancheck( matrix_layout, 'l', 'u', k, &v[ncols_v-k],
+ ldv ) )
+ return -9;
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, ncols_v-k, v, ldv ) )
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldwork * MAX(1,k) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zlarfb_work( matrix_layout, side, trans, direct, storev, m, n,
+ k, v, ldv, t, ldt, c, ldc, work, ldwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlarfb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlarfb_work.c b/LAPACKE/src/lapacke_zlarfb_work.c
new file mode 100644
index 00000000..b69abaf3
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlarfb_work.c
@@ -0,0 +1,159 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlarfb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlarfb_work( int matrix_layout, char side, char trans,
+ char direct, char storev, lapack_int m,
+ lapack_int n, lapack_int k,
+ const lapack_complex_double* v, lapack_int ldv,
+ const lapack_complex_double* t, lapack_int ldt,
+ lapack_complex_double* c, lapack_int ldc,
+ lapack_complex_double* work, lapack_int ldwork )
+{
+ lapack_int info = 0;
+ lapack_int nrows_v, ncols_v;
+ lapack_int ldc_t, ldt_t, ldv_t;
+ lapack_complex_double *v_t = NULL, *t_t = NULL, *c_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlarfb( &side, &trans, &direct, &storev, &m, &n, &k, v, &ldv, t,
+ &ldt, c, &ldc, work, &ldwork );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ nrows_v = ( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( side, 'l' ) ) ? m :
+ ( ( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( side, 'r' ) ) ? n :
+ ( LAPACKE_lsame( storev, 'r' ) ? k : 1) );
+ ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+ ( ( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( side, 'l' ) ) ? m :
+ ( ( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( side, 'r' ) ) ? n : 1) );
+ ldc_t = MAX(1,m);
+ ldt_t = MAX(1,k);
+ ldv_t = MAX(1,nrows_v);
+ /* Check leading dimension(s) */
+ if( ldc < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_zlarfb_work", info );
+ return info;
+ }
+ if( ldt < k ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zlarfb_work", info );
+ return info;
+ }
+ if( ldv < ncols_v ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zlarfb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldv_t * MAX(1,ncols_v) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldt_t * MAX(1,k) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ c_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'f' ) ) {
+ LAPACKE_ztr_trans( matrix_layout, 'l', 'u', k, v, ldv, v_t, ldv_t );
+ LAPACKE_zge_trans( matrix_layout, nrows_v-k, ncols_v, &v[k*ldv], ldv,
+ &v_t[k], ldv_t );
+ } else if( LAPACKE_lsame( storev, 'c' ) &&
+ LAPACKE_lsame( direct, 'b' ) ) {
+ if( k > nrows_v ) {
+ LAPACKE_xerbla( "LAPACKE_zlarfb_work", -8 );
+ return -8;
+ }
+ LAPACKE_ztr_trans( matrix_layout, 'u', 'u', k, &v[(nrows_v-k)*ldv],
+ ldv, &v_t[nrows_v-k], ldv_t );
+ LAPACKE_zge_trans( matrix_layout, nrows_v-k, ncols_v, v, ldv, v_t,
+ ldv_t );
+ } else if( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( direct, 'f' ) ) {
+ LAPACKE_ztr_trans( matrix_layout, 'u', 'u', k, v, ldv, v_t, ldv_t );
+ LAPACKE_zge_trans( matrix_layout, nrows_v, ncols_v-k, &v[k], ldv,
+ &v_t[k*ldv_t], ldv_t );
+ } else if( LAPACKE_lsame( storev, 'r' ) &&
+ LAPACKE_lsame( direct, 'f' ) ) {
+ if( k > ncols_v ) {
+ LAPACKE_xerbla( "LAPACKE_zlarfb_work", -8 );
+ return -8;
+ }
+ LAPACKE_ztr_trans( matrix_layout, 'l', 'u', k, &v[ncols_v-k], ldv,
+ &v_t[(ncols_v-k)*ldv_t], ldv_t );
+ LAPACKE_zge_trans( matrix_layout, nrows_v, ncols_v-k, v, ldv, v_t,
+ ldv_t );
+ }
+ LAPACKE_zge_trans( matrix_layout, k, k, t, ldt, t_t, ldt_t );
+ LAPACKE_zge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlarfb( &side, &trans, &direct, &storev, &m, &n, &k, v_t, &ldv_t,
+ t_t, &ldt_t, c_t, &ldc_t, work, &ldwork );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlarfb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlarfb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlarfg.c b/LAPACKE/src/lapacke_zlarfg.c
new file mode 100644
index 00000000..ea3a37ff
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlarfg.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 zlarfg
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlarfg( lapack_int n, lapack_complex_double* alpha,
+ lapack_complex_double* x, lapack_int incx,
+ lapack_complex_double* tau )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_z_nancheck( 1, alpha, 1 ) ) {
+ return -2;
+ }
+ if( LAPACKE_z_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_zlarfg_work( n, alpha, x, incx, tau );
+}
diff --git a/LAPACKE/src/lapacke_zlarfg_work.c b/LAPACKE/src/lapacke_zlarfg_work.c
new file mode 100644
index 00000000..ee0e1376
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlarfg_work.c
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 zlarfg
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlarfg_work( lapack_int n, lapack_complex_double* alpha,
+ lapack_complex_double* x, lapack_int incx,
+ lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlarfg( &n, alpha, x, &incx, tau );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlarft.c b/LAPACKE/src/lapacke_zlarft.c
new file mode 100644
index 00000000..0175d267
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlarft.c
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlarft
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlarft( int matrix_layout, char direct, char storev,
+ lapack_int n, lapack_int k,
+ const lapack_complex_double* v, lapack_int ldv,
+ const lapack_complex_double* tau,
+ lapack_complex_double* t, lapack_int ldt )
+{
+ lapack_int ncols_v, nrows_v;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlarft", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+ ( LAPACKE_lsame( storev, 'r' ) ? n : 1);
+ nrows_v = LAPACKE_lsame( storev, 'c' ) ? n :
+ ( LAPACKE_lsame( storev, 'r' ) ? k : 1);
+ if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_zlarft_work( matrix_layout, direct, storev, n, k, v, ldv, tau,
+ t, ldt );
+}
diff --git a/LAPACKE/src/lapacke_zlarft_work.c b/LAPACKE/src/lapacke_zlarft_work.c
new file mode 100644
index 00000000..7a4748b0
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlarft_work.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlarft
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlarft_work( int matrix_layout, char direct, char storev,
+ lapack_int n, lapack_int k,
+ const lapack_complex_double* v, lapack_int ldv,
+ const lapack_complex_double* tau,
+ lapack_complex_double* t, lapack_int ldt )
+{
+ lapack_int info = 0;
+ lapack_int nrows_v, ncols_v;
+ lapack_int ldt_t, ldv_t;
+ lapack_complex_double *v_t = NULL, *t_t = NULL;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlarft( &direct, &storev, &n, &k, v, &ldv, tau, t, &ldt );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ nrows_v = LAPACKE_lsame( storev, 'c' ) ? n :
+ ( LAPACKE_lsame( storev, 'r' ) ? k : 1);
+ ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+ ( LAPACKE_lsame( storev, 'r' ) ? n : 1);
+ ldt_t = MAX(1,k);
+ ldv_t = MAX(1,nrows_v);
+ /* Check leading dimension(s) */
+ if( ldt < k ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zlarft_work", info );
+ return info;
+ }
+ if( ldv < ncols_v ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zlarft_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldv_t * MAX(1,ncols_v) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldt_t * MAX(1,k) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, nrows_v, ncols_v, v, ldv, v_t, ldv_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlarft( &direct, &storev, &n, &k, v_t, &ldv_t, tau, t_t,
+ &ldt_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, k, k, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlarft_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlarft_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlarfx.c b/LAPACKE/src/lapacke_zlarfx.c
new file mode 100644
index 00000000..b1b1ec58
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlarfx.c
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlarfx
+* Author: Intel Corporation
+* Generated April, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlarfx( int matrix_layout, char side, lapack_int m,
+ lapack_int n, const lapack_complex_double* v,
+ lapack_complex_double tau, lapack_complex_double* c,
+ lapack_int ldc, lapack_complex_double* work )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlarfx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -7;
+ }
+ if( LAPACKE_z_nancheck( 1, &tau, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_z_nancheck( m, v, 1 ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_zlarfx_work( matrix_layout, side, m, n, v, tau, c, ldc,
+ work );
+}
diff --git a/LAPACKE/src/lapacke_zlarfx_work.c b/LAPACKE/src/lapacke_zlarfx_work.c
new file mode 100644
index 00000000..a6ad300d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlarfx_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlarfx
+* Author: Intel Corporation
+* Generated April, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlarfx_work( int matrix_layout, char side, lapack_int m,
+ lapack_int n, const lapack_complex_double* v,
+ lapack_complex_double tau,
+ lapack_complex_double* c, lapack_int ldc,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlarfx( &side, &m, &n, v, &tau, c, &ldc, work );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldc < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zlarfx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ c_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlarfx( &side, &m, &n, v, &tau, c_t, &ldc_t, work );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlarfx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlarfx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlarnv.c b/LAPACKE/src/lapacke_zlarnv.c
new file mode 100644
index 00000000..515e09b3
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlarnv.c
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 zlarnv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlarnv( lapack_int idist, lapack_int* iseed, lapack_int n,
+ lapack_complex_double* x )
+{
+ return LAPACKE_zlarnv_work( idist, iseed, n, x );
+}
diff --git a/LAPACKE/src/lapacke_zlarnv_work.c b/LAPACKE/src/lapacke_zlarnv_work.c
new file mode 100644
index 00000000..0e86fa14
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlarnv_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 zlarnv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlarnv_work( lapack_int idist, lapack_int* iseed,
+ lapack_int n, lapack_complex_double* x )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlarnv( &idist, iseed, &n, x );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlaset.c b/LAPACKE/src/lapacke_zlaset.c
new file mode 100644
index 00000000..9b4725be
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlaset.c
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlaset
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlaset( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, lapack_complex_double alpha,
+ lapack_complex_double beta, lapack_complex_double* a,
+ lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlaset", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_z_nancheck( 1, &alpha, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_z_nancheck( 1, &beta, 1 ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_zlaset_work( matrix_layout, uplo, m, n, alpha, beta, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_zlaset_work.c b/LAPACKE/src/lapacke_zlaset_work.c
new file mode 100644
index 00000000..4f6ea796
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlaset_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlaset
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlaset_work( int matrix_layout, char uplo, lapack_int m,
+ lapack_int n, lapack_complex_double alpha,
+ lapack_complex_double beta,
+ lapack_complex_double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlaset( &uplo, &m, &n, &alpha, &beta, a, &lda );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zlaset_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlaset( &uplo, &m, &n, &alpha, &beta, a_t, &lda_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlaset_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlaset_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlaswp.c b/LAPACKE/src/lapacke_zlaswp.c
new file mode 100644
index 00000000..765e35a3
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlaswp.c
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlaswp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlaswp( int matrix_layout, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int k1, lapack_int k2, const lapack_int* ipiv,
+ lapack_int incx )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlaswp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, lda, n, a, lda ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_zlaswp_work( matrix_layout, n, a, lda, k1, k2, ipiv, incx );
+}
diff --git a/LAPACKE/src/lapacke_zlaswp_work.c b/LAPACKE/src/lapacke_zlaswp_work.c
new file mode 100644
index 00000000..219ed6ed
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlaswp_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlaswp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlaswp_work( int matrix_layout, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int k1, lapack_int k2,
+ const lapack_int* ipiv, lapack_int incx )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlaswp( &n, a, &lda, &k1, &k2, ipiv, &incx );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,lda);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -4;
+ LAPACKE_xerbla( "LAPACKE_zlaswp_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlaswp( &n, a_t, &lda_t, &k1, &k2, ipiv, &incx );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlaswp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlaswp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlatms.c b/LAPACKE/src/lapacke_zlatms.c
new file mode 100644
index 00000000..ca078796
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlatms.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlatms
+* Author: Intel Corporation
+* Generated April, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlatms( int matrix_layout, lapack_int m, lapack_int n,
+ char dist, lapack_int* iseed, char sym, double* d,
+ lapack_int mode, double cond, double dmax,
+ lapack_int kl, lapack_int ku, char pack,
+ lapack_complex_double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlatms", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -14;
+ }
+ if( LAPACKE_d_nancheck( 1, &cond, 1 ) ) {
+ return -9;
+ }
+ if( LAPACKE_d_nancheck( MIN(n,m), d, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &dmax, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,3*(MAX(n,m))) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zlatms_work( matrix_layout, m, n, dist, iseed, sym, d, mode,
+ cond, dmax, kl, ku, pack, a, lda, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlatms", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlatms_work.c b/LAPACKE/src/lapacke_zlatms_work.c
new file mode 100644
index 00000000..a8869287
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlatms_work.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlatms
+* Author: Intel Corporation
+* Generated April, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlatms_work( int matrix_layout, lapack_int m, lapack_int n,
+ char dist, lapack_int* iseed, char sym,
+ double* d, lapack_int mode, double cond,
+ double dmax, lapack_int kl, lapack_int ku,
+ char pack, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlatms( &m, &n, &dist, iseed, &sym, d, &mode, &cond, &dmax, &kl,
+ &ku, &pack, a, &lda, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_zlatms_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlatms( &m, &n, &dist, iseed, &sym, d, &mode, &cond, &dmax, &kl,
+ &ku, &pack, a_t, &lda_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlatms_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlatms_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zlauum.c b/LAPACKE/src/lapacke_zlauum.c
new file mode 100644
index 00000000..ab6b589d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlauum.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlauum
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlauum( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zlauum", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zlauum_work( matrix_layout, uplo, n, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_zlauum_work.c b/LAPACKE/src/lapacke_zlauum_work.c
new file mode 100644
index 00000000..1a512eb7
--- /dev/null
+++ b/LAPACKE/src/lapacke_zlauum_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zlauum
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlauum_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlauum( &uplo, &n, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zlauum_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zlauum( &uplo, &n, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zlauum_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zlauum_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpbcon.c b/LAPACKE/src/lapacke_zpbcon.c
new file mode 100644
index 00000000..0f9ddddc
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpbcon.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpbcon( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, const lapack_complex_double* ab,
+ lapack_int ldab, double anorm, double* rcond )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zpbcon_work( matrix_layout, uplo, n, kd, ab, ldab, anorm,
+ rcond, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpbcon_work.c b/LAPACKE/src/lapacke_zpbcon_work.c
new file mode 100644
index 00000000..f066fa8c
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpbcon_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpbcon_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, const lapack_complex_double* ab,
+ lapack_int ldab, double anorm, double* rcond,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpbcon( &uplo, &n, &kd, ab, &ldab, &anorm, rcond, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_complex_double* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zpbcon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpbcon( &uplo, &n, &kd, ab_t, &ldab_t, &anorm, rcond, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpbcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpbequ.c b/LAPACKE/src/lapacke_zpbequ.c
new file mode 100644
index 00000000..cb851675
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpbequ.c
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpbequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpbequ( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, const lapack_complex_double* ab,
+ lapack_int ldab, double* s, double* scond,
+ double* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_zpbequ_work( matrix_layout, uplo, n, kd, ab, ldab, s, scond,
+ amax );
+}
diff --git a/LAPACKE/src/lapacke_zpbequ_work.c b/LAPACKE/src/lapacke_zpbequ_work.c
new file mode 100644
index 00000000..bb9ecb89
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpbequ_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpbequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpbequ_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, const lapack_complex_double* ab,
+ lapack_int ldab, double* s, double* scond,
+ double* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpbequ( &uplo, &n, &kd, ab, &ldab, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_complex_double* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zpbequ_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpbequ( &uplo, &n, &kd, ab_t, &ldab_t, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpbequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpbrfs.c b/LAPACKE/src/lapacke_zpbrfs.c
new file mode 100644
index 00000000..093af8ac
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpbrfs.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpbrfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs,
+ const lapack_complex_double* ab, lapack_int ldab,
+ const lapack_complex_double* afb, lapack_int ldafb,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zpbrfs_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, afb,
+ ldafb, b, ldb, x, ldx, ferr, berr, work,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpbrfs_work.c b/LAPACKE/src/lapacke_zpbrfs_work.c
new file mode 100644
index 00000000..d5e1b9eb
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpbrfs_work.c
@@ -0,0 +1,145 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpbrfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs,
+ const lapack_complex_double* ab,
+ lapack_int ldab,
+ const lapack_complex_double* afb,
+ lapack_int ldafb,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpbrfs( &uplo, &n, &kd, &nrhs, ab, &ldab, afb, &ldafb, b, &ldb,
+ x, &ldx, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldafb_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* afb_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zpbrfs_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zpbrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zpbrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zpbrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ LAPACKE_zpb_trans( matrix_layout, uplo, n, kd, afb, ldafb, afb_t,
+ ldafb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpbrfs( &uplo, &n, &kd, &nrhs, ab_t, &ldab_t, afb_t, &ldafb_t,
+ b_t, &ldb_t, x_t, &ldx_t, ferr, berr, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpbrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpbstf.c b/LAPACKE/src/lapacke_zpbstf.c
new file mode 100644
index 00000000..ac7ab328
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpbstf.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpbstf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpbstf( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kb, lapack_complex_double* bb,
+ lapack_int ldbb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbstf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_zpbstf_work( matrix_layout, uplo, n, kb, bb, ldbb );
+}
diff --git a/LAPACKE/src/lapacke_zpbstf_work.c b/LAPACKE/src/lapacke_zpbstf_work.c
new file mode 100644
index 00000000..2f1e0838
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpbstf_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpbstf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpbstf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kb, lapack_complex_double* bb,
+ lapack_int ldbb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpbstf( &uplo, &n, &kb, bb, &ldbb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldbb_t = MAX(1,kb+1);
+ lapack_complex_double* bb_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldbb < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zpbstf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ bb_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldbb_t * MAX(1,n) );
+ if( bb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpb_trans( matrix_layout, uplo, n, kb, bb, ldbb, bb_t, ldbb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpbstf( &uplo, &n, &kb, bb_t, &ldbb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zpb_trans( LAPACK_COL_MAJOR, uplo, n, kb, bb_t, ldbb_t, bb,
+ ldbb );
+ /* Release memory and exit */
+ LAPACKE_free( bb_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbstf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpbstf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpbsv.c b/LAPACKE/src/lapacke_zpbsv.c
new file mode 100644
index 00000000..84d24070
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpbsv.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpbsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpbsv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs,
+ lapack_complex_double* ab, lapack_int ldab,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_zpbsv_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_zpbsv_work.c b/LAPACKE/src/lapacke_zpbsv_work.c
new file mode 100644
index 00000000..c83ecc4f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpbsv_work.c
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpbsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpbsv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs,
+ lapack_complex_double* ab, lapack_int ldab,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpbsv( &uplo, &n, &kd, &nrhs, ab, &ldab, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zpbsv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zpbsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpbsv( &uplo, &n, &kd, &nrhs, ab_t, &ldab_t, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zpb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpbsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpbsvx.c b/LAPACKE/src/lapacke_zpbsvx.c
new file mode 100644
index 00000000..f32a0cda
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpbsvx.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpbsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpbsvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs,
+ lapack_complex_double* ab, lapack_int ldab,
+ lapack_complex_double* afb, lapack_int ldafb,
+ char* equed, double* s, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* x,
+ lapack_int ldx, double* rcond, double* ferr,
+ double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -7;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
+ return -9;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zpbsvx_work( matrix_layout, fact, uplo, n, kd, nrhs, ab, ldab,
+ afb, ldafb, equed, s, b, ldb, x, ldx, rcond,
+ ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpbsvx_work.c b/LAPACKE/src/lapacke_zpbsvx_work.c
new file mode 100644
index 00000000..7b9d0a43
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpbsvx_work.c
@@ -0,0 +1,155 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpbsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpbsvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int kd, lapack_int nrhs,
+ lapack_complex_double* ab, lapack_int ldab,
+ lapack_complex_double* afb, lapack_int ldafb,
+ char* equed, double* s,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpbsvx( &fact, &uplo, &n, &kd, &nrhs, ab, &ldab, afb, &ldafb,
+ equed, s, b, &ldb, x, &ldx, rcond, ferr, berr, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldafb_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* afb_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zpbsvx_work", info );
+ return info;
+ }
+ if( ldafb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zpbsvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_zpbsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_zpbsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ afb_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldafb_t * MAX(1,n) );
+ if( afb_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_zpb_trans( matrix_layout, uplo, n, kd, afb, ldafb, afb_t,
+ ldafb_t );
+ }
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpbsvx( &fact, &uplo, &n, &kd, &nrhs, ab_t, &ldab_t, afb_t,
+ &ldafb_t, equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond,
+ ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_zpb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_zpb_trans( LAPACK_COL_MAJOR, uplo, n, kd, afb_t, ldafb_t,
+ afb, ldafb );
+ }
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( afb_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpbsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpbtrf.c b/LAPACKE/src/lapacke_zpbtrf.c
new file mode 100644
index 00000000..b72db856
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpbtrf.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpbtrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpbtrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_complex_double* ab,
+ lapack_int ldab )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbtrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_zpbtrf_work( matrix_layout, uplo, n, kd, ab, ldab );
+}
diff --git a/LAPACKE/src/lapacke_zpbtrf_work.c b/LAPACKE/src/lapacke_zpbtrf_work.c
new file mode 100644
index 00000000..5c042ce3
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpbtrf_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpbtrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpbtrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_complex_double* ab,
+ lapack_int ldab )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpbtrf( &uplo, &n, &kd, ab, &ldab, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_complex_double* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zpbtrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpbtrf( &uplo, &n, &kd, ab_t, &ldab_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zpb_trans( LAPACK_COL_MAJOR, uplo, n, kd, ab_t, ldab_t, ab,
+ ldab );
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbtrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpbtrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpbtrs.c b/LAPACKE/src/lapacke_zpbtrs.c
new file mode 100644
index 00000000..1a7ceaf3
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpbtrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpbtrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs,
+ const lapack_complex_double* ab, lapack_int ldab,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbtrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+ return -6;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_zpbtrs_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_zpbtrs_work.c b/LAPACKE/src/lapacke_zpbtrs_work.c
new file mode 100644
index 00000000..eb7bc66a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpbtrs_work.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpbtrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int kd, lapack_int nrhs,
+ const lapack_complex_double* ab,
+ lapack_int ldab, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpbtrs( &uplo, &n, &kd, &nrhs, ab, &ldab, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zpbtrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zpbtrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpb_trans( matrix_layout, uplo, n, kd, ab, ldab, ab_t, ldab_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpbtrs( &uplo, &n, &kd, &nrhs, ab_t, &ldab_t, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpbtrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpbtrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpftrf.c b/LAPACKE/src/lapacke_zpftrf.c
new file mode 100644
index 00000000..ea74d4a8
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpftrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpftrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpftrf( int matrix_layout, char transr, char uplo,
+ lapack_int n, lapack_complex_double* a )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpftrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpf_nancheck( n, a ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_zpftrf_work( matrix_layout, transr, uplo, n, a );
+}
diff --git a/LAPACKE/src/lapacke_zpftrf_work.c b/LAPACKE/src/lapacke_zpftrf_work.c
new file mode 100644
index 00000000..ea6c97b5
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpftrf_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpftrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpftrf_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, lapack_complex_double* a )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpftrf( &transr, &uplo, &n, a, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpf_trans( matrix_layout, transr, uplo, n, a, a_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpftrf( &transr, &uplo, &n, a_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zpf_trans( LAPACK_COL_MAJOR, transr, uplo, n, a_t, a );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpftrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpftrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpftri.c b/LAPACKE/src/lapacke_zpftri.c
new file mode 100644
index 00000000..8dd1995d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpftri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpftri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpftri( int matrix_layout, char transr, char uplo,
+ lapack_int n, lapack_complex_double* a )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpftri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpf_nancheck( n, a ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_zpftri_work( matrix_layout, transr, uplo, n, a );
+}
diff --git a/LAPACKE/src/lapacke_zpftri_work.c b/LAPACKE/src/lapacke_zpftri_work.c
new file mode 100644
index 00000000..e9057451
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpftri_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpftri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpftri_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, lapack_complex_double* a )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpftri( &transr, &uplo, &n, a, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpf_trans( matrix_layout, transr, uplo, n, a, a_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpftri( &transr, &uplo, &n, a_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zpf_trans( LAPACK_COL_MAJOR, transr, uplo, n, a_t, a );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpftri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpftri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpftrs.c b/LAPACKE/src/lapacke_zpftrs.c
new file mode 100644
index 00000000..f5cf20df
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpftrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpftrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpftrs( int matrix_layout, char transr, char uplo,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* a,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpftrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpf_nancheck( n, a ) ) {
+ return -6;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_zpftrs_work( matrix_layout, transr, uplo, n, nrhs, a, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_zpftrs_work.c b/LAPACKE/src/lapacke_zpftrs_work.c
new file mode 100644
index 00000000..f0876a60
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpftrs_work.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpftrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpftrs_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* a,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpftrs( &transr, &uplo, &n, &nrhs, a, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zpftrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zpf_trans( matrix_layout, transr, uplo, n, a, a_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpftrs( &transr, &uplo, &n, &nrhs, a_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpftrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpftrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpocon.c b/LAPACKE/src/lapacke_zpocon.c
new file mode 100644
index 00000000..3f02939b
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpocon.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpocon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpocon( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double anorm, double* rcond )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpocon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zpocon_work( matrix_layout, uplo, n, a, lda, anorm, rcond,
+ work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpocon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpocon_work.c b/LAPACKE/src/lapacke_zpocon_work.c
new file mode 100644
index 00000000..0b485038
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpocon_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpocon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpocon_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double anorm, double* rcond,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpocon( &uplo, &n, a, &lda, &anorm, rcond, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zpocon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpocon( &uplo, &n, a_t, &lda_t, &anorm, rcond, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpocon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpocon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpoequ.c b/LAPACKE/src/lapacke_zpoequ.c
new file mode 100644
index 00000000..f7960656
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpoequ.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpoequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpoequ( int matrix_layout, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double* s, double* scond, double* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpoequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_zpoequ_work( matrix_layout, n, a, lda, s, scond, amax );
+}
diff --git a/LAPACKE/src/lapacke_zpoequ_work.c b/LAPACKE/src/lapacke_zpoequ_work.c
new file mode 100644
index 00000000..7f3b2301
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpoequ_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpoequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpoequ_work( int matrix_layout, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double* s, double* scond, double* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpoequ( &n, a, &lda, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -4;
+ LAPACKE_xerbla( "LAPACKE_zpoequ_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpoequ( &n, a_t, &lda_t, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpoequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpoequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpoequb.c b/LAPACKE/src/lapacke_zpoequb.c
new file mode 100644
index 00000000..a6ddeea7
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpoequb.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpoequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpoequb( int matrix_layout, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double* s, double* scond, double* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpoequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_zpoequb_work( matrix_layout, n, a, lda, s, scond, amax );
+}
diff --git a/LAPACKE/src/lapacke_zpoequb_work.c b/LAPACKE/src/lapacke_zpoequb_work.c
new file mode 100644
index 00000000..94e37b23
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpoequb_work.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpoequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpoequb_work( int matrix_layout, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double* s, double* scond, double* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpoequb( &n, a, &lda, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -4;
+ LAPACKE_xerbla( "LAPACKE_zpoequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpoequb( &n, a_t, &lda_t, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpoequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpoequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zporfs.c b/LAPACKE/src/lapacke_zporfs.c
new file mode 100644
index 00000000..9acc3471
--- /dev/null
+++ b/LAPACKE/src/lapacke_zporfs.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zporfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zporfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* af,
+ lapack_int ldaf, const lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* x,
+ lapack_int ldx, double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zporfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -11;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zporfs_work( matrix_layout, uplo, n, nrhs, a, lda, af, ldaf,
+ b, ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zporfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zporfs_work.c b/LAPACKE/src/lapacke_zporfs_work.c
new file mode 100644
index 00000000..2e5231cd
--- /dev/null
+++ b/LAPACKE/src/lapacke_zporfs_work.c
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zporfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zporfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* af,
+ lapack_int ldaf, const lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* x,
+ lapack_int ldx, double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zporfs( &uplo, &n, &nrhs, a, &lda, af, &ldaf, b, &ldb, x, &ldx,
+ ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* af_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zporfs_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zporfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zporfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zporfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zpo_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zporfs( &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zporfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zporfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zporfsx.c b/LAPACKE/src/lapacke_zporfsx.c
new file mode 100644
index 00000000..6c0f7d88
--- /dev/null
+++ b/LAPACKE/src/lapacke_zporfsx.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zporfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zporfsx( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* af, lapack_int ldaf,
+ const double* s, const lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* x,
+ lapack_int ldx, double* rcond, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zporfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -11;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -21;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'y' ) ) {
+ if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -13;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zporfsx_work( matrix_layout, uplo, equed, n, nrhs, a, lda, af,
+ ldaf, s, b, ldb, x, ldx, rcond, berr,
+ n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zporfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zporfsx_work.c b/LAPACKE/src/lapacke_zporfsx_work.c
new file mode 100644
index 00000000..f1c7a288
--- /dev/null
+++ b/LAPACKE/src/lapacke_zporfsx_work.c
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zporfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zporfsx_work( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* af,
+ lapack_int ldaf, const double* s,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zporfsx( &uplo, &equed, &n, &nrhs, a, &lda, af, &ldaf, s, b,
+ &ldb, x, &ldx, rcond, berr, &n_err_bnds, err_bnds_norm,
+ err_bnds_comp, &nparams, params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* af_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zporfsx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zporfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zporfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_zporfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zporfsx( &uplo, &equed, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, s,
+ b_t, &ldb_t, x_t, &ldx_t, rcond, berr, &n_err_bnds,
+ err_bnds_norm_t, err_bnds_comp_t, &nparams, params,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zporfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zporfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zposv.c b/LAPACKE/src/lapacke_zposv.c
new file mode 100644
index 00000000..c8c127b7
--- /dev/null
+++ b/LAPACKE/src/lapacke_zposv.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zposv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zposv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zposv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_zposv_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_zposv_work.c b/LAPACKE/src/lapacke_zposv_work.c
new file mode 100644
index 00000000..fbb90904
--- /dev/null
+++ b/LAPACKE/src/lapacke_zposv_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zposv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zposv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zposv( &uplo, &n, &nrhs, a, &lda, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zposv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zposv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zposv( &uplo, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zposv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zposv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zposvx.c b/LAPACKE/src/lapacke_zposvx.c
new file mode 100644
index 00000000..7269ef03
--- /dev/null
+++ b/LAPACKE/src/lapacke_zposvx.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zposvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zposvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* af,
+ lapack_int ldaf, char* equed, double* s,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zposvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zposvx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, equed, s, b, ldb, x, ldx, rcond, ferr,
+ berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zposvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zposvx_work.c b/LAPACKE/src/lapacke_zposvx_work.c
new file mode 100644
index 00000000..9bfbec97
--- /dev/null
+++ b/LAPACKE/src/lapacke_zposvx_work.c
@@ -0,0 +1,151 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zposvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zposvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* af, lapack_int ldaf,
+ char* equed, double* s,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zposvx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, equed, s, b,
+ &ldb, x, &ldx, rcond, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* af_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zposvx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zposvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zposvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_zposvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_zpo_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zposvx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr, berr,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_zpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_zpo_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zposvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zposvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zposvxx.c b/LAPACKE/src/lapacke_zposvxx.c
new file mode 100644
index 00000000..75fdabfc
--- /dev/null
+++ b/LAPACKE/src/lapacke_zposvxx.c
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zposvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zposvxx( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* af, lapack_int ldaf,
+ char* equed, double* s, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* x,
+ lapack_int ldx, double* rcond, double* rpvgrw,
+ double* berr, lapack_int n_err_bnds,
+ double* err_bnds_norm, double* err_bnds_comp,
+ lapack_int nparams, double* params )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zposvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -23;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+ return -11;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zposvxx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, equed, s, b, ldb, x, ldx, rcond, rpvgrw,
+ berr, n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zposvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zposvxx_work.c b/LAPACKE/src/lapacke_zposvxx_work.c
new file mode 100644
index 00000000..1fcaa97e
--- /dev/null
+++ b/LAPACKE/src/lapacke_zposvxx_work.c
@@ -0,0 +1,179 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zposvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zposvxx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* af, lapack_int ldaf,
+ char* equed, double* s,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* rpvgrw, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zposvxx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, equed, s,
+ b, &ldb, x, &ldx, rcond, rpvgrw, berr, &n_err_bnds,
+ err_bnds_norm, err_bnds_comp, &nparams, params, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* af_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zposvxx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zposvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zposvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_zposvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_zpo_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zposvxx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond, rpvgrw, berr,
+ &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t, &nparams,
+ params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_zpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_zpo_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zposvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zposvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpotrf.c b/LAPACKE/src/lapacke_zpotrf.c
new file mode 100644
index 00000000..ee2b598e
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpotrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpotrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpotrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpotrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zpotrf_work( matrix_layout, uplo, n, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_zpotrf_work.c b/LAPACKE/src/lapacke_zpotrf_work.c
new file mode 100644
index 00000000..a7051267
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpotrf_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpotrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpotrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpotrf( &uplo, &n, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zpotrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpotrf( &uplo, &n, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpotrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpotrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpotri.c b/LAPACKE/src/lapacke_zpotri.c
new file mode 100644
index 00000000..933f1a57
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpotri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpotri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpotri( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpotri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zpotri_work( matrix_layout, uplo, n, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_zpotri_work.c b/LAPACKE/src/lapacke_zpotri_work.c
new file mode 100644
index 00000000..615c0167
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpotri_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpotri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpotri_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpotri( &uplo, &n, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zpotri_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpotri( &uplo, &n, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpotri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpotri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpotrs.c b/LAPACKE/src/lapacke_zpotrs.c
new file mode 100644
index 00000000..98c5e8bc
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpotrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpotrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpotrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpotrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_zpotrs_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_zpotrs_work.c b/LAPACKE/src/lapacke_zpotrs_work.c
new file mode 100644
index 00000000..71a1979d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpotrs_work.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpotrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpotrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpotrs( &uplo, &n, &nrhs, a, &lda, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zpotrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zpotrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpotrs( &uplo, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpotrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpotrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zppcon.c b/LAPACKE/src/lapacke_zppcon.c
new file mode 100644
index 00000000..4149ca70
--- /dev/null
+++ b/LAPACKE/src/lapacke_zppcon.c
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zppcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zppcon( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* ap, double anorm,
+ double* rcond )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zppcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_zpp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zppcon_work( matrix_layout, uplo, n, ap, anorm, rcond, work,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zppcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zppcon_work.c b/LAPACKE/src/lapacke_zppcon_work.c
new file mode 100644
index 00000000..725a7016
--- /dev/null
+++ b/LAPACKE/src/lapacke_zppcon_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zppcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zppcon_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* ap, double anorm,
+ double* rcond, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zppcon( &uplo, &n, ap, &anorm, rcond, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zppcon( &uplo, &n, ap_t, &anorm, rcond, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zppcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zppcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zppequ.c b/LAPACKE/src/lapacke_zppequ.c
new file mode 100644
index 00000000..2920f7dd
--- /dev/null
+++ b/LAPACKE/src/lapacke_zppequ.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zppequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zppequ( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* ap, double* s,
+ double* scond, double* amax )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zppequ", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zppequ_work( matrix_layout, uplo, n, ap, s, scond, amax );
+}
diff --git a/LAPACKE/src/lapacke_zppequ_work.c b/LAPACKE/src/lapacke_zppequ_work.c
new file mode 100644
index 00000000..14a39c77
--- /dev/null
+++ b/LAPACKE/src/lapacke_zppequ_work.c
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zppequ
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zppequ_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* ap, double* s,
+ double* scond, double* amax )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zppequ( &uplo, &n, ap, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zppequ( &uplo, &n, ap_t, s, scond, amax, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zppequ_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zppequ_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpprfs.c b/LAPACKE/src/lapacke_zpprfs.c
new file mode 100644
index 00000000..5439a355
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpprfs.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpprfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* ap,
+ const lapack_complex_double* afp,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpprfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpp_nancheck( n, afp ) ) {
+ return -6;
+ }
+ if( LAPACKE_zpp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zpprfs_work( matrix_layout, uplo, n, nrhs, ap, afp, b, ldb, x,
+ ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpprfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpprfs_work.c b/LAPACKE/src/lapacke_zpprfs_work.c
new file mode 100644
index 00000000..9f746ea1
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpprfs_work.c
@@ -0,0 +1,130 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpprfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs,
+ const lapack_complex_double* ap,
+ const lapack_complex_double* afp,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpprfs( &uplo, &n, &nrhs, ap, afp, b, &ldb, x, &ldx, ferr, berr,
+ work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ lapack_complex_double* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zpprfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zpprfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ LAPACKE_zpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_zpp_trans( matrix_layout, uplo, n, afp, afp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpprfs( &uplo, &n, &nrhs, ap_t, afp_t, b_t, &ldb_t, x_t, &ldx_t,
+ ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpprfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpprfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zppsv.c b/LAPACKE/src/lapacke_zppsv.c
new file mode 100644
index 00000000..e0e87afe
--- /dev/null
+++ b/LAPACKE/src/lapacke_zppsv.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zppsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zppsv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* ap,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zppsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_zppsv_work( matrix_layout, uplo, n, nrhs, ap, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_zppsv_work.c b/LAPACKE/src/lapacke_zppsv_work.c
new file mode 100644
index 00000000..e6883b34
--- /dev/null
+++ b/LAPACKE/src/lapacke_zppsv_work.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zppsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zppsv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* ap,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zppsv( &uplo, &n, &nrhs, ap, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zppsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zppsv( &uplo, &n, &nrhs, ap_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_zpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zppsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zppsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zppsvx.c b/LAPACKE/src/lapacke_zppsvx.c
new file mode 100644
index 00000000..7a625b63
--- /dev/null
+++ b/LAPACKE/src/lapacke_zppsvx.c
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zppsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zppsvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* ap,
+ lapack_complex_double* afp, char* equed, double* s,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zppsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_zpp_nancheck( n, afp ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_zpp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+ return -9;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zppsvx_work( matrix_layout, fact, uplo, n, nrhs, ap, afp,
+ equed, s, b, ldb, x, ldx, rcond, ferr, berr,
+ work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zppsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zppsvx_work.c b/LAPACKE/src/lapacke_zppsvx_work.c
new file mode 100644
index 00000000..6bbf3426
--- /dev/null
+++ b/LAPACKE/src/lapacke_zppsvx_work.c
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zppsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zppsvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_double* ap,
+ lapack_complex_double* afp, char* equed,
+ double* s, lapack_complex_double* b,
+ lapack_int ldb, lapack_complex_double* x,
+ lapack_int ldx, double* rcond, double* ferr,
+ double* berr, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zppsvx( &fact, &uplo, &n, &nrhs, ap, afp, equed, s, b, &ldb, x,
+ &ldx, rcond, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ lapack_complex_double* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zppsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zppsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_zpp_trans( matrix_layout, uplo, n, afp, afp_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zppsvx( &fact, &uplo, &n, &nrhs, ap_t, afp_t, equed, s, b_t,
+ &ldb_t, x_t, &ldx_t, rcond, ferr, berr, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_zpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_zpp_trans( LAPACK_COL_MAJOR, uplo, n, afp_t, afp );
+ }
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zppsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zppsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpptrf.c b/LAPACKE/src/lapacke_zpptrf.c
new file mode 100644
index 00000000..8fdd8ca3
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpptrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpptrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpptrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zpptrf_work( matrix_layout, uplo, n, ap );
+}
diff --git a/LAPACKE/src/lapacke_zpptrf_work.c b/LAPACKE/src/lapacke_zpptrf_work.c
new file mode 100644
index 00000000..9ae49432
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpptrf_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpptrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpptrf( &uplo, &n, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpptrf( &uplo, &n, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpptrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpptrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpptri.c b/LAPACKE/src/lapacke_zpptri.c
new file mode 100644
index 00000000..ab671170
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpptri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpptri( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpptri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zpptri_work( matrix_layout, uplo, n, ap );
+}
diff --git a/LAPACKE/src/lapacke_zpptri_work.c b/LAPACKE/src/lapacke_zpptri_work.c
new file mode 100644
index 00000000..4bf06219
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpptri_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpptri_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpptri( &uplo, &n, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpptri( &uplo, &n, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpptri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpptri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpptrs.c b/LAPACKE/src/lapacke_zpptrs.c
new file mode 100644
index 00000000..eb111691
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpptrs.c
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpptrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* ap,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpptrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_zpptrs_work( matrix_layout, uplo, n, nrhs, ap, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_zpptrs_work.c b/LAPACKE/src/lapacke_zpptrs_work.c
new file mode 100644
index 00000000..2be54c7a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpptrs_work.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpptrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs,
+ const lapack_complex_double* ap,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpptrs( &uplo, &n, &nrhs, ap, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zpptrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpptrs( &uplo, &n, &nrhs, ap_t, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpptrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpptrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpstrf.c b/LAPACKE/src/lapacke_zpstrf.c
new file mode 100644
index 00000000..3a5a426a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpstrf.c
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpstrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpstrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* piv, lapack_int* rank, double tol )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpstrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( 1, &tol, 1 ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zpstrf_work( matrix_layout, uplo, n, a, lda, piv, rank, tol,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpstrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpstrf_work.c b/LAPACKE/src/lapacke_zpstrf_work.c
new file mode 100644
index 00000000..b2b3d7da
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpstrf_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpstrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpstrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* piv, lapack_int* rank, double tol,
+ double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpstrf( &uplo, &n, a, &lda, piv, rank, &tol, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zpstrf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpstrf( &uplo, &n, a_t, &lda_t, piv, rank, &tol, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zpo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpstrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpstrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zptcon.c b/LAPACKE/src/lapacke_zptcon.c
new file mode 100644
index 00000000..db9feed4
--- /dev/null
+++ b/LAPACKE/src/lapacke_zptcon.c
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 zptcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zptcon( lapack_int n, const double* d,
+ const lapack_complex_double* e, double anorm,
+ double* rcond )
+{
+ lapack_int info = 0;
+ double* work = NULL;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -2;
+ }
+ if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
+ return -3;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zptcon_work( n, d, e, anorm, rcond, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zptcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zptcon_work.c b/LAPACKE/src/lapacke_zptcon_work.c
new file mode 100644
index 00000000..0162c8ca
--- /dev/null
+++ b/LAPACKE/src/lapacke_zptcon_work.c
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 zptcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zptcon_work( lapack_int n, const double* d,
+ const lapack_complex_double* e, double anorm,
+ double* rcond, double* work )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_zptcon( &n, d, e, &anorm, rcond, work, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpteqr.c b/LAPACKE/src/lapacke_zpteqr.c
new file mode 100644
index 00000000..58baa333
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpteqr.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpteqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpteqr( int matrix_layout, char compz, lapack_int n,
+ double* d, double* e, lapack_complex_double* z,
+ lapack_int ldz )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lwork;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpteqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -6;
+ }
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( compz, 'n' ) ) {
+ lwork = 1;
+ } else {
+ lwork = MAX(1,4*n-4);
+ }
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zpteqr_work( matrix_layout, compz, n, d, e, z, ldz, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpteqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpteqr_work.c b/LAPACKE/src/lapacke_zpteqr_work.c
new file mode 100644
index 00000000..b53f817c
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpteqr_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpteqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpteqr_work( int matrix_layout, char compz, lapack_int n,
+ double* d, double* e, lapack_complex_double* z,
+ lapack_int ldz, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpteqr( &compz, &n, d, e, z, &ldz, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zpteqr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpteqr( &compz, &n, d, e, z_t, &ldz_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ /* Release memory and exit */
+ LAPACKE_free( z_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpteqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpteqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zptrfs.c b/LAPACKE/src/lapacke_zptrfs.c
new file mode 100644
index 00000000..1b75d5d8
--- /dev/null
+++ b/LAPACKE/src/lapacke_zptrfs.c
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zptrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zptrfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* d,
+ const lapack_complex_double* e, const double* df,
+ const lapack_complex_double* ef,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zptrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( n, df, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_z_nancheck( n-1, ef, 1 ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -11;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zptrfs_work( matrix_layout, uplo, n, nrhs, d, e, df, ef, b,
+ ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zptrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zptrfs_work.c b/LAPACKE/src/lapacke_zptrfs_work.c
new file mode 100644
index 00000000..9178d08a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zptrfs_work.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zptrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zptrfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* d,
+ const lapack_complex_double* e,
+ const double* df,
+ const lapack_complex_double* ef,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zptrfs( &uplo, &n, &nrhs, d, e, df, ef, b, &ldb, x, &ldx, ferr,
+ berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zptrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zptrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zptrfs( &uplo, &n, &nrhs, d, e, df, ef, b_t, &ldb_t, x_t, &ldx_t,
+ ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zptrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zptrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zptsv.c b/LAPACKE/src/lapacke_zptsv.c
new file mode 100644
index 00000000..7e282cf4
--- /dev/null
+++ b/LAPACKE/src/lapacke_zptsv.c
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zptsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zptsv( int matrix_layout, lapack_int n, lapack_int nrhs,
+ double* d, lapack_complex_double* e,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zptsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -6;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_zptsv_work( matrix_layout, n, nrhs, d, e, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_zptsv_work.c b/LAPACKE/src/lapacke_zptsv_work.c
new file mode 100644
index 00000000..2f2df104
--- /dev/null
+++ b/LAPACKE/src/lapacke_zptsv_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zptsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zptsv_work( int matrix_layout, lapack_int n, lapack_int nrhs,
+ double* d, lapack_complex_double* e,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zptsv( &n, &nrhs, d, e, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zptsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zptsv( &n, &nrhs, d, e, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zptsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zptsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zptsvx.c b/LAPACKE/src/lapacke_zptsvx.c
new file mode 100644
index 00000000..24279df9
--- /dev/null
+++ b/LAPACKE/src/lapacke_zptsvx.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zptsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zptsvx( int matrix_layout, char fact, lapack_int n,
+ lapack_int nrhs, const double* d,
+ const lapack_complex_double* e, double* df,
+ lapack_complex_double* ef,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zptsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_d_nancheck( n, df, 1 ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_z_nancheck( n-1, ef, 1 ) ) {
+ return -8;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zptsvx_work( matrix_layout, fact, n, nrhs, d, e, df, ef, b,
+ ldb, x, ldx, rcond, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zptsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zptsvx_work.c b/LAPACKE/src/lapacke_zptsvx_work.c
new file mode 100644
index 00000000..ca27bd23
--- /dev/null
+++ b/LAPACKE/src/lapacke_zptsvx_work.c
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zptsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zptsvx_work( int matrix_layout, char fact, lapack_int n,
+ lapack_int nrhs, const double* d,
+ const lapack_complex_double* e, double* df,
+ lapack_complex_double* ef,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zptsvx( &fact, &n, &nrhs, d, e, df, ef, b, &ldb, x, &ldx, rcond,
+ ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zptsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zptsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zptsvx( &fact, &n, &nrhs, d, e, df, ef, b_t, &ldb_t, x_t, &ldx_t,
+ rcond, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zptsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zptsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpttrf.c b/LAPACKE/src/lapacke_zpttrf.c
new file mode 100644
index 00000000..d2ffc503
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpttrf.c
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 zpttrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpttrf( lapack_int n, double* d, lapack_complex_double* e )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -2;
+ }
+ if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
+ return -3;
+ }
+#endif
+ return LAPACKE_zpttrf_work( n, d, e );
+}
diff --git a/LAPACKE/src/lapacke_zpttrf_work.c b/LAPACKE/src/lapacke_zpttrf_work.c
new file mode 100644
index 00000000..2c855672
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpttrf_work.c
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ Copyright (c) 2011, Intel Corp.
+ 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 zpttrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpttrf_work( lapack_int n, double* d,
+ lapack_complex_double* e )
+{
+ lapack_int info = 0;
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpttrf( &n, d, e, &info );
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zpttrs.c b/LAPACKE/src/lapacke_zpttrs.c
new file mode 100644
index 00000000..851ae72e
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpttrs.c
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpttrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpttrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* d,
+ const lapack_complex_double* e,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zpttrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_zpttrs_work( matrix_layout, uplo, n, nrhs, d, e, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_zpttrs_work.c b/LAPACKE/src/lapacke_zpttrs_work.c
new file mode 100644
index 00000000..27942a43
--- /dev/null
+++ b/LAPACKE/src/lapacke_zpttrs_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zpttrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zpttrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const double* d,
+ const lapack_complex_double* e,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpttrs( &uplo, &n, &nrhs, d, e, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zpttrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zpttrs( &uplo, &n, &nrhs, d, e, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zpttrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zpttrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zspcon.c b/LAPACKE/src/lapacke_zspcon.c
new file mode 100644
index 00000000..626aa2f1
--- /dev/null
+++ b/LAPACKE/src/lapacke_zspcon.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zspcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zspcon( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* ap,
+ const lapack_int* ipiv, double anorm, double* rcond )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zspcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_zsp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zspcon_work( matrix_layout, uplo, n, ap, ipiv, anorm, rcond,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zspcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zspcon_work.c b/LAPACKE/src/lapacke_zspcon_work.c
new file mode 100644
index 00000000..6f139610
--- /dev/null
+++ b/LAPACKE/src/lapacke_zspcon_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zspcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zspcon_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* ap,
+ const lapack_int* ipiv, double anorm,
+ double* rcond, lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zspcon( &uplo, &n, ap, ipiv, &anorm, rcond, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zspcon( &uplo, &n, ap_t, ipiv, &anorm, rcond, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zspcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zspcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsprfs.c b/LAPACKE/src/lapacke_zsprfs.c
new file mode 100644
index 00000000..129b4270
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsprfs.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsprfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* ap,
+ const lapack_complex_double* afp,
+ const lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsprfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsp_nancheck( n, afp ) ) {
+ return -6;
+ }
+ if( LAPACKE_zsp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zsprfs_work( matrix_layout, uplo, n, nrhs, ap, afp, ipiv, b,
+ ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsprfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsprfs_work.c b/LAPACKE/src/lapacke_zsprfs_work.c
new file mode 100644
index 00000000..377f5161
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsprfs_work.c
@@ -0,0 +1,131 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsprfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs,
+ const lapack_complex_double* ap,
+ const lapack_complex_double* afp,
+ const lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsprfs( &uplo, &n, &nrhs, ap, afp, ipiv, b, &ldb, x, &ldx, ferr,
+ berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ lapack_complex_double* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zsprfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zsprfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ LAPACKE_zsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ LAPACKE_zsp_trans( matrix_layout, uplo, n, afp, afp_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsprfs( &uplo, &n, &nrhs, ap_t, afp_t, ipiv, b_t, &ldb_t, x_t,
+ &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsprfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsprfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zspsv.c b/LAPACKE/src/lapacke_zspsv.c
new file mode 100644
index 00000000..cf5c6613
--- /dev/null
+++ b/LAPACKE/src/lapacke_zspsv.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zspsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zspsv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* ap,
+ lapack_int* ipiv, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zspsv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_zspsv_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_zspsv_work.c b/LAPACKE/src/lapacke_zspsv_work.c
new file mode 100644
index 00000000..b32fbbe8
--- /dev/null
+++ b/LAPACKE/src/lapacke_zspsv_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zspsv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zspsv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* ap,
+ lapack_int* ipiv, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zspsv( &uplo, &n, &nrhs, ap, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zspsv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zspsv( &uplo, &n, &nrhs, ap_t, ipiv, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ LAPACKE_zsp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zspsv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zspsv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zspsvx.c b/LAPACKE/src/lapacke_zspsvx.c
new file mode 100644
index 00000000..40ffb73b
--- /dev/null
+++ b/LAPACKE/src/lapacke_zspsvx.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zspsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zspsvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* ap,
+ lapack_complex_double* afp, lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zspsvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_zsp_nancheck( n, afp ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_zsp_nancheck( n, ap ) ) {
+ return -6;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zspsvx_work( matrix_layout, fact, uplo, n, nrhs, ap, afp,
+ ipiv, b, ldb, x, ldx, rcond, ferr, berr, work,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zspsvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zspsvx_work.c b/LAPACKE/src/lapacke_zspsvx_work.c
new file mode 100644
index 00000000..9fd23fcf
--- /dev/null
+++ b/LAPACKE/src/lapacke_zspsvx_work.c
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zspsvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zspsvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* ap,
+ lapack_complex_double* afp, lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zspsvx( &fact, &uplo, &n, &nrhs, ap, afp, ipiv, b, &ldb, x, &ldx,
+ rcond, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ lapack_complex_double* afp_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zspsvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zspsvx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ afp_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( afp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_zsp_trans( matrix_layout, uplo, n, afp, afp_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zspsvx( &fact, &uplo, &n, &nrhs, ap_t, afp_t, ipiv, b_t, &ldb_t,
+ x_t, &ldx_t, rcond, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ if( LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_zsp_trans( LAPACK_COL_MAJOR, uplo, n, afp_t, afp );
+ }
+ /* Release memory and exit */
+ LAPACKE_free( afp_t );
+exit_level_3:
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zspsvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zspsvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsptrf.c b/LAPACKE/src/lapacke_zsptrf.c
new file mode 100644
index 00000000..872cdb13
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsptrf.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsptrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* ap, lapack_int* ipiv )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsptrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zsptrf_work( matrix_layout, uplo, n, ap, ipiv );
+}
diff --git a/LAPACKE/src/lapacke_zsptrf_work.c b/LAPACKE/src/lapacke_zsptrf_work.c
new file mode 100644
index 00000000..63059761
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsptrf_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsptrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsptrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* ap, lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsptrf( &uplo, &n, ap, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsptrf( &uplo, &n, ap_t, ipiv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zsp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsptrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsptrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsptri.c b/LAPACKE/src/lapacke_zsptri.c
new file mode 100644
index 00000000..bfa3026e
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsptri.c
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsptri( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* ap, const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsptri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zsptri_work( matrix_layout, uplo, n, ap, ipiv, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsptri", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsptri_work.c b/LAPACKE/src/lapacke_zsptri_work.c
new file mode 100644
index 00000000..19e96f6a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsptri_work.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsptri_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* ap,
+ const lapack_int* ipiv,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsptri( &uplo, &n, ap, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsptri( &uplo, &n, ap_t, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zsp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsptri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsptri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsptrs.c b/LAPACKE/src/lapacke_zsptrs.c
new file mode 100644
index 00000000..a6ed6e5d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsptrs.c
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsptrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* ap,
+ const lapack_int* ipiv, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsptrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsp_nancheck( n, ap ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -7;
+ }
+#endif
+ return LAPACKE_zsptrs_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_zsptrs_work.c b/LAPACKE/src/lapacke_zsptrs_work.c
new file mode 100644
index 00000000..65eef367
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsptrs_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsptrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs,
+ const lapack_complex_double* ap,
+ const lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsptrs( &uplo, &n, &nrhs, ap, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zsptrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zsp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsptrs( &uplo, &n, &nrhs, ap_t, ipiv, b_t, &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsptrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsptrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zstedc.c b/LAPACKE/src/lapacke_zstedc.c
new file mode 100644
index 00000000..747651dd
--- /dev/null
+++ b/LAPACKE/src/lapacke_zstedc.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zstedc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zstedc( int matrix_layout, char compz, lapack_int n,
+ double* d, double* e, lapack_complex_double* z,
+ lapack_int ldz )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_int iwork_query;
+ double rwork_query;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zstedc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -6;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zstedc_work( matrix_layout, compz, n, d, e, z, ldz,
+ &work_query, lwork, &rwork_query, lrwork,
+ &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_Z2INT( 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;
+ }
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zstedc_work( matrix_layout, compz, n, d, e, z, ldz, work,
+ lwork, rwork, lrwork, iwork, liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zstedc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zstedc_work.c b/LAPACKE/src/lapacke_zstedc_work.c
new file mode 100644
index 00000000..91aece10
--- /dev/null
+++ b/LAPACKE/src/lapacke_zstedc_work.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zstedc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zstedc_work( int matrix_layout, char compz, lapack_int n,
+ double* d, double* e, lapack_complex_double* z,
+ lapack_int ldz, lapack_complex_double* work,
+ lapack_int lwork, double* rwork,
+ lapack_int lrwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zstedc( &compz, &n, d, e, z, &ldz, work, &lwork, rwork, &lrwork,
+ iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zstedc_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lrwork == -1 || lwork == -1 ) {
+ LAPACK_zstedc( &compz, &n, d, e, z, &ldz_t, work, &lwork, rwork,
+ &lrwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zstedc( &compz, &n, d, e, z_t, &ldz_t, work, &lwork, rwork,
+ &lrwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zstedc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zstedc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zstegr.c b/LAPACKE/src/lapacke_zstegr.c
new file mode 100644
index 00000000..f73750d4
--- /dev/null
+++ b/LAPACKE/src/lapacke_zstegr.c
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zstegr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zstegr( int matrix_layout, char jobz, char range,
+ lapack_int n, double* d, double* e, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_int* isuppz )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zstegr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+ return -11;
+ }
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( n, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -7;
+ }
+ }
+ if( LAPACKE_lsame( range, 'v' ) ) {
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -8;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zstegr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, abstol, m, w, z, ldz, isuppz, &work_query,
+ lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_zstegr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, abstol, m, w, z, ldz, isuppz, 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_zstegr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zstegr_work.c b/LAPACKE/src/lapacke_zstegr_work.c
new file mode 100644
index 00000000..c2c37712
--- /dev/null
+++ b/LAPACKE/src/lapacke_zstegr_work.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zstegr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zstegr_work( int matrix_layout, char jobz, char range,
+ lapack_int n, double* d, double* e, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ double abstol, lapack_int* m, double* w,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_int* isuppz, double* work,
+ lapack_int lwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zstegr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol, m,
+ w, z, &ldz, isuppz, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ( LAPACKE_lsame( jobz, 'v' ) && ( ldz < ldz_t ) ) || ( ldz < 1 ) ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_zstegr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_zstegr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol,
+ m, w, z, &ldz_t, isuppz, work, &lwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ /* Let be always 'n' instead of 'm' */
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zstegr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &abstol, m,
+ w, z_t, &ldz_t, isuppz, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, *m, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zstegr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zstegr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zstein.c b/LAPACKE/src/lapacke_zstein.c
new file mode 100644
index 00000000..b5ce99af
--- /dev/null
+++ b/LAPACKE/src/lapacke_zstein.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zstein
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zstein( int matrix_layout, lapack_int n, const double* d,
+ const double* e, lapack_int m, const double* w,
+ const lapack_int* iblock, const lapack_int* isplit,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_int* ifailv )
+{
+ lapack_int info = 0;
+ lapack_int* iwork = NULL;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zstein", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -3;
+ }
+ if( LAPACKE_d_nancheck( n, e, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n, w, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,5*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zstein_work( matrix_layout, n, d, e, m, w, iblock, isplit, z,
+ ldz, work, iwork, ifailv );
+ /* 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_zstein", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zstein_work.c b/LAPACKE/src/lapacke_zstein_work.c
new file mode 100644
index 00000000..fe764746
--- /dev/null
+++ b/LAPACKE/src/lapacke_zstein_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zstein
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zstein_work( int matrix_layout, lapack_int n, const double* d,
+ const double* e, lapack_int m, const double* w,
+ const lapack_int* iblock,
+ const lapack_int* isplit,
+ lapack_complex_double* z, lapack_int ldz,
+ double* work, lapack_int* iwork,
+ lapack_int* ifailv )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zstein( &n, d, e, &m, w, iblock, isplit, z, &ldz, work, iwork,
+ ifailv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < m ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zstein_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldz_t * MAX(1,m) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zstein( &n, d, e, &m, w, iblock, isplit, z_t, &ldz_t, work,
+ iwork, ifailv, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, m, z_t, ldz_t, z, ldz );
+ /* Release memory and exit */
+ LAPACKE_free( z_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zstein_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zstein_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zstemr.c b/LAPACKE/src/lapacke_zstemr.c
new file mode 100644
index 00000000..f5ae1344
--- /dev/null
+++ b/LAPACKE/src/lapacke_zstemr.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zstemr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zstemr( int matrix_layout, char jobz, char range,
+ lapack_int n, double* d, double* e, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ lapack_int* m, double* w, lapack_complex_double* z,
+ lapack_int ldz, lapack_int nzc, lapack_int* isuppz,
+ lapack_logical* tryrac )
+{
+ 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;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zstemr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+ return -6;
+ }
+ if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+ return -7;
+ }
+ if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zstemr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, m, w, z, ldz, nzc, isuppz, tryrac,
+ &work_query, lwork, &iwork_query, liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)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_zstemr_work( matrix_layout, jobz, range, n, d, e, vl, vu, il,
+ iu, m, w, z, ldz, nzc, isuppz, tryrac, 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_zstemr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zstemr_work.c b/LAPACKE/src/lapacke_zstemr_work.c
new file mode 100644
index 00000000..10eab93f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zstemr_work.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zstemr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zstemr_work( int matrix_layout, char jobz, char range,
+ lapack_int n, double* d, double* e, double vl,
+ double vu, lapack_int il, lapack_int iu,
+ lapack_int* m, double* w,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_int nzc, lapack_int* isuppz,
+ lapack_logical* tryrac, double* work,
+ lapack_int lwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zstemr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, m, w, z,
+ &ldz, &nzc, isuppz, tryrac, work, &lwork, iwork, &liwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_zstemr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_zstemr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, m, w, z,
+ &ldz_t, &nzc, isuppz, tryrac, work, &lwork, iwork,
+ &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zstemr( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, m, w, z_t,
+ &ldz_t, &nzc, isuppz, tryrac, work, &lwork, iwork,
+ &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zstemr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zstemr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsteqr.c b/LAPACKE/src/lapacke_zsteqr.c
new file mode 100644
index 00000000..22782a3e
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsteqr.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsteqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsteqr( int matrix_layout, char compz, lapack_int n,
+ double* d, double* e, lapack_complex_double* z,
+ lapack_int ldz )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lwork;
+ double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsteqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+ return -5;
+ }
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -6;
+ }
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( compz, 'n' ) ) {
+ lwork = 1;
+ } else {
+ lwork = MAX(1,2*n-2);
+ }
+ /* Allocate memory for working array(s) */
+ work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zsteqr_work( matrix_layout, compz, n, d, e, z, ldz, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsteqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsteqr_work.c b/LAPACKE/src/lapacke_zsteqr_work.c
new file mode 100644
index 00000000..29503d2d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsteqr_work.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsteqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsteqr_work( int matrix_layout, char compz, lapack_int n,
+ double* d, double* e, lapack_complex_double* z,
+ lapack_int ldz, double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsteqr( &compz, &n, d, e, z, &ldz, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldz < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zsteqr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Transpose input matrices */
+ if( LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsteqr( &compz, &n, d, e, z_t, &ldz_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsteqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsteqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsycon.c b/LAPACKE/src/lapacke_zsycon.c
new file mode 100644
index 00000000..d599cf68
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsycon.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsycon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsycon( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv, double anorm, double* rcond )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsycon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zsycon_work( matrix_layout, uplo, n, a, lda, ipiv, anorm,
+ rcond, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsycon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsycon_work.c b/LAPACKE/src/lapacke_zsycon_work.c
new file mode 100644
index 00000000..cf476199
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsycon_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsycon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsycon_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv, double anorm,
+ double* rcond, lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsycon( &uplo, &n, a, &lda, ipiv, &anorm, rcond, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zsycon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsycon( &uplo, &n, a_t, &lda_t, ipiv, &anorm, rcond, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsycon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsycon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsyconv.c b/LAPACKE/src/lapacke_zsyconv.c
new file mode 100644
index 00000000..d4833582
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsyconv.c
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsyconv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsyconv( int matrix_layout, char uplo, char way, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsyconv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, lda, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zsyconv_work( matrix_layout, uplo, way, n, a, lda, ipiv,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsyconv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsyconv_work.c b/LAPACKE/src/lapacke_zsyconv_work.c
new file mode 100644
index 00000000..de0ef757
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsyconv_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsyconv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsyconv_work( int matrix_layout, char uplo, char way,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsyconv( &uplo, &way, &n, a, &lda, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,lda);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zsyconv_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsyconv( &uplo, &way, &n, a_t, &lda_t, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsyconv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsyconv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsyequb.c b/LAPACKE/src/lapacke_zsyequb.c
new file mode 100644
index 00000000..de5296b5
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsyequb.c
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsyequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsyequb( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double* s, double* scond, double* amax )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsyequb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,3*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zsyequb_work( matrix_layout, uplo, n, a, lda, s, scond, amax,
+ work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsyequb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsyequb_work.c b/LAPACKE/src/lapacke_zsyequb_work.c
new file mode 100644
index 00000000..177032ac
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsyequb_work.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsyequb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsyequb_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double* s, double* scond, double* amax,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsyequb( &uplo, &n, a, &lda, s, scond, amax, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zsyequb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsyequb( &uplo, &n, a_t, &lda_t, s, scond, amax, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsyequb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsyequb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsyr.c b/LAPACKE/src/lapacke_zsyr.c
new file mode 100644
index 00000000..b6dfa445
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsyr.c
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsyr
+* Author: Intel Corporation
+* Generated March, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsyr( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double alpha,
+ const lapack_complex_double* x, lapack_int incx,
+ lapack_complex_double* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsyr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_z_nancheck( 1, &alpha, 1 ) ) {
+ return -4;
+ }
+ if( LAPACKE_z_nancheck( n, x, 1 ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_zsyr_work( matrix_layout, uplo, n, alpha, x, incx, a,
+ lda );
+}
diff --git a/LAPACKE/src/lapacke_zsyr_work.c b/LAPACKE/src/lapacke_zsyr_work.c
new file mode 100644
index 00000000..6d8e9f77
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsyr_work.c
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsyr
+* Author: Intel Corporation
+* Generated March, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsyr_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double alpha,
+ const lapack_complex_double* x,
+ lapack_int incx, lapack_complex_double* a,
+ lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsyr( &uplo, &n, &alpha, x, &incx, a, &lda );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zsyr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsyr( &uplo, &n, &alpha, x, &incx, a_t, &lda_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsyr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsyr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsyrfs.c b/LAPACKE/src/lapacke_zsyrfs.c
new file mode 100644
index 00000000..e172b980
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsyrfs.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsyrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsyrfs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsyrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zsyrfs_work( matrix_layout, uplo, n, nrhs, a, lda, af, ldaf,
+ ipiv, b, ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsyrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsyrfs_work.c b/LAPACKE/src/lapacke_zsyrfs_work.c
new file mode 100644
index 00000000..b877cd89
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsyrfs_work.c
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsyrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsyrfs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsyrfs( &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b, &ldb, x,
+ &ldx, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* af_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zsyrfs_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zsyrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zsyrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zsyrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsyrfs( &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t, ipiv, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsyrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsyrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsyrfsx.c b/LAPACKE/src/lapacke_zsyrfsx.c
new file mode 100644
index 00000000..f707b998
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsyrfsx.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsyrfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsyrfsx( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* af, lapack_int ldaf,
+ const lapack_int* ipiv, const double* s,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* berr, lapack_int n_err_bnds,
+ double* err_bnds_norm, double* err_bnds_comp,
+ lapack_int nparams, double* params )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsyrfsx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -12;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -22;
+ }
+ }
+ if( LAPACKE_lsame( equed, 'y' ) ) {
+ if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+ return -11;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -14;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zsyrfsx_work( matrix_layout, uplo, equed, n, nrhs, a, lda, af,
+ ldaf, ipiv, s, b, ldb, x, ldx, rcond, berr,
+ n_err_bnds, err_bnds_norm, err_bnds_comp,
+ nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsyrfsx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsyrfsx_work.c b/LAPACKE/src/lapacke_zsyrfsx_work.c
new file mode 100644
index 00000000..ebf1341d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsyrfsx_work.c
@@ -0,0 +1,171 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsyrfsx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsyrfsx_work( int matrix_layout, char uplo, char equed,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* af,
+ lapack_int ldaf, const lapack_int* ipiv,
+ const double* s,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsyrfsx( &uplo, &equed, &n, &nrhs, a, &lda, af, &ldaf, ipiv, s,
+ b, &ldb, x, &ldx, rcond, berr, &n_err_bnds,
+ err_bnds_norm, err_bnds_comp, &nparams, params, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* af_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zsyrfsx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zsyrfsx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_zsyrfsx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_zsyrfsx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsyrfsx( &uplo, &equed, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, s, b_t, &ldb_t, x_t, &ldx_t, rcond, berr,
+ &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t, &nparams,
+ params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, nrhs );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, nrhs );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsyrfsx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsyrfsx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsysv.c b/LAPACKE/src/lapacke_zsysv.c
new file mode 100644
index 00000000..de971b71
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsysv.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsysv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsysv( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* a,
+ lapack_int lda, lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsysv", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zsysv_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zsysv_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsysv", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsysv_rook.c b/LAPACKE/src/lapacke_zsysv_rook.c
new file mode 100644
index 00000000..b97ef2eb
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsysv_rook.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsysv_rook
+* Author: Intel Corporation
+* Generated January, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsysv_rook( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* a,
+ lapack_int lda, lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsysv_rook", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zsysv_rook_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv,
+ b, ldb, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zsysv_rook_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv,
+ b, ldb, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsysv_rook", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsysv_rook_work.c b/LAPACKE/src/lapacke_zsysv_rook_work.c
new file mode 100644
index 00000000..c002f254
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsysv_rook_work.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsysv_rook
+* Author: Intel Corporation
+* Generated January, 2012
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsysv_rook_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* a,
+ lapack_int lda, lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsysv_rook( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zsysv_rook_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zsysv_rook_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zsysv_rook( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsysv_rook( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsysv_rook_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsysv_rook_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsysv_work.c b/LAPACKE/src/lapacke_zsysv_work.c
new file mode 100644
index 00000000..a078f559
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsysv_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsysv
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsysv_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, lapack_complex_double* a,
+ lapack_int lda, lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsysv( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zsysv_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zsysv_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zsysv( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t, work,
+ &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsysv( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsysv_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsysv_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsysvx.c b/LAPACKE/src/lapacke_zsysvx.c
new file mode 100644
index 00000000..b241f377
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsysvx.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsysvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsysvx( int matrix_layout, char fact, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* af,
+ lapack_int ldaf, lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsysvx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -11;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zsysvx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr,
+ &work_query, lwork, rwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zsysvx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr,
+ work, lwork, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsysvx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsysvx_work.c b/LAPACKE/src/lapacke_zsysvx_work.c
new file mode 100644
index 00000000..06b248a8
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsysvx_work.c
@@ -0,0 +1,156 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsysvx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsysvx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* af, lapack_int ldaf,
+ lapack_int* ipiv,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* ferr, double* berr,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsysvx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv, b,
+ &ldb, x, &ldx, rcond, ferr, berr, work, &lwork, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* af_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zsysvx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zsysvx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zsysvx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_zsysvx_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zsysvx( &fact, &uplo, &n, &nrhs, a, &lda_t, af, &ldaf_t,
+ ipiv, b, &ldb_t, x, &ldx_t, rcond, ferr, berr, work,
+ &lwork, rwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsysvx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, b_t, &ldb_t, x_t, &ldx_t, rcond, ferr, berr, work,
+ &lwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsysvx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsysvx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsysvxx.c b/LAPACKE/src/lapacke_zsysvxx.c
new file mode 100644
index 00000000..256c0b62
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsysvxx.c
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsysvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsysvxx( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, double* s,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* rpvgrw, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsysvxx", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -13;
+ }
+ if( nparams>0 ) {
+ if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+ return -24;
+ }
+ }
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zsysvxx_work( matrix_layout, fact, uplo, n, nrhs, a, lda, af,
+ ldaf, ipiv, equed, s, b, ldb, x, ldx, rcond,
+ rpvgrw, berr, n_err_bnds, err_bnds_norm,
+ err_bnds_comp, nparams, params, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsysvxx", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsysvxx_work.c b/LAPACKE/src/lapacke_zsysvxx_work.c
new file mode 100644
index 00000000..e486e8bc
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsysvxx_work.c
@@ -0,0 +1,181 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsysvxx
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsysvxx_work( int matrix_layout, char fact, char uplo,
+ lapack_int n, lapack_int nrhs,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* af, lapack_int ldaf,
+ lapack_int* ipiv, char* equed, double* s,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* x, lapack_int ldx,
+ double* rcond, double* rpvgrw, double* berr,
+ lapack_int n_err_bnds, double* err_bnds_norm,
+ double* err_bnds_comp, lapack_int nparams,
+ double* params, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsysvxx( &fact, &uplo, &n, &nrhs, a, &lda, af, &ldaf, ipiv,
+ equed, s, b, &ldb, x, &ldx, rcond, rpvgrw, berr,
+ &n_err_bnds, err_bnds_norm, err_bnds_comp, &nparams,
+ params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldaf_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* af_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ double* err_bnds_norm_t = NULL;
+ double* err_bnds_comp_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zsysvxx_work", info );
+ return info;
+ }
+ if( ldaf < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zsysvxx_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_zsysvxx_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_zsysvxx_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ af_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldaf_t * MAX(1,n) );
+ if( af_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ err_bnds_norm_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_norm_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ err_bnds_comp_t = (double*)
+ LAPACKE_malloc( sizeof(double) * nrhs * MAX(1,n_err_bnds) );
+ if( err_bnds_comp_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ if( LAPACKE_lsame( fact, 'f' ) ) {
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, af, ldaf, af_t, ldaf_t );
+ }
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsysvxx( &fact, &uplo, &n, &nrhs, a_t, &lda_t, af_t, &ldaf_t,
+ ipiv, equed, s, b_t, &ldb_t, x_t, &ldx_t, rcond, rpvgrw,
+ berr, &n_err_bnds, err_bnds_norm_t, err_bnds_comp_t,
+ &nparams, params, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( fact, 'e' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ }
+ if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
+ LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, af_t, ldaf_t, af,
+ ldaf );
+ }
+ if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ }
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
+ nrhs, err_bnds_norm, n_err_bnds );
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
+ nrhs, err_bnds_comp, n_err_bnds );
+ /* Release memory and exit */
+ LAPACKE_free( err_bnds_comp_t );
+exit_level_5:
+ LAPACKE_free( err_bnds_norm_t );
+exit_level_4:
+ LAPACKE_free( x_t );
+exit_level_3:
+ LAPACKE_free( b_t );
+exit_level_2:
+ LAPACKE_free( af_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsysvxx_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsysvxx_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsyswapr.c b/LAPACKE/src/lapacke_zsyswapr.c
new file mode 100644
index 00000000..f487a92f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsyswapr.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsyswapr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsyswapr( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int i1,
+ lapack_int i2 )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsyswapr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, n ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_zsyswapr_work( matrix_layout, uplo, n, a, i1, i2 );
+}
diff --git a/LAPACKE/src/lapacke_zsyswapr_work.c b/LAPACKE/src/lapacke_zsyswapr_work.c
new file mode 100644
index 00000000..dfb62beb
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsyswapr_work.c
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsyswapr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsyswapr_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int i1,
+ lapack_int i2 )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsyswapr( &uplo, &n, a, &i1, &i2 );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * n * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, n, a_t, n );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsyswapr( &uplo, &n, a_t, &i1, &i2 );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, n, a, n );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsyswapr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsyswapr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsytrf.c b/LAPACKE/src/lapacke_zsytrf.c
new file mode 100644
index 00000000..f6380670
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsytrf.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsytrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytrf( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zsytrf_work( matrix_layout, uplo, n, a, lda, ipiv,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zsytrf_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsytrf_work.c b/LAPACKE/src/lapacke_zsytrf_work.c
new file mode 100644
index 00000000..2f48659d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsytrf_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsytrf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytrf_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int* ipiv, lapack_complex_double* work,
+ lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsytrf( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zsytrf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zsytrf( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsytrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytrf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsytrf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsytri.c b/LAPACKE/src/lapacke_zsytri.c
new file mode 100644
index 00000000..c18a775b
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsytri.c
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsytri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytri( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zsytri_work( matrix_layout, uplo, n, a, lda, ipiv, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytri", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsytri2.c b/LAPACKE/src/lapacke_zsytri2.c
new file mode 100644
index 00000000..80030ec5
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsytri2.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsytri2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytri2( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytri2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zsytri2_work( matrix_layout, uplo, n, a, lda, ipiv,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zsytri2_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytri2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsytri2_work.c b/LAPACKE/src/lapacke_zsytri2_work.c
new file mode 100644
index 00000000..9b9ee670
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsytri2_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsytri2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytri2_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsytri2( &uplo, &n, a, &lda, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zsytri2_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zsytri2( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsytri2( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytri2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsytri2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsytri2x.c b/LAPACKE/src/lapacke_zsytri2x.c
new file mode 100644
index 00000000..bfb2fdd1
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsytri2x.c
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsytri2x
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytri2x( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv, lapack_int nb )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytri2x", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n+nb+1)*(+1) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zsytri2x_work( matrix_layout, uplo, n, a, lda, ipiv, work,
+ nb );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytri2x", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsytri2x_work.c b/LAPACKE/src/lapacke_zsytri2x_work.c
new file mode 100644
index 00000000..c53879c2
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsytri2x_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsytri2x
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytri2x_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_double* work, lapack_int nb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsytri2x( &uplo, &n, a, &lda, ipiv, work, &nb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zsytri2x_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsytri2x( &uplo, &n, a_t, &lda_t, ipiv, work, &nb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytri2x_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsytri2x_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsytri_work.c b/LAPACKE/src/lapacke_zsytri_work.c
new file mode 100644
index 00000000..bdeb9605
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsytri_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsytri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytri_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsytri( &uplo, &n, a, &lda, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zsytri_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsytri( &uplo, &n, a_t, &lda_t, ipiv, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsytri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsytrs.c b/LAPACKE/src/lapacke_zsytrs.c
new file mode 100644
index 00000000..88887d90
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsytrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsytrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytrs( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_zsytrs_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_zsytrs2.c b/LAPACKE/src/lapacke_zsytrs2.c
new file mode 100644
index 00000000..1193404e
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsytrs2.c
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsytrs2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytrs2( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytrs2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zsytrs2_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytrs2", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsytrs2_work.c b/LAPACKE/src/lapacke_zsytrs2_work.c
new file mode 100644
index 00000000..350742a6
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsytrs2_work.c
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsytrs2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytrs2_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsytrs2( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zsytrs2_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zsytrs2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsytrs2( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytrs2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsytrs2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsytrs_work.c b/LAPACKE/src/lapacke_zsytrs_work.c
new file mode 100644
index 00000000..4d471669
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsytrs_work.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zsytrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytrs_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_int nrhs, const lapack_complex_double* a,
+ lapack_int lda, const lapack_int* ipiv,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsytrs( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zsytrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zsytrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsytrs( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsytrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztbcon.c b/LAPACKE/src/lapacke_ztbcon.c
new file mode 100644
index 00000000..e23e60c7
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztbcon.c
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztbcon( int matrix_layout, char norm, char uplo, char diag,
+ lapack_int n, lapack_int kd,
+ const lapack_complex_double* ab, lapack_int ldab,
+ double* rcond )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztbcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ztb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+ return -7;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztbcon_work( matrix_layout, norm, uplo, diag, n, kd, ab, ldab,
+ rcond, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztbcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztbcon_work.c b/LAPACKE/src/lapacke_ztbcon_work.c
new file mode 100644
index 00000000..523365a6
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztbcon_work.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztbcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztbcon_work( int matrix_layout, char norm, char uplo,
+ char diag, lapack_int n, lapack_int kd,
+ const lapack_complex_double* ab,
+ lapack_int ldab, double* rcond,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztbcon( &norm, &uplo, &diag, &n, &kd, ab, &ldab, rcond, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_complex_double* ab_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ztbcon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ztb_trans( matrix_layout, uplo, diag, n, kd, ab, ldab, ab_t,
+ ldab_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztbcon( &norm, &uplo, &diag, &n, &kd, ab_t, &ldab_t, rcond, work,
+ rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztbcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztbcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztbrfs.c b/LAPACKE/src/lapacke_ztbrfs.c
new file mode 100644
index 00000000..b4181552
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztbrfs.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztbrfs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int kd, lapack_int nrhs,
+ const lapack_complex_double* ab, lapack_int ldab,
+ const lapack_complex_double* b, lapack_int ldb,
+ const lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztbrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ztb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -12;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztbrfs_work( matrix_layout, uplo, trans, diag, n, kd, nrhs,
+ ab, ldab, b, ldb, x, ldx, ferr, berr, work,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztbrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztbrfs_work.c b/LAPACKE/src/lapacke_ztbrfs_work.c
new file mode 100644
index 00000000..f32567d3
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztbrfs_work.c
@@ -0,0 +1,123 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztbrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztbrfs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int kd,
+ lapack_int nrhs,
+ const lapack_complex_double* ab,
+ lapack_int ldab, const lapack_complex_double* b,
+ lapack_int ldb, const lapack_complex_double* x,
+ lapack_int ldx, double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztbrfs( &uplo, &trans, &diag, &n, &kd, &nrhs, ab, &ldab, b, &ldb,
+ x, &ldx, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ztbrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ztbrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_ztbrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ztb_trans( matrix_layout, uplo, diag, n, kd, ab, ldab, ab_t,
+ ldab_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztbrfs( &uplo, &trans, &diag, &n, &kd, &nrhs, ab_t, &ldab_t, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztbrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztbrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztbtrs.c b/LAPACKE/src/lapacke_ztbtrs.c
new file mode 100644
index 00000000..237eeab7
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztbtrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztbtrs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int kd, lapack_int nrhs,
+ const lapack_complex_double* ab, lapack_int ldab,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztbtrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ztb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -10;
+ }
+#endif
+ return LAPACKE_ztbtrs_work( matrix_layout, uplo, trans, diag, n, kd, nrhs,
+ ab, ldab, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_ztbtrs_work.c b/LAPACKE/src/lapacke_ztbtrs_work.c
new file mode 100644
index 00000000..6c672970
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztbtrs_work.c
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztbtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztbtrs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int kd,
+ lapack_int nrhs,
+ const lapack_complex_double* ab,
+ lapack_int ldab, lapack_complex_double* b,
+ lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztbtrs( &uplo, &trans, &diag, &n, &kd, &nrhs, ab, &ldab, b, &ldb,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldab_t = MAX(1,kd+1);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* ab_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldab < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ztbtrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ztbtrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ ab_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldab_t * MAX(1,n) );
+ if( ab_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ztb_trans( matrix_layout, uplo, diag, n, kd, ab, ldab, ab_t,
+ ldab_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztbtrs( &uplo, &trans, &diag, &n, &kd, &nrhs, ab_t, &ldab_t, b_t,
+ &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( ab_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztbtrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztbtrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztfsm.c b/LAPACKE/src/lapacke_ztfsm.c
new file mode 100644
index 00000000..9e162800
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztfsm.c
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztfsm
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztfsm( int matrix_layout, char transr, char side, char uplo,
+ char trans, char diag, lapack_int m, lapack_int n,
+ lapack_complex_double alpha,
+ const lapack_complex_double* a,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztfsm", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( IS_Z_NONZERO(alpha) ) {
+ if( LAPACKE_ztf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_z_nancheck( 1, &alpha, 1 ) ) {
+ return -9;
+ }
+ if( IS_Z_NONZERO(alpha) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -11;
+ }
+ }
+#endif
+ return LAPACKE_ztfsm_work( matrix_layout, transr, side, uplo, trans, diag, m,
+ n, alpha, a, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_ztfsm_work.c b/LAPACKE/src/lapacke_ztfsm_work.c
new file mode 100644
index 00000000..2a7638b5
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztfsm_work.c
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztfsm
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztfsm_work( int matrix_layout, char transr, char side,
+ char uplo, char trans, char diag, lapack_int m,
+ lapack_int n, lapack_complex_double alpha,
+ const lapack_complex_double* a,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztfsm( &transr, &side, &uplo, &trans, &diag, &m, &n, &alpha, a,
+ b, &ldb );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,m);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_ztfsm_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( IS_Z_NONZERO(alpha) ) {
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ if( IS_Z_NONZERO(alpha) ) {
+ LAPACKE_zge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ }
+ if( IS_Z_NONZERO(alpha) ) {
+ LAPACKE_ztf_trans( matrix_layout, transr, uplo, diag, n, a, a_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztfsm( &transr, &side, &uplo, &trans, &diag, &m, &n, &alpha, a_t,
+ b_t, &ldb_t );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ if( IS_Z_NONZERO(alpha) ) {
+ LAPACKE_free( a_t );
+ }
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztfsm_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztfsm_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztftri.c b/LAPACKE/src/lapacke_ztftri.c
new file mode 100644
index 00000000..07630437
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztftri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztftri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztftri( int matrix_layout, char transr, char uplo, char diag,
+ lapack_int n, lapack_complex_double* a )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztftri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ztf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_ztftri_work( matrix_layout, transr, uplo, diag, n, a );
+}
diff --git a/LAPACKE/src/lapacke_ztftri_work.c b/LAPACKE/src/lapacke_ztftri_work.c
new file mode 100644
index 00000000..aa6ea461
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztftri_work.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztftri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztftri_work( int matrix_layout, char transr, char uplo,
+ char diag, lapack_int n,
+ lapack_complex_double* a )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztftri( &transr, &uplo, &diag, &n, a, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* a_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ztf_trans( matrix_layout, transr, uplo, diag, n, a, a_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztftri( &transr, &uplo, &diag, &n, a_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ztf_trans( LAPACK_COL_MAJOR, transr, uplo, diag, n, a_t, a );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztftri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztftri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztfttp.c b/LAPACKE/src/lapacke_ztfttp.c
new file mode 100644
index 00000000..775af257
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztfttp.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztfttp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztfttp( int matrix_layout, char transr, char uplo,
+ lapack_int n, const lapack_complex_double* arf,
+ lapack_complex_double* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztfttp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpf_nancheck( n, arf ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_ztfttp_work( matrix_layout, transr, uplo, n, arf, ap );
+}
diff --git a/LAPACKE/src/lapacke_ztfttp_work.c b/LAPACKE/src/lapacke_ztfttp_work.c
new file mode 100644
index 00000000..a4e81cd9
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztfttp_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztfttp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztfttp_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, const lapack_complex_double* arf,
+ lapack_complex_double* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztfttp( &transr, &uplo, &n, arf, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* ap_t = NULL;
+ lapack_complex_double* arf_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ arf_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( arf_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpf_trans( matrix_layout, transr, uplo, n, arf, arf_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztfttp( &transr, &uplo, &n, arf_t, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( arf_t );
+exit_level_1:
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztfttp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztfttp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztfttr.c b/LAPACKE/src/lapacke_ztfttr.c
new file mode 100644
index 00000000..b5da2b8a
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztfttr.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztfttr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztfttr( int matrix_layout, char transr, char uplo,
+ lapack_int n, const lapack_complex_double* arf,
+ lapack_complex_double* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztfttr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpf_nancheck( n, arf ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_ztfttr_work( matrix_layout, transr, uplo, n, arf, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_ztfttr_work.c b/LAPACKE/src/lapacke_ztfttr_work.c
new file mode 100644
index 00000000..7728851d
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztfttr_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztfttr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztfttr_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, const lapack_complex_double* arf,
+ lapack_complex_double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztfttr( &transr, &uplo, &n, arf, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* arf_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ztfttr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ arf_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( arf_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpf_trans( matrix_layout, transr, uplo, n, arf, arf_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztfttr( &transr, &uplo, &n, arf_t, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( arf_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztfttr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztfttr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztgevc.c b/LAPACKE/src/lapacke_ztgevc.c
new file mode 100644
index 00000000..6e852711
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztgevc.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztgevc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztgevc( int matrix_layout, char side, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const lapack_complex_double* s, lapack_int lds,
+ const lapack_complex_double* p, lapack_int ldp,
+ lapack_complex_double* vl, lapack_int ldvl,
+ lapack_complex_double* vr, lapack_int ldvr,
+ lapack_int mm, lapack_int* m )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztgevc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, p, ldp ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, s, lds ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztgevc_work( matrix_layout, side, howmny, select, n, s, lds,
+ p, ldp, vl, ldvl, vr, ldvr, mm, m, work,
+ rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztgevc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztgevc_work.c b/LAPACKE/src/lapacke_ztgevc_work.c
new file mode 100644
index 00000000..237f2fc8
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztgevc_work.c
@@ -0,0 +1,162 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztgevc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztgevc_work( int matrix_layout, char side, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const lapack_complex_double* s, lapack_int lds,
+ const lapack_complex_double* p, lapack_int ldp,
+ lapack_complex_double* vl, lapack_int ldvl,
+ lapack_complex_double* vr, lapack_int ldvr,
+ lapack_int mm, lapack_int* m,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztgevc( &side, &howmny, select, &n, s, &lds, p, &ldp, vl, &ldvl,
+ vr, &ldvr, &mm, m, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldp_t = MAX(1,n);
+ lapack_int lds_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ lapack_complex_double* s_t = NULL;
+ lapack_complex_double* p_t = NULL;
+ lapack_complex_double* vl_t = NULL;
+ lapack_complex_double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldp < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ztgevc_work", info );
+ return info;
+ }
+ if( lds < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ztgevc_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ztgevc_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_ztgevc_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ s_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lds_t * MAX(1,n) );
+ if( s_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ p_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldp_t * MAX(1,n) );
+ if( p_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ vl_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ vr_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, s, lds, s_t, lds_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, p, ldp, p_t, ldp_t );
+ if( ( LAPACKE_lsame( side, 'l' ) || LAPACKE_lsame( side, 'b' ) ) &&
+ LAPACKE_lsame( howmny, 'b' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( ( LAPACKE_lsame( side, 'r' ) || LAPACKE_lsame( side, 'b' ) ) &&
+ LAPACKE_lsame( howmny, 'b' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztgevc( &side, &howmny, select, &n, s_t, &lds_t, p_t, &ldp_t,
+ vl_t, &ldvl_t, vr_t, &ldvr_t, &mm, m, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, mm, vl_t, ldvl_t, vl,
+ ldvl );
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, mm, vr_t, ldvr_t, vr,
+ ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_2:
+ LAPACKE_free( p_t );
+exit_level_1:
+ LAPACKE_free( s_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztgevc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztgevc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztgexc.c b/LAPACKE/src/lapacke_ztgexc.c
new file mode 100644
index 00000000..e242a0f5
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztgexc.c
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztgexc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztgexc( int matrix_layout, lapack_logical wantq,
+ lapack_logical wantz, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_int ifst, lapack_int ilst )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztgexc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -7;
+ }
+ if( wantq ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -9;
+ }
+ }
+ if( wantz ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -11;
+ }
+ }
+#endif
+ return LAPACKE_ztgexc_work( matrix_layout, wantq, wantz, n, a, lda, b, ldb,
+ q, ldq, z, ldz, ifst, ilst );
+}
diff --git a/LAPACKE/src/lapacke_ztgexc_work.c b/LAPACKE/src/lapacke_ztgexc_work.c
new file mode 100644
index 00000000..4a41d119
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztgexc_work.c
@@ -0,0 +1,158 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztgexc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztgexc_work( int matrix_layout, lapack_logical wantq,
+ lapack_logical wantz, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_int ifst, lapack_int ilst )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztgexc( &wantq, &wantz, &n, a, &lda, b, &ldb, q, &ldq, z, &ldz,
+ &ifst, &ilst, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* q_t = NULL;
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_ztgexc_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ztgexc_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ztgexc_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_ztgexc_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( wantq ) {
+ q_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( wantz ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ if( wantq ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ if( wantz ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztgexc( &wantq, &wantz, &n, a_t, &lda_t, b_t, &ldb_t, q_t,
+ &ldq_t, z_t, &ldz_t, &ifst, &ilst, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( wantq ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( wantz ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( wantz ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( wantq ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztgexc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztgexc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztgsen.c b/LAPACKE/src/lapacke_ztgsen.c
new file mode 100644
index 00000000..70a6495c
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztgsen.c
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztgsen
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztgsen( int matrix_layout, lapack_int ijob,
+ lapack_logical wantq, lapack_logical wantz,
+ const lapack_logical* select, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* alpha,
+ lapack_complex_double* beta,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_int* m, double* pl, double* pr, double* dif )
+{
+ lapack_int info = 0;
+ lapack_int liwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_int iwork_query;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztgsen", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+ if( wantq ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -13;
+ }
+ }
+ if( wantz ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+ return -15;
+ }
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ztgsen_work( matrix_layout, ijob, wantq, wantz, select, n, a,
+ lda, b, ldb, alpha, beta, q, ldq, z, ldz, m, pl,
+ pr, dif, &work_query, lwork, &iwork_query,
+ liwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ liwork = (lapack_int)iwork_query;
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ if( ijob != 0 ) {
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztgsen_work( matrix_layout, ijob, wantq, wantz, select, n, a,
+ lda, b, ldb, alpha, beta, q, ldq, z, ldz, m, pl,
+ pr, dif, work, lwork, iwork, liwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ if( ijob != 0 ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztgsen", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztgsen_work.c b/LAPACKE/src/lapacke_ztgsen_work.c
new file mode 100644
index 00000000..b2c075b7
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztgsen_work.c
@@ -0,0 +1,173 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztgsen
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztgsen_work( int matrix_layout, lapack_int ijob,
+ lapack_logical wantq, lapack_logical wantz,
+ const lapack_logical* select, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* alpha,
+ lapack_complex_double* beta,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_complex_double* z, lapack_int ldz,
+ lapack_int* m, double* pl, double* pr,
+ double* dif, lapack_complex_double* work,
+ lapack_int lwork, lapack_int* iwork,
+ lapack_int liwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztgsen( &ijob, &wantq, &wantz, select, &n, a, &lda, b, &ldb,
+ alpha, beta, q, &ldq, z, &ldz, m, pl, pr, dif, work,
+ &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldz_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* q_t = NULL;
+ lapack_complex_double* z_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ztgsen_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ztgsen_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_ztgsen_work", info );
+ return info;
+ }
+ if( ldz < n ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_ztgsen_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( liwork == -1 || lwork == -1 ) {
+ LAPACK_ztgsen( &ijob, &wantq, &wantz, select, &n, a, &lda_t, b,
+ &ldb_t, alpha, beta, q, &ldq_t, z, &ldz_t, m, pl, pr,
+ dif, work, &lwork, iwork, &liwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( wantq ) {
+ q_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( wantz ) {
+ z_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldz_t * MAX(1,n) );
+ if( z_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ if( wantq ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ if( wantz ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, z, ldz, z_t, ldz_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztgsen( &ijob, &wantq, &wantz, select, &n, a_t, &lda_t, b_t,
+ &ldb_t, alpha, beta, q_t, &ldq_t, z_t, &ldz_t, m, pl, pr,
+ dif, work, &lwork, iwork, &liwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb );
+ if( wantq ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ if( wantz ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
+ }
+ /* Release memory and exit */
+ if( wantz ) {
+ LAPACKE_free( z_t );
+ }
+exit_level_3:
+ if( wantq ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztgsen_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztgsen_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztgsja.c b/LAPACKE/src/lapacke_ztgsja.c
new file mode 100644
index 00000000..dc280b87
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztgsja.c
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztgsja
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztgsja( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int p, lapack_int n,
+ lapack_int k, lapack_int l, lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* b,
+ lapack_int ldb, double tola, double tolb,
+ double* alpha, double* beta,
+ lapack_complex_double* u, lapack_int ldu,
+ lapack_complex_double* v, lapack_int ldv,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_int* ncycle )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztgsja", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -10;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+ return -12;
+ }
+ if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -22;
+ }
+ }
+ if( LAPACKE_d_nancheck( 1, &tola, 1 ) ) {
+ return -14;
+ }
+ if( LAPACKE_d_nancheck( 1, &tolb, 1 ) ) {
+ return -15;
+ }
+ if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, m, m, u, ldu ) ) {
+ return -18;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, p, p, v, ldv ) ) {
+ return -20;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztgsja_work( matrix_layout, jobu, jobv, jobq, m, p, n, k, l,
+ a, lda, b, ldb, tola, tolb, alpha, beta, u, ldu,
+ v, ldv, q, ldq, work, ncycle );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztgsja", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztgsja_work.c b/LAPACKE/src/lapacke_ztgsja_work.c
new file mode 100644
index 00000000..3a91a2d9
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztgsja_work.c
@@ -0,0 +1,190 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztgsja
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztgsja_work( int matrix_layout, char jobu, char jobv,
+ char jobq, lapack_int m, lapack_int p,
+ lapack_int n, lapack_int k, lapack_int l,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ double tola, double tolb, double* alpha,
+ double* beta, lapack_complex_double* u,
+ lapack_int ldu, lapack_complex_double* v,
+ lapack_int ldv, lapack_complex_double* q,
+ lapack_int ldq, lapack_complex_double* work,
+ lapack_int* ncycle )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztgsja( &jobu, &jobv, &jobq, &m, &p, &n, &k, &l, a, &lda, b,
+ &ldb, &tola, &tolb, alpha, beta, u, &ldu, v, &ldv, q,
+ &ldq, work, ncycle, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,p);
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldu_t = MAX(1,m);
+ lapack_int ldv_t = MAX(1,p);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* u_t = NULL;
+ lapack_complex_double* v_t = NULL;
+ lapack_complex_double* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ztgsja_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_ztgsja_work", info );
+ return info;
+ }
+ if( ldq < n ) {
+ info = -23;
+ LAPACKE_xerbla( "LAPACKE_ztgsja_work", info );
+ return info;
+ }
+ if( ldu < m ) {
+ info = -19;
+ LAPACKE_xerbla( "LAPACKE_ztgsja_work", info );
+ return info;
+ }
+ if( ldv < p ) {
+ info = -21;
+ LAPACKE_xerbla( "LAPACKE_ztgsja_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+ u_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldu_t * MAX(1,m) );
+ if( u_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ v_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldv_t * MAX(1,p) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+ q_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, p, n, b, ldb, b_t, ldb_t );
+ if( LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_zge_trans( matrix_layout, m, m, u, ldu, u_t, ldu_t );
+ }
+ if( LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_zge_trans( matrix_layout, p, p, v, ldv, v_t, ldv_t );
+ }
+ if( LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztgsja( &jobu, &jobv, &jobq, &m, &p, &n, &k, &l, a_t, &lda_t,
+ b_t, &ldb_t, &tola, &tolb, alpha, beta, u_t, &ldu_t, v_t,
+ &ldv_t, q_t, &ldq_t, work, ncycle, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, p, n, b_t, ldb_t, b, ldb );
+ if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
+ }
+ if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, p, p, v_t, ldv_t, v, ldv );
+ }
+ if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_4:
+ if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+ LAPACKE_free( v_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+ LAPACKE_free( u_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztgsja_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztgsja_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztgsna.c b/LAPACKE/src/lapacke_ztgsna.c
new file mode 100644
index 00000000..f1ee68fa
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztgsna.c
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztgsna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztgsna( int matrix_layout, char job, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* b, lapack_int ldb,
+ const lapack_complex_double* vl, lapack_int ldvl,
+ const lapack_complex_double* vr, lapack_int ldvr,
+ double* s, double* dif, lapack_int mm,
+ lapack_int* m )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztgsna", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -10;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -12;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n+2) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ztgsna_work( matrix_layout, job, howmny, select, n, a, lda, b,
+ ldb, vl, ldvl, vr, ldvr, s, dif, mm, m,
+ &work_query, lwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztgsna_work( matrix_layout, job, howmny, select, n, a, lda, b,
+ ldb, vl, ldvl, vr, ldvr, s, dif, mm, m, work,
+ lwork, iwork );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( iwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztgsna", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztgsna_work.c b/LAPACKE/src/lapacke_ztgsna_work.c
new file mode 100644
index 00000000..65770e94
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztgsna_work.c
@@ -0,0 +1,161 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztgsna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztgsna_work( int matrix_layout, char job, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* b, lapack_int ldb,
+ const lapack_complex_double* vl,
+ lapack_int ldvl,
+ const lapack_complex_double* vr,
+ lapack_int ldvr, double* s, double* dif,
+ lapack_int mm, lapack_int* m,
+ lapack_complex_double* work, lapack_int lwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztgsna( &job, &howmny, select, &n, a, &lda, b, &ldb, vl, &ldvl,
+ vr, &ldvr, s, dif, &mm, m, work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* vl_t = NULL;
+ lapack_complex_double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ztgsna_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ztgsna_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ztgsna_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_ztgsna_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ztgsna( &job, &howmny, select, &n, a, &lda_t, b, &ldb_t, vl,
+ &ldvl_t, vr, &ldvr_t, s, dif, &mm, m, work, &lwork,
+ iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ vl_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ vr_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztgsna( &job, &howmny, select, &n, a_t, &lda_t, b_t, &ldb_t,
+ vl_t, &ldvl_t, vr_t, &ldvr_t, s, dif, &mm, m, work,
+ &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_3:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztgsna_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztgsna_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztgsyl.c b/LAPACKE/src/lapacke_ztgsyl.c
new file mode 100644
index 00000000..f56db787
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztgsyl.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztgsyl
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztgsyl( int matrix_layout, char trans, lapack_int ijob,
+ lapack_int m, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* c, lapack_int ldc,
+ const lapack_complex_double* d, lapack_int ldd,
+ const lapack_complex_double* e, lapack_int lde,
+ lapack_complex_double* f, lapack_int ldf,
+ double* scale, double* dif )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztgsyl", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, m, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, m, d, ldd ) ) {
+ return -12;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, e, lde ) ) {
+ return -14;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, f, ldf ) ) {
+ return -16;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m+n+2) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ztgsyl_work( matrix_layout, trans, ijob, m, n, a, lda, b, ldb,
+ c, ldc, d, ldd, e, lde, f, ldf, scale, dif,
+ &work_query, lwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztgsyl_work( matrix_layout, trans, ijob, m, n, a, lda, b, ldb,
+ c, ldc, d, ldd, e, lde, f, ldf, scale, dif,
+ work, lwork, iwork );
+ /* 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_ztgsyl", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztgsyl_work.c b/LAPACKE/src/lapacke_ztgsyl_work.c
new file mode 100644
index 00000000..f3afcf8e
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztgsyl_work.c
@@ -0,0 +1,183 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztgsyl
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztgsyl_work( int matrix_layout, char trans, lapack_int ijob,
+ lapack_int m, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* c, lapack_int ldc,
+ const lapack_complex_double* d, lapack_int ldd,
+ const lapack_complex_double* e, lapack_int lde,
+ lapack_complex_double* f, lapack_int ldf,
+ double* scale, double* dif,
+ lapack_complex_double* work, lapack_int lwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztgsyl( &trans, &ijob, &m, &n, a, &lda, b, &ldb, c, &ldc, d,
+ &ldd, e, &lde, f, &ldf, scale, dif, work, &lwork, iwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_int ldd_t = MAX(1,m);
+ lapack_int lde_t = MAX(1,n);
+ lapack_int ldf_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* c_t = NULL;
+ lapack_complex_double* d_t = NULL;
+ lapack_complex_double* e_t = NULL;
+ lapack_complex_double* f_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ztgsyl_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ztgsyl_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ztgsyl_work", info );
+ return info;
+ }
+ if( ldd < m ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_ztgsyl_work", info );
+ return info;
+ }
+ if( lde < n ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_ztgsyl_work", info );
+ return info;
+ }
+ if( ldf < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_ztgsyl_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ztgsyl( &trans, &ijob, &m, &n, a, &lda_t, b, &ldb_t, c,
+ &ldc_t, d, &ldd_t, e, &lde_t, f, &ldf_t, scale, dif,
+ work, &lwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ c_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ d_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldd_t * MAX(1,m) );
+ if( d_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ e_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lde_t * MAX(1,n) );
+ if( e_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ f_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldf_t * MAX(1,n) );
+ if( f_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, m, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ LAPACKE_zge_trans( matrix_layout, m, m, d, ldd, d_t, ldd_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, e, lde, e_t, lde_t );
+ LAPACKE_zge_trans( matrix_layout, m, n, f, ldf, f_t, ldf_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztgsyl( &trans, &ijob, &m, &n, a_t, &lda_t, b_t, &ldb_t, c_t,
+ &ldc_t, d_t, &ldd_t, e_t, &lde_t, f_t, &ldf_t, scale,
+ dif, work, &lwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, f_t, ldf_t, f, ldf );
+ /* Release memory and exit */
+ LAPACKE_free( f_t );
+exit_level_5:
+ LAPACKE_free( e_t );
+exit_level_4:
+ LAPACKE_free( d_t );
+exit_level_3:
+ LAPACKE_free( c_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztgsyl_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztgsyl_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztpcon.c b/LAPACKE/src/lapacke_ztpcon.c
new file mode 100644
index 00000000..8ce96064
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztpcon.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztpcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztpcon( int matrix_layout, char norm, char uplo, char diag,
+ lapack_int n, const lapack_complex_double* ap,
+ double* rcond )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztpcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ztp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztpcon_work( matrix_layout, norm, uplo, diag, n, ap, rcond,
+ work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztpcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztpcon_work.c b/LAPACKE/src/lapacke_ztpcon_work.c
new file mode 100644
index 00000000..eb22c96b
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztpcon_work.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztpcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztpcon_work( int matrix_layout, char norm, char uplo,
+ char diag, lapack_int n,
+ const lapack_complex_double* ap, double* rcond,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztpcon( &norm, &uplo, &diag, &n, ap, rcond, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ztp_trans( matrix_layout, uplo, diag, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztpcon( &norm, &uplo, &diag, &n, ap_t, rcond, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztpcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztpcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztpmqrt.c b/LAPACKE/src/lapacke_ztpmqrt.c
new file mode 100644
index 00000000..718a3158
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztpmqrt.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztpmqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztpmqrt( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int l, lapack_int nb,
+ const lapack_complex_double* v, lapack_int ldv,
+ const lapack_complex_double* t, lapack_int ldt,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztpmqrt", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -13;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -15;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) {
+ return -11;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ return -9;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,m) * MAX(1,nb) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztpmqrt_work( matrix_layout, side, trans, m, n, k, l, nb, v,
+ ldv, t, ldt, a, lda, b, ldb, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztpmqrt", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztpmqrt_work.c b/LAPACKE/src/lapacke_ztpmqrt_work.c
new file mode 100644
index 00000000..fa4cd346
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztpmqrt_work.c
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztpmqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztpmqrt_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int l, lapack_int nb,
+ const lapack_complex_double* v, lapack_int ldv,
+ const lapack_complex_double* t, lapack_int ldt,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztpmqrt( &side, &trans, &m, &n, &k, &l, &nb, v, &ldv, t, &ldt, a,
+ &lda, b, &ldb, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'r' ) ? k : k;
+ lapack_int lda_t = MAX(1,k);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,ldt);
+ lapack_int ldv_t = MAX(1,ldv);
+ lapack_complex_double* v_t = NULL;
+ lapack_complex_double* t_t = NULL;
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_ztpmqrt_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_ztpmqrt_work", info );
+ return info;
+ }
+ if( ldt < nb ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_ztpmqrt_work", info );
+ return info;
+ }
+ if( ldv < k ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ztpmqrt_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldv_t * MAX(1,k) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldt_t * MAX(1,nb) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, ldv, k, v, ldv, v_t, ldv_t );
+ LAPACKE_zge_trans( matrix_layout, ldt, nb, t, ldt, t_t, ldt_t );
+ LAPACKE_zge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztpmqrt( &side, &trans, &m, &n, &k, &l, &nb, v_t, &ldv_t, t_t,
+ &ldt_t, a_t, &lda_t, b_t, &ldb_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, k, m, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_3:
+ LAPACKE_free( a_t );
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztpmqrt_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztpmqrt_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztpqrt.c b/LAPACKE/src/lapacke_ztpqrt.c
new file mode 100644
index 00000000..ac8dbdec
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztpqrt.c
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztpqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztpqrt( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int l, lapack_int nb,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* t, lapack_int ldt )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztpqrt", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,nb) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztpqrt_work( matrix_layout, m, n, l, nb, a, lda, b, ldb, t,
+ ldt, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztpqrt", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztpqrt2.c b/LAPACKE/src/lapacke_ztpqrt2.c
new file mode 100644
index 00000000..6228c10d
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztpqrt2.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztpqrt2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztpqrt2( int matrix_layout,
+ lapack_int m, lapack_int n, lapack_int l,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* t, lapack_int ldt )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztpqrt2", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -6;
+ }
+#endif
+ return LAPACKE_ztpqrt2_work( matrix_layout, m, n, l, a, lda, b, ldb, t, ldt );
+}
diff --git a/LAPACKE/src/lapacke_ztpqrt2_work.c b/LAPACKE/src/lapacke_ztpqrt2_work.c
new file mode 100644
index 00000000..94218f41
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztpqrt2_work.c
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztpqrt2
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztpqrt2_work( int matrix_layout,
+ lapack_int m, lapack_int n, lapack_int l,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* t, lapack_int ldt )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztpqrt2( &m, &n, &l, a, &lda, b, &ldb, t, &ldt, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_ztpqrt2_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ztpqrt2_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ztpqrt2_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztpqrt2( &m, &n, &l, a_t, &lda_t, b_t, &ldb_t, t_t, &ldt_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztpqrt2_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztpqrt2_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztpqrt_work.c b/LAPACKE/src/lapacke_ztpqrt_work.c
new file mode 100644
index 00000000..f7f42611
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztpqrt_work.c
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztpqrt
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztpqrt_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int l, lapack_int nb,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* t, lapack_int ldt,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztpqrt( &m, &n, &l, &nb, a, &lda, b, &ldb, t, &ldt, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,nb);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* t_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ztpqrt_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ztpqrt_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ztpqrt_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztpqrt( &m, &n, &l, &nb, a_t, &lda_t, b_t, &ldb_t, t_t, &ldt_t,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nb, n, t_t, ldt_t, t, ldt );
+ /* Release memory and exit */
+ LAPACKE_free( t_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztpqrt_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztpqrt_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztprfb.c b/LAPACKE/src/lapacke_ztprfb.c
new file mode 100644
index 00000000..c6495739
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztprfb.c
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztprfb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztprfb( int matrix_layout, char side, char trans, char direct,
+ char storev, lapack_int m, lapack_int n,
+ lapack_int k, lapack_int l,
+ const lapack_complex_double* v, lapack_int ldv,
+ const lapack_complex_double* t, lapack_int ldt,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb)
+{
+ lapack_int info = 0;
+ lapack_int ldwork;
+ lapack_int work_size;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztprfb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -14;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+ return -16;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, ldt, k, t, ldt ) ) {
+ return -12;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ return -10;
+ }
+#endif
+ if (side=='l' || side=='L') {
+ ldwork = k;
+ work_size = MAX(1,ldwork) * MAX(1,n);
+ }
+ else {
+ ldwork = m;
+ work_size = MAX(1,ldwork) * MAX(1,k);
+ }
+
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * work_size );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztprfb_work( matrix_layout, side, trans, direct, storev, m, n,
+ k, l, v, ldv, t, ldt, a, lda, b, ldb, work,
+ ldwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztprfb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztprfb_work.c b/LAPACKE/src/lapacke_ztprfb_work.c
new file mode 100644
index 00000000..7d2282df
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztprfb_work.c
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztprfb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztprfb_work( int matrix_layout, char side, char trans,
+ char direct, char storev, lapack_int m,
+ lapack_int n, lapack_int k, lapack_int l,
+ const lapack_complex_double* v, lapack_int ldv,
+ const lapack_complex_double* t, lapack_int ldt,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* work, lapack_int ldwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztprfb( &side, &trans, &direct, &storev, &m, &n, &k, &l, v, &ldv,
+ t, &ldt, a, &lda, b, &ldb, work, &ldwork );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'r' ) ? k : k;
+ lapack_int lda_t = MAX(1,k);
+ lapack_int ldb_t = MAX(1,m);
+ lapack_int ldt_t = MAX(1,ldt);
+ lapack_int ldv_t = MAX(1,ldv);
+ lapack_complex_double* v_t = NULL;
+ lapack_complex_double* t_t = NULL;
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -15;
+ LAPACKE_xerbla( "LAPACKE_ztprfb_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -17;
+ LAPACKE_xerbla( "LAPACKE_ztprfb_work", info );
+ return info;
+ }
+ if( ldt < k ) {
+ info = -13;
+ LAPACKE_xerbla( "LAPACKE_ztprfb_work", info );
+ return info;
+ }
+ if( ldv < k ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ztprfb_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ v_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldv_t * MAX(1,k) );
+ if( v_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldt_t * MAX(1,k) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, ldv, k, v, ldv, v_t, ldv_t );
+ LAPACKE_zge_trans( matrix_layout, ldt, k, t, ldt, t_t, ldt_t );
+ LAPACKE_zge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztprfb( &side, &trans, &direct, &storev, &m, &n, &k, &l, v_t,
+ &ldv_t, t_t, &ldt_t, a_t, &lda_t, b_t, &ldb_t, work,
+ &ldwork );
+ info = 0; /* LAPACK call is ok! */
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, k, m, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_3:
+ LAPACKE_free( a_t );
+exit_level_2:
+ LAPACKE_free( t_t );
+exit_level_1:
+ LAPACKE_free( v_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztprfb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztprfb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztprfs.c b/LAPACKE/src/lapacke_ztprfs.c
new file mode 100644
index 00000000..de6897c4
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztprfs.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztprfs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* ap,
+ const lapack_complex_double* b, lapack_int ldb,
+ const lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztprfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ztp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -10;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztprfs_work( matrix_layout, uplo, trans, diag, n, nrhs, ap, b,
+ ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztprfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztprfs_work.c b/LAPACKE/src/lapacke_ztprfs_work.c
new file mode 100644
index 00000000..b9aabc2c
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztprfs_work.c
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztprfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztprfs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* ap,
+ const lapack_complex_double* b, lapack_int ldb,
+ const lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztprfs( &uplo, &trans, &diag, &n, &nrhs, ap, b, &ldb, x, &ldx,
+ ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ztprfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ztprfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ LAPACKE_ztp_trans( matrix_layout, uplo, diag, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztprfs( &uplo, &trans, &diag, &n, &nrhs, ap_t, b_t, &ldb_t, x_t,
+ &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_2:
+ LAPACKE_free( x_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztprfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztprfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztptri.c b/LAPACKE/src/lapacke_ztptri.c
new file mode 100644
index 00000000..4351b9d1
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztptri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztptri( int matrix_layout, char uplo, char diag, lapack_int n,
+ lapack_complex_double* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztptri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ztp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_ztptri_work( matrix_layout, uplo, diag, n, ap );
+}
diff --git a/LAPACKE/src/lapacke_ztptri_work.c b/LAPACKE/src/lapacke_ztptri_work.c
new file mode 100644
index 00000000..58c3fa80
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztptri_work.c
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztptri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztptri_work( int matrix_layout, char uplo, char diag,
+ lapack_int n, lapack_complex_double* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztptri( &uplo, &diag, &n, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* ap_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ztp_trans( matrix_layout, uplo, diag, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztptri( &uplo, &diag, &n, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ztp_trans( LAPACK_COL_MAJOR, uplo, diag, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztptri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztptri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztptrs.c b/LAPACKE/src/lapacke_ztptrs.c
new file mode 100644
index 00000000..634a67b3
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztptrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztptrs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* ap,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztptrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ztp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ return LAPACKE_ztptrs_work( matrix_layout, uplo, trans, diag, n, nrhs, ap, b,
+ ldb );
+}
diff --git a/LAPACKE/src/lapacke_ztptrs_work.c b/LAPACKE/src/lapacke_ztptrs_work.c
new file mode 100644
index 00000000..acf5a847
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztptrs_work.c
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztptrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztptrs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* ap,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztptrs( &uplo, &trans, &diag, &n, &nrhs, ap, b, &ldb, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ztptrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_ztp_trans( matrix_layout, uplo, diag, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztptrs( &uplo, &trans, &diag, &n, &nrhs, ap_t, b_t, &ldb_t,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( b_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztptrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztptrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztpttf.c b/LAPACKE/src/lapacke_ztpttf.c
new file mode 100644
index 00000000..f888c6f5
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztpttf.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztpttf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztpttf( int matrix_layout, char transr, char uplo,
+ lapack_int n, const lapack_complex_double* ap,
+ lapack_complex_double* arf )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztpttf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpp_nancheck( n, ap ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_ztpttf_work( matrix_layout, transr, uplo, n, ap, arf );
+}
diff --git a/LAPACKE/src/lapacke_ztpttf_work.c b/LAPACKE/src/lapacke_ztpttf_work.c
new file mode 100644
index 00000000..dcf52edd
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztpttf_work.c
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztpttf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztpttf_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, const lapack_complex_double* ap,
+ lapack_complex_double* arf )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztpttf( &transr, &uplo, &n, ap, arf, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_complex_double* ap_t = NULL;
+ lapack_complex_double* arf_t = NULL;
+ /* Allocate memory for temporary array(s) */
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ arf_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( arf_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztpttf( &transr, &uplo, &n, ap_t, arf_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zpf_trans( LAPACK_COL_MAJOR, transr, uplo, n, arf_t, arf );
+ /* Release memory and exit */
+ LAPACKE_free( arf_t );
+exit_level_1:
+ LAPACKE_free( ap_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztpttf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztpttf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztpttr.c b/LAPACKE/src/lapacke_ztpttr.c
new file mode 100644
index 00000000..7a2aaccb
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztpttr.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztpttr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztpttr( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* ap,
+ lapack_complex_double* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztpttr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpp_nancheck( n, ap ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_ztpttr_work( matrix_layout, uplo, n, ap, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_ztpttr_work.c b/LAPACKE/src/lapacke_ztpttr_work.c
new file mode 100644
index 00000000..b755cb9f
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztpttr_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztpttr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztpttr_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* ap,
+ lapack_complex_double* a, lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztpttr( &uplo, &n, ap, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_ztpttr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztpttr( &uplo, &n, ap_t, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztpttr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztpttr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztrcon.c b/LAPACKE/src/lapacke_ztrcon.c
new file mode 100644
index 00000000..23e4c5ce
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrcon.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrcon( int matrix_layout, char norm, char uplo, char diag,
+ lapack_int n, const lapack_complex_double* a,
+ lapack_int lda, double* rcond )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrcon", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ztr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -6;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztrcon_work( matrix_layout, norm, uplo, diag, n, a, lda,
+ rcond, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrcon", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztrcon_work.c b/LAPACKE/src/lapacke_ztrcon_work.c
new file mode 100644
index 00000000..6c414e2d
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrcon_work.c
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrcon
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrcon_work( int matrix_layout, char norm, char uplo,
+ char diag, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ double* rcond, lapack_complex_double* work,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrcon( &norm, &uplo, &diag, &n, a, &lda, rcond, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ztrcon_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ztr_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrcon( &norm, &uplo, &diag, &n, a_t, &lda_t, rcond, work, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrcon_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztrcon_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztrevc.c b/LAPACKE/src/lapacke_ztrevc.c
new file mode 100644
index 00000000..0e8908d2
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrevc.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrevc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrevc( int matrix_layout, char side, char howmny,
+ const lapack_logical* select, lapack_int n,
+ lapack_complex_double* t, lapack_int ldt,
+ lapack_complex_double* vl, lapack_int ldvl,
+ lapack_complex_double* vr, lapack_int ldvr,
+ lapack_int mm, lapack_int* m )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrevc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztrevc_work( matrix_layout, side, howmny, select, n, t, ldt,
+ vl, ldvl, vr, ldvr, mm, m, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrevc", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztrevc_work.c b/LAPACKE/src/lapacke_ztrevc_work.c
new file mode 100644
index 00000000..9b632dfa
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrevc_work.c
@@ -0,0 +1,145 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrevc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrevc_work( int matrix_layout, char side, char howmny,
+ const lapack_logical* select, lapack_int n,
+ lapack_complex_double* t, lapack_int ldt,
+ lapack_complex_double* vl, lapack_int ldvl,
+ lapack_complex_double* vr, lapack_int ldvr,
+ lapack_int mm, lapack_int* m,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrevc( &side, &howmny, select, &n, t, &ldt, vl, &ldvl, vr,
+ &ldvr, &mm, m, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldt_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ lapack_complex_double* t_t = NULL;
+ lapack_complex_double* vl_t = NULL;
+ lapack_complex_double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ztrevc_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ztrevc_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ztrevc_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ vl_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ vr_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( ( LAPACKE_lsame( side, 'l' ) || LAPACKE_lsame( side, 'b' ) ) &&
+ LAPACKE_lsame( howmny, 'b' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( ( LAPACKE_lsame( side, 'r' ) || LAPACKE_lsame( side, 'b' ) ) &&
+ LAPACKE_lsame( howmny, 'b' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrevc( &side, &howmny, select, &n, t_t, &ldt_t, vl_t, &ldvl_t,
+ vr_t, &ldvr_t, &mm, m, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, mm, vl_t, ldvl_t, vl,
+ ldvl );
+ }
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, mm, vr_t, ldvr_t, vr,
+ ldvr );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( t_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrevc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztrevc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztrexc.c b/LAPACKE/src/lapacke_ztrexc.c
new file mode 100644
index 00000000..7d4a0601
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrexc.c
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrexc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrexc( int matrix_layout, char compq, lapack_int n,
+ lapack_complex_double* t, lapack_int ldt,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_int ifst, lapack_int ilst )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrexc", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -6;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_ztrexc_work( matrix_layout, compq, n, t, ldt, q, ldq, ifst,
+ ilst );
+}
diff --git a/LAPACKE/src/lapacke_ztrexc_work.c b/LAPACKE/src/lapacke_ztrexc_work.c
new file mode 100644
index 00000000..7b3ba3cd
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrexc_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrexc
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrexc_work( int matrix_layout, char compq, lapack_int n,
+ lapack_complex_double* t, lapack_int ldt,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_int ifst, lapack_int ilst )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrexc( &compq, &n, t, &ldt, q, &ldq, &ifst, &ilst, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldt_t = MAX(1,n);
+ lapack_complex_double* t_t = NULL;
+ lapack_complex_double* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldq < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ztrexc_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_ztrexc_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ q_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrexc( &compq, &n, t_t, &ldt_t, q_t, &ldq_t, &ifst, &ilst,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( t_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrexc_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztrexc_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztrrfs.c b/LAPACKE/src/lapacke_ztrrfs.c
new file mode 100644
index 00000000..418f1597
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrrfs.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrrfs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* b, lapack_int ldb,
+ const lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr )
+{
+ lapack_int info = 0;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrrfs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ztr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+ return -11;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztrrfs_work( matrix_layout, uplo, trans, diag, n, nrhs, a,
+ lda, b, ldb, x, ldx, ferr, berr, work, rwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_1:
+ LAPACKE_free( rwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrrfs", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztrrfs_work.c b/LAPACKE/src/lapacke_ztrrfs_work.c
new file mode 100644
index 00000000..7bfad811
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrrfs_work.c
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrrfs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrrfs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* b, lapack_int ldb,
+ const lapack_complex_double* x, lapack_int ldx,
+ double* ferr, double* berr,
+ lapack_complex_double* work, double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrrfs( &uplo, &trans, &diag, &n, &nrhs, a, &lda, b, &ldb, x,
+ &ldx, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldx_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* x_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ztrrfs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ztrrfs_work", info );
+ return info;
+ }
+ if( ldx < nrhs ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_ztrrfs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx_t * MAX(1,nrhs) );
+ if( x_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ztr_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrrfs( &uplo, &trans, &diag, &n, &nrhs, a_t, &lda_t, b_t,
+ &ldb_t, x_t, &ldx_t, ferr, berr, work, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ LAPACKE_free( x_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrrfs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztrrfs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztrsen.c b/LAPACKE/src/lapacke_ztrsen.c
new file mode 100644
index 00000000..4b8d8dad
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrsen.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrsen
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrsen( int matrix_layout, char job, char compq,
+ const lapack_logical* select, lapack_int n,
+ lapack_complex_double* t, lapack_int ldt,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_complex_double* w, lapack_int* m, double* s,
+ double* sep )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrsen", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -6;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ztrsen_work( matrix_layout, job, compq, select, n, t, ldt, q,
+ ldq, w, m, s, sep, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztrsen_work( matrix_layout, job, compq, select, n, t, ldt, q,
+ ldq, w, m, s, sep, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrsen", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztrsen_work.c b/LAPACKE/src/lapacke_ztrsen_work.c
new file mode 100644
index 00000000..21a7b8fa
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrsen_work.c
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrsen
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrsen_work( int matrix_layout, char job, char compq,
+ const lapack_logical* select, lapack_int n,
+ lapack_complex_double* t, lapack_int ldt,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_complex_double* w, lapack_int* m,
+ double* s, double* sep,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrsen( &job, &compq, select, &n, t, &ldt, q, &ldq, w, m, s, sep,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldq_t = MAX(1,n);
+ lapack_int ldt_t = MAX(1,n);
+ lapack_complex_double* t_t = NULL;
+ lapack_complex_double* q_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldq < n ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ztrsen_work", info );
+ return info;
+ }
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ztrsen_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ztrsen( &job, &compq, select, &n, t, &ldt_t, q, &ldq_t, w, m,
+ s, sep, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ q_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, n, q, ldq, q_t, ldq_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrsen( &job, &compq, select, &n, t_t, &ldt_t, q_t, &ldq_t, w, m,
+ s, sep, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, t_t, ldt_t, t, ldt );
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( compq, 'v' ) ) {
+ LAPACKE_free( q_t );
+ }
+exit_level_1:
+ LAPACKE_free( t_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrsen_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztrsen_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztrsna.c b/LAPACKE/src/lapacke_ztrsna.c
new file mode 100644
index 00000000..34a1ad15
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrsna.c
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrsna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrsna( int matrix_layout, char job, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const lapack_complex_double* t, lapack_int ldt,
+ const lapack_complex_double* vl, lapack_int ldvl,
+ const lapack_complex_double* vr, lapack_int ldvr,
+ double* s, double* sep, lapack_int mm,
+ lapack_int* m )
+{
+ lapack_int info = 0;
+ lapack_int ldwork = LAPACKE_lsame( job, 'e' ) ? 1 : MAX(1,n) ;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrsna", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+ return -6;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+ return -8;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+ return -10;
+ }
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldwork * MAX(1,n+6) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztrsna_work( matrix_layout, job, howmny, select, n, t, ldt,
+ vl, ldvl, vr, ldvr, s, sep, mm, m, work, ldwork,
+ rwork );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( work );
+ }
+exit_level_1:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
+ LAPACKE_free( rwork );
+ }
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrsna", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztrsna_work.c b/LAPACKE/src/lapacke_ztrsna_work.c
new file mode 100644
index 00000000..4aea6408
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrsna_work.c
@@ -0,0 +1,137 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrsna
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrsna_work( int matrix_layout, char job, char howmny,
+ const lapack_logical* select, lapack_int n,
+ const lapack_complex_double* t, lapack_int ldt,
+ const lapack_complex_double* vl,
+ lapack_int ldvl,
+ const lapack_complex_double* vr,
+ lapack_int ldvr, double* s, double* sep,
+ lapack_int mm, lapack_int* m,
+ lapack_complex_double* work, lapack_int ldwork,
+ double* rwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrsna( &job, &howmny, select, &n, t, &ldt, vl, &ldvl, vr, &ldvr,
+ s, sep, &mm, m, work, &ldwork, rwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldt_t = MAX(1,n);
+ lapack_int ldvl_t = MAX(1,n);
+ lapack_int ldvr_t = MAX(1,n);
+ lapack_complex_double* t_t = NULL;
+ lapack_complex_double* vl_t = NULL;
+ lapack_complex_double* vr_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldt < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_ztrsna_work", info );
+ return info;
+ }
+ if( ldvl < mm ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_ztrsna_work", info );
+ return info;
+ }
+ if( ldvr < mm ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_ztrsna_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldt_t * MAX(1,n) );
+ if( t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ vl_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvl_t * MAX(1,mm) );
+ if( vl_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ vr_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldvr_t * MAX(1,mm) );
+ if( vr_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, t, ldt, t_t, ldt_t );
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, mm, vl, ldvl, vl_t, ldvl_t );
+ }
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_zge_trans( matrix_layout, n, mm, vr, ldvr, vr_t, ldvr_t );
+ }
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrsna( &job, &howmny, select, &n, t_t, &ldt_t, vl_t, &ldvl_t,
+ vr_t, &ldvr_t, s, sep, &mm, m, work, &ldwork, rwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_free( vr_t );
+ }
+exit_level_2:
+ if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+ LAPACKE_free( vl_t );
+ }
+exit_level_1:
+ LAPACKE_free( t_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrsna_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztrsna_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztrsyl.c b/LAPACKE/src/lapacke_ztrsyl.c
new file mode 100644
index 00000000..ea7908fa
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrsyl.c
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrsyl
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrsyl( int matrix_layout, char trana, char tranb,
+ lapack_int isgn, lapack_int m, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* c, lapack_int ldc,
+ double* scale )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrsyl", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, m, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ return -9;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -11;
+ }
+#endif
+ return LAPACKE_ztrsyl_work( matrix_layout, trana, tranb, isgn, m, n, a, lda,
+ b, ldb, c, ldc, scale );
+}
diff --git a/LAPACKE/src/lapacke_ztrsyl_work.c b/LAPACKE/src/lapacke_ztrsyl_work.c
new file mode 100644
index 00000000..4c7b8c25
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrsyl_work.c
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrsyl
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrsyl_work( int matrix_layout, char trana, char tranb,
+ lapack_int isgn, lapack_int m, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* b, lapack_int ldb,
+ lapack_complex_double* c, lapack_int ldc,
+ double* scale )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrsyl( &trana, &tranb, &isgn, &m, &n, a, &lda, b, &ldb, c, &ldc,
+ scale, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ lapack_complex_double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ztrsyl_work", info );
+ return info;
+ }
+ if( ldb < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ztrsyl_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_ztrsyl_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,n) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ c_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, m, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
+ LAPACKE_zge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrsyl( &trana, &tranb, &isgn, &m, &n, a_t, &lda_t, b_t, &ldb_t,
+ c_t, &ldc_t, scale, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_2:
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrsyl_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztrsyl_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztrtri.c b/LAPACKE/src/lapacke_ztrtri.c
new file mode 100644
index 00000000..197f432d
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrtri.c
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrtri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrtri( int matrix_layout, char uplo, char diag, lapack_int n,
+ lapack_complex_double* a, lapack_int lda )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrtri", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ztr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_ztrtri_work( matrix_layout, uplo, diag, n, a, lda );
+}
diff --git a/LAPACKE/src/lapacke_ztrtri_work.c b/LAPACKE/src/lapacke_ztrtri_work.c
new file mode 100644
index 00000000..ea6e1f63
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrtri_work.c
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrtri
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrtri_work( int matrix_layout, char uplo, char diag,
+ lapack_int n, lapack_complex_double* a,
+ lapack_int lda )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrtri( &uplo, &diag, &n, a, &lda, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_ztrtri_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ztr_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrtri( &uplo, &diag, &n, a_t, &lda_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_ztr_trans( LAPACK_COL_MAJOR, uplo, diag, n, a_t, lda_t, a,
+ lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrtri_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztrtri_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztrtrs.c b/LAPACKE/src/lapacke_ztrtrs.c
new file mode 100644
index 00000000..3ab3523d
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrtrs.c
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrtrs( int matrix_layout, char uplo, char trans, char diag,
+ lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrtrs", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_ztr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -9;
+ }
+#endif
+ return LAPACKE_ztrtrs_work( matrix_layout, uplo, trans, diag, n, nrhs, a,
+ lda, b, ldb );
+}
diff --git a/LAPACKE/src/lapacke_ztrtrs_work.c b/LAPACKE/src/lapacke_ztrtrs_work.c
new file mode 100644
index 00000000..cbba789f
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrtrs_work.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrtrs
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrtrs_work( int matrix_layout, char uplo, char trans,
+ char diag, lapack_int n, lapack_int nrhs,
+ const lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrtrs( &uplo, &trans, &diag, &n, &nrhs, a, &lda, b, &ldb,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_ztrtrs_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_ztrtrs_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_ztr_trans( matrix_layout, uplo, diag, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrtrs( &uplo, &trans, &diag, &n, &nrhs, a_t, &lda_t, b_t,
+ &ldb_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrtrs_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztrtrs_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztrttf.c b/LAPACKE/src/lapacke_ztrttf.c
new file mode 100644
index 00000000..bb321936
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrttf.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrttf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrttf( int matrix_layout, char transr, char uplo,
+ lapack_int n, const lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* arf )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrttf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+#endif
+ return LAPACKE_ztrttf_work( matrix_layout, transr, uplo, n, a, lda, arf );
+}
diff --git a/LAPACKE/src/lapacke_ztrttf_work.c b/LAPACKE/src/lapacke_ztrttf_work.c
new file mode 100644
index 00000000..4a801195
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrttf_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrttf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrttf_work( int matrix_layout, char transr, char uplo,
+ lapack_int n, const lapack_complex_double* a,
+ lapack_int lda, lapack_complex_double* arf )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrttf( &transr, &uplo, &n, a, &lda, arf, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* arf_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_ztrttf_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ arf_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( arf_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrttf( &transr, &uplo, &n, a_t, &lda_t, arf_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zpf_trans( LAPACK_COL_MAJOR, transr, uplo, n, arf_t, arf );
+ /* Release memory and exit */
+ LAPACKE_free( arf_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrttf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztrttf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztrttp.c b/LAPACKE/src/lapacke_ztrttp.c
new file mode 100644
index 00000000..770e9e86
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrttp.c
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrttp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrttp( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* ap )
+{
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrttp", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ return LAPACKE_ztrttp_work( matrix_layout, uplo, n, a, lda, ap );
+}
diff --git a/LAPACKE/src/lapacke_ztrttp_work.c b/LAPACKE/src/lapacke_ztrttp_work.c
new file mode 100644
index 00000000..debb183d
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztrttp_work.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztrttp
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztrttp_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* ap )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrttp( &uplo, &n, a, &lda, ap, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_ztrttp_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztrttp( &uplo, &n, a_t, &lda_t, ap_t, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zpp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztrttp_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztrttp_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztzrzf.c b/LAPACKE/src/lapacke_ztzrzf.c
new file mode 100644
index 00000000..79fb3eb6
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztzrzf.c
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztzrzf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztzrzf( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_ztzrzf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_ztzrzf_work( matrix_layout, m, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_ztzrzf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztzrzf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_ztzrzf_work.c b/LAPACKE/src/lapacke_ztzrzf_work.c
new file mode 100644
index 00000000..73ff9351
--- /dev/null
+++ b/LAPACKE/src/lapacke_ztzrzf_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 ztzrzf
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ztzrzf_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* tau,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztzrzf( &m, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_ztzrzf_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_ztzrzf( &m, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_ztzrzf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_ztzrzf_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_ztzrzf_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunbdb.c b/LAPACKE/src/lapacke_zunbdb.c
new file mode 100644
index 00000000..9b02be67
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunbdb.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunbdb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunbdb( int matrix_layout, char trans, char signs,
+ lapack_int m, lapack_int p, lapack_int q,
+ lapack_complex_double* x11, lapack_int ldx11,
+ lapack_complex_double* x12, lapack_int ldx12,
+ lapack_complex_double* x21, lapack_int ldx21,
+ lapack_complex_double* x22, lapack_int ldx22,
+ double* theta, double* phi,
+ lapack_complex_double* taup1,
+ lapack_complex_double* taup2,
+ lapack_complex_double* tauq1,
+ lapack_complex_double* tauq2 )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zunbdb", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
+ nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
+ nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
+ nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) {
+ return -9;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
+ return -11;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) {
+ return -13;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zunbdb_work( matrix_layout, trans, signs, m, p, q, x11, ldx11,
+ x12, ldx12, x21, ldx21, x22, ldx22, theta, phi,
+ taup1, taup2, tauq1, tauq2, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zunbdb_work( matrix_layout, trans, signs, m, p, q, x11, ldx11,
+ x12, ldx12, x21, ldx21, x22, ldx22, theta, phi,
+ taup1, taup2, tauq1, tauq2, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunbdb", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunbdb_work.c b/LAPACKE/src/lapacke_zunbdb_work.c
new file mode 100644
index 00000000..2fcf2a97
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunbdb_work.c
@@ -0,0 +1,170 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunbdb
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunbdb_work( int matrix_layout, char trans, char signs,
+ lapack_int m, lapack_int p, lapack_int q,
+ lapack_complex_double* x11, lapack_int ldx11,
+ lapack_complex_double* x12, lapack_int ldx12,
+ lapack_complex_double* x21, lapack_int ldx21,
+ lapack_complex_double* x22, lapack_int ldx22,
+ double* theta, double* phi,
+ lapack_complex_double* taup1,
+ lapack_complex_double* taup2,
+ lapack_complex_double* tauq1,
+ lapack_complex_double* tauq2,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunbdb( &trans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12,
+ x21, &ldx21, x22, &ldx22, theta, phi, taup1, taup2,
+ tauq1, tauq2, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
+ lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
+ lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
+ lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
+ lapack_int ldx11_t = MAX(1,nrows_x11);
+ lapack_int ldx12_t = MAX(1,nrows_x12);
+ lapack_int ldx21_t = MAX(1,nrows_x21);
+ lapack_int ldx22_t = MAX(1,nrows_x22);
+ lapack_complex_double* x11_t = NULL;
+ lapack_complex_double* x12_t = NULL;
+ lapack_complex_double* x21_t = NULL;
+ lapack_complex_double* x22_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldx11 < q ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zunbdb_work", info );
+ return info;
+ }
+ if( ldx12 < m-q ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zunbdb_work", info );
+ return info;
+ }
+ if( ldx21 < q ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zunbdb_work", info );
+ return info;
+ }
+ if( ldx22 < m-q ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_zunbdb_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zunbdb( &trans, &signs, &m, &p, &q, x11, &ldx11_t, x12,
+ &ldx12_t, x21, &ldx21_t, x22, &ldx22_t, theta, phi,
+ taup1, taup2, tauq1, tauq2, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ x11_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx11_t * MAX(1,q) );
+ if( x11_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x12_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx12_t * MAX(1,m-q) );
+ if( x12_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x21_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx21_t * MAX(1,q) );
+ if( x21_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x22_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx22_t * MAX(1,m-q) );
+ if( x22_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t,
+ ldx11_t );
+ LAPACKE_zge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t,
+ ldx12_t );
+ LAPACKE_zge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t,
+ ldx21_t );
+ LAPACKE_zge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t,
+ ldx22_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunbdb( &trans, &signs, &m, &p, &q, x11_t, &ldx11_t, x12_t,
+ &ldx12_t, x21_t, &ldx21_t, x22_t, &ldx22_t, theta, phi,
+ taup1, taup2, tauq1, tauq2, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11,
+ ldx11 );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t,
+ x12, ldx12 );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21,
+ ldx21 );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t,
+ x22, ldx22 );
+ /* Release memory and exit */
+ LAPACKE_free( x22_t );
+exit_level_3:
+ LAPACKE_free( x21_t );
+exit_level_2:
+ LAPACKE_free( x12_t );
+exit_level_1:
+ LAPACKE_free( x11_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunbdb_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zunbdb_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zuncsd.c b/LAPACKE/src/lapacke_zuncsd.c
new file mode 100644
index 00000000..191051e8
--- /dev/null
+++ b/LAPACKE/src/lapacke_zuncsd.c
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zuncsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zuncsd( int matrix_layout, char jobu1, char jobu2,
+ char jobv1t, char jobv2t, char trans, char signs,
+ lapack_int m, lapack_int p, lapack_int q,
+ lapack_complex_double* x11, lapack_int ldx11,
+ lapack_complex_double* x12, lapack_int ldx12,
+ lapack_complex_double* x21, lapack_int ldx21,
+ lapack_complex_double* x22, lapack_int ldx22,
+ double* theta, lapack_complex_double* u1,
+ lapack_int ldu1, lapack_complex_double* u2,
+ lapack_int ldu2, lapack_complex_double* v1t,
+ lapack_int ldv1t, lapack_complex_double* v2t,
+ lapack_int ldv2t )
+{
+ lapack_int info = 0;
+ lapack_int lrwork = -1;
+ lapack_int lwork = -1;
+ lapack_int* iwork = NULL;
+ double* rwork = NULL;
+ lapack_complex_double* work = NULL;
+ double rwork_query;
+ lapack_complex_double work_query;
+ lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zuncsd", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
+ nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
+ nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
+ nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
+ return -11;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) {
+ return -13;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
+ return -15;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) {
+ return -17;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m-MIN(MIN(p,m-p),MIN(q,m-q))) );
+ if( iwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zuncsd_work( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
+ trans, signs, m, p, q, x11, ldx11, x12, ldx12,
+ x21, ldx21, x22, ldx22, theta, u1, ldu1, u2,
+ ldu2, v1t, ldv1t, v2t, ldv2t, &work_query,
+ lwork, &rwork_query, lrwork, iwork );
+ if( info != 0 ) {
+ goto exit_level_1;
+ }
+ lrwork = (lapack_int)rwork_query;
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork );
+ if( rwork == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zuncsd_work( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
+ trans, signs, m, p, q, x11, ldx11, x12, ldx12,
+ x21, ldx21, x22, ldx22, theta, u1, ldu1, u2,
+ ldu2, v1t, ldv1t, v2t, ldv2t, work, lwork,
+ rwork, lrwork, iwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_2:
+ LAPACKE_free( rwork );
+exit_level_1:
+ LAPACKE_free( iwork );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zuncsd", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zuncsd_work.c b/LAPACKE/src/lapacke_zuncsd_work.c
new file mode 100644
index 00000000..4c30efe7
--- /dev/null
+++ b/LAPACKE/src/lapacke_zuncsd_work.c
@@ -0,0 +1,278 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zuncsd
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zuncsd_work( int matrix_layout, char jobu1, char jobu2,
+ char jobv1t, char jobv2t, char trans,
+ char signs, lapack_int m, lapack_int p,
+ lapack_int q, lapack_complex_double* x11,
+ lapack_int ldx11, lapack_complex_double* x12,
+ lapack_int ldx12, lapack_complex_double* x21,
+ lapack_int ldx21, lapack_complex_double* x22,
+ lapack_int ldx22, double* theta,
+ lapack_complex_double* u1, lapack_int ldu1,
+ lapack_complex_double* u2, lapack_int ldu2,
+ lapack_complex_double* v1t, lapack_int ldv1t,
+ lapack_complex_double* v2t, lapack_int ldv2t,
+ lapack_complex_double* work, lapack_int lwork,
+ double* rwork, lapack_int lrwork,
+ lapack_int* iwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p,
+ &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, &ldx22,
+ theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, &ldv2t,
+ work, &lwork, rwork, &lrwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
+ lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
+ lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
+ lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
+ lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
+ lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
+ lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
+ lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
+ lapack_int ldu1_t = MAX(1,nrows_u1);
+ lapack_int ldu2_t = MAX(1,nrows_u2);
+ lapack_int ldv1t_t = MAX(1,nrows_v1t);
+ lapack_int ldv2t_t = MAX(1,nrows_v2t);
+ lapack_int ldx11_t = MAX(1,nrows_x11);
+ lapack_int ldx12_t = MAX(1,nrows_x12);
+ lapack_int ldx21_t = MAX(1,nrows_x21);
+ lapack_int ldx22_t = MAX(1,nrows_x22);
+ lapack_complex_double* x11_t = NULL;
+ lapack_complex_double* x12_t = NULL;
+ lapack_complex_double* x21_t = NULL;
+ lapack_complex_double* x22_t = NULL;
+ lapack_complex_double* u1_t = NULL;
+ lapack_complex_double* u2_t = NULL;
+ lapack_complex_double* v1t_t = NULL;
+ lapack_complex_double* v2t_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldu1 < p ) {
+ info = -21;
+ LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
+ return info;
+ }
+ if( ldu2 < m-p ) {
+ info = -23;
+ LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
+ return info;
+ }
+ if( ldv1t < q ) {
+ info = -25;
+ LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
+ return info;
+ }
+ if( ldv2t < m-q ) {
+ info = -27;
+ LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
+ return info;
+ }
+ if( ldx11 < q ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
+ return info;
+ }
+ if( ldx12 < m-q ) {
+ info = -14;
+ LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
+ return info;
+ }
+ if( ldx21 < q ) {
+ info = -16;
+ LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
+ return info;
+ }
+ if( ldx22 < m-q ) {
+ info = -18;
+ LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lrwork == -1 || lwork == -1 ) {
+ LAPACK_zuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m,
+ &p, &q, x11, &ldx11_t, x12, &ldx12_t, x21, &ldx21_t,
+ x22, &ldx22_t, theta, u1, &ldu1_t, u2, &ldu2_t, v1t,
+ &ldv1t_t, v2t, &ldv2t_t, work, &lwork, rwork,
+ &lrwork, iwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ x11_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx11_t * MAX(1,q) );
+ if( x11_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ x12_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx12_t * MAX(1,m-q) );
+ if( x12_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ x21_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx21_t * MAX(1,q) );
+ if( x21_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_2;
+ }
+ x22_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldx22_t * MAX(1,m-q) );
+ if( x22_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_3;
+ }
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ u1_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldu1_t * MAX(1,p) );
+ if( u1_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_4;
+ }
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ u2_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldu2_t * MAX(1,m-p) );
+ if( u2_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_5;
+ }
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ v1t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldv1t_t * MAX(1,q) );
+ if( v1t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_6;
+ }
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ v2t_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldv2t_t * MAX(1,m-q) );
+ if( v2t_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_7;
+ }
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t,
+ ldx11_t );
+ LAPACKE_zge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t,
+ ldx12_t );
+ LAPACKE_zge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t,
+ ldx21_t );
+ LAPACKE_zge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t,
+ ldx22_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p,
+ &q, x11_t, &ldx11_t, x12_t, &ldx12_t, x21_t, &ldx21_t,
+ x22_t, &ldx22_t, theta, u1_t, &ldu1_t, u2_t, &ldu2_t,
+ v1t_t, &ldv1t_t, v2t_t, &ldv2t_t, work, &lwork, rwork,
+ &lrwork, iwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11,
+ ldx11 );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t,
+ x12, ldx12 );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21,
+ ldx21 );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t,
+ x22, ldx22 );
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1,
+ ldu1 );
+ }
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t,
+ u2, ldu2 );
+ }
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t,
+ v1t, ldv1t );
+ }
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t,
+ v2t, ldv2t );
+ }
+ /* Release memory and exit */
+ if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+ LAPACKE_free( v2t_t );
+ }
+exit_level_7:
+ if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+ LAPACKE_free( v1t_t );
+ }
+exit_level_6:
+ if( LAPACKE_lsame( jobu2, 'y' ) ) {
+ LAPACKE_free( u2_t );
+ }
+exit_level_5:
+ if( LAPACKE_lsame( jobu1, 'y' ) ) {
+ LAPACKE_free( u1_t );
+ }
+exit_level_4:
+ LAPACKE_free( x22_t );
+exit_level_3:
+ LAPACKE_free( x21_t );
+exit_level_2:
+ LAPACKE_free( x12_t );
+exit_level_1:
+ LAPACKE_free( x11_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zungbr.c b/LAPACKE/src/lapacke_zungbr.c
new file mode 100644
index 00000000..52696680
--- /dev/null
+++ b/LAPACKE/src/lapacke_zungbr.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zungbr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zungbr( int matrix_layout, char vect, lapack_int m,
+ lapack_int n, lapack_int k, lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zungbr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -6;
+ }
+ if( LAPACKE_z_nancheck( MIN(m,k), tau, 1 ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zungbr_work( matrix_layout, vect, m, n, k, a, lda, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zungbr_work( matrix_layout, vect, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zungbr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zungbr_work.c b/LAPACKE/src/lapacke_zungbr_work.c
new file mode 100644
index 00000000..c605786a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zungbr_work.c
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zungbr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zungbr_work( int matrix_layout, char vect, lapack_int m,
+ lapack_int n, lapack_int k,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zungbr( &vect, &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zungbr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zungbr( &vect, &m, &n, &k, a, &lda_t, tau, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zungbr( &vect, &m, &n, &k, a_t, &lda_t, tau, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zungbr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zungbr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunghr.c b/LAPACKE/src/lapacke_zunghr.c
new file mode 100644
index 00000000..916128f1
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunghr.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunghr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunghr( int matrix_layout, lapack_int n, lapack_int ilo,
+ lapack_int ihi, lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zunghr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_z_nancheck( n-1, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zunghr_work( matrix_layout, n, ilo, ihi, a, lda, tau,
+ &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zunghr_work( matrix_layout, n, ilo, ihi, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunghr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunghr_work.c b/LAPACKE/src/lapacke_zunghr_work.c
new file mode 100644
index 00000000..cc64293b
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunghr_work.c
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunghr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunghr_work( int matrix_layout, lapack_int n, lapack_int ilo,
+ lapack_int ihi, lapack_complex_double* a,
+ lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunghr( &n, &ilo, &ihi, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zunghr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zunghr( &n, &ilo, &ihi, a, &lda_t, tau, work, &lwork,
+ &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunghr( &n, &ilo, &ihi, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunghr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zunghr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunglq.c b/LAPACKE/src/lapacke_zunglq.c
new file mode 100644
index 00000000..98dfbda9
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunglq.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunglq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunglq( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zunglq", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zunglq_work( matrix_layout, m, n, k, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zunglq_work( matrix_layout, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunglq", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunglq_work.c b/LAPACKE/src/lapacke_zunglq_work.c
new file mode 100644
index 00000000..9ba98b82
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunglq_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunglq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunglq_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, lapack_complex_double* a,
+ lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunglq( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zunglq_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zunglq( &m, &n, &k, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunglq( &m, &n, &k, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunglq_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zunglq_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zungql.c b/LAPACKE/src/lapacke_zungql.c
new file mode 100644
index 00000000..9f9ff885
--- /dev/null
+++ b/LAPACKE/src/lapacke_zungql.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zungql
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zungql( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zungql", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zungql_work( matrix_layout, m, n, k, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zungql_work( matrix_layout, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zungql", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zungql_work.c b/LAPACKE/src/lapacke_zungql_work.c
new file mode 100644
index 00000000..b4b967a6
--- /dev/null
+++ b/LAPACKE/src/lapacke_zungql_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zungql
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zungql_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, lapack_complex_double* a,
+ lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zungql( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zungql_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zungql( &m, &n, &k, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zungql( &m, &n, &k, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zungql_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zungql_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zungqr.c b/LAPACKE/src/lapacke_zungqr.c
new file mode 100644
index 00000000..53da5c13
--- /dev/null
+++ b/LAPACKE/src/lapacke_zungqr.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zungqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zungqr( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zungqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zungqr_work( matrix_layout, m, n, k, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zungqr_work( matrix_layout, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zungqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zungqr_work.c b/LAPACKE/src/lapacke_zungqr_work.c
new file mode 100644
index 00000000..507e4cbe
--- /dev/null
+++ b/LAPACKE/src/lapacke_zungqr_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zungqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zungqr_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, lapack_complex_double* a,
+ lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zungqr( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zungqr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zungqr( &m, &n, &k, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zungqr( &m, &n, &k, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zungqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zungqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zungrq.c b/LAPACKE/src/lapacke_zungrq.c
new file mode 100644
index 00000000..f5417481
--- /dev/null
+++ b/LAPACKE/src/lapacke_zungrq.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zungrq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zungrq( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zungrq", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+ return -7;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zungrq_work( matrix_layout, m, n, k, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zungrq_work( matrix_layout, m, n, k, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zungrq", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zungrq_work.c b/LAPACKE/src/lapacke_zungrq_work.c
new file mode 100644
index 00000000..6a9ee670
--- /dev/null
+++ b/LAPACKE/src/lapacke_zungrq_work.c
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zungrq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zungrq_work( int matrix_layout, lapack_int m, lapack_int n,
+ lapack_int k, lapack_complex_double* a,
+ lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zungrq( &m, &n, &k, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zungrq_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zungrq( &m, &n, &k, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zungrq( &m, &n, &k, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zungrq_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zungrq_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zungtr.c b/LAPACKE/src/lapacke_zungtr.c
new file mode 100644
index 00000000..a7dd855d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zungtr.c
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zungtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zungtr( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* tau )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zungtr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ return -4;
+ }
+ if( LAPACKE_z_nancheck( n-1, tau, 1 ) ) {
+ return -6;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zungtr_work( matrix_layout, uplo, n, a, lda, tau, &work_query,
+ lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zungtr_work( matrix_layout, uplo, n, a, lda, tau, work,
+ lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zungtr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zungtr_work.c b/LAPACKE/src/lapacke_zungtr_work.c
new file mode 100644
index 00000000..2f1fd2dc
--- /dev/null
+++ b/LAPACKE/src/lapacke_zungtr_work.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zungtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zungtr_work( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zungtr( &uplo, &n, a, &lda, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -5;
+ LAPACKE_xerbla( "LAPACKE_zungtr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zungtr( &uplo, &n, a, &lda_t, tau, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zungtr( &uplo, &n, a_t, &lda_t, tau, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
+ /* Release memory and exit */
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zungtr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zungtr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunmbr.c b/LAPACKE/src/lapacke_zunmbr.c
new file mode 100644
index 00000000..e0d902a2
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunmbr.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunmbr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunmbr( int matrix_layout, char vect, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ lapack_int nq, r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmbr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ nq = LAPACKE_lsame( side, 'l' ) ? m : n;
+ r = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k);
+ if( LAPACKE_zge_nancheck( matrix_layout, r, MIN(nq,k), a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -11;
+ }
+ if( LAPACKE_z_nancheck( MIN(nq,k), tau, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zunmbr_work( matrix_layout, vect, side, trans, m, n, k, a,
+ lda, tau, c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zunmbr_work( matrix_layout, vect, side, trans, m, n, k, a,
+ lda, tau, c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmbr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunmbr_work.c b/LAPACKE/src/lapacke_zunmbr_work.c
new file mode 100644
index 00000000..b04686f9
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunmbr_work.c
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunmbr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunmbr_work( int matrix_layout, char vect, char side,
+ char trans, lapack_int m, lapack_int n,
+ lapack_int k, const lapack_complex_double* a,
+ lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunmbr( &vect, &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int nq = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lapack_int r = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k);
+ lapack_int lda_t = MAX(1,r);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < MIN(nq,k) ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zunmbr_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zunmbr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zunmbr( &vect, &side, &trans, &m, &n, &k, a, &lda_t, tau, c,
+ &ldc_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ lda_t * MAX(1,MIN(nq,k)) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, r, MIN(nq,k), a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunmbr( &vect, &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t,
+ &ldc_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmbr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zunmbr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunmhr.c b/LAPACKE/src/lapacke_zunmhr.c
new file mode 100644
index 00000000..a3f647aa
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunmhr.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunmhr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunmhr( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int ilo,
+ lapack_int ihi, const lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmhr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_zge_nancheck( matrix_layout, r, r, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -11;
+ }
+ if( LAPACKE_z_nancheck( m-1, tau, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zunmhr_work( matrix_layout, side, trans, m, n, ilo, ihi, a,
+ lda, tau, c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zunmhr_work( matrix_layout, side, trans, m, n, ilo, ihi, a,
+ lda, tau, c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmhr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunmhr_work.c b/LAPACKE/src/lapacke_zunmhr_work.c
new file mode 100644
index 00000000..5411c4d2
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunmhr_work.c
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunmhr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunmhr_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int ilo,
+ lapack_int ihi, const lapack_complex_double* a,
+ lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunmhr( &side, &trans, &m, &n, &ilo, &ihi, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lapack_int lda_t = MAX(1,r);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < r ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zunmhr_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zunmhr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zunmhr( &side, &trans, &m, &n, &ilo, &ihi, a, &lda_t, tau, c,
+ &ldc_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,r) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, r, r, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunmhr( &side, &trans, &m, &n, &ilo, &ihi, a_t, &lda_t, tau, c_t,
+ &ldc_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmhr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zunmhr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunmlq.c b/LAPACKE/src/lapacke_zunmlq.c
new file mode 100644
index 00000000..1bbb1687
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunmlq.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunmlq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunmlq( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmlq", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zunmlq_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zunmlq_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmlq", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunmlq_work.c b/LAPACKE/src/lapacke_zunmlq_work.c
new file mode 100644
index 00000000..7390ca99
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunmlq_work.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunmlq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunmlq_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunmlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,k);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zunmlq_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zunmlq_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zunmlq( &side, &trans, &m, &n, &k, a, &lda_t, tau, c, &ldc_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunmlq( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmlq_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zunmlq_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunmql.c b/LAPACKE/src/lapacke_zunmql.c
new file mode 100644
index 00000000..927a17ca
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunmql.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunmql
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunmql( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_int r;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmql", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_zge_nancheck( matrix_layout, r, k, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zunmql_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zunmql_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmql", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunmql_work.c b/LAPACKE/src/lapacke_zunmql_work.c
new file mode 100644
index 00000000..0c370ec3
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunmql_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunmql
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunmql_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunmql( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lapack_int lda_t = MAX(1,r);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < k ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zunmql_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zunmql_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zunmql( &side, &trans, &m, &n, &k, a, &lda_t, tau, c, &ldc_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,k) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, r, k, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunmql( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmql_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zunmql_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunmqr.c b/LAPACKE/src/lapacke_zunmqr.c
new file mode 100644
index 00000000..acf64d2e
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunmqr.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunmqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunmqr( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmqr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_zge_nancheck( matrix_layout, r, k, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zunmqr_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zunmqr_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmqr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunmqr_work.c b/LAPACKE/src/lapacke_zunmqr_work.c
new file mode 100644
index 00000000..6efb2d05
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunmqr_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunmqr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunmqr_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunmqr( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lapack_int lda_t = MAX(1,r);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < k ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zunmqr_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zunmqr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zunmqr( &side, &trans, &m, &n, &k, a, &lda_t, tau, c, &ldc_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,k) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, r, k, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunmqr( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmqr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zunmqr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunmrq.c b/LAPACKE/src/lapacke_zunmrq.c
new file mode 100644
index 00000000..e011a13b
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunmrq.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunmrq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunmrq( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmrq", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zunmrq_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zunmrq_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
+ c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmrq", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunmrq_work.c b/LAPACKE/src/lapacke_zunmrq_work.c
new file mode 100644
index 00000000..ff6a944a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunmrq_work.c
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunmrq
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunmrq_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunmrq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,k);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zunmrq_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zunmrq_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zunmrq( &side, &trans, &m, &n, &k, a, &lda_t, tau, c, &ldc_t,
+ work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunmrq( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmrq_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zunmrq_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunmrz.c b/LAPACKE/src/lapacke_zunmrz.c
new file mode 100644
index 00000000..61954e82
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunmrz.c
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunmrz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunmrz( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int l, const lapack_complex_double* a,
+ lapack_int lda, const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmrz", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ return -8;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -11;
+ }
+ if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+ return -10;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zunmrz_work( matrix_layout, side, trans, m, n, k, l, a, lda,
+ tau, c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zunmrz_work( matrix_layout, side, trans, m, n, k, l, a, lda,
+ tau, c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmrz", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunmrz_work.c b/LAPACKE/src/lapacke_zunmrz_work.c
new file mode 100644
index 00000000..9962f2dd
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunmrz_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunmrz
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunmrz_work( int matrix_layout, char side, char trans,
+ lapack_int m, lapack_int n, lapack_int k,
+ lapack_int l, const lapack_complex_double* a,
+ lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunmrz( &side, &trans, &m, &n, &k, &l, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,k);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < m ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zunmrz_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -12;
+ LAPACKE_xerbla( "LAPACKE_zunmrz_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zunmrz( &side, &trans, &m, &n, &k, &l, a, &lda_t, tau, c,
+ &ldc_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,m) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunmrz( &side, &trans, &m, &n, &k, &l, a_t, &lda_t, tau, c_t,
+ &ldc_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmrz_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zunmrz_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunmtr.c b/LAPACKE/src/lapacke_zunmtr.c
new file mode 100644
index 00000000..0b10f38f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunmtr.c
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunmtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunmtr( int matrix_layout, char side, char uplo, char trans,
+ lapack_int m, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ lapack_int lwork = -1;
+ lapack_complex_double* work = NULL;
+ lapack_complex_double work_query;
+ lapack_int r;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmtr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_zge_nancheck( matrix_layout, r, r, a, lda ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -10;
+ }
+ if( LAPACKE_z_nancheck( m-1, tau, 1 ) ) {
+ return -9;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zunmtr_work( matrix_layout, side, uplo, trans, m, n, a, lda,
+ tau, c, ldc, &work_query, lwork );
+ if( info != 0 ) {
+ goto exit_level_0;
+ }
+ lwork = LAPACK_Z2INT( work_query );
+ /* Allocate memory for work arrays */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zunmtr_work( matrix_layout, side, uplo, trans, m, n, a, lda,
+ tau, c, ldc, work, lwork );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmtr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zunmtr_work.c b/LAPACKE/src/lapacke_zunmtr_work.c
new file mode 100644
index 00000000..65178652
--- /dev/null
+++ b/LAPACKE/src/lapacke_zunmtr_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zunmtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zunmtr_work( int matrix_layout, char side, char uplo,
+ char trans, lapack_int m, lapack_int n,
+ const lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunmtr( &side, &uplo, &trans, &m, &n, a, &lda, tau, c, &ldc,
+ work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lapack_int lda_t = MAX(1,r);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* c_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < r ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zunmtr_work", info );
+ return info;
+ }
+ if( ldc < n ) {
+ info = -11;
+ LAPACKE_xerbla( "LAPACKE_zunmtr_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zunmtr( &side, &uplo, &trans, &m, &n, a, &lda_t, tau, c,
+ &ldc_t, work, &lwork, &info );
+ return (info < 0) ? (info - 1) : info;
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,r) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ c_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, r, r, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunmtr( &side, &uplo, &trans, &m, &n, a_t, &lda_t, tau, c_t,
+ &ldc_t, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( c_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zunmtr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zunmtr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zupgtr.c b/LAPACKE/src/lapacke_zupgtr.c
new file mode 100644
index 00000000..3d8684a1
--- /dev/null
+++ b/LAPACKE/src/lapacke_zupgtr.c
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zupgtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zupgtr( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* ap,
+ const lapack_complex_double* tau,
+ lapack_complex_double* q, lapack_int ldq )
+{
+ lapack_int info = 0;
+ lapack_complex_double* work = NULL;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zupgtr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zpp_nancheck( n, ap ) ) {
+ return -4;
+ }
+ if( LAPACKE_z_nancheck( n-1, tau, 1 ) ) {
+ return -5;
+ }
+#endif
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,n-1) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zupgtr_work( matrix_layout, uplo, n, ap, tau, q, ldq, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zupgtr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zupgtr_work.c b/LAPACKE/src/lapacke_zupgtr_work.c
new file mode 100644
index 00000000..8f7e799a
--- /dev/null
+++ b/LAPACKE/src/lapacke_zupgtr_work.c
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zupgtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zupgtr_work( int matrix_layout, char uplo, lapack_int n,
+ const lapack_complex_double* ap,
+ const lapack_complex_double* tau,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zupgtr( &uplo, &n, ap, tau, q, &ldq, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int ldq_t = MAX(1,n);
+ lapack_complex_double* q_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldq < n ) {
+ info = -7;
+ LAPACKE_xerbla( "LAPACKE_zupgtr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ q_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldq_t * MAX(1,n) );
+ if( q_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,n) * MAX(2,n+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zpp_trans( matrix_layout, uplo, n, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zupgtr( &uplo, &n, ap_t, tau, q_t, &ldq_t, work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( q_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zupgtr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zupgtr_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zupmtr.c b/LAPACKE/src/lapacke_zupmtr.c
new file mode 100644
index 00000000..a6361714
--- /dev/null
+++ b/LAPACKE/src/lapacke_zupmtr.c
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zupmtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zupmtr( int matrix_layout, char side, char uplo, char trans,
+ lapack_int m, lapack_int n,
+ const lapack_complex_double* ap,
+ const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc )
+{
+ lapack_int info = 0;
+ /* Additional scalars declarations for work arrays */
+ lapack_int lwork;
+ lapack_complex_double* work = NULL;
+ lapack_int r ;
+ if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+ LAPACKE_xerbla( "LAPACKE_zupmtr", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ if( LAPACKE_zpp_nancheck( r, ap ) ) {
+ return -7;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+ return -9;
+ }
+ if( LAPACKE_z_nancheck( m-1, tau, 1 ) ) {
+ return -8;
+ }
+#endif
+ /* Additional scalars initializations for work arrays */
+ if( LAPACKE_lsame( side, 'l' ) ) {
+ lwork = MAX(1,n);
+ } else if( LAPACKE_lsame( side, 'r' ) ) {
+ lwork = MAX(1,m);
+ } else {
+ lwork = 1; /* Any value */
+ }
+ /* Allocate memory for working array(s) */
+ work = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Call middle-level interface */
+ info = LAPACKE_zupmtr_work( matrix_layout, side, uplo, trans, m, n, ap, tau,
+ c, ldc, work );
+ /* Release memory and exit */
+ LAPACKE_free( work );
+exit_level_0:
+ if( info == LAPACK_WORK_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zupmtr", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zupmtr_work.c b/LAPACKE/src/lapacke_zupmtr_work.c
new file mode 100644
index 00000000..e13336b7
--- /dev/null
+++ b/LAPACKE/src/lapacke_zupmtr_work.c
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ Copyright (c) 2014, Intel Corp.
+ 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 zupmtr
+* Author: Intel Corporation
+* Generated November, 2011
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zupmtr_work( int matrix_layout, char side, char uplo,
+ char trans, lapack_int m, lapack_int n,
+ const lapack_complex_double* ap,
+ const lapack_complex_double* tau,
+ lapack_complex_double* c, lapack_int ldc,
+ lapack_complex_double* work )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zupmtr( &side, &uplo, &trans, &m, &n, ap, tau, c, &ldc, work,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_double* c_t = NULL;
+ lapack_complex_double* ap_t = NULL;
+ /* Check leading dimension(s) */
+ if( ldc < n ) {
+ info = -10;
+ LAPACKE_xerbla( "LAPACKE_zupmtr_work", info );
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+ c_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * ldc_t * MAX(1,n) );
+ if( c_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ ap_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ( MAX(1,r) * MAX(2,r+1) ) / 2 );
+ if( ap_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
+ LAPACKE_zpp_trans( matrix_layout, uplo, r, ap, ap_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zupmtr( &side, &uplo, &trans, &m, &n, ap_t, tau, c_t, &ldc_t,
+ work, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
+ /* Release memory and exit */
+ LAPACKE_free( ap_t );
+exit_level_1:
+ LAPACKE_free( c_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zupmtr_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zupmtr_work", info );
+ }
+ return info;
+}