|
@@ -1,7 +1,7 @@
|
|
/* StarPU --- Runtime system for heterogeneous multicore architectures.
|
|
/* StarPU --- Runtime system for heterogeneous multicore architectures.
|
|
*
|
|
*
|
|
* Copyright (C) 2009, 2010-2011, 2013-2014 Université de Bordeaux 1
|
|
* Copyright (C) 2009, 2010-2011, 2013-2014 Université de Bordeaux 1
|
|
- * Copyright (C) 2010, 2011, 2012, 2013 Centre National de la Recherche Scientifique
|
|
|
|
|
|
+ * Copyright (C) 2010, 2011, 2012, 2013, 2014 Centre National de la Recherche Scientifique
|
|
*
|
|
*
|
|
* StarPU is free software; you can redistribute it and/or modify
|
|
* StarPU is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License as published by
|
|
* it under the terms of the GNU Lesser General Public License as published by
|
|
@@ -46,29 +46,29 @@ uint32_t _starpu_compute_buffers_footprint(struct starpu_perfmodel *model, struc
|
|
|
|
|
|
struct starpu_task *task = j->task;
|
|
struct starpu_task *task = j->task;
|
|
|
|
|
|
- if (model != NULL && model->footprint != NULL)
|
|
|
|
|
|
+ if (model)
|
|
{
|
|
{
|
|
- footprint = model->footprint(task);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- if (model != NULL && model->per_arch)
|
|
|
|
|
|
+ if (model->footprint)
|
|
|
|
+ {
|
|
|
|
+ footprint = model->footprint(task);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
{
|
|
{
|
|
struct starpu_perfmodel_per_arch *per_arch = starpu_perfmodel_get_model_per_arch(model, arch, nimpl);
|
|
struct starpu_perfmodel_per_arch *per_arch = starpu_perfmodel_get_model_per_arch(model, arch, nimpl);
|
|
- if(per_arch != NULL && per_arch->size_base)
|
|
|
|
|
|
+ if (per_arch != NULL && per_arch->size_base)
|
|
{
|
|
{
|
|
size_t size = per_arch->size_base(task, arch, nimpl);
|
|
size_t size = per_arch->size_base(task, arch, nimpl);
|
|
footprint = starpu_hash_crc32c_be_n(&size, sizeof(size), footprint);
|
|
footprint = starpu_hash_crc32c_be_n(&size, sizeof(size), footprint);
|
|
}
|
|
}
|
|
- }
|
|
|
|
- else if (model && model->size_base)
|
|
|
|
- {
|
|
|
|
- size_t size = model->size_base(task, nimpl);
|
|
|
|
- footprint = starpu_hash_crc32c_be_n(&size, sizeof(size), footprint);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- footprint = starpu_task_data_footprint(task);
|
|
|
|
|
|
+ else if (model->size_base)
|
|
|
|
+ {
|
|
|
|
+ size_t size = model->size_base(task, nimpl);
|
|
|
|
+ footprint = starpu_hash_crc32c_be_n(&size, sizeof(size), footprint);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ footprint = starpu_task_data_footprint(task);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|