Skip to content

Commit

Permalink
Fix coverity scan issue CID 1546910
Browse files Browse the repository at this point in the history
  • Loading branch information
aobolensk committed Jan 3, 2025
1 parent 4ebb6ed commit 8ae6662
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/plugins/intel_cpu/src/nodes/unique.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,15 +240,17 @@ void Unique::flattenTensorExec() {

for (size_t i = 0, j = 0; i < inputLen; ++i) {
auto it = uniq.emplace(srcDataPtr[i], j);
inToOutTmpPtr[i] = it.first->second;
if (it.second) {
if (definedOutputs[FIRST_UNIQUE_IDX]) {
firstTmpPtr[j] = i;
}
++j;
} else {
if (definedOutputs[OCCURRENCES_NUM]) {
occurTmpPtr[inToOutTmpPtr[i]]++;
if (definedOutputs[INPUT_TO_UNIQ_IDX]) {
inToOutTmpPtr[i] = it.first->second;
if (it.second) {
if (definedOutputs[FIRST_UNIQUE_IDX]) {
firstTmpPtr[j] = i;
}
++j;
} else {
if (definedOutputs[OCCURRENCES_NUM]) {
occurTmpPtr[inToOutTmpPtr[i]]++;
}
}
}
}
Expand Down

0 comments on commit 8ae6662

Please sign in to comment.