소스 검색

gcc-plugin: as lookup_name cannot lookup for a struct, add a typedef for struct starpu_codelet

Nathalie Furmento 13 년 전
부모
커밋
dd254fcf2f
2개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      gcc-plugin/src/starpu.c
  2. 4 0
      include/starpu_task.h

+ 1 - 1
gcc-plugin/src/starpu.c

@@ -77,7 +77,7 @@ static const char task_implementation_wrapper_attribute_name[] =
   ".task_implementation_wrapper";
 
 /* Names of data structures defined in <starpu.h>.  */
-static const char codelet_struct_name[] = "struct starpu_codelet";
+static const char codelet_struct_name[] = "starpu_codelet_gcc";
 static const char task_struct_name[] = "starpu_task";
 
 /* Cached function declarations.  */

+ 4 - 0
include/starpu_task.h

@@ -109,6 +109,10 @@ struct starpu_codelet {
 	unsigned long per_worker_stats[STARPU_NMAXWORKERS];
 };
 
+#ifdef STARPU_GCC_PLUGIN
+typedef struct starpu_codelet starpu_codelet_gcc;
+#endif /* STARPU_GCC_PLUGIN */
+
 struct starpu_task {
 	struct starpu_codelet *cl;