wonook commented on issue #103: [NEMO-11] Generalize Equality of Int Predicates 
for Loops
URL: https://github.com/apache/incubator-nemo/pull/103#issuecomment-414101721
 
 
   @arunlakshman 
   In my opinion, for our specific use case, it checks the equality of int 
predicates that determine the total number of iterations in a loop. In that 
case, I think it makes sense to start the range from the number 0 (we can make 
this more clear in the code).
   
   To add a bit more of an explanation, taking a look at the `LoopVertex` 
implementation, a loop vertex has a `maxNumberOfIterations` variable that 
determines the max number of how many times to repeat the iteration, and once 
it gets to a point where the predicate returns true, predicate taking in the 
`maxNumberOfIterations` variable as its parameter, it stops the loop unrolling 
process. (Loop unrolling process simply appends the iteration's sub-DAG before 
the LoopVertex, until it reaches its termination condition - maxNumber becoming 
0 or predicate returning true). Therefore, thinking only about this use case it 
actually makes sense to simply check the range between 0 and the 
`maxNumberOfIterations` variable.
   
   Currently, we trust the developer to use this function correctly, but my 
point about the issue is that we could make this process to be done without the 
developer's interference. For instance, we could maybe receive a LoopVertex 
with the method to extract the `maxNumberOfIterations` variable and use it as 
the max value of the range to check the predicates.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to