Skip to content

Resolve Arguments in wrong order issue reported by Coverity tool #1513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions dpnp/backend/kernels/dpnp_krnl_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -851,17 +851,18 @@ DPCTLSyclEventRef dpnp_matmul_c(DPCTLSyclQueueRef q_ref,
std::is_same<_DataType, float>::value)
{
// using std::max for these ldx variables is required by math library
const std::int64_t lda =
std::max<size_t>(1UL, size_k); // First dimensions of array_1
const std::int64_t ldb =
const std::int64_t ld_array_2 =
std::max<size_t>(1UL, size_n); // First dimensions of array_2
const std::int64_t ldc =
const std::int64_t ld_array_1 =
std::max<size_t>(1UL, size_k); // First dimensions of array_1
const std::int64_t ld_result =
std::max<size_t>(1UL, size_n); // Fast dimensions of result

event = mkl_blas::gemm(q, oneapi::mkl::transpose::nontrans,
oneapi::mkl::transpose::nontrans, size_n, size_m,
size_k, _DataType(1), array_2, ldb, array_1, lda,
_DataType(0), result, ldc, dep_events);
size_k, _DataType(1), array_2, ld_array_2,
array_1, ld_array_1, _DataType(0), result,
ld_result, dep_events);
}
else {
// input1: M x K
Expand Down