Browse Source

add perfmodel to axpy

Samuel Thibault 9 years ago
parent
commit
de919add3c
1 changed files with 8 additions and 1 deletions
  1. 8 1
      examples/axpy/axpy.c

+ 8 - 1
examples/axpy/axpy.c

@@ -82,6 +82,12 @@ void axpy_gpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *arg)
 extern void axpy_opencl(void *buffers[], void *args);
 extern void axpy_opencl(void *buffers[], void *args);
 #endif
 #endif
 
 
+static struct starpu_perfmodel axpy_model =
+{
+	.type = STARPU_HISTORY_BASED,
+	.symbol = "axpy"
+};
+
 static struct starpu_codelet axpy_cl =
 static struct starpu_codelet axpy_cl =
 {
 {
 	.cpu_funcs = {axpy_cpu},
 	.cpu_funcs = {axpy_cpu},
@@ -95,7 +101,8 @@ static struct starpu_codelet axpy_cl =
 #endif
 #endif
 	.nbuffers = 2,
 	.nbuffers = 2,
 	.modes = {STARPU_R, STARPU_RW},
 	.modes = {STARPU_R, STARPU_RW},
-	.name = "axpy"
+	.name = "axpy",
+	.model = &axpy_model
 };
 };
 
 
 static int
 static int