浏览代码

fix forcing calibration of never-calibrated archs. HASH_FIND_UINT32_T will return NULL when the head is NULL anyway, so there is no need to check for that case, and instead use the factorized behavior

Samuel Thibault 12 年之前
父节点
当前提交
46f9cdae13
共有 1 个文件被更改,包括 0 次插入5 次删除
  1. 0 5
      src/core/perfmodel/perfmodel_history.c

+ 0 - 5
src/core/perfmodel/perfmodel_history.c

@@ -1089,11 +1089,6 @@ double _starpu_history_based_job_expected_perf(struct starpu_perfmodel *model, e
 
 
 	_STARPU_PTHREAD_RWLOCK_RDLOCK(&model->model_rwlock);
 	_STARPU_PTHREAD_RWLOCK_RDLOCK(&model->model_rwlock);
 	history = per_arch_model->history;
 	history = per_arch_model->history;
-	if (!history) {
-		_STARPU_PTHREAD_RWLOCK_UNLOCK(&model->model_rwlock);
-		return NAN;
-	}
-
 	HASH_FIND_UINT32_T(history, &key, elt);
 	HASH_FIND_UINT32_T(history, &key, elt);
 	entry = (elt == NULL) ? NULL : elt->history_entry;
 	entry = (elt == NULL) ? NULL : elt->history_entry;
 	_STARPU_PTHREAD_RWLOCK_UNLOCK(&model->model_rwlock);
 	_STARPU_PTHREAD_RWLOCK_UNLOCK(&model->model_rwlock);