Browse Source

New function starpu_get_version() to return as 3 integers the release
version of StarPU.

Nathalie Furmento 12 years ago
parent
commit
c5fef199cc
4 changed files with 15 additions and 0 deletions
  1. 2 0
      ChangeLog
  2. 4 0
      doc/chapters/api.texi
  3. 2 0
      include/starpu.h
  4. 7 0
      src/core/workers.c

+ 2 - 0
ChangeLog

@@ -127,6 +127,8 @@ Small features:
     activity polling method for StarPU-MPI.
   * Permit to disable sequential consistency for a given task.
   * New macro STARPU_RELEASE_VERSION
+  * New function starpu_get_version() to return as 3 integers the
+    release version of StarPU.
 
 Changes:
   * Fix the block filter functions.

+ 4 - 0
doc/chapters/api.texi

@@ -51,6 +51,10 @@ Define the minor version of StarPU
 Define the release version of StarPU
 @end defmac
 
+@deftypefun void starpu_get_version (int *@var{major}, int *@var{minor}, int *@var{release})
+Return as 3 integers the release version of StarPU.
+@end deftypefun
+
 @node Initialization and Termination
 @section Initialization and Termination
 

+ 2 - 0
include/starpu.h

@@ -153,6 +153,8 @@ int starpu_asynchronous_opencl_copy_disabled(void);
 void starpu_profiling_init();
 void starpu_display_stats();
 
+void starpu_get_version(int *major, int *minor, int *release);
+
 #ifdef __cplusplus
 }
 #endif

+ 7 - 0
src/core/workers.c

@@ -1437,3 +1437,10 @@ starpu_driver_deinit(struct starpu_driver *d)
 		return -EINVAL;
 	}
 }
+
+void starpu_get_version(int *major, int *minor, int *release)
+{
+	*major = STARPU_MAJOR_VERSION;
+	*minor = STARPU_MINOR_VERSION;
+	*release = STARPU_RELEASE_VERSION;
+}