Skip to content

Commit 9a5a741

Browse files
committed
Fix warnings
1 parent b63aad4 commit 9a5a741

File tree

2 files changed

+12
-21
lines changed

2 files changed

+12
-21
lines changed

source/module_base/blas_connector.cpp

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,17 @@ float BlasConnector::dot( const int n, const float *X, const int incX, const flo
6969
{
7070
if (device_type == base_device::AbacusDevice_t::CpuDevice) {
7171
return sdot_(&n, X, &incX, Y, &incY);
72+
}
7273
return sdot_(&n, X, &incX, Y, &incY);
7374
}
74-
}
7575

7676
double BlasConnector::dot( const int n, const double *X, const int incX, const double *Y, const int incY, base_device::AbacusDevice_t device_type)
7777
{
7878
if (device_type == base_device::AbacusDevice_t::CpuDevice) {
7979
return ddot_(&n, X, &incX, Y, &incY);
80+
}
8081
return ddot_(&n, X, &incX, Y, &incY);
8182
}
82-
}
8383

8484
// C = a * A.? * B.? + b * C
8585
void BlasConnector::gemm(const char transa, const char transb, const int m, const int n, const int k,
@@ -93,7 +93,7 @@ void BlasConnector::gemm(const char transa, const char transb, const int m, cons
9393
}
9494
#ifdef __DSP
9595
else if (device_type == base_device::AbacusDevice_t::DspDevice){
96-
sgemm_mth_(&transb, &transa, &n, &m, &k,
96+
sgemm_mt_(&transb, &transa, &n, &m, &k,
9797
&alpha, b, &ldb, a, &lda,
9898
&beta, c, &ldc, GlobalV::MY_RANK);
9999
}
@@ -111,7 +111,7 @@ void BlasConnector::gemm(const char transa, const char transb, const int m, cons
111111
}
112112
#ifdef __DSP
113113
else if (device_type == base_device::AbacusDevice_t::DspDevice){
114-
dgemm_mth_(&transb, &transa, &n, &m, &k,
114+
dgemm_mt_(&transb, &transa, &n, &m, &k,
115115
&alpha, b, &ldb, a, &lda,
116116
&beta, c, &ldc, GlobalV::MY_RANK);
117117
}
@@ -129,7 +129,7 @@ void BlasConnector::gemm(const char transa, const char transb, const int m, cons
129129
}
130130
#ifdef __DSP
131131
else if (device_type == base_device::AbacusDevice_t::DspDevice) {
132-
cgemm_mth_(&transb, &transa, &n, &m, &k,
132+
cgemm_mt_(&transb, &transa, &n, &m, &k,
133133
&alpha, b, &ldb, a, &lda,
134134
&beta, c, &ldc, GlobalV::MY_RANK);
135135
}
@@ -147,22 +147,13 @@ void BlasConnector::gemm(const char transa, const char transb, const int m, cons
147147
}
148148
#ifdef __DSP
149149
else if (device_type == base_device::AbacusDevice_t::DspDevice) {
150-
zgemm_mth_(&transb, &transa, &n, &m, &k,
150+
zgemm_mt_(&transb, &transa, &n, &m, &k,
151151
&alpha, b, &ldb, a, &lda,
152152
&beta, c, &ldc, GlobalV::MY_RANK);
153153
}
154154
#endif
155155
}
156156

157-
void BlasConnector::gemv(const char trans, const int m, const int n,
158-
const float alpha, const float* A, const int lda, const float* X, const int incx,
159-
const float beta, float* Y, const int incy, base_device::AbacusDevice_t device_type)
160-
{
161-
if (device_type == base_device::AbacusDevice_t::CpuDevice) {
162-
sgemv_(&trans, &m, &n, &alpha, A, &lda, X, &incx, &beta, Y, &incy);
163-
}
164-
}
165-
166157
void BlasConnector::gemv(const char trans, const int m, const int n,
167158
const double alpha, const double* A, const int lda, const double* X, const int incx,
168159
const double beta, double* Y, const int incy, base_device::AbacusDevice_t device_type)
@@ -196,39 +187,39 @@ float BlasConnector::nrm2( const int n, const float *X, const int incX, base_dev
196187
{
197188
if (device_type == base_device::AbacusDevice_t::CpuDevice) {
198189
return snrm2_( &n, X, &incX );
190+
}
199191
return snrm2_( &n, X, &incX );
200192
}
201-
}
202193

203194

204195
double BlasConnector::nrm2( const int n, const double *X, const int incX, base_device::AbacusDevice_t device_type )
205196
{
206197
if (device_type == base_device::AbacusDevice_t::CpuDevice) {
207198
return dnrm2_( &n, X, &incX );
199+
}
208200
return dnrm2_( &n, X, &incX );
209201
}
210-
}
211202

212203

213204
double BlasConnector::nrm2( const int n, const std::complex<double> *X, const int incX, base_device::AbacusDevice_t device_type )
214205
{
215206
if (device_type == base_device::AbacusDevice_t::CpuDevice) {
216207
return dznrm2_( &n, X, &incX );
208+
}
217209
return dznrm2_( &n, X, &incX );
218210
}
219-
}
220211

221212
// copies a into b
222213
void BlasConnector::copy(const long n, const double *a, const int incx, double *b, const int incy, base_device::AbacusDevice_t device_type)
223214
{
224215
if (device_type == base_device::AbacusDevice_t::CpuDevice) {
225216
dcopy_(&n, a, &incx, b, &incy);
226-
}
217+
}
227218
}
228219

229220
void BlasConnector::copy(const long n, const std::complex<double> *a, const int incx, std::complex<double> *b, const int incy, base_device::AbacusDevice_t device_type)
230221
{
231222
if (device_type == base_device::AbacusDevice_t::CpuDevice) {
232223
zcopy_(&n, a, &incx, b, &incy);
233-
}
224+
}
234225
}

source/module_hsolver/kernels/cuda/math_kernel_op.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace hsolver
1313
{
1414
const int warp_size = 32;
15-
const unsigned int full_mask = 0xffffffff;
15+
//const unsigned int full_mask = 0xffffffff;
1616
const int thread_per_block = 256;
1717
}
1818

0 commit comments

Comments
 (0)