Esempio n. 1
0
def program():
    if not pygis.use_opencl:
        raise OpenCLNotPresentError()

    global _program
    if _program is not None:
        return _program
    elif _have_opencl:
        src = ''.join(open(pygis.data_file('kernels.cl')).readlines())
        _program = cl.Program(context(), src)
        _program.build()
        print(_program.get_build_info(_program.devices[0], cl.program_build_info.LOG))
        return _program

    raise OpenCLNotPresentError()
Esempio n. 2
0
def program():
    if not pygis.use_opencl:
        raise OpenCLNotPresentError()

    global _program
    if _program is not None:
        return _program
    elif _have_opencl:
        src = ''.join(open(pygis.data_file('kernels.cl')).readlines())
        _program = cl.Program(context(), src)
        _program.build()
        print(
            _program.get_build_info(_program.devices[0],
                                    cl.program_build_info.LOG))
        return _program

    raise OpenCLNotPresentError()
Esempio n. 3
0
File: tests.py Progetto: rjw57/pygis
 def setUp(self):
     self.mons = pygis.raster.open_raster(pygis.data_file("olympus-mons.tiff"))
Esempio n. 4
0
 def setUp(self):
     self.mons = pygis.raster.open_raster(
         pygis.data_file('olympus-mons.tiff'))