Пример #1
0
    def test_numpy_against_opencl(self):
        from tvb.simulator.models.wong_wang import ReducedWongWang
        from tvb.simulator._opencl.models import CLRWW
        np_rww = ReducedWongWang()
        np_rww.configure()
        cl_rww = CLRWW()
        cl_rww.configure()
        cl_rww.configure_opencl(self.context, self.queue)

        np_dx = np_rww.dfun(self.state, self.coupling)
        cl_dx = cl_rww.dfunKernel(self.state, self.coupling)

        numpy.testing.assert_allclose(cl_dx, np_dx, 1e-5, 1e-6)
Пример #2
0
    def test_RWW_opencl(self):
        from tvb.simulator.models.wong_wang import ReducedWongWang
        from tvb.simulator._opencl.models import CLRWW

        self.validate(ReducedWongWang(),CLRWW(),1)