def set_up(self): # Make sure the Fern algorithm instantiation with the sequential # execution policy is used. We don't want any threading stuff to # be used. The goals is to be able to compare the classic PCRaster # implementation (unicore) with the new Fern implementation # (also unicore). pcrmc.set_nr_worker_threads(0) operation_timer_case.OperationTimerCase.set_up(self)
def method(self): pcrmc.set_nr_worker_threads(nr_worker_threads) rasters = [] for i in range(len(value_scales)): rasters.append( self.raster_by_value_scale[value_scales[i]][indices[i]]) result = function(*rasters)
def set_up(self): pcrmc.set_nr_worker_threads(1) operation_timer_case.OperationTimerCase.set_up(self)