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()
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()
def setUp(self): self.mons = pygis.raster.open_raster(pygis.data_file("olympus-mons.tiff"))
def setUp(self): self.mons = pygis.raster.open_raster( pygis.data_file('olympus-mons.tiff'))