Skip to content

Commit f86749c

Browse files
authored
Resolve Arguments in wrong order issue reported by Coverity tool (#1513)
* Resolved issue reported by Coverity tool * Renamed local variables and updated comments
1 parent dd7a6ea commit f86749c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

dpnp/backend/kernels/dpnp_krnl_common.cpp

+7-6
Original file line numberDiff line numberDiff line change
@@ -851,17 +851,18 @@ DPCTLSyclEventRef dpnp_matmul_c(DPCTLSyclQueueRef q_ref,
851851
std::is_same<_DataType, float>::value)
852852
{
853853
// using std::max for these ldx variables is required by math library
854-
const std::int64_t lda =
855-
std::max<size_t>(1UL, size_k); // First dimensions of array_1
856-
const std::int64_t ldb =
854+
const std::int64_t ld_array_2 =
857855
std::max<size_t>(1UL, size_n); // First dimensions of array_2
858-
const std::int64_t ldc =
856+
const std::int64_t ld_array_1 =
857+
std::max<size_t>(1UL, size_k); // First dimensions of array_1
858+
const std::int64_t ld_result =
859859
std::max<size_t>(1UL, size_n); // Fast dimensions of result
860860

861861
event = mkl_blas::gemm(q, oneapi::mkl::transpose::nontrans,
862862
oneapi::mkl::transpose::nontrans, size_n, size_m,
863-
size_k, _DataType(1), array_2, ldb, array_1, lda,
864-
_DataType(0), result, ldc, dep_events);
863+
size_k, _DataType(1), array_2, ld_array_2,
864+
array_1, ld_array_1, _DataType(0), result,
865+
ld_result, dep_events);
865866
}
866867
else {
867868
// input1: M x K

0 commit comments

Comments
 (0)