Пример #1
0
 def setUp(self):
     syris.init(device_index=0)
     self.pixel_size = 1e-3
     self.precision_places = int(np.log10(1 / self.pixel_size))
     self.prg = g_util.get_program(g_util.get_metaobjects_source())
     self.poly_deg = 4
     self.roots_mem = cl.Buffer(cfg.OPENCL.ctx, cl.mem_flags.READ_WRITE,
                                size=(self.poly_deg + 1) * cfg.PRECISION.cl_float)
Пример #2
0
 def setUp(self):
     syris.init(device_index=0)
     self.pixel_size = 1e-3
     self.precision_places = int(np.log10(1 / self.pixel_size))
     self.prg = g_util.get_program(g_util.get_metaobjects_source())
     self.poly_deg = 4
     self.roots_mem = cl.Buffer(cfg.OPENCL.ctx,
                                cl.mem_flags.READ_WRITE,
                                size=(self.poly_deg + 1) *
                                cfg.PRECISION.cl_float)
Пример #3
0
 def setUp(self):
     syris.init(device_index=0)
     self.prg = g_util.get_program(
         g_util.get_source(["polyobject.cl",
                            "heapsort.cl"],
                           precision_sensitive=True))
     self.num = 10
     self.data = np.array([1, 8, np.nan, -1, np.nan, 8, 680, 74, 2, 0]).\
         astype(cfg.PRECISION.np_float)
     self.mem = cl.Buffer(cfg.OPENCL.ctx, cl.mem_flags.READ_WRITE |
                          cl.mem_flags.COPY_HOST_PTR, hostbuf=self.data)
Пример #4
0
 def setUp(self):
     default_syris_init()
     self.prg = g_util.get_program(
         g_util.get_source(["polyobject.cl", "heapsort.cl"],
                           precision_sensitive=True))
     self.num = 10
     self.data = np.array([1, 8, np.nan, -1, np.nan, 8, 680, 74, 2,
                           0]).astype(cfg.PRECISION.np_float)
     self.mem = cl.Buffer(cfg.OPENCL.ctx,
                          cl.mem_flags.READ_WRITE
                          | cl.mem_flags.COPY_HOST_PTR,
                          hostbuf=self.data)
Пример #5
0
    def setUp(self):
        syris.init(device_index=0)
        self.poly_deg = 4
        self.coeffs = np.array([5, 87, -2, 37, 17], dtype=cfg.PRECISION.np_float)

        self.coeffs_mem = cl.Buffer(cfg.OPENCL.ctx, cl.mem_flags.READ_ONLY |
                                    cl.mem_flags.COPY_HOST_PTR,
                                    hostbuf=self.coeffs)
        self.scalar_mem = cl.Buffer(cfg.OPENCL.ctx, cl.mem_flags.READ_WRITE,
                                    size=cfg.PRECISION.cl_float)

        self.pixel_size = 1e-3
        self.precision_places = int(np.log10(1 / self.pixel_size))
        self.prg = g_util.get_program(g_util.get_metaobjects_source())
        self.roots_mem = cl.Buffer(cfg.OPENCL.ctx, cl.mem_flags.READ_WRITE,
                                   size=(self.poly_deg + 1) * cfg.PRECISION.cl_float)
Пример #6
0
    def setUp(self):
        syris.init(device_index=0)
        self.poly_deg = 4
        self.coeffs = np.array([5, 87, -2, 37, 17],
                               dtype=cfg.PRECISION.np_float)

        self.coeffs_mem = cl.Buffer(cfg.OPENCL.ctx,
                                    cl.mem_flags.READ_ONLY
                                    | cl.mem_flags.COPY_HOST_PTR,
                                    hostbuf=self.coeffs)
        self.scalar_mem = cl.Buffer(cfg.OPENCL.ctx,
                                    cl.mem_flags.READ_WRITE,
                                    size=cfg.PRECISION.cl_float)

        self.pixel_size = 1e-3
        self.precision_places = int(np.log10(1 / self.pixel_size))
        self.prg = g_util.get_program(g_util.get_metaobjects_source())
        self.roots_mem = cl.Buffer(cfg.OPENCL.ctx,
                                   cl.mem_flags.READ_WRITE,
                                   size=(self.poly_deg + 1) *
                                   cfg.PRECISION.cl_float)