Ejemplo n.º 1
0
    def setUp(self):
        NNPSTestCase.setUp(self)
        cl = importorskip("pyopencl")
        from pysph.base import gpu_nnps
        cfg = get_config()
        self._orig_use_double = cfg.use_double
        cfg.use_double = False

        self.nps = gpu_nnps.BruteForceNNPS(
            dim=3, particles=self.particles, radius_scale=2.0,
            backend='opencl'
        )
Ejemplo n.º 2
0
    def setUp(self):
        NNPSTestCase.setUp(self)
        cl = importorskip("pyopencl")
        from pysph.base import gpu_nnps
        ctx = cl.create_some_context(interactive=False)
        cfg = get_config()
        self._orig_use_double = cfg.use_double
        cfg.use_double = False

        self.nps = gpu_nnps.BruteForceNNPS(dim=3,
                                           particles=self.particles,
                                           radius_scale=2.0,
                                           ctx=ctx)