|
@@ -189,7 +189,7 @@ size_t _starpu_job_get_data_size(struct starpu_perfmodel *model, struct starpu_p
|
|
|
struct starpu_task *task = j->task;
|
|
|
int comb = starpu_perfmodel_arch_comb_get(arch->ndevices, arch->devices);
|
|
|
|
|
|
- if (model && model->state && model->state->per_arch && comb != -1 && model->state->per_arch[comb] && model->state->per_arch[comb][impl].size_base)
|
|
|
+ if (model && model->state->per_arch && comb != -1 && model->state->per_arch[comb] && model->state->per_arch[comb][impl].size_base)
|
|
|
{
|
|
|
return model->state->per_arch[comb][impl].size_base(task, arch, impl);
|
|
|
}
|
|
@@ -1546,8 +1546,8 @@ int starpu_perfmodel_list_combs(FILE *output, struct starpu_perfmodel *model)
|
|
|
struct starpu_perfmodel_per_arch *starpu_perfmodel_get_model_per_arch(struct starpu_perfmodel *model, struct starpu_perfmodel_arch *arch, unsigned impl)
|
|
|
{
|
|
|
int comb = starpu_perfmodel_arch_comb_get(arch->ndevices, arch->devices);
|
|
|
- if(comb == -1 || !model->state || !model->state->per_arch[comb])
|
|
|
- return NULL;
|
|
|
+ if(comb == -1) return NULL;
|
|
|
+ if(!model->state->per_arch[comb]) return NULL;
|
|
|
|
|
|
return &model->state->per_arch[comb][impl];
|
|
|
}
|