Fix gcc-8 & gcc-7 compilation errors
Bonjour,
Afin de compiler en gcc 8, j'ai du faire quelques modifications mineures:
- Operator est un mot clef interdit avec gcc 8
diff --git a/control/common.h b/control/common.h
index cfa3208d..5d360627 100644
--- a/control/common.h
+++ b/control/common.h
@@ -106,7 +106,7 @@ extern "C" {
#endif
void chameleon_pmap( cham_uplo_t uplo, CHAM_desc_t *A,
- cham_unary_operator_t operator, void *op_args,
+ cham_unary_operator_t op, void *op_args,
RUNTIME_sequence_t *sequence, RUNTIME_request_t *request );
#include "control/compute_s.h"
- Pour gcc-8, l'ordre des initialisations est important
diff --git a/runtime/starpu/include/runtime_codelets.h b/runtime/starpu/include/runtime_codelets.h
index a6872444..244d6524 100644
--- a/runtime/starpu/include/runtime_codelets.h
+++ b/runtime/starpu/include/runtime_codelets.h
@@ -45,8 +45,8 @@
struct starpu_codelet cl_##cl_name = { \
.where = (_original_location_), \
.cpu_func = ((cpu_func_name)), \
- CODELET_CUDA_FLAGS(cuda_flags) \
.cuda_func = ((cuda_func_name)), \
+ CODELET_CUDA_FLAGS(cuda_flags) \
.nbuffers = ((_nbuffers)), \
.model = &cl_##cl_name##_model, \
.name = #cl_name \
- Pour gcc-7, les modifications sont plus grandes due à l'erreur "non-trivial designated initializers not supported"
diff --git a/runtime/starpu/include/runtime_codelets.h b/runtime/starpu/include/runtime_codelets.h
index a6872444..7f6d06dc 100644
--- a/runtime/starpu/include/runtime_codelets.h
+++ b/runtime/starpu/include/runtime_codelets.h
@@ -26,30 +26,57 @@
//#undef STARPU_CUDA_ASYNC
#ifdef STARPU_CUDA_ASYNC
-#define CODELET_CUDA_FLAGS(flags) .cuda_flags = {(flags)},
+#define CODELET_CUDA_FLAGS(flags) {(flags)},
#else
-#define CODELET_CUDA_FLAGS(flags)
+#define CODELET_CUDA_FLAGS(flags) {},
#endif
#define CODELETS_ALL(cl_name, _nbuffers, cpu_func_name, cuda_func_name, _original_location_, cuda_flags) \
- struct starpu_perfmodel cl_##cl_name##_fake = { \
- .type = STARPU_HISTORY_BASED, \
- .symbol = "fake_"#cl_name \
+ struct starpu_perfmodel cl_##cl_name##_fake = { \
+ STARPU_HISTORY_BASED, \
+ NULL, \
+ NULL, \
+ NULL, \
+ NULL, \
+ "fake_"#cl_name \
}; \
\
struct starpu_perfmodel cl_##cl_name##_model = { \
- .type = STARPU_HISTORY_BASED, \
- .symbol = ""#cl_name \
+ STARPU_HISTORY_BASED, \
+ NULL, \
+ NULL, \
+ NULL, \
+ NULL, \
+ ""#cl_name \
}; \
\
struct starpu_codelet cl_##cl_name = { \
- .where = (_original_location_), \
- .cpu_func = ((cpu_func_name)), \
+ (_original_location_), \
+ NULL, \
+ STARPU_SEQ, \
+ 0, \
+ ((cpu_func_name)), \
+ ((cuda_func_name)), \
+ NULL, \
+ {}, \
+ {}, \
CODELET_CUDA_FLAGS(cuda_flags) \
- .cuda_func = ((cuda_func_name)), \
- .nbuffers = ((_nbuffers)), \
- .model = &cl_##cl_name##_model, \
- .name = #cl_name \
+ {}, \
+ {}, \
+ {}, \
+ {}, \
+ {}, \
+ {}, \
+ ((_nbuffers)), \
+ {}, \
+ NULL, \
+ 0, \
+ {}, \
+ NULL, \
+ &cl_##cl_name##_model, \
+ NULL, \
+ {}, \
+ #cl_name \
}; \
\
void cl_##cl_name##_restrict_where(uint32_t where) \
- Nous avons eu besoin d'avoir plus d'headers dans l'installation
diff --git a/control/CMakeLists.txt b/control/CMakeLists.txt
index 377ddb77..b13067da 100644
--- a/control/CMakeLists.txt
+++ b/control/CMakeLists.txt
@@ -52,9 +52,9 @@ set(CHAMELEON_HDRS
)
set(HDR_INSTALL ${CHAMELEON_HDRS})
-# foreach( hdr_file ${CHAMELEON_HDRS_GENERATED} )
-# list(APPEND HDR_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/${hdr_file})
-# endforeach()
+foreach( hdr_file ${CHAMELEON_HDRS_GENERATED} )
+ list(APPEND HDR_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/${hdr_file})
+endforeach()
list(APPEND CHAMELEON_HDRS ${CHAMELEON_HDRS_GENERATED})
@@ -65,8 +65,8 @@ set(CHAMELEON_SOURCES_TARGETS "${CHAMELEON_SOURCES_TARGETS};control_include" CAC
# installation
# ------------
-# install(FILES ${HDR_INSTALL}
-# DESTINATION include/chameleon/control)
+install(FILES ${HDR_INSTALL}
+ DESTINATION include/control)
###
### END CMakeLists.txt