Markus Mottl avatar Markus Mottl committed 186b804

Added lauum

Comments (0)

Files changed (5)

              for contributing sygv!
 
                * orgqr
+               * lauum
 
              Added example for QR-factorization.
 
 name="lacaml"
-version="5.4.4"
+version="5.4.5"
 description="LACAML - BLAS/LAPACK-interface for OCaml"
 
 requires="lacaml.core"
   let norm = get_norm_char norm in
   direct_lange ~norm ~m ~n ~ar ~ac ~a ~work
 
+(* DLAUUM *)
+
+external direct_lauum :
+  uplo : char ->
+  n : int ->
+  ar : int ->
+  ac : int ->
+  a : mat ->
+  unit = "lacaml_NPREClauum_stub"
+
+let lauum ?(up = true) ?n ?(ar = 1) ?(ac = 1) a =
+  let loc = "Lacaml.Impl.NPREC.lauum" in
+  let n = get_n_of_a loc ar ac a n in
+  let uplo = get_uplo_char up in
+  direct_lauum ~uplo ~n ~ar ~ac ~a
+
 
 (* Linear equations (computational routines) *)
 

lib/impl_SDCZ.mli

     @param ar default = 1
     @param ac default = 1 *)
 
+val lauum :
+  ?up : bool ->
+  ?n : int ->
+  ?ar : int ->
+  ?ac : int ->
+  mat ->
+  unit
+(** [lauum ?up ?n ?ar ?ac a]
+    @param up default = [true]
+    @param n default = minimum of available number of rows/columns in matrix [a]
+    @param ar default = 1
+    @param ac default = 1 *)
+
 
 (** Linear equations (computational routines) *)
 

lib/impl_SDCZ_c.c

 }
 
 
+/** LAUUM */
+
+extern REAL FUN(lauum)(
+  char *UPLO,
+  integer *N,
+  NUMBER *A, integer *LDA,
+  integer *INFO);
+
+CAMLprim value LFUN(lauum_stub)(
+  value vUPLO, value vN,
+  value vAR, value vAC, value vA)
+{
+  CAMLparam1(vA);
+
+  char GET_INT(UPLO);
+  integer GET_INT(N), INFO;
+
+  MAT_PARAMS(A);
+
+  caml_enter_blocking_section();  /* Allow other threads */
+  FUN(lauum)(&UPLO, &N, A_data, &rows_A, &INFO);
+  caml_leave_blocking_section();  /* Disallow other threads */
+
+  CAMLreturn(Val_unit);
+}
+
+
 /* Linear Equations (computational routines)
 ************************************************************************/
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.