瀏覽代碼

src/core/combined_workers.c: only access variables if defined

Nathalie Furmento 12 年之前
父節點
當前提交
920df8c828
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/core/combined_workers.c

+ 2 - 0
src/core/combined_workers.c

@@ -113,8 +113,10 @@ int starpu_combined_worker_assign_workerid(int nworkers, int workerid_array[])
 		combined_worker->perf_arch = (enum starpu_perfmodel_archtype) (STARPU_CPU_DEFAULT + nworkers - 1);
 		combined_worker->worker_mask = STARPU_CPU;
 	}
+#ifdef STARPU_USE_MIC
 	combined_worker->count = nworkers -1;
 	pthread_mutex_init(&combined_worker->count_mutex,NULL);
+#endif
 
 	/* We assume that the memory node should either be that of the first
 	 * entry, and it is very likely that every worker in the combination