예제 #1
0
    def run(self):
        while not self.kill_received:
             # get a task
            try:
                job = self.work_queue.get_nowait()
            except Queue.Empty:
                break

            start_time = time.time()

            print("Adding Errors")
            bvpl_octree_batch.init_process("bvplAddTaylorErrorsProcess")
            bvpl_octree_batch.set_input_from_db(0, job.error_scene)
            bvpl_octree_batch.set_input_double(1, job.fraction)
            bvpl_octree_batch.set_input_int(2, job.block_i)
            bvpl_octree_batch.set_input_int(3, job.block_j)
            bvpl_octree_batch.set_input_int(4, job.block_k)
            bvpl_octree_batch.run_process()
            (id, type) = bvpl_octree_batch.commit_output(0)
            error_val = dbvalue(id, type)
            error = bvpl_octree_batch.get_output_double(id)

            self.result_queue.put(error)

            print("error")
            print(error)

            print("Runing time for worker:", self.name)
            print(time.time() - start_time)
예제 #2
0
    def run(self):
        while not self.kill_received:
            # get a task
            try:
                job = self.work_queue.get_nowait()
            except Queue.Empty:
                break

            start_time = time.time()

            print("Adding Errors")
            bvpl_octree_batch.init_process("bvplAddTaylorErrorsProcess")
            bvpl_octree_batch.set_input_from_db(0, job.error_scene)
            bvpl_octree_batch.set_input_double(1, job.fraction)
            bvpl_octree_batch.set_input_int(2, job.block_i)
            bvpl_octree_batch.set_input_int(3, job.block_j)
            bvpl_octree_batch.set_input_int(4, job.block_k)
            bvpl_octree_batch.run_process()
            (id, type) = bvpl_octree_batch.commit_output(0)
            error_val = dbvalue(id, type)
            error = bvpl_octree_batch.get_output_double(id)

            self.result_queue.put(error)

            print("error")
            print(error)

            print("Runing time for worker:", self.name)
            print(time.time() - start_time)
    def run(self):
        while not self.kill_received:
             # get a task
            try:
                job = self.work_queue.get_nowait()
            except Queue.Empty:
                break
            
            start_time = time.time();
            
            bvpl_octree_batch.init_process("bvpl_taylor_global_add_error_process");
            bvpl_octree_batch.set_input_from_db(0,job.global_taylor);
            bvpl_octree_batch.set_input_int(1, job.scene_id);
            bvpl_octree_batch.set_input_int(2, job.block_i);
            bvpl_octree_batch.set_input_int(3, job.block_j);
            bvpl_octree_batch.set_input_int(4, job.block_k);
            bvpl_octree_batch.run_process();
            (id, type) = bvpl_octree_batch.commit_output(0);
            error_val = dbvalue(id, type);
            error = bvpl_octree_batch.get_output_double(id);
            self.result_queue.put(error);
            
            bvpl_octree_batch.clear();
 
            print ("Runing time for worker:", self.name)
            print(time.time() - start_time);
예제 #4
0
    def run(self):
        while not self.kill_received:
             # get a task
            try:
                job = self.work_queue.get_nowait();
            except Queue.Empty:
                break;

            start_time = time.time();

            print("Adding Errors");
            bvpl_octree_batch.init_process("bvplAddPCAErrorsProcess");
            bvpl_octree_batch.set_input_from_db(0,job.pca_scenes);
            bvpl_octree_batch.set_input_unsigned(1, job.dim);
            bvpl_octree_batch.set_input_double(2,job.fraction);
            bvpl_octree_batch.set_input_int(3, job.block_i);
            bvpl_octree_batch.set_input_int(4, job.block_j)
            bvpl_octree_batch.set_input_int(5, job.block_k)
            bvpl_octree_batch.run_process();
            (id, type) = bvpl_octree_batch.commit_output(0);
            error_val = dbvalue(id, type);
            error = bvpl_octree_batch.get_output_double(id);

            self.result_queue.put(error);

            print("Runing time for worker:", self.name);
            print(time.time() - start_time);