ソースを参照

src/sched_policies: remove useless initialization for work stealing policies

These fields are already initialized to 0 when the fifo is allocated in
_starpu_create_fifo(). For ws, nprocessed was initialized to -1 but this
has no effect because it's only used by that overload thing which is not
used anymore.
Samuel Pitoiset 9 年 前
コミット
d4541060ed
共有2 個のファイルを変更した0 個の追加10 個の削除を含む
  1. 0 3
      src/sched_policies/locality_work_stealing_policy.c
  2. 0 7
      src/sched_policies/work_stealing_policy.c

+ 0 - 3
src/sched_policies/locality_work_stealing_policy.c

@@ -248,9 +248,6 @@ static void lws_add_workers(unsigned sched_ctx_id, int *workerids,unsigned nwork
 		/* Tell helgrid that we are fine with getting outdated values,
 		 * this is just an estimation */
 		STARPU_HG_DISABLE_CHECKING(ws->queue_array[workerid]->ntasks);
-
-		ws->queue_array[workerid]->nprocessed = 0;
-		ws->queue_array[workerid]->ntasks = 0;
 	}
 
 

+ 0 - 7
src/sched_policies/work_stealing_policy.c

@@ -381,13 +381,6 @@ static void ws_add_workers(unsigned sched_ctx_id, int *workerids,unsigned nworke
 		/* Tell helgrid that we are fine with getting outdated values,
 		 * this is just an estimation */
 		STARPU_HG_DISABLE_CHECKING(ws->queue_array[workerid]->ntasks);
-
-		/**
-		 * The first WS_POP_TASK will increase NPROCESSED though no task was actually performed yet,
-		 * we need to initialize it at -1.
-		 */
-		ws->queue_array[workerid]->nprocessed = -1;
-		ws->queue_array[workerid]->ntasks = 0;
 	}
 }