Selaa lähdekoodia

More uses of starpu_nop_perf_model

Samuel Thibault 7 vuotta sitten
vanhempi
commit
a4e170fbd0

+ 2 - 1
mpi/examples/comm/comm.c

@@ -36,7 +36,8 @@ struct starpu_codelet mycodelet =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 1,
-	.modes = {STARPU_RW}
+	.modes = {STARPU_RW},
+	.model = &starpu_nop_perf_model,
 };
 
 int main(int argc, char **argv)

+ 2 - 1
mpi/examples/comm/mix_comm.c

@@ -36,7 +36,8 @@ struct starpu_codelet mycodelet =
 {
 	.cpu_funcs = {func_cpu},
 	.nbuffers = 1,
-	.modes = {STARPU_RW}
+	.modes = {STARPU_RW},
+	.model = &starpu_nop_perf_model,
 };
 
 int main(int argc, char **argv)

+ 1 - 16
mpi/examples/complex/mpi_complex.c

@@ -26,27 +26,12 @@ void display_foo_codelet(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	FPRINTF(stderr, "foo = %d\n", *foo);
 }
 
-/* Dumb performance model for simgrid */
-static double display_cost_function(struct starpu_task *task, unsigned nimpl)
-{
-	(void) task;
-	(void) nimpl;
-	return 0.000001;
-}
-
-static struct starpu_perfmodel display_model =
-{
-	.type = STARPU_COMMON,
-	.cost_function = display_cost_function,
-	.symbol = "display"
-};
-
 struct starpu_codelet foo_display =
 {
 	.cpu_funcs = {display_foo_codelet},
 	.nbuffers = 1,
 	.modes = {STARPU_R},
-	.model = &display_model
+	.model = &starpu_nop_perf_model,
 };
 
 int main(int argc, char **argv)

+ 1 - 16
mpi/examples/stencil/stencil5.c

@@ -37,27 +37,12 @@ void stencil5_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 //	fprintf(stdout, "VALUES: %2.2f %2.2f %2.2f %2.2f %2.2f\n", *xy, *xm1y, *xp1y, *xym1, *xyp1);
 }
 
-/* Dumb performance model for simgrid */
-static double stencil5_cost_function(struct starpu_task *task, unsigned nimpl)
-{
-	(void) task;
-	(void) nimpl;
-	return 0.000001;
-}
-
-static struct starpu_perfmodel stencil5_model =
-{
-	.type = STARPU_COMMON,
-	.cost_function = stencil5_cost_function,
-	.symbol = "stencil5"
-};
-
 struct starpu_codelet stencil5_cl =
 {
 	.cpu_funcs = {stencil5_cpu},
 	.nbuffers = 5,
 	.modes = {STARPU_RW, STARPU_R, STARPU_R, STARPU_R, STARPU_R},
-	.model = &stencil5_model
+	.model = &starpu_nop_perf_model,
 };
 
 #ifdef STARPU_QUICK_CHECK

+ 2 - 1
mpi/examples/stencil/stencil5_lb.c

@@ -42,7 +42,8 @@ struct starpu_codelet stencil5_cl =
 {
 	.cpu_funcs = {stencil5_cpu},
 	.nbuffers = 5,
-	.modes = {STARPU_RW, STARPU_R, STARPU_R, STARPU_R, STARPU_R}
+	.modes = {STARPU_RW, STARPU_R, STARPU_R, STARPU_R, STARPU_R},
+	.model = &starpu_nop_perf_model,
 };
 
 #ifdef STARPU_QUICK_CHECK