00001 #include "cblas.h"
00002 #include <complex.h>
00003
00004
00005
00006
00007 float cblas_sasum(const int N, const float *X, const int incX)
00008 {
00009 return sasum_(&N, X, &incX);
00010 }
00011 double cblas_dasum(const int N, const double *X, const int incX)
00012 {
00013 return dasum_(&N, X, &incX);
00014 }
00015
00016 float cblas_scasum(const int N, const _Complex float *X, const int incX)
00017 {
00018 return scasum_(&N, X, &incX);
00019 }
00020 double cblas_dzasum(const int N, const _Complex double *X, const int incX)
00021 {
00022 return dzasum_(&N, X, &incX);
00023 }
00024
00025
00026 void cblas_saxpy(const int N, const float alpha, const float *X, const int incX, float *Y, const int incY)
00027 {
00028 saxpy_(&N, &alpha, X, &incX, Y, &incY);
00029 }
00030 void cblas_daxpy(const int N, const double alpha, const double *X, const int incX, double *Y, const int incY)
00031 {
00032 daxpy_(&N, &alpha, X, &incX, Y, &incY);
00033 }
00034 void cblas_caxpy(const int N, const _Complex float alpha, const _Complex float *X, const int incX, _Complex float *Y, const int incY)
00035 {
00036 caxpy_(&N, &alpha, X, &incX, Y, &incY);
00037 }
00038 void cblas_zaxpy(const int N, const _Complex double alpha, const _Complex double *X, const int incX, _Complex double *Y, const int incY)
00039 {
00040 zaxpy_(&N, &alpha, X, &incX, Y, &incY);
00041 }
00042
00043
00044 void cblas_scopy(const int N, const float *X, const int incX, float *Y, const int incY)
00045 {
00046 scopy_(&N, X, &incX, Y, &incY);
00047 }
00048 void cblas_dcopy(const int N, const double *X, const int incX, double *Y, const int incY)
00049 {
00050 dcopy_(&N, X, &incX, Y, &incY);
00051 }
00052 void cblas_ccopy(const int N, const _Complex float *X, const int incX, _Complex float *Y, const int incY)
00053 {
00054 ccopy_(&N, X, &incX, Y, &incY);
00055 }
00056 void cblas_zcopy(const int N, const _Complex double *X, const int incX, _Complex double *Y, const int incY)
00057 {
00058 zcopy_(&N, X, &incX, Y, &incY);
00059 }
00060
00061
00062 float cblas_sdot(const int N, const float *X, const int incX, const float *Y, const int incY)
00063 {
00064 return sdot_(&N, X, &incX, Y, &incY);
00065 }
00066 double cblas_ddot(const int N, const double *X, const int incX, const double *Y, const int incY)
00067 {
00068 return ddot_(&N, X, &incX, Y, &incY);
00069 }
00070
00071
00072 _Complex float cblas_cdotc(const int N, const _Complex float *X, const int incX, const _Complex float *Y, const int incY)
00073 {
00074 _Complex float cdotc;
00075 cdotc_(&cdotc,&N, X, &incX, Y, &incY);
00076 return cdotc;
00077 }
00078 _Complex double cblas_zdotc(const int N, const _Complex double *X, const int incX, const _Complex double *Y, const int incY)
00079 {
00080 _Complex double zdotc;
00081 zdotc_(&zdotc,&N, X, &incX, Y, &incY);
00082 return zdotc;
00083 }
00084
00085
00086
00087 _Complex float cblas_cdotu(const int N, const _Complex float *X, const int incX, const _Complex float *Y, const int incY)
00088 {
00089 _Complex float cdotu;
00090 cdotu_(&cdotu,&N, X, &incX, Y, &incY);
00091 return cdotu;
00092 }
00093 _Complex double cblas_zdotu(const int N, const _Complex double *X, const int incX, const _Complex double *Y, const int incY)
00094 {
00095 _Complex double zdotu;
00096 zdotu_(&zdotu,&N, X, &incX, Y, &incY);
00097 return zdotu;
00098 }
00099
00100
00101 float cblas_snrm2(const int N, const float *X, const int incX)
00102 {
00103 return snrm2_(&N, X, &incX);
00104 }
00105 double cblas_dnrm2(const int N, const double *X, const int incX)
00106 {
00107 return dnrm2_(&N, X, &incX);
00108
00109 }
00110 float cblas_scnrm2(const int N, const _Complex float *X, const int incX)
00111 {
00112 return scnrm2_(&N, X, &incX);
00113 }
00114 double cblas_dznrm2(const int N, const _Complex double *X, const int incX)
00115 {
00116 return dznrm2_(&N, X, &incX);
00117 }
00118
00119
00120 void cblas_srot(const int N, float *X, const int incX, float *Y, const int incY, const float c, const float s)
00121 {
00122 srot_(&N, X, &incX, Y, &incY, &c, &s);
00123 }
00124 void cblas_drot(const int N, double *X, const int incX, double *Y, const int incY, const double c, const double s)
00125 {
00126 drot_(&N, X, &incX, Y, &incY, &c, &s);
00127 }
00128
00129
00130 void cblas_srotg(float *a, float *b, float *c, float *s)
00131 {
00132 srotg_(a,b,c,s);
00133 }
00134 void cblas_drotg(double *a, double *b, double *c, double *s)
00135 {
00136 drotg_(a,b,c,s);
00137 }
00138
00139
00140 void cblas_srotm(const int N, float *X, const int incX, float *Y, const int incY, const float *P)
00141 {
00142 srotm_(&N, X, &incX, Y, &incY, P);
00143 }
00144 void cblas_drotm(const int N, double *X, const int incX, double *Y, const int incY, const double *P)
00145 {
00146 drotm_(&N, X, &incX, Y, &incY, P);
00147 }
00148
00149
00150 void cblas_srotmg(float *d1, float *d2, float *b1, const float b2, float *P)
00151 {
00152 srotmg_(d1,d2,b1,&b2,P);
00153 }
00154 void cblas_drotmg(double *d1, double *d2, double *b1, const double b2, double *P)
00155 {
00156 drotmg_(d1,d2,b1,&b2,P);
00157 }
00158
00159
00160 void cblas_sscal(const int N, const float alpha, float *X, const int incX)
00161 {
00162 sscal_(&N, &alpha, X, &incX);
00163 }
00164 void cblas_dscal(const int N, const double alpha, double *X, const int incX)
00165 {
00166 dscal_(&N, &alpha, X, &incX);
00167 }
00168 void cblas_cscal(const int N, const _Complex float alpha, _Complex float *X, const int incX)
00169 {
00170 cscal_(&N, &alpha, X, &incX);
00171 }
00172 void cblas_zscal(const int N, const _Complex double alpha, _Complex double *X, const int incX)
00173 {
00174 zscal_(&N, &alpha, X, &incX);
00175 }
00176 void cblas_csscal(const int N, const float alpha, _Complex float *X, const int incX)
00177 {
00178 csscal_(&N, &alpha, X, &incX);
00179 }
00180 void cblas_zdscal(const int N, const double alpha, _Complex double *X, const int incX)
00181 {
00182 zdscal_(&N, &alpha, X, &incX);
00183 }
00184
00185
00186 void cblas_sswap(const int N, float *X, const int incX, float *Y, const int incY)
00187 {
00188 sswap_(&N, X, &incX, Y, &incY);
00189 }
00190 void cblas_dswap(const int N, double *X, const int incX, double *Y, const int incY)
00191 {
00192 dswap_(&N, X, &incX, Y, &incY);
00193 }
00194 void cblas_cswap(const int N, _Complex float *X, const int incX, _Complex float *Y, const int incY)
00195 {
00196 cswap_(&N, X, &incX, Y, &incY);
00197 }
00198 void cblas_zswap(const int N, _Complex double *X, const int incX, _Complex double *Y, const int incY)
00199 {
00200 zswap_(&N, X, &incX, Y, &incY);
00201 }
00202
00203
00204 int cblas_isamax(const int N, const float *X, const int incX)
00205 {
00206 return isamax_(&N, X, &incX);
00207 }
00208 int cblas_idamax(const int N, const double *X, const int incX)
00209 {
00210 return idamax_(&N, X, &incX);
00211 }
00212 int cblas_icamax(const int N, const _Complex float *X, const int incX)
00213 {
00214 return icamax_(&N, X, &incX);
00215 }
00216 int cblas_izamax(const int N, const _Complex double *X, const int incX)
00217 {
00218 return izamax_(&N, X, &incX);
00219 }
00220
00221
00222 int cblas_isamin(const int N, const float *X, const int incX)
00223 {
00224 return isamin_(&N, X, &incX);
00225 }
00226 int cblas_idamin(const int N, const double *X, const int incX)
00227 {
00228 return idamin_(&N, X, &incX);
00229 }
00230 int cblas_icamin(const int N, const _Complex float *X, const int incX)
00231 {
00232 return icamin_(&N, X, &incX);
00233 }
00234 int cblas_izamin(const int N, const _Complex double *X, const int incX)
00235 {
00236 return izamin_(&N, X, &incX);
00237 }
00238