Mentions légales du service

Skip to content

Add leftHermite function to ISLMatrix

NARMOUR Louis requested to merge isl-hermite-function into master

Adds a function to bind the following for ISLMatrix:

__isl_give isl_mat *isl_mat_left_hermite(__isl_take isl_mat *M, int neg,
  __isl_give isl_mat **U, __isl_give isl_mat **Q);

This requires some extra special handling since the jnimapper does not play nice with double pointers. This introduces a new user module ISLUser_mat to wrap the call to isl_mat_left_hermite and store the individual values (i.e., the function return value, which we denote as H, and the other matrices U and Q) in a separate data structure. This separate data structure is called struct isl_hermite_result and is defined in Isl.jnimap. The individual ISLMatrix objects (H, U, and Q) can be retrieved in Java code via the new Java class ISLHermiteResult and is defined by its corresponding group in Isl.jnimap.

The C code that handles calling isl_mat_left_hermite and storing its return values lives in native/ISLUser_mat.c. This was written manually.

There are many file changes because this requires a new header file for the new user module, ISLUser_mat.h, which must be included in all of the other ISL_*_native.c files. 85 of these are only a single line:

$ git diff --stat master isl-hermite-function | grep ' 1 +' | wc -l
      85

The significant changes are:

$ git diff --stat master isl-hermite-function | grep -v ' 1 +' | grep -v lib
 .../fr.irisa.cairn.jnimap.isl/native/ISLUser_mat.c |  41 +++++
 .../fr.irisa.cairn.jnimap.isl/native/ISLUser_mat.h |  73 ++++++++
 .../native/ISL_ISLHermiteResult_native.c           | 203 +++++++++++++++++++++
 .../native/ISL_ISLMatrix_native.c                  |  76 ++++++++
 .../native/ISL_UserModules.c                       |  30 +++
 .../irisa/cairn/jnimap/isl/ISLHermiteResult.java   | 140 ++++++++++++++
 .../fr/irisa/cairn/jnimap/isl/ISLMatrix.java       |  69 +++++++
 .../fr/irisa/cairn/jnimap/isl/ISLNative.java       |  29 ++-
 bundles/fr.irisa.cairn.jnimap.isl/src/Isl.jnimap   |  23 +++
 .../native/build/Linux_64/Makefile                 |  11 ++
 .../native/build/Linux_64/user.mk                  |   2 +-
 .../native/build/Macosx_64/Makefile                |  14 +-
 .../native/build/Mingw_32/Makefile                 |  11 ++
 103 files changed, 803 insertions(+), 4 deletions(-)
Edited by NARMOUR Louis

Merge request reports

Loading