[Ahub] Fix Ahub issue
authorSeoHyungjun <hyungjun.seo@samsung.com>
Wed, 23 Aug 2023 11:57:49 +0000 (20:57 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Wed, 20 Sep 2023 06:47:40 +0000 (15:47 +0900)
The condition of the while statement has been modified to solve
'Dereferencingiterator lhs_iter thought it is already past the end
of its container'. In fact, in the above if conditional, it only
works when the size of the two containers is the same, so there is
no problem using '||'. However, it has been edited for clarity.

Signed-off-by: SeoHyungjun <hyungjun.seo@samsung.com>
test/unittest/compiler/compiler_test_util.cpp

index 23c5233..e220b09 100644 (file)
@@ -41,7 +41,7 @@ void graphEqual(const nntrainer::GraphRepresentation &lhs,
   if (lhs.size() == rhs.size()) {
     auto lhs_iter = lhs.cbegin();
     auto rhs_iter = rhs.cbegin();
-    while(lhs_iter != lhs.cend() || rhs_iter != rhs.cend()) {
+    while(lhs_iter != lhs.cend() && rhs_iter != rhs.cend()) {
       auto lhs = *lhs_iter;
       auto rhs = *rhs_iter;
       is_node_equal(*lhs.get(), *rhs.get());