Hey,

 > Also, I'm not sure of the 'correct' way to construct a unary type
> node. For instance, if you try and print a unary type node with only lhs
> set (as would make sense), then you get into an infinite loop, because
> the operator<< and print_node functions in scheduler/io.hpp assume
> you've got a binary node, and the default construction of an
> lhs_rhs_element (because of how enums work) produces a COMPOSITE
> element, with node_index of 0 (which just points the recursive printer
> back to the start of the expression!).

For the evaluation the rhs() doesn't matter, but for printing there's no 
separate check. Thus, always set both LHS and RHS even if it's an unary 
expression.


> Fortunately, that's not really a problem in PyViennaCL, because I just
> set both lhs and rhs the same (even though that seems silly), and I
> don't do any node / statement printing..

I'll alter the code such that printing works without setting the RHS of 
an unary node.

Best regards,
Karli

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
ViennaCL-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/viennacl-devel

Reply via email to