Skip to content
25 changes: 21 additions & 4 deletions src/sage/libs/linbox/fflas.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ cdef extern from "fflas-ffpack/fflas-ffpack.h" namespace "FFLAS":
FflasTrans

ctypedef enum FFLAS_SIDE:
FflasLeft
FflasRight

# double
Expand Down Expand Up @@ -80,6 +81,16 @@ cdef extern from "fflas-ffpack/fflas-ffpack.h" namespace "FFLAS":
size_t C_stride, size_t numthreads)

cdef extern from "fflas-ffpack/fflas-ffpack.h" namespace "FFPACK":
ctypedef enum FFPACK_LU_TAG:
FfpackTileRecursive

void RankProfileFromLU (size_t* P, size_t N, size_t R,
size_t* rkprofile, FFPACK_LU_TAG LuTag)

void PLUQtoEchelonPermutation (size_t N, size_t R, size_t * P, size_t * outPerm)

void MathPerm2LAPACKPerm (size_t * LapackP, size_t * MathP, size_t N)

# double
bint IsSingular (Modular_double F,
size_t nrows, size_t ncols, Modular_double.Element* A,
Expand All @@ -104,11 +115,14 @@ cdef extern from "fflas-ffpack/fflas-ffpack.h" namespace "FFPACK":

size_t ReducedRowEchelonForm (Modular_double F, size_t a, size_t b,
Modular_double.Element* matrix,
size_t s, size_t* P, size_t* Q)
size_t s, size_t* P, size_t* Q,
bool transform, FFPACK_LU_TAG LuTag)

size_t pReducedRowEchelonForm (Modular_double F, size_t a, size_t b,
Modular_double.Element* matrix,
size_t s, size_t* P, size_t* Q, bool transform, size_t numthreads)
size_t s, size_t* P, size_t* Q,
bool transform, size_t numthreads,
FFPACK_LU_TAG LuTag)

Modular_double.Element* Solve (Modular_double F, size_t M,
Modular_double.Element* A, size_t lda,
Expand Down Expand Up @@ -158,11 +172,14 @@ cdef extern from "fflas-ffpack/fflas-ffpack.h" namespace "FFPACK":

size_t ReducedRowEchelonForm (Modular_float F, size_t a, size_t b,
Modular_float.Element* matrix,
size_t s, size_t* P, size_t* Q)
size_t s, size_t* P, size_t* Q,
bool transform, FFPACK_LU_TAG LuTag)

size_t pReducedRowEchelonForm (Modular_float F, size_t a, size_t b,
Modular_float.Element* matrix,
size_t s, size_t* P, size_t* Q, bool transform, size_t numthreads)
size_t s, size_t* P, size_t* Q,
bool transform, size_t numthreads,
FFPACK_LU_TAG LuTag)

Modular_float.Element* Solve (Modular_float F, size_t M,
Modular_float.Element* A, size_t lda,
Expand Down
1 change: 1 addition & 0 deletions src/sage/matrix/matrix2.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -8649,6 +8649,7 @@ cdef class Matrix(Matrix1):
if v is not None:
self.cache('echelon_transformation', v)
self.cache('pivots', E.pivots())

if transformation and v is not None:
return (E, v)
else:
Expand Down
Loading
Loading