use of org.apache.sysml.hops.codegen.cplan.CNode in project systemml by apache.
the class CPlanComparisonTest method testNotEqualBinaryDAG1.
@Test
public void testNotEqualBinaryDAG1() {
CNode c1 = createCNodeData(DataType.MATRIX);
CNode c2 = createCNodeData(DataType.MATRIX);
CNode c3 = createCNodeData(DataType.SCALAR);
// DAG 1a: (c1*c2)*c3
CNode b1a = new CNodeBinary(c1, c2, BinType.MULT);
CNode b2a = new CNodeBinary(b1a, c3, BinType.MULT);
// DAG 1b: (c1*c2)*c1
CNode b1b = new CNodeBinary(c1, c2, BinType.MULT);
CNode b2b = new CNodeBinary(b1b, c1, BinType.MULT);
Assert.assertNotEquals(b2a, b2b);
}
use of org.apache.sysml.hops.codegen.cplan.CNode in project systemml by apache.
the class CPlanComparisonTest method testNotEqualBinaryNodes.
@Test
public void testNotEqualBinaryNodes() {
CNode c1 = createCNodeData(DataType.MATRIX);
CNode c2 = createCNodeData(DataType.SCALAR);
Assert.assertNotEquals(new CNodeBinary(c1, c2, BinType.PLUS), new CNodeBinary(c1, c2, BinType.MULT));
}
use of org.apache.sysml.hops.codegen.cplan.CNode in project systemml by apache.
the class CPlanComparisonTest method testNotEqualBinaryTernaryNodes.
@Test
public void testNotEqualBinaryTernaryNodes() {
CNode c1 = createCNodeData(DataType.MATRIX);
CNode c2 = createCNodeData(DataType.SCALAR);
CNode c3 = createCNodeData(DataType.MATRIX);
CNode un1 = new CNodeBinary(c1, c2, BinType.EQUAL);
CNode ter2 = new CNodeTernary(c1, c2, c3, TernaryType.PLUS_MULT);
Assert.assertNotEquals(un1, ter2);
}
use of org.apache.sysml.hops.codegen.cplan.CNode in project systemml by apache.
the class CPlanComparisonTest method testNotEqualTernaryNodes.
@Test
public void testNotEqualTernaryNodes() {
CNode c1 = createCNodeData(DataType.MATRIX);
CNode c2 = createCNodeData(DataType.SCALAR);
CNode c3 = createCNodeData(DataType.MATRIX);
CNode ter1 = new CNodeTernary(c1, c2, c3, TernaryType.MINUS_MULT);
CNode ter2 = new CNodeTernary(c1, c2, c3, TernaryType.PLUS_MULT);
Assert.assertNotEquals(ter1, ter2);
}
use of org.apache.sysml.hops.codegen.cplan.CNode in project systemml by apache.
the class CPlanComparisonTest method testNotEqualUnaryTernaryNodes.
@Test
public void testNotEqualUnaryTernaryNodes() {
CNode c1 = createCNodeData(DataType.MATRIX);
CNode c2 = createCNodeData(DataType.SCALAR);
CNode c3 = createCNodeData(DataType.MATRIX);
CNode un1 = new CNodeUnary(c1, UnaryType.ABS);
CNode ter2 = new CNodeTernary(c1, c2, c3, TernaryType.PLUS_MULT);
Assert.assertNotEquals(un1, ter2);
}
Aggregations