Browse Source

include: define deprecated define for starpu 0.x and for starpu 1.0

Nathalie Furmento 12 years ago
parent
commit
cb83bbd705
3 changed files with 10 additions and 3 deletions
  1. 0 2
      include/starpu.h
  2. 9 0
      include/starpu_deprecated_api.h
  3. 1 1
      include/starpu_util.h

+ 0 - 2
include/starpu.h

@@ -155,8 +155,6 @@ void starpu_display_stats();
 }
 #endif
 
-#if defined(STARPU_USE_DEPRECATED_API)
 #include "starpu_deprecated_api.h"
-#endif /* STARPU_USE_DEPRECATED_API */
 
 #endif /* __STARPU_H__ */

+ 9 - 0
include/starpu_deprecated_api.h

@@ -23,8 +23,11 @@ extern "C"
 {
 #endif
 
+#if defined(STARPU_USE_DEPRECATED_API) || defined(STARPU_USE_DEPRECATED_ONE_ZERO_API)
 #warning Your application is using former types. You may want to update to use the latest API, by using tools/dev/rename.sh.
+#endif /* defined(STARPU_USE_DEPRECATED_API) || defined(STARPU_USE_DEPRECATED_ONE_ZERO_API) */
 
+#ifdef STARPU_USE_DEPRECATED_API
 typedef starpu_data_handle_t starpu_data_handle;
 typedef struct starpu_block_interface starpu_block_interface_t;
 typedef struct starpu_matrix_interface starpu_matrix_interface_t;
@@ -56,6 +59,10 @@ typedef enum starpu_access_mode starpu_access_mode;
 #define starpu_pack_cl_args   	       starpu_codelet_pack_args
 #define starpu_task_deinit	       starpu_task_clean
 
+#endif /* STARPU_USE_DEPRECATED_API */
+
+#ifdef STARPU_USE_DEPRECATED_ONE_ZERO_API
+
 #define starpu_allocate_buffer_on_node	starpu_malloc_on_node
 #define starpu_free_buffer_on_node	starpu_free_on_node
 #define starpu_helper_cublas_init	starpu_cublas_init
@@ -81,6 +88,8 @@ typedef enum starpu_access_mode starpu_access_mode;
 #define starpu_depth_block_filter_func_block		starpu_block_filter_depth_block
 #define starpu_depth_block_shadow_filter_func_block	starpu_block_filter_depth_block_shadow
 
+#endif /* STARPU_USE_DEPRECATED_ONE_ZERO_API */
+
 #ifdef __cplusplus
 }
 #endif

+ 1 - 1
include/starpu_util.h

@@ -50,7 +50,7 @@ extern "C"
 #  define STARPU_ATTRIBUTE_INTERNAL
 #endif
 
-#if STARPU_GNUC_PREREQ(3, 1) && !defined(BUILDING_STARPU) && !defined(STARPU_USE_DEPRECATED_API)
+#if STARPU_GNUC_PREREQ(3, 1) && !defined(BUILDING_STARPU) && !defined(STARPU_USE_DEPRECATED_API) && !defined(STARPU_USE_DEPRECATED_ONE_ZERO_API)
 #define STARPU_DEPRECATED  __attribute__((__deprecated__))
 #else
 #define STARPU_DEPRECATED