Browse Source

Fix insert_task_many warning

Samuel Thibault 5 years ago
parent
commit
685780a97f
1 changed files with 15 additions and 1 deletions
  1. 15 1
      tests/main/insert_task_many.c

+ 15 - 1
tests/main/insert_task_many.c

@@ -51,7 +51,7 @@ struct starpu_codelet codelet_dyn =
 	.nbuffers = NPARAMS,
 };
 
-/* This will warn out at compilation time when maxbuffers is less than NPARAMS.
+/* When maxbuffers is less than NPARAMS we will miss some access modes.
  * That is on purpose: we here check that we still behave correctly in that case.
  * We are just not able to check the parameter access modes.  */
 struct starpu_codelet codelet_toomany =
@@ -70,13 +70,27 @@ struct starpu_codelet codelet_toomany =
 		STARPU_RW,
 		STARPU_R,
 		STARPU_RW|STARPU_COMMUTE,
+#if STARPU_NMAXBUFS >= 9
 		STARPU_R,
+#endif
+#if STARPU_NMAXBUFS >= 10
 		STARPU_RW|STARPU_COMMUTE,
+#endif
+#if STARPU_NMAXBUFS >= 11
 		STARPU_R,
+#endif
+#if STARPU_NMAXBUFS >= 12
 		STARPU_R,
+#endif
+#if STARPU_NMAXBUFS >= 13
 		STARPU_SCRATCH,
+#endif
+#if STARPU_NMAXBUFS >= 14
 		STARPU_SCRATCH,
+#endif
+#if STARPU_NMAXBUFS >= 15
 		STARPU_SCRATCH,
+#endif
 	}
 };