Skip to content

Commit fc2b25d

Browse files
committed
fixing logBarWeighted in RAJA vector
1 parent ecb7554 commit fc2b25d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/LinAlg/hiopVectorRajaImpl.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,9 @@ double hiopVectorRaja<MEM, POL>::logBarrierWeighted_local(const hiopVector& sele
14061406
#ifdef HIOP_DEEPCHECKS
14071407
assert(id[i] == one || id[i] == zero);
14081408
#endif
1409-
sum += id[i]*w[i]*std::log(data[i]);
1409+
if(one == id[i]) {
1410+
sum += w[i]*std::log(data[i]);
1411+
}
14101412
});
14111413

14121414
return sum.get();

0 commit comments

Comments
 (0)