Baunsgaard commented on pull request #1234:
URL: https://github.com/apache/systemds/pull/1234#issuecomment-826721786


   Looking through your comments, it seems like you insist on the "universal " 
Operation node approach.
   This is something that i would like not to happen, because this means for 
every operation called we would need to differentiate between "am i single 
return?", "am i multi return?", "am i a matrix?", "am i a frame?".
   Currently we have the luxury that there is only Matrices and scalars, but we 
already have a PR for Frames that become a subclass to Operation Node, And in 
the future we might add more datatype, or abstractions needed.
   
   Therefore the perfect design in my book for this multi return support is:
   
   - Make a class that is can contain multiple different Operation Nodes(that 
each correspond to a single output).
   - This new class should implement the type DAGNode.
   
   One of the reasons why this is important to separate, is because many 
operations supported directly on a OperationNode is not valid on a "MultiNode", 
like for instance min.
   Rather than having to introduce an if else inside the min function (if we 
chose the universal approach) trowing an invalid exception, i would prefer not 
having that if else.
   
   Again comments and discussions are welcome if you disagree
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to