Ejemplo n.º 1
0
 def make_node(self, A, alpha, x, y):
     Ger.make_node(self, A, alpha, x, y)
     A = as_gpuarray_variable(A)
     x = as_gpuarray_variable(x)
     y = as_gpuarray_variable(y)
     assert A.dtype == x.dtype == y.dtype
     return Apply(self, [A, alpha, x, y], [A.type()])
Ejemplo n.º 2
0
    def test_eq(self):
        self.assert_(CGer(True) == CGer(True))
        self.assert_(CGer(False) == CGer(False))
        self.assert_(CGer(False) != CGer(True))

        self.assert_(CGer(True) != ScipyGer(True))
        self.assert_(CGer(False) != ScipyGer(False))
        self.assert_(CGer(True) != Ger(True))
        self.assert_(CGer(False) != Ger(False))

        # assert that eq works for non-CGer instances
        self.assert_(CGer(False) is not None)
        self.assert_(CGer(True) is not None)
Ejemplo n.º 3
0
    def test_eq(self):
        assert CGer(True) == CGer(True)
        assert CGer(False) == CGer(False)
        assert CGer(False) != CGer(True)

        assert CGer(True) != ScipyGer(True)
        assert CGer(False) != ScipyGer(False)
        assert CGer(True) != Ger(True)
        assert CGer(False) != Ger(False)

        # assert that eq works for non-CGer instances
        assert CGer(False) is not None
        assert CGer(True) is not None
Ejemplo n.º 4
0
 def make_node(self, A, alpha, x, y):
     res = Ger.make_node(self, A, alpha, x, y)
     A = as_gpuarray_variable(A)
     x = as_gpuarray_variable(x)
     y = as_gpuarray_variable(y)
     assert A.dtype == x.dtype == y.dtype
     return Apply(self, [A, alpha, x, y], [A.type()])