Ticket #14699: iml-1.0.1.p15.diff

File iml-1.0.1.p15.diff, 99.2 KB (added by jdemeyer, 7 years ago)

Spkg diff, for review only.

  • SPKG.txt

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1370932541 -7200
    # Node ID f5acc534d75e652db49a25e17e186776068e6678
    # Parent  671ae592ac442663d3ef072e5c583a1295a9fb55
    Trac #14699: Cleanup spkg, restore upstream sources
    
    diff --git a/SPKG.txt b/SPKG.txt
    a b  
    22
    33== Description ==
    44
    5 IML is a free library of C source code which implements algorithms for computing exact solutions to dense systems of linear equations over the integers. IML is designed to be used with the ATLAS/BLAS library and GMP bignum library.
     5IML is a free library of C source code which implements algorithms for
     6computing exact solutions to dense systems of linear equations over the
     7integers. IML is designed to be used with the ATLAS/BLAS library and
     8GMP bignum library.
     9
     10Written in portable C, IML can be used on both 32-bit and 64-bit
     11machines. It can be called from C++.
    612
    713Website: http://www.cs.uwaterloo.ca/~astorjoh/iml.html
    814
    915== License ==
    1016
    11 GPL
    12 
    13 == SPKG Maintainers ==
    14  * William Stein
    15  * Martin Albrecht
     17 * GPLv2+
    1618
    1719== Upstream Contact ==
    1820
     
    2527
    2628== Special Update/Build Instructions ==
    2729
    28  * Sage's current version is fairly out of date. As of July 21st 2010, the
     30 * Sage's current version is fairly out of date. As of June 2013, the
    2931   latest upstream release is 1.0.3 (dated July 28th 2008).
     32 * Various files should be made executable. Run spkg-src after
     33   extracting the sources to src/ to fix this.
    3034
    31 The following build instructions by William Stein might be incomplete and/or out of date:
     35=== Patches ===
    3236
    33  * I had to put the built version of src/repl in that directory, since on OS X it won't build. It's basically empty, so this seems safe.
    34  * I had to src/config/install-sh executable.
    35  * I had to create src/cblas.h since on many systems it isn't installed anywhere!? I just used gsl_cblas.h for this purpose, which seems to work fine.
     37 * rename_lift.patch: Change lift to iml_lift in padiclift.* and
     38   nonsingsolve.*, since otherwise  on OSX you'll have horrible weird
     39   conflict problems.
    3640 * Modified some of the examples, and made build scripts that work.
    37  * '''IMPORTANT''': Change lift to iml_lift in padiclift.* and nonsingsolve.*, since otherwise  on OSX you'll have horrible weird conflict problems.
    3841
    3942== Changelog ==
    4043
     44=== iml-1.0.1.p15 (Jean-Pierre Flori, Jeroen Demeyer, 11 June 2013) ===
     45 * #14699: Cleanup spkg, restore upstream sources, moved patches
     46   into patch files in patches/
     47 * Do not build/install src/repl at all, since it does nothing anyway
     48   and creating empty archives fails on OS X.
     49
    4150=== iml-1.0.1.p14 (Simon King, 10th December 2011) ===
    4251 * #12131: Use --libdir, to make the package work on openSUSE.
    4352
    4453=== iml-1.0.1.p13 (David Kirkby, 22nd June, 2010) ===
    4554 * #9309 Add an spkg-check file for the IML library. There are only
    46    two self-tests, but at least there is some testing. 
     55   two self-tests, but at least there is some testing.
    4756
    4857=== iml-1.0.1.p12 (Jaap Spies, Jan 25th, 2010) ===
    4958 * Let SAGE64 work for Open Solaris 64 bit
     
    6170
    6271=== iml-1.0.1.p7 (Michael Abshoff, December 23rd, 2007) ===
    6372 * apply memleak patch in nullspace.c (which has been send to the IML autors)
    64  *  add .hgignore
     73 * add .hgignore
    6574
    6675=== William Stein (2007-02-14) ===
    6776 * initial version
    68 
  • new file patches/blas_headers.patch

    diff --git a/patches/blas_headers.patch b/patches/blas_headers.patch
    new file mode 100644
    - +  
     1diff -ruN iml-1.0.1-sage/cblas.h src/cblas.h
     2--- iml-1.0.1-sage/cblas.h      1970-01-01 01:00:00.000000000 +0100
     3+++ src/cblas.h 2007-02-15 07:51:41.000000000 +0100
     4@@ -0,0 +1,606 @@
     5+/* blas/gsl_cblas.h
     6+ *
     7+ * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman
     8+ *
     9+ * This program is free software; you can redistribute it and/or modify
     10+ * it under the terms of the GNU General Public License as published by
     11+ * the Free Software Foundation; either version 2 of the License, or (at
     12+ * your option) any later version.
     13+ *
     14+ * This program is distributed in the hope that it will be useful, but
     15+ * WITHOUT ANY WARRANTY; without even the implied warranty of
     16+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     17+ * General Public License for more details.
     18+ *
     19+ * You should have received a copy of the GNU General Public License
     20+ * along with this program; if not, write to the Free Software
     21+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
     22+ */
     23+
     24+/* This is a copy of the CBLAS standard header.
     25+ * We carry this around so we do not have to
     26+ * break our model for flexible BLAS functionality.
     27+ */
     28+
     29+#ifndef __GSL_CBLAS_H__
     30+#define __GSL_CBLAS_H__
     31+#include <stddef.h>
     32+
     33+#undef __BEGIN_DECLS
     34+#undef __END_DECLS
     35+#ifdef __cplusplus
     36+#define __BEGIN_DECLS extern "C" {
     37+#define __END_DECLS }
     38+#else
     39+#define __BEGIN_DECLS           /* empty */
     40+#define __END_DECLS             /* empty */
     41+#endif
     42+
     43+__BEGIN_DECLS
     44+
     45+/*
     46+ * Enumerated and derived types
     47+ */
     48+#define CBLAS_INDEX size_t  /* this may vary between platforms */
     49+
     50+enum CBLAS_ORDER {CblasRowMajor=101, CblasColMajor=102};
     51+enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113};
     52+enum CBLAS_UPLO {CblasUpper=121, CblasLower=122};
     53+enum CBLAS_DIAG {CblasNonUnit=131, CblasUnit=132};
     54+enum CBLAS_SIDE {CblasLeft=141, CblasRight=142};
     55+
     56+/*
     57+ * ===========================================================================
     58+ * Prototypes for level 1 BLAS functions (complex are recast as routines)
     59+ * ===========================================================================
     60+ */
     61+float  cblas_sdsdot(const int N, const float alpha, const float *X,
     62+                    const int incX, const float *Y, const int incY);
     63+double cblas_dsdot(const int N, const float *X, const int incX, const float *Y,
     64+                   const int incY);
     65+float  cblas_sdot(const int N, const float  *X, const int incX,
     66+                  const float  *Y, const int incY);
     67+double cblas_ddot(const int N, const double *X, const int incX,
     68+                  const double *Y, const int incY);
     69+
     70+/*
     71+ * Functions having prefixes Z and C only
     72+ */
     73+void   cblas_cdotu_sub(const int N, const void *X, const int incX,
     74+                       const void *Y, const int incY, void *dotu);
     75+void   cblas_cdotc_sub(const int N, const void *X, const int incX,
     76+                       const void *Y, const int incY, void *dotc);
     77+
     78+void   cblas_zdotu_sub(const int N, const void *X, const int incX,
     79+                       const void *Y, const int incY, void *dotu);
     80+void   cblas_zdotc_sub(const int N, const void *X, const int incX,
     81+                       const void *Y, const int incY, void *dotc);
     82+
     83+
     84+/*
     85+ * Functions having prefixes S D SC DZ
     86+ */
     87+float  cblas_snrm2(const int N, const float *X, const int incX);
     88+float  cblas_sasum(const int N, const float *X, const int incX);
     89+
     90+double cblas_dnrm2(const int N, const double *X, const int incX);
     91+double cblas_dasum(const int N, const double *X, const int incX);
     92+
     93+float  cblas_scnrm2(const int N, const void *X, const int incX);
     94+float  cblas_scasum(const int N, const void *X, const int incX);
     95+
     96+double cblas_dznrm2(const int N, const void *X, const int incX);
     97+double cblas_dzasum(const int N, const void *X, const int incX);
     98+
     99+
     100+/*
     101+ * Functions having standard 4 prefixes (S D C Z)
     102+ */
     103+CBLAS_INDEX cblas_isamax(const int N, const float  *X, const int incX);
     104+CBLAS_INDEX cblas_idamax(const int N, const double *X, const int incX);
     105+CBLAS_INDEX cblas_icamax(const int N, const void   *X, const int incX);
     106+CBLAS_INDEX cblas_izamax(const int N, const void   *X, const int incX);
     107+
     108+/*
     109+ * ===========================================================================
     110+ * Prototypes for level 1 BLAS routines
     111+ * ===========================================================================
     112+ */
     113+
     114+/*
     115+ * Routines with standard 4 prefixes (s, d, c, z)
     116+ */
     117+void cblas_sswap(const int N, float *X, const int incX,
     118+                 float *Y, const int incY);
     119+void cblas_scopy(const int N, const float *X, const int incX,
     120+                 float *Y, const int incY);
     121+void cblas_saxpy(const int N, const float alpha, const float *X,
     122+                 const int incX, float *Y, const int incY);
     123+
     124+void cblas_dswap(const int N, double *X, const int incX,
     125+                 double *Y, const int incY);
     126+void cblas_dcopy(const int N, const double *X, const int incX,
     127+                 double *Y, const int incY);
     128+void cblas_daxpy(const int N, const double alpha, const double *X,
     129+                 const int incX, double *Y, const int incY);
     130+
     131+void cblas_cswap(const int N, void *X, const int incX,
     132+                 void *Y, const int incY);
     133+void cblas_ccopy(const int N, const void *X, const int incX,
     134+                 void *Y, const int incY);
     135+void cblas_caxpy(const int N, const void *alpha, const void *X,
     136+                 const int incX, void *Y, const int incY);
     137+
     138+void cblas_zswap(const int N, void *X, const int incX,
     139+                 void *Y, const int incY);
     140+void cblas_zcopy(const int N, const void *X, const int incX,
     141+                 void *Y, const int incY);
     142+void cblas_zaxpy(const int N, const void *alpha, const void *X,
     143+                 const int incX, void *Y, const int incY);
     144+
     145+
     146+/*
     147+ * Routines with S and D prefix only
     148+ */
     149+void cblas_srotg(float *a, float *b, float *c, float *s);
     150+void cblas_srotmg(float *d1, float *d2, float *b1, const float b2, float *P);
     151+void cblas_srot(const int N, float *X, const int incX,
     152+                float *Y, const int incY, const float c, const float s);
     153+void cblas_srotm(const int N, float *X, const int incX,
     154+                float *Y, const int incY, const float *P);
     155+
     156+void cblas_drotg(double *a, double *b, double *c, double *s);
     157+void cblas_drotmg(double *d1, double *d2, double *b1, const double b2, double *P);
     158+void cblas_drot(const int N, double *X, const int incX,
     159+                double *Y, const int incY, const double c, const double  s);
     160+void cblas_drotm(const int N, double *X, const int incX,
     161+                double *Y, const int incY, const double *P);
     162+
     163+
     164+/*
     165+ * Routines with S D C Z CS and ZD prefixes
     166+ */
     167+void cblas_sscal(const int N, const float alpha, float *X, const int incX);
     168+void cblas_dscal(const int N, const double alpha, double *X, const int incX);
     169+void cblas_cscal(const int N, const void *alpha, void *X, const int incX);
     170+void cblas_zscal(const int N, const void *alpha, void *X, const int incX);
     171+void cblas_csscal(const int N, const float alpha, void *X, const int incX);
     172+void cblas_zdscal(const int N, const double alpha, void *X, const int incX);
     173+
     174+/*
     175+ * ===========================================================================
     176+ * Prototypes for level 2 BLAS
     177+ * ===========================================================================
     178+ */
     179+
     180+/*
     181+ * Routines with standard 4 prefixes (S, D, C, Z)
     182+ */
     183+void cblas_sgemv(const enum CBLAS_ORDER order,
     184+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
     185+                 const float alpha, const float *A, const int lda,
     186+                 const float *X, const int incX, const float beta,
     187+                 float *Y, const int incY);
     188+void cblas_sgbmv(const enum CBLAS_ORDER order,
     189+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
     190+                 const int KL, const int KU, const float alpha,
     191+                 const float *A, const int lda, const float *X,
     192+                 const int incX, const float beta, float *Y, const int incY);
     193+void cblas_strmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     194+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     195+                 const int N, const float *A, const int lda,
     196+                 float *X, const int incX);
     197+void cblas_stbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     198+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     199+                 const int N, const int K, const float *A, const int lda,
     200+                 float *X, const int incX);
     201+void cblas_stpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     202+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     203+                 const int N, const float *Ap, float *X, const int incX);
     204+void cblas_strsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     205+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     206+                 const int N, const float *A, const int lda, float *X,
     207+                 const int incX);
     208+void cblas_stbsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     209+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     210+                 const int N, const int K, const float *A, const int lda,
     211+                 float *X, const int incX);
     212+void cblas_stpsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     213+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     214+                 const int N, const float *Ap, float *X, const int incX);
     215+
     216+void cblas_dgemv(const enum CBLAS_ORDER order,
     217+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
     218+                 const double alpha, const double *A, const int lda,
     219+                 const double *X, const int incX, const double beta,
     220+                 double *Y, const int incY);
     221+void cblas_dgbmv(const enum CBLAS_ORDER order,
     222+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
     223+                 const int KL, const int KU, const double alpha,
     224+                 const double *A, const int lda, const double *X,
     225+                 const int incX, const double beta, double *Y, const int incY);
     226+void cblas_dtrmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     227+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     228+                 const int N, const double *A, const int lda,
     229+                 double *X, const int incX);
     230+void cblas_dtbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     231+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     232+                 const int N, const int K, const double *A, const int lda,
     233+                 double *X, const int incX);
     234+void cblas_dtpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     235+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     236+                 const int N, const double *Ap, double *X, const int incX);
     237+void cblas_dtrsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     238+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     239+                 const int N, const double *A, const int lda, double *X,
     240+                 const int incX);
     241+void cblas_dtbsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     242+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     243+                 const int N, const int K, const double *A, const int lda,
     244+                 double *X, const int incX);
     245+void cblas_dtpsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     246+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     247+                 const int N, const double *Ap, double *X, const int incX);
     248+
     249+void cblas_cgemv(const enum CBLAS_ORDER order,
     250+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
     251+                 const void *alpha, const void *A, const int lda,
     252+                 const void *X, const int incX, const void *beta,
     253+                 void *Y, const int incY);
     254+void cblas_cgbmv(const enum CBLAS_ORDER order,
     255+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
     256+                 const int KL, const int KU, const void *alpha,
     257+                 const void *A, const int lda, const void *X,
     258+                 const int incX, const void *beta, void *Y, const int incY);
     259+void cblas_ctrmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     260+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     261+                 const int N, const void *A, const int lda,
     262+                 void *X, const int incX);
     263+void cblas_ctbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     264+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     265+                 const int N, const int K, const void *A, const int lda,
     266+                 void *X, const int incX);
     267+void cblas_ctpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     268+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     269+                 const int N, const void *Ap, void *X, const int incX);
     270+void cblas_ctrsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     271+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     272+                 const int N, const void *A, const int lda, void *X,
     273+                 const int incX);
     274+void cblas_ctbsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     275+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     276+                 const int N, const int K, const void *A, const int lda,
     277+                 void *X, const int incX);
     278+void cblas_ctpsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     279+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     280+                 const int N, const void *Ap, void *X, const int incX);
     281+
     282+void cblas_zgemv(const enum CBLAS_ORDER order,
     283+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
     284+                 const void *alpha, const void *A, const int lda,
     285+                 const void *X, const int incX, const void *beta,
     286+                 void *Y, const int incY);
     287+void cblas_zgbmv(const enum CBLAS_ORDER order,
     288+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
     289+                 const int KL, const int KU, const void *alpha,
     290+                 const void *A, const int lda, const void *X,
     291+                 const int incX, const void *beta, void *Y, const int incY);
     292+void cblas_ztrmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     293+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     294+                 const int N, const void *A, const int lda,
     295+                 void *X, const int incX);
     296+void cblas_ztbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     297+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     298+                 const int N, const int K, const void *A, const int lda,
     299+                 void *X, const int incX);
     300+void cblas_ztpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     301+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     302+                 const int N, const void *Ap, void *X, const int incX);
     303+void cblas_ztrsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     304+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     305+                 const int N, const void *A, const int lda, void *X,
     306+                 const int incX);
     307+void cblas_ztbsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     308+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     309+                 const int N, const int K, const void *A, const int lda,
     310+                 void *X, const int incX);
     311+void cblas_ztpsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     312+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     313+                 const int N, const void *Ap, void *X, const int incX);
     314+
     315+
     316+/*
     317+ * Routines with S and D prefixes only
     318+ */
     319+void cblas_ssymv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     320+                 const int N, const float alpha, const float *A,
     321+                 const int lda, const float *X, const int incX,
     322+                 const float beta, float *Y, const int incY);
     323+void cblas_ssbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     324+                 const int N, const int K, const float alpha, const float *A,
     325+                 const int lda, const float *X, const int incX,
     326+                 const float beta, float *Y, const int incY);
     327+void cblas_sspmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     328+                 const int N, const float alpha, const float *Ap,
     329+                 const float *X, const int incX,
     330+                 const float beta, float *Y, const int incY);
     331+void cblas_sger(const enum CBLAS_ORDER order, const int M, const int N,
     332+                const float alpha, const float *X, const int incX,
     333+                const float *Y, const int incY, float *A, const int lda);
     334+void cblas_ssyr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     335+                const int N, const float alpha, const float *X,
     336+                const int incX, float *A, const int lda);
     337+void cblas_sspr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     338+                const int N, const float alpha, const float *X,
     339+                const int incX, float *Ap);
     340+void cblas_ssyr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     341+                const int N, const float alpha, const float *X,
     342+                const int incX, const float *Y, const int incY, float *A,
     343+                const int lda);
     344+void cblas_sspr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     345+                const int N, const float alpha, const float *X,
     346+                const int incX, const float *Y, const int incY, float *A);
     347+
     348+void cblas_dsymv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     349+                 const int N, const double alpha, const double *A,
     350+                 const int lda, const double *X, const int incX,
     351+                 const double beta, double *Y, const int incY);
     352+void cblas_dsbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     353+                 const int N, const int K, const double alpha, const double *A,
     354+                 const int lda, const double *X, const int incX,
     355+                 const double beta, double *Y, const int incY);
     356+void cblas_dspmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     357+                 const int N, const double alpha, const double *Ap,
     358+                 const double *X, const int incX,
     359+                 const double beta, double *Y, const int incY);
     360+void cblas_dger(const enum CBLAS_ORDER order, const int M, const int N,
     361+                const double alpha, const double *X, const int incX,
     362+                const double *Y, const int incY, double *A, const int lda);
     363+void cblas_dsyr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     364+                const int N, const double alpha, const double *X,
     365+                const int incX, double *A, const int lda);
     366+void cblas_dspr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     367+                const int N, const double alpha, const double *X,
     368+                const int incX, double *Ap);
     369+void cblas_dsyr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     370+                const int N, const double alpha, const double *X,
     371+                const int incX, const double *Y, const int incY, double *A,
     372+                const int lda);
     373+void cblas_dspr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     374+                const int N, const double alpha, const double *X,
     375+                const int incX, const double *Y, const int incY, double *A);
     376+
     377+
     378+/*
     379+ * Routines with C and Z prefixes only
     380+ */
     381+void cblas_chemv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     382+                 const int N, const void *alpha, const void *A,
     383+                 const int lda, const void *X, const int incX,
     384+                 const void *beta, void *Y, const int incY);
     385+void cblas_chbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     386+                 const int N, const int K, const void *alpha, const void *A,
     387+                 const int lda, const void *X, const int incX,
     388+                 const void *beta, void *Y, const int incY);
     389+void cblas_chpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     390+                 const int N, const void *alpha, const void *Ap,
     391+                 const void *X, const int incX,
     392+                 const void *beta, void *Y, const int incY);
     393+void cblas_cgeru(const enum CBLAS_ORDER order, const int M, const int N,
     394+                 const void *alpha, const void *X, const int incX,
     395+                 const void *Y, const int incY, void *A, const int lda);
     396+void cblas_cgerc(const enum CBLAS_ORDER order, const int M, const int N,
     397+                 const void *alpha, const void *X, const int incX,
     398+                 const void *Y, const int incY, void *A, const int lda);
     399+void cblas_cher(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     400+                const int N, const float alpha, const void *X, const int incX,
     401+                void *A, const int lda);
     402+void cblas_chpr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     403+                const int N, const float alpha, const void *X,
     404+                const int incX, void *A);
     405+void cblas_cher2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N,
     406+                const void *alpha, const void *X, const int incX,
     407+                const void *Y, const int incY, void *A, const int lda);
     408+void cblas_chpr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N,
     409+                const void *alpha, const void *X, const int incX,
     410+                const void *Y, const int incY, void *Ap);
     411+
     412+void cblas_zhemv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     413+                 const int N, const void *alpha, const void *A,
     414+                 const int lda, const void *X, const int incX,
     415+                 const void *beta, void *Y, const int incY);
     416+void cblas_zhbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     417+                 const int N, const int K, const void *alpha, const void *A,
     418+                 const int lda, const void *X, const int incX,
     419+                 const void *beta, void *Y, const int incY);
     420+void cblas_zhpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     421+                 const int N, const void *alpha, const void *Ap,
     422+                 const void *X, const int incX,
     423+                 const void *beta, void *Y, const int incY);
     424+void cblas_zgeru(const enum CBLAS_ORDER order, const int M, const int N,
     425+                 const void *alpha, const void *X, const int incX,
     426+                 const void *Y, const int incY, void *A, const int lda);
     427+void cblas_zgerc(const enum CBLAS_ORDER order, const int M, const int N,
     428+                 const void *alpha, const void *X, const int incX,
     429+                 const void *Y, const int incY, void *A, const int lda);
     430+void cblas_zher(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     431+                const int N, const double alpha, const void *X, const int incX,
     432+                void *A, const int lda);
     433+void cblas_zhpr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     434+                const int N, const double alpha, const void *X,
     435+                const int incX, void *A);
     436+void cblas_zher2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N,
     437+                const void *alpha, const void *X, const int incX,
     438+                const void *Y, const int incY, void *A, const int lda);
     439+void cblas_zhpr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N,
     440+                const void *alpha, const void *X, const int incX,
     441+                const void *Y, const int incY, void *Ap);
     442+
     443+/*
     444+ * ===========================================================================
     445+ * Prototypes for level 3 BLAS
     446+ * ===========================================================================
     447+ */
     448+
     449+/*
     450+ * Routines with standard 4 prefixes (S, D, C, Z)
     451+ */
     452+void cblas_sgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
     453+                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
     454+                 const int K, const float alpha, const float *A,
     455+                 const int lda, const float *B, const int ldb,
     456+                 const float beta, float *C, const int ldc);
     457+void cblas_ssymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     458+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
     459+                 const float alpha, const float *A, const int lda,
     460+                 const float *B, const int ldb, const float beta,
     461+                 float *C, const int ldc);
     462+void cblas_ssyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     463+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     464+                 const float alpha, const float *A, const int lda,
     465+                 const float beta, float *C, const int ldc);
     466+void cblas_ssyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     467+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     468+                  const float alpha, const float *A, const int lda,
     469+                  const float *B, const int ldb, const float beta,
     470+                  float *C, const int ldc);
     471+void cblas_strmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     472+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
     473+                 const enum CBLAS_DIAG Diag, const int M, const int N,
     474+                 const float alpha, const float *A, const int lda,
     475+                 float *B, const int ldb);
     476+void cblas_strsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     477+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
     478+                 const enum CBLAS_DIAG Diag, const int M, const int N,
     479+                 const float alpha, const float *A, const int lda,
     480+                 float *B, const int ldb);
     481+
     482+void cblas_dgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
     483+                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
     484+                 const int K, const double alpha, const double *A,
     485+                 const int lda, const double *B, const int ldb,
     486+                 const double beta, double *C, const int ldc);
     487+void cblas_dsymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     488+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
     489+                 const double alpha, const double *A, const int lda,
     490+                 const double *B, const int ldb, const double beta,
     491+                 double *C, const int ldc);
     492+void cblas_dsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     493+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     494+                 const double alpha, const double *A, const int lda,
     495+                 const double beta, double *C, const int ldc);
     496+void cblas_dsyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     497+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     498+                  const double alpha, const double *A, const int lda,
     499+                  const double *B, const int ldb, const double beta,
     500+                  double *C, const int ldc);
     501+void cblas_dtrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     502+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
     503+                 const enum CBLAS_DIAG Diag, const int M, const int N,
     504+                 const double alpha, const double *A, const int lda,
     505+                 double *B, const int ldb);
     506+void cblas_dtrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     507+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
     508+                 const enum CBLAS_DIAG Diag, const int M, const int N,
     509+                 const double alpha, const double *A, const int lda,
     510+                 double *B, const int ldb);
     511+
     512+void cblas_cgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
     513+                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
     514+                 const int K, const void *alpha, const void *A,
     515+                 const int lda, const void *B, const int ldb,
     516+                 const void *beta, void *C, const int ldc);
     517+void cblas_csymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     518+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
     519+                 const void *alpha, const void *A, const int lda,
     520+                 const void *B, const int ldb, const void *beta,
     521+                 void *C, const int ldc);
     522+void cblas_csyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     523+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     524+                 const void *alpha, const void *A, const int lda,
     525+                 const void *beta, void *C, const int ldc);
     526+void cblas_csyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     527+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     528+                  const void *alpha, const void *A, const int lda,
     529+                  const void *B, const int ldb, const void *beta,
     530+                  void *C, const int ldc);
     531+void cblas_ctrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     532+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
     533+                 const enum CBLAS_DIAG Diag, const int M, const int N,
     534+                 const void *alpha, const void *A, const int lda,
     535+                 void *B, const int ldb);
     536+void cblas_ctrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     537+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
     538+                 const enum CBLAS_DIAG Diag, const int M, const int N,
     539+                 const void *alpha, const void *A, const int lda,
     540+                 void *B, const int ldb);
     541+
     542+void cblas_zgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
     543+                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
     544+                 const int K, const void *alpha, const void *A,
     545+                 const int lda, const void *B, const int ldb,
     546+                 const void *beta, void *C, const int ldc);
     547+void cblas_zsymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     548+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
     549+                 const void *alpha, const void *A, const int lda,
     550+                 const void *B, const int ldb, const void *beta,
     551+                 void *C, const int ldc);
     552+void cblas_zsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     553+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     554+                 const void *alpha, const void *A, const int lda,
     555+                 const void *beta, void *C, const int ldc);
     556+void cblas_zsyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     557+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     558+                  const void *alpha, const void *A, const int lda,
     559+                  const void *B, const int ldb, const void *beta,
     560+                  void *C, const int ldc);
     561+void cblas_ztrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     562+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
     563+                 const enum CBLAS_DIAG Diag, const int M, const int N,
     564+                 const void *alpha, const void *A, const int lda,
     565+                 void *B, const int ldb);
     566+void cblas_ztrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     567+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
     568+                 const enum CBLAS_DIAG Diag, const int M, const int N,
     569+                 const void *alpha, const void *A, const int lda,
     570+                 void *B, const int ldb);
     571+
     572+
     573+/*
     574+ * Routines with prefixes C and Z only
     575+ */
     576+void cblas_chemm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     577+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
     578+                 const void *alpha, const void *A, const int lda,
     579+                 const void *B, const int ldb, const void *beta,
     580+                 void *C, const int ldc);
     581+void cblas_cherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     582+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     583+                 const float alpha, const void *A, const int lda,
     584+                 const float beta, void *C, const int ldc);
     585+void cblas_cher2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     586+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     587+                  const void *alpha, const void *A, const int lda,
     588+                  const void *B, const int ldb, const float beta,
     589+                  void *C, const int ldc);
     590+
     591+void cblas_zhemm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     592+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
     593+                 const void *alpha, const void *A, const int lda,
     594+                 const void *B, const int ldb, const void *beta,
     595+                 void *C, const int ldc);
     596+void cblas_zherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     597+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     598+                 const double alpha, const void *A, const int lda,
     599+                 const double beta, void *C, const int ldc);
     600+void cblas_zher2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     601+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     602+                  const void *alpha, const void *A, const int lda,
     603+                  const void *B, const int ldb, const double beta,
     604+                  void *C, const int ldc);
     605+
     606+void cblas_xerbla(int p, const char *rout, const char *form, ...);
     607+
     608+__END_DECLS
     609+
     610+#endif /* __GSL_CBLAS_H__ */
     611diff -ruN iml-1.0.1-sage/gsl_cblas.h src/gsl_cblas.h
     612--- iml-1.0.1-sage/gsl_cblas.h  1970-01-01 01:00:00.000000000 +0100
     613+++ src/gsl_cblas.h     2007-02-15 07:51:41.000000000 +0100
     614@@ -0,0 +1,606 @@
     615+/* blas/gsl_cblas.h
     616+ *
     617+ * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman
     618+ *
     619+ * This program is free software; you can redistribute it and/or modify
     620+ * it under the terms of the GNU General Public License as published by
     621+ * the Free Software Foundation; either version 2 of the License, or (at
     622+ * your option) any later version.
     623+ *
     624+ * This program is distributed in the hope that it will be useful, but
     625+ * WITHOUT ANY WARRANTY; without even the implied warranty of
     626+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     627+ * General Public License for more details.
     628+ *
     629+ * You should have received a copy of the GNU General Public License
     630+ * along with this program; if not, write to the Free Software
     631+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
     632+ */
     633+
     634+/* This is a copy of the CBLAS standard header.
     635+ * We carry this around so we do not have to
     636+ * break our model for flexible BLAS functionality.
     637+ */
     638+
     639+#ifndef __GSL_CBLAS_H__
     640+#define __GSL_CBLAS_H__
     641+#include <stddef.h>
     642+
     643+#undef __BEGIN_DECLS
     644+#undef __END_DECLS
     645+#ifdef __cplusplus
     646+#define __BEGIN_DECLS extern "C" {
     647+#define __END_DECLS }
     648+#else
     649+#define __BEGIN_DECLS           /* empty */
     650+#define __END_DECLS             /* empty */
     651+#endif
     652+
     653+__BEGIN_DECLS
     654+
     655+/*
     656+ * Enumerated and derived types
     657+ */
     658+#define CBLAS_INDEX size_t  /* this may vary between platforms */
     659+
     660+enum CBLAS_ORDER {CblasRowMajor=101, CblasColMajor=102};
     661+enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113};
     662+enum CBLAS_UPLO {CblasUpper=121, CblasLower=122};
     663+enum CBLAS_DIAG {CblasNonUnit=131, CblasUnit=132};
     664+enum CBLAS_SIDE {CblasLeft=141, CblasRight=142};
     665+
     666+/*
     667+ * ===========================================================================
     668+ * Prototypes for level 1 BLAS functions (complex are recast as routines)
     669+ * ===========================================================================
     670+ */
     671+float  cblas_sdsdot(const int N, const float alpha, const float *X,
     672+                    const int incX, const float *Y, const int incY);
     673+double cblas_dsdot(const int N, const float *X, const int incX, const float *Y,
     674+                   const int incY);
     675+float  cblas_sdot(const int N, const float  *X, const int incX,
     676+                  const float  *Y, const int incY);
     677+double cblas_ddot(const int N, const double *X, const int incX,
     678+                  const double *Y, const int incY);
     679+
     680+/*
     681+ * Functions having prefixes Z and C only
     682+ */
     683+void   cblas_cdotu_sub(const int N, const void *X, const int incX,
     684+                       const void *Y, const int incY, void *dotu);
     685+void   cblas_cdotc_sub(const int N, const void *X, const int incX,
     686+                       const void *Y, const int incY, void *dotc);
     687+
     688+void   cblas_zdotu_sub(const int N, const void *X, const int incX,
     689+                       const void *Y, const int incY, void *dotu);
     690+void   cblas_zdotc_sub(const int N, const void *X, const int incX,
     691+                       const void *Y, const int incY, void *dotc);
     692+
     693+
     694+/*
     695+ * Functions having prefixes S D SC DZ
     696+ */
     697+float  cblas_snrm2(const int N, const float *X, const int incX);
     698+float  cblas_sasum(const int N, const float *X, const int incX);
     699+
     700+double cblas_dnrm2(const int N, const double *X, const int incX);
     701+double cblas_dasum(const int N, const double *X, const int incX);
     702+
     703+float  cblas_scnrm2(const int N, const void *X, const int incX);
     704+float  cblas_scasum(const int N, const void *X, const int incX);
     705+
     706+double cblas_dznrm2(const int N, const void *X, const int incX);
     707+double cblas_dzasum(const int N, const void *X, const int incX);
     708+
     709+
     710+/*
     711+ * Functions having standard 4 prefixes (S D C Z)
     712+ */
     713+CBLAS_INDEX cblas_isamax(const int N, const float  *X, const int incX);
     714+CBLAS_INDEX cblas_idamax(const int N, const double *X, const int incX);
     715+CBLAS_INDEX cblas_icamax(const int N, const void   *X, const int incX);
     716+CBLAS_INDEX cblas_izamax(const int N, const void   *X, const int incX);
     717+
     718+/*
     719+ * ===========================================================================
     720+ * Prototypes for level 1 BLAS routines
     721+ * ===========================================================================
     722+ */
     723+
     724+/*
     725+ * Routines with standard 4 prefixes (s, d, c, z)
     726+ */
     727+void cblas_sswap(const int N, float *X, const int incX,
     728+                 float *Y, const int incY);
     729+void cblas_scopy(const int N, const float *X, const int incX,
     730+                 float *Y, const int incY);
     731+void cblas_saxpy(const int N, const float alpha, const float *X,
     732+                 const int incX, float *Y, const int incY);
     733+
     734+void cblas_dswap(const int N, double *X, const int incX,
     735+                 double *Y, const int incY);
     736+void cblas_dcopy(const int N, const double *X, const int incX,
     737+                 double *Y, const int incY);
     738+void cblas_daxpy(const int N, const double alpha, const double *X,
     739+                 const int incX, double *Y, const int incY);
     740+
     741+void cblas_cswap(const int N, void *X, const int incX,
     742+                 void *Y, const int incY);
     743+void cblas_ccopy(const int N, const void *X, const int incX,
     744+                 void *Y, const int incY);
     745+void cblas_caxpy(const int N, const void *alpha, const void *X,
     746+                 const int incX, void *Y, const int incY);
     747+
     748+void cblas_zswap(const int N, void *X, const int incX,
     749+                 void *Y, const int incY);
     750+void cblas_zcopy(const int N, const void *X, const int incX,
     751+                 void *Y, const int incY);
     752+void cblas_zaxpy(const int N, const void *alpha, const void *X,
     753+                 const int incX, void *Y, const int incY);
     754+
     755+
     756+/*
     757+ * Routines with S and D prefix only
     758+ */
     759+void cblas_srotg(float *a, float *b, float *c, float *s);
     760+void cblas_srotmg(float *d1, float *d2, float *b1, const float b2, float *P);
     761+void cblas_srot(const int N, float *X, const int incX,
     762+                float *Y, const int incY, const float c, const float s);
     763+void cblas_srotm(const int N, float *X, const int incX,
     764+                float *Y, const int incY, const float *P);
     765+
     766+void cblas_drotg(double *a, double *b, double *c, double *s);
     767+void cblas_drotmg(double *d1, double *d2, double *b1, const double b2, double *P);
     768+void cblas_drot(const int N, double *X, const int incX,
     769+                double *Y, const int incY, const double c, const double  s);
     770+void cblas_drotm(const int N, double *X, const int incX,
     771+                double *Y, const int incY, const double *P);
     772+
     773+
     774+/*
     775+ * Routines with S D C Z CS and ZD prefixes
     776+ */
     777+void cblas_sscal(const int N, const float alpha, float *X, const int incX);
     778+void cblas_dscal(const int N, const double alpha, double *X, const int incX);
     779+void cblas_cscal(const int N, const void *alpha, void *X, const int incX);
     780+void cblas_zscal(const int N, const void *alpha, void *X, const int incX);
     781+void cblas_csscal(const int N, const float alpha, void *X, const int incX);
     782+void cblas_zdscal(const int N, const double alpha, void *X, const int incX);
     783+
     784+/*
     785+ * ===========================================================================
     786+ * Prototypes for level 2 BLAS
     787+ * ===========================================================================
     788+ */
     789+
     790+/*
     791+ * Routines with standard 4 prefixes (S, D, C, Z)
     792+ */
     793+void cblas_sgemv(const enum CBLAS_ORDER order,
     794+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
     795+                 const float alpha, const float *A, const int lda,
     796+                 const float *X, const int incX, const float beta,
     797+                 float *Y, const int incY);
     798+void cblas_sgbmv(const enum CBLAS_ORDER order,
     799+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
     800+                 const int KL, const int KU, const float alpha,
     801+                 const float *A, const int lda, const float *X,
     802+                 const int incX, const float beta, float *Y, const int incY);
     803+void cblas_strmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     804+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     805+                 const int N, const float *A, const int lda,
     806+                 float *X, const int incX);
     807+void cblas_stbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     808+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     809+                 const int N, const int K, const float *A, const int lda,
     810+                 float *X, const int incX);
     811+void cblas_stpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     812+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     813+                 const int N, const float *Ap, float *X, const int incX);
     814+void cblas_strsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     815+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     816+                 const int N, const float *A, const int lda, float *X,
     817+                 const int incX);
     818+void cblas_stbsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     819+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     820+                 const int N, const int K, const float *A, const int lda,
     821+                 float *X, const int incX);
     822+void cblas_stpsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     823+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     824+                 const int N, const float *Ap, float *X, const int incX);
     825+
     826+void cblas_dgemv(const enum CBLAS_ORDER order,
     827+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
     828+                 const double alpha, const double *A, const int lda,
     829+                 const double *X, const int incX, const double beta,
     830+                 double *Y, const int incY);
     831+void cblas_dgbmv(const enum CBLAS_ORDER order,
     832+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
     833+                 const int KL, const int KU, const double alpha,
     834+                 const double *A, const int lda, const double *X,
     835+                 const int incX, const double beta, double *Y, const int incY);
     836+void cblas_dtrmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     837+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     838+                 const int N, const double *A, const int lda,
     839+                 double *X, const int incX);
     840+void cblas_dtbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     841+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     842+                 const int N, const int K, const double *A, const int lda,
     843+                 double *X, const int incX);
     844+void cblas_dtpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     845+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     846+                 const int N, const double *Ap, double *X, const int incX);
     847+void cblas_dtrsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     848+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     849+                 const int N, const double *A, const int lda, double *X,
     850+                 const int incX);
     851+void cblas_dtbsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     852+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     853+                 const int N, const int K, const double *A, const int lda,
     854+                 double *X, const int incX);
     855+void cblas_dtpsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     856+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     857+                 const int N, const double *Ap, double *X, const int incX);
     858+
     859+void cblas_cgemv(const enum CBLAS_ORDER order,
     860+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
     861+                 const void *alpha, const void *A, const int lda,
     862+                 const void *X, const int incX, const void *beta,
     863+                 void *Y, const int incY);
     864+void cblas_cgbmv(const enum CBLAS_ORDER order,
     865+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
     866+                 const int KL, const int KU, const void *alpha,
     867+                 const void *A, const int lda, const void *X,
     868+                 const int incX, const void *beta, void *Y, const int incY);
     869+void cblas_ctrmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     870+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     871+                 const int N, const void *A, const int lda,
     872+                 void *X, const int incX);
     873+void cblas_ctbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     874+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     875+                 const int N, const int K, const void *A, const int lda,
     876+                 void *X, const int incX);
     877+void cblas_ctpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     878+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     879+                 const int N, const void *Ap, void *X, const int incX);
     880+void cblas_ctrsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     881+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     882+                 const int N, const void *A, const int lda, void *X,
     883+                 const int incX);
     884+void cblas_ctbsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     885+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     886+                 const int N, const int K, const void *A, const int lda,
     887+                 void *X, const int incX);
     888+void cblas_ctpsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     889+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     890+                 const int N, const void *Ap, void *X, const int incX);
     891+
     892+void cblas_zgemv(const enum CBLAS_ORDER order,
     893+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
     894+                 const void *alpha, const void *A, const int lda,
     895+                 const void *X, const int incX, const void *beta,
     896+                 void *Y, const int incY);
     897+void cblas_zgbmv(const enum CBLAS_ORDER order,
     898+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
     899+                 const int KL, const int KU, const void *alpha,
     900+                 const void *A, const int lda, const void *X,
     901+                 const int incX, const void *beta, void *Y, const int incY);
     902+void cblas_ztrmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     903+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     904+                 const int N, const void *A, const int lda,
     905+                 void *X, const int incX);
     906+void cblas_ztbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     907+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     908+                 const int N, const int K, const void *A, const int lda,
     909+                 void *X, const int incX);
     910+void cblas_ztpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     911+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     912+                 const int N, const void *Ap, void *X, const int incX);
     913+void cblas_ztrsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     914+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     915+                 const int N, const void *A, const int lda, void *X,
     916+                 const int incX);
     917+void cblas_ztbsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     918+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     919+                 const int N, const int K, const void *A, const int lda,
     920+                 void *X, const int incX);
     921+void cblas_ztpsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     922+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
     923+                 const int N, const void *Ap, void *X, const int incX);
     924+
     925+
     926+/*
     927+ * Routines with S and D prefixes only
     928+ */
     929+void cblas_ssymv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     930+                 const int N, const float alpha, const float *A,
     931+                 const int lda, const float *X, const int incX,
     932+                 const float beta, float *Y, const int incY);
     933+void cblas_ssbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     934+                 const int N, const int K, const float alpha, const float *A,
     935+                 const int lda, const float *X, const int incX,
     936+                 const float beta, float *Y, const int incY);
     937+void cblas_sspmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     938+                 const int N, const float alpha, const float *Ap,
     939+                 const float *X, const int incX,
     940+                 const float beta, float *Y, const int incY);
     941+void cblas_sger(const enum CBLAS_ORDER order, const int M, const int N,
     942+                const float alpha, const float *X, const int incX,
     943+                const float *Y, const int incY, float *A, const int lda);
     944+void cblas_ssyr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     945+                const int N, const float alpha, const float *X,
     946+                const int incX, float *A, const int lda);
     947+void cblas_sspr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     948+                const int N, const float alpha, const float *X,
     949+                const int incX, float *Ap);
     950+void cblas_ssyr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     951+                const int N, const float alpha, const float *X,
     952+                const int incX, const float *Y, const int incY, float *A,
     953+                const int lda);
     954+void cblas_sspr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     955+                const int N, const float alpha, const float *X,
     956+                const int incX, const float *Y, const int incY, float *A);
     957+
     958+void cblas_dsymv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     959+                 const int N, const double alpha, const double *A,
     960+                 const int lda, const double *X, const int incX,
     961+                 const double beta, double *Y, const int incY);
     962+void cblas_dsbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     963+                 const int N, const int K, const double alpha, const double *A,
     964+                 const int lda, const double *X, const int incX,
     965+                 const double beta, double *Y, const int incY);
     966+void cblas_dspmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     967+                 const int N, const double alpha, const double *Ap,
     968+                 const double *X, const int incX,
     969+                 const double beta, double *Y, const int incY);
     970+void cblas_dger(const enum CBLAS_ORDER order, const int M, const int N,
     971+                const double alpha, const double *X, const int incX,
     972+                const double *Y, const int incY, double *A, const int lda);
     973+void cblas_dsyr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     974+                const int N, const double alpha, const double *X,
     975+                const int incX, double *A, const int lda);
     976+void cblas_dspr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     977+                const int N, const double alpha, const double *X,
     978+                const int incX, double *Ap);
     979+void cblas_dsyr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     980+                const int N, const double alpha, const double *X,
     981+                const int incX, const double *Y, const int incY, double *A,
     982+                const int lda);
     983+void cblas_dspr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     984+                const int N, const double alpha, const double *X,
     985+                const int incX, const double *Y, const int incY, double *A);
     986+
     987+
     988+/*
     989+ * Routines with C and Z prefixes only
     990+ */
     991+void cblas_chemv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     992+                 const int N, const void *alpha, const void *A,
     993+                 const int lda, const void *X, const int incX,
     994+                 const void *beta, void *Y, const int incY);
     995+void cblas_chbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     996+                 const int N, const int K, const void *alpha, const void *A,
     997+                 const int lda, const void *X, const int incX,
     998+                 const void *beta, void *Y, const int incY);
     999+void cblas_chpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     1000+                 const int N, const void *alpha, const void *Ap,
     1001+                 const void *X, const int incX,
     1002+                 const void *beta, void *Y, const int incY);
     1003+void cblas_cgeru(const enum CBLAS_ORDER order, const int M, const int N,
     1004+                 const void *alpha, const void *X, const int incX,
     1005+                 const void *Y, const int incY, void *A, const int lda);
     1006+void cblas_cgerc(const enum CBLAS_ORDER order, const int M, const int N,
     1007+                 const void *alpha, const void *X, const int incX,
     1008+                 const void *Y, const int incY, void *A, const int lda);
     1009+void cblas_cher(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     1010+                const int N, const float alpha, const void *X, const int incX,
     1011+                void *A, const int lda);
     1012+void cblas_chpr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     1013+                const int N, const float alpha, const void *X,
     1014+                const int incX, void *A);
     1015+void cblas_cher2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N,
     1016+                const void *alpha, const void *X, const int incX,
     1017+                const void *Y, const int incY, void *A, const int lda);
     1018+void cblas_chpr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N,
     1019+                const void *alpha, const void *X, const int incX,
     1020+                const void *Y, const int incY, void *Ap);
     1021+
     1022+void cblas_zhemv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     1023+                 const int N, const void *alpha, const void *A,
     1024+                 const int lda, const void *X, const int incX,
     1025+                 const void *beta, void *Y, const int incY);
     1026+void cblas_zhbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     1027+                 const int N, const int K, const void *alpha, const void *A,
     1028+                 const int lda, const void *X, const int incX,
     1029+                 const void *beta, void *Y, const int incY);
     1030+void cblas_zhpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     1031+                 const int N, const void *alpha, const void *Ap,
     1032+                 const void *X, const int incX,
     1033+                 const void *beta, void *Y, const int incY);
     1034+void cblas_zgeru(const enum CBLAS_ORDER order, const int M, const int N,
     1035+                 const void *alpha, const void *X, const int incX,
     1036+                 const void *Y, const int incY, void *A, const int lda);
     1037+void cblas_zgerc(const enum CBLAS_ORDER order, const int M, const int N,
     1038+                 const void *alpha, const void *X, const int incX,
     1039+                 const void *Y, const int incY, void *A, const int lda);
     1040+void cblas_zher(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     1041+                const int N, const double alpha, const void *X, const int incX,
     1042+                void *A, const int lda);
     1043+void cblas_zhpr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
     1044+                const int N, const double alpha, const void *X,
     1045+                const int incX, void *A);
     1046+void cblas_zher2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N,
     1047+                const void *alpha, const void *X, const int incX,
     1048+                const void *Y, const int incY, void *A, const int lda);
     1049+void cblas_zhpr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N,
     1050+                const void *alpha, const void *X, const int incX,
     1051+                const void *Y, const int incY, void *Ap);
     1052+
     1053+/*
     1054+ * ===========================================================================
     1055+ * Prototypes for level 3 BLAS
     1056+ * ===========================================================================
     1057+ */
     1058+
     1059+/*
     1060+ * Routines with standard 4 prefixes (S, D, C, Z)
     1061+ */
     1062+void cblas_sgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
     1063+                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
     1064+                 const int K, const float alpha, const float *A,
     1065+                 const int lda, const float *B, const int ldb,
     1066+                 const float beta, float *C, const int ldc);
     1067+void cblas_ssymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     1068+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
     1069+                 const float alpha, const float *A, const int lda,
     1070+                 const float *B, const int ldb, const float beta,
     1071+                 float *C, const int ldc);
     1072+void cblas_ssyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     1073+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     1074+                 const float alpha, const float *A, const int lda,
     1075+                 const float beta, float *C, const int ldc);
     1076+void cblas_ssyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     1077+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     1078+                  const float alpha, const float *A, const int lda,
     1079+                  const float *B, const int ldb, const float beta,
     1080+                  float *C, const int ldc);
     1081+void cblas_strmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     1082+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
     1083+                 const enum CBLAS_DIAG Diag, const int M, const int N,
     1084+                 const float alpha, const float *A, const int lda,
     1085+                 float *B, const int ldb);
     1086+void cblas_strsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     1087+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
     1088+                 const enum CBLAS_DIAG Diag, const int M, const int N,
     1089+                 const float alpha, const float *A, const int lda,
     1090+                 float *B, const int ldb);
     1091+
     1092+void cblas_dgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
     1093+                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
     1094+                 const int K, const double alpha, const double *A,
     1095+                 const int lda, const double *B, const int ldb,
     1096+                 const double beta, double *C, const int ldc);
     1097+void cblas_dsymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     1098+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
     1099+                 const double alpha, const double *A, const int lda,
     1100+                 const double *B, const int ldb, const double beta,
     1101+                 double *C, const int ldc);
     1102+void cblas_dsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     1103+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     1104+                 const double alpha, const double *A, const int lda,
     1105+                 const double beta, double *C, const int ldc);
     1106+void cblas_dsyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     1107+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     1108+                  const double alpha, const double *A, const int lda,
     1109+                  const double *B, const int ldb, const double beta,
     1110+                  double *C, const int ldc);
     1111+void cblas_dtrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     1112+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
     1113+                 const enum CBLAS_DIAG Diag, const int M, const int N,
     1114+                 const double alpha, const double *A, const int lda,
     1115+                 double *B, const int ldb);
     1116+void cblas_dtrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     1117+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
     1118+                 const enum CBLAS_DIAG Diag, const int M, const int N,
     1119+                 const double alpha, const double *A, const int lda,
     1120+                 double *B, const int ldb);
     1121+
     1122+void cblas_cgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
     1123+                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
     1124+                 const int K, const void *alpha, const void *A,
     1125+                 const int lda, const void *B, const int ldb,
     1126+                 const void *beta, void *C, const int ldc);
     1127+void cblas_csymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     1128+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
     1129+                 const void *alpha, const void *A, const int lda,
     1130+                 const void *B, const int ldb, const void *beta,
     1131+                 void *C, const int ldc);
     1132+void cblas_csyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     1133+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     1134+                 const void *alpha, const void *A, const int lda,
     1135+                 const void *beta, void *C, const int ldc);
     1136+void cblas_csyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     1137+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     1138+                  const void *alpha, const void *A, const int lda,
     1139+                  const void *B, const int ldb, const void *beta,
     1140+                  void *C, const int ldc);
     1141+void cblas_ctrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     1142+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
     1143+                 const enum CBLAS_DIAG Diag, const int M, const int N,
     1144+                 const void *alpha, const void *A, const int lda,
     1145+                 void *B, const int ldb);
     1146+void cblas_ctrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     1147+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
     1148+                 const enum CBLAS_DIAG Diag, const int M, const int N,
     1149+                 const void *alpha, const void *A, const int lda,
     1150+                 void *B, const int ldb);
     1151+
     1152+void cblas_zgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
     1153+                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
     1154+                 const int K, const void *alpha, const void *A,
     1155+                 const int lda, const void *B, const int ldb,
     1156+                 const void *beta, void *C, const int ldc);
     1157+void cblas_zsymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     1158+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
     1159+                 const void *alpha, const void *A, const int lda,
     1160+                 const void *B, const int ldb, const void *beta,
     1161+                 void *C, const int ldc);
     1162+void cblas_zsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     1163+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     1164+                 const void *alpha, const void *A, const int lda,
     1165+                 const void *beta, void *C, const int ldc);
     1166+void cblas_zsyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     1167+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     1168+                  const void *alpha, const void *A, const int lda,
     1169+                  const void *B, const int ldb, const void *beta,
     1170+                  void *C, const int ldc);
     1171+void cblas_ztrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     1172+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
     1173+                 const enum CBLAS_DIAG Diag, const int M, const int N,
     1174+                 const void *alpha, const void *A, const int lda,
     1175+                 void *B, const int ldb);
     1176+void cblas_ztrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     1177+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
     1178+                 const enum CBLAS_DIAG Diag, const int M, const int N,
     1179+                 const void *alpha, const void *A, const int lda,
     1180+                 void *B, const int ldb);
     1181+
     1182+
     1183+/*
     1184+ * Routines with prefixes C and Z only
     1185+ */
     1186+void cblas_chemm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     1187+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
     1188+                 const void *alpha, const void *A, const int lda,
     1189+                 const void *B, const int ldb, const void *beta,
     1190+                 void *C, const int ldc);
     1191+void cblas_cherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     1192+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     1193+                 const float alpha, const void *A, const int lda,
     1194+                 const float beta, void *C, const int ldc);
     1195+void cblas_cher2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     1196+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     1197+                  const void *alpha, const void *A, const int lda,
     1198+                  const void *B, const int ldb, const float beta,
     1199+                  void *C, const int ldc);
     1200+
     1201+void cblas_zhemm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
     1202+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
     1203+                 const void *alpha, const void *A, const int lda,
     1204+                 const void *B, const int ldb, const void *beta,
     1205+                 void *C, const int ldc);
     1206+void cblas_zherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     1207+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     1208+                 const double alpha, const void *A, const int lda,
     1209+                 const double beta, void *C, const int ldc);
     1210+void cblas_zher2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
     1211+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
     1212+                  const void *alpha, const void *A, const int lda,
     1213+                  const void *B, const int ldb, const double beta,
     1214+                  void *C, const int ldc);
     1215+
     1216+void cblas_xerbla(int p, const char *rout, const char *form, ...);
     1217+
     1218+__END_DECLS
     1219+
     1220+#endif /* __GSL_CBLAS_H__ */
  • new file patches/build.patch

    diff --git a/patches/build.patch b/patches/build.patch
    new file mode 100644
    - +  
     1diff -ruN a/src/Makefile.in b/src/Makefile.in
     2--- a/src/Makefile.in   2006-11-26 15:45:53.000000000 +0100
     3+++ b/src/Makefile.in   2013-06-11 08:27:59.432406016 +0200
     4@@ -94,8 +94,8 @@
     5 AMDEP_TRUE = @AMDEP_TRUE@
     6 AMTAR = @AMTAR@
     7 AR = @AR@
     8-ATLAS_CFLAGS = @ATLAS_CFLAGS@
     9-ATLAS_LIBS = @ATLAS_LIBS@
     10+ATLAS_CFLAGS =
     11+ATLAS_LIBS =
     12 AUTOCONF = @AUTOCONF@
     13 AUTOHEADER = @AUTOHEADER@
     14 AUTOMAKE = @AUTOMAKE@
     15diff -ruN a/Makefile.in b/Makefile.in
     16--- a/Makefile.in       2006-11-26 15:45:52.000000000 +0100
     17+++ b/Makefile.in       2013-06-11 08:27:59.432406016 +0200
     18@@ -79,8 +79,8 @@
     19 AMDEP_TRUE = @AMDEP_TRUE@
     20 AMTAR = @AMTAR@
     21 AR = @AR@
     22-ATLAS_CFLAGS = @ATLAS_CFLAGS@
     23-ATLAS_LIBS = @ATLAS_LIBS@
     24+ATLAS_CFLAGS =
     25+ATLAS_LIBS =
     26 AUTOCONF = @AUTOCONF@
     27 AUTOHEADER = @AUTOHEADER@
     28 AUTOMAKE = @AUTOMAKE@
     29diff -ruN a/configure b/configure
     30--- a/configure 2006-11-23 22:27:13.000000000 +0100
     31+++ b/configure 2007-03-06 17:56:30.000000000 +0100
     32@@ -20040,15 +20040,15 @@
     33 sed 's/^/| /' conftest.$ac_ext >&5
     34 
     35 
     36-                  unset ATLAS_CFLAGS
     37-                  unset ATLAS_LIBS
     38-                  { { echo "$as_me:$LINENO: error: ATLAS not found!
     39-ATLAS version 3.0 or greater is required for this library to compile. Please make sure ATLAS is installed and specify the header and libraries location with the options --with-atlas-include=<path> and --with-atlas-lib=<path> respectively when running configure.
     40-" >&5
     41-echo "$as_me: error: ATLAS not found!
     42-ATLAS version 3.0 or greater is required for this library to compile. Please make sure ATLAS is installed and specify the header and libraries location with the options --with-atlas-include=<path> and --with-atlas-lib=<path> respectively when running configure.
     43-" >&2;}
     44-   { (exit 1); exit 1; }; }
     45+#                 unset ATLAS_CFLAGS
     46+#                 unset ATLAS_LIBS
     47+#                 { { echo "$as_me:$LINENO: error: ATLAS not found!
     48+#ATLAS version 3.0 or greater is required for this library to compile. Please make sure ATLAS is installed and specify the header and libraries location with the options --with-atlas-include=<path> and --with-atlas-lib=<path> respectively when running configure.
     49+#" >&5
     50+#echo "$as_me: error: ATLAS not found!
     51+#ATLAS version 3.0 or greater is required for this library to compile. Please make sure ATLAS is installed and specify the header and libraries location with the options --with-atlas-include=<path> and --with-atlas-lib=<path> respectively when running configure.
     52+#" >&2;}
     53+#   { (exit 1); exit 1; }; }
     54 
     55 fi
     56 rm -f conftest.err conftest.$ac_objext \
     57@@ -20084,23 +20084,23 @@
     58 elif test -n "$atlas_problem"; then
     59        echo "$as_me:$LINENO: result: problem" >&5
     60 echo "${ECHO_T}problem" >&6
     61-       { { echo "$as_me:$LINENO: error: ATLAS not found!
     62-ATLAS version 3.0 or greater is required for this library to compile. Please make sure ATLAS is installed and specify the header and libraries location with the options --with-atlas-include=<path> and --with-atlas-lib=<path> respectively when running configure.
     63-" >&5
     64-echo "$as_me: error: ATLAS not found!
     65-ATLAS version 3.0 or greater is required for this library to compile. Please make sure ATLAS is installed and specify the header and libraries location with the options --with-atlas-include=<path> and --with-atlas-lib=<path> respectively when running configure.
     66-" >&2;}
     67-   { (exit 1); exit 1; }; }
     68-elif test "x$atlas_found" = "xno" ; then
     69-       echo "$as_me:$LINENO: result: not found" >&5
     70-echo "${ECHO_T}not found" >&6
     71-       { { echo "$as_me:$LINENO: error: ATLAS not found!
     72-ATLAS version 3.0 or greater is required for this library to compile. Please make sure ATLAS is installed and specify the header and libraries location with the options --with-atlas-include=<path> and --with-atlas-lib=<path> respectively when running configure.
     73-" >&5
     74-echo "$as_me: error: ATLAS not found!
     75-ATLAS version 3.0 or greater is required for this library to compile. Please make sure ATLAS is installed and specify the header and libraries location with the options --with-atlas-include=<path> and --with-atlas-lib=<path> respectively when running configure.
     76-" >&2;}
     77-   { (exit 1); exit 1; }; }
     78+#      { { echo "$as_me:$LINENO: error: ATLAS not found!
     79+#ATLAS version 3.0 or greater is required for this library to compile. Please make sure ATLAS is installed and specify the header and libraries location with the options --with-atlas-include=<path> and --with-atlas-lib=<path> respectively when running configure.
     80+#" >&5
     81+#echo "$as_me: error: ATLAS not found!
     82+#ATLAS version 3.0 or greater is required for this library to compile. Please make sure ATLAS is installed and specify the header and libraries location with the options --with-atlas-include=<path> and --with-atlas-lib=<path> respectively when running configure.
     83+#" >&2;}
     84+#   { (exit 1); exit 1; }; }
     85+#elif test "x$atlas_found" = "xno" ; then
     86+#      echo "$as_me:$LINENO: result: not found" >&5
     87+#echo "${ECHO_T}not found" >&6
     88+#      { { echo "$as_me:$LINENO: error: ATLAS not found!
     89+#ATLAS version 3.0 or greater is required for this library to compile. Please make sure ATLAS is installed and specify the header and libraries location with the options --with-atlas-include=<path> and --with-atlas-lib=<path> respectively when running configure.
     90+#" >&5
     91+#echo "$as_me: error: ATLAS not found!
     92+#ATLAS version 3.0 or greater is required for this library to compile. Please make sure ATLAS is installed and specify the header and libraries location with the options --with-atlas-include=<path> and --with-atlas-lib=<path> respectively when running configure.
     93+#" >&2;}
     94+#   { (exit 1); exit 1; }; }
     95 fi
     96 
     97 CFLAGS=${BACKUP_CFLAGS}
  • new file patches/examples.patch

    diff --git a/patches/examples.patch b/patches/examples.patch
    new file mode 100644
    - +  
     1diff -ruN iml-1.0.1-sage/examples/exam-nullspace.c src/examples/exam-nullspace.c
     2--- iml-1.0.1-sage/examples/exam-nullspace.c    2006-11-23 22:45:00.000000000 +0100
     3+++ src/examples/exam-nullspace.c       2007-03-01 06:25:06.000000000 +0100
     4@@ -46,6 +46,7 @@
     5 
     6 #include <stdio.h>
     7 #include <stdlib.h>
     8+#include <time.h>
     9 #include "gmp.h"
     10 #include "iml.h"
     11 
     12@@ -57,29 +58,41 @@
     13 {
     14   long i, j, n, m, bd, s, *A;
     15   mpz_t *mp_B, *mp_N;
     16+  clock_t c;
     17 
     18   /* generate a n x m random left hand side matrix A */
     19   n = 5;
     20-  m = 8;
     21-  bd = 16;                     /* entris of A satisfying -2^bd < e < 2^bd */
     22+  m = 6;
     23+  bd = 3;                      /* entris of A satisfying -2^bd < e < 2^bd */
     24   A = randomLongMat (n, m, bd);
     25+  c = clock();
     26+  s = nullspaceLong (n, m, A, &mp_N);
     27+  printf("Time to compute nullspace: %f\n", (clock() - c)/((float)CLOCKS_PER_SEC));
     28+  fprintf (stdout, "Dimension of nullspace: ");
     29+  fprintf (stdout, " %ld\n", s);
     30+
     31   fprintf (stdout, "Input system:\n");
     32+  fprintf (stdout, "[");
     33   for (i = 0; i < n; i++)
     34     {
     35-      fprintf (stdout, "  ");
     36-      for (j = 0; j < m; j++)
     37-       fprintf (stdout, "%ld\t", A[i * m + j]);
     38-      fprintf (stdout, "\n");
     39+      for (j = 0; j < m; j++) {
     40+       fprintf (stdout, "%ld", A[i * m + j]);
     41+       if (!(i==n-1 && j == m-1))
     42+         fprintf(stdout, ",");
     43+      }
     44     }
     45-  s = nullspaceLong (n, m, A, &mp_N);
     46-  fprintf (stdout, "Dimension of nullspace: ");
     47-  fprintf (stdout, " %ld\n", s);
     48+  fprintf(stdout, "]\n");
     49+
     50+  fprintf (stdout, "[");
     51   for (i = 0; i < m; i++)
     52     {
     53-      for (j = 0; j < s; j++)
     54-       gmp_fprintf (stdout, "  %Zd", mp_N[i * s + j]);
     55-      fprintf (stdout, "\n");
     56+      for (j = 0; j < s; j++) {
     57+       gmp_fprintf (stdout, "%Zd", mp_N[i * s + j]);
     58+       if (!(i==m-1 && j == s-1))
     59+         fprintf(stdout, ",");
     60+      }
     61     }
     62+  fprintf(stdout, "]\n");
     63   free (A);
     64   for (i = 0; i < m * s; i++)
     65     mpz_clear (mp_N[i]);
     66diff -ruN iml-1.0.1-sage/examples/exam-nullspace2.c src/examples/exam-nullspace2.c
     67--- iml-1.0.1-sage/examples/exam-nullspace2.c   1970-01-01 01:00:00.000000000 +0100
     68+++ src/examples/exam-nullspace2.c      2007-03-01 06:25:06.000000000 +0100
     69@@ -0,0 +1,146 @@
     70+/* ---------------------------------------------------------------------
     71+ *
     72+ * -- Integer Matrix Library (IML)
     73+ *    (C) Copyright 2004, 2006 All Rights Reserved
     74+ *
     75+ * -- IML routines -- Version 1.0.1 -- November, 2006
     76+ *
     77+ * Author         : Zhuliang Chen
     78+ * Contributor(s) : Arne Storjohann
     79+ * University of Waterloo -- School of Computer Science
     80+ * Waterloo, Ontario, N2L3G1 Canada
     81+ *
     82+ * ---------------------------------------------------------------------
     83+ *
     84+ * -- Copyright notice and Licensing terms:
     85+ *
     86+ *  Redistribution  and  use in  source and binary forms, with or without
     87+ *  modification, are  permitted provided  that the following  conditions
     88+ *  are met:
     89+ *
     90+ * 1. Redistributions  of  source  code  must retain the above copyright
     91+ *    notice, this list of conditions and the following disclaimer.
     92+ * 2. Redistributions in binary form must reproduce  the above copyright
     93+ *    notice,  this list of conditions, and the  following disclaimer in
     94+ *    the documentation and/or other materials provided with the distri-
     95+ *    bution.
     96+ * 3. The name of the University,  the IML group,  or the names of its
     97+ *    contributors  may not be used to endorse or promote products deri-
     98+ *    ved from this software without specific written permission.
     99+ *
     100+ * -- Disclaimer:
     101+ *
     102+ * THIS  SOFTWARE  IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     103+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,  INCLUDING,  BUT NOT
     104+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     105+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY
     106+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,  INDIRECT, INCIDENTAL, SPE-
     107+ * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
     108+ * TO,  PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
     109+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEO-
     110+ * RY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  (IN-
     111+ * CLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     112+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     113+ *
     114+ */
     115+
     116+#include <stdio.h>
     117+#include <stdlib.h>
     118+#include <time.h>
     119+#include "gmp.h"
     120+#include "iml.h"
     121+
     122+long *randomLongMat (const long n, const long m, const long bd);
     123+mpz_t *randomMPMat (const long n, const long m, const mpz_t mp_bd);
     124+
     125+int
     126+main (void)
     127+{
     128+  long i, j, n, m, bd, s, *A;
     129+  mpz_t *mp_B, *mp_N;
     130+  clock_t c;
     131+
     132+  /* generate a n x m random left hand side matrix A */
     133+  printf("1\n");
     134+  n = 20;
     135+  m = 21;
     136+  bd = 3;     
     137+               /* entris of A satisfying -2^bd < e < 2^bd */
     138+  A = randomLongMat (n, m, bd);
     139+  printf("2\n");
     140+  c = clock();
     141+  printf("3\n");
     142+  fprintf (stdout, "Input system:\n");
     143+  for (i = 0; i < n; i++)
     144+    {
     145+      fprintf (stdout, "  ");
     146+      for (j = 0; j < m; j++)
     147+       fprintf (stdout, "%ld\t", A[i * m + j]);
     148+      fprintf (stdout, "\n");
     149+    }
     150+  s = nullspaceLong (n, m, A, &mp_N);
     151+  printf("4\n");
     152+  printf("Time to compute nullspace: %f\n", (clock() - c)/((float)CLOCKS_PER_SEC));
     153+  fprintf (stdout, "Dimension of nullspace: ");
     154+  fprintf (stdout, " %ld\n", s);
     155+
     156+
     157+  for (i = 0; i < m; i++)
     158+    {
     159+      for (j = 0; j < s; j++)
     160+       gmp_fprintf (stdout, "  %Zd", mp_N[i * s + j]);
     161+      fprintf (stdout, "\n");
     162+    }
     163+  free (A);
     164+  for (i = 0; i < m * s; i++)
     165+    mpz_clear (mp_N[i]);
     166+  free (mp_N);
     167+  return 0;
     168+}
     169+
     170+
     171+/* generate a n x m random dense signed long matrix with entries lying in
     172+ * (-2^bd, 2^bd)
     173+ */
     174+long *
     175+randomLongMat (const long n, const long m, const long bd)
     176+{
     177+  long i, j;
     178+  mpz_t mp_rand, mp_sign;
     179+  gmp_randstate_t state;
     180+  unsigned long seed;
     181+  FILE *devrandom;
     182+  long *M;
     183+  static unsigned long inc = 0;
     184+
     185+  M = (long *) malloc (n * m * sizeof (long));
     186+  mpz_init (mp_sign);
     187+  mpz_init (mp_rand);
     188+  gmp_randinit_default (state);
     189+  seed = 387439;
     190+
     191+
     192+  /* generate random seed using /dev/random */
     193+  if ((devrandom = fopen ("/dev/urandom", "r")) != NULL)
     194+    {
     195+      fread (&seed, sizeof (seed), 1, devrandom);
     196+      fclose (devrandom);
     197+    }
     198+  seed += inc;
     199+  inc += 1;
     200+  gmp_randseed_ui (state, seed);
     201+
     202+
     203+  for (i = 0; i < n * m; i++)
     204+    {
     205+      mpz_urandomb (mp_rand, state, bd);
     206+      mpz_urandomb (mp_sign, state, 1);
     207+      if (mpz_sgn (mp_sign) == 0)
     208+       mpz_neg (mp_rand, mp_rand);
     209+      M[i] = mpz_get_si (mp_rand);
     210+    }
     211+  mpz_clear (mp_rand);
     212+  gmp_randclear (state);
     213+  mpz_clear (mp_sign);
     214+  return M;
     215+}
  • new file patches/remove_repl.patch

    diff --git a/patches/remove_repl.patch b/patches/remove_repl.patch
    new file mode 100644
    - +  
     1diff -ru src/Makefile.in b/Makefile.in
     2--- src/Makefile.in     2006-11-26 15:45:52.000000000 +0100
     3+++ b/Makefile.in       2013-06-11 00:11:55.562405457 +0200
     4@@ -177,7 +177,7 @@
     5 sysconfdir = @sysconfdir@
     6 target_alias = @target_alias@
     7 EXTRA_DIST = bootstrap
     8-SUBDIRS = repl config src doc tests examples
     9+SUBDIRS = config src doc tests examples
     10 all: config.h
     11        $(MAKE) $(AM_MAKEFLAGS) all-recursive
     12 
     13diff -ru src/src/Makefile.in b/src/Makefile.in
     14--- src/src/Makefile.in 2006-11-26 15:45:53.000000000 +0100
     15+++ b/src/Makefile.in   2013-06-11 00:12:39.062405430 +0200
     16@@ -63,7 +63,7 @@
     17 am__DEPENDENCIES_1 =
     18 am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
     19 libiml_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
     20-       $(top_builddir)/repl/librepl.la
     21+       
     22 am_libiml_la_OBJECTS = libiml_la-basisop.lo libiml_la-certsolve.lo \
     23        libiml_la-error.lo libiml_la-latreduce.lo \
     24        libiml_la-memalloc.lo libiml_la-mtrans.lo \
     25@@ -221,7 +221,7 @@
     26 
     27 libiml_la_CFLAGS = $(AM_CFLAGS)
     28 libiml_la_LIBADD = $(EXTERNLIB) \
     29-                  $(top_builddir)/repl/librepl.la
     30+                 
     31 
     32 all: all-am
     33 
  • new file patches/rename_lift.patch

    diff --git a/patches/rename_lift.patch b/patches/rename_lift.patch
    new file mode 100644
    - +  
     1diff -ruN a/src/nonsysolve.c b/src/nonsysolve.c
     2--- a/src/nonsysolve.c  2006-11-23 22:25:23.000000000 +0100
     3+++ b/src/nonsysolve.c  2013-06-10 23:07:48.882393429 +0200
     4@@ -188,7 +188,7 @@
     5 #endif
     6 
     7     /* lifting kincr more steps */
     8-    C1 = lift(solupos, kincr, n, m, basislen, extbasislen, mp_basisprod, \
     9+    C1 = iml_lift(solupos, kincr, n, m, basislen, extbasislen, mp_basisprod, \
     10              mp_extbasisprod, liftbasis, cmbasis, extbdcoeff, liftbasisInv, \
     11              mp_r, extbasis, AInv, ARNS);
     12 
     13@@ -396,7 +396,7 @@
     14   C = NULL;
     15   do {
     16     /* lifting kincr more steps */
     17-    C1 = lift(solupos, kincr, n, m, basislen, extbasislen, mp_basisprod, \
     18+    C1 = iml_lift(solupos, kincr, n, m, basislen, extbasislen, mp_basisprod, \
     19              mp_extbasisprod, liftbasis, cmbasis, extbdcoeff, liftbasisInv, \
     20              mp_r, extbasis, AInv, ARNS);
     21 
     22@@ -617,7 +617,7 @@
     23 #endif
     24 
     25     /* lifting kincr more steps */
     26-    C1 = lift(solupos, kincr, n, m, liftbasislen, extbasislen, \
     27+    C1 = iml_lift(solupos, kincr, n, m, liftbasislen, extbasislen, \
     28              mp_liftbasisprod,  mp_extbasisprod, liftbasis, cmliftbasis, \
     29              extbdcoeff, liftbasisInv, mp_r, extbasis, AInv, AExtRNS);
     30 
     31diff -ruN a/src/padiclift.c b/src/padiclift.c
     32--- a/src/padiclift.c   2006-11-23 22:25:23.000000000 +0100
     33+++ b/src/padiclift.c   2013-06-10 23:07:48.882393429 +0200
     34@@ -446,7 +446,7 @@
     35  */
     36 
     37 Double ***
     38-lift (const enum SOLU_POS solupos, const long k, const long n, \
     39+iml_lift (const enum SOLU_POS solupos, const long k, const long n, \
     40       const long m, const long liftbasislen, const long extbasislen, \
     41       const mpz_t mp_basisprod, const mpz_t mp_extbasisprod, \
     42       const FiniteField *liftbasis, const FiniteField *cmbasis, \
     43diff -ruN a/src/padiclift.h b/src/padiclift.h
     44--- a/src/padiclift.h   2006-11-23 22:25:24.000000000 +0100
     45+++ b/src/padiclift.h   2013-06-10 23:07:48.882393429 +0200
     46@@ -95,7 +95,7 @@
     47                 Double **AInv, FiniteField ***extbasis, Double ***AExtRNS);
     48 
     49 
     50-Double*** lift(const enum SOLU_POS solupos, const long k, const long n, \
     51+Double*** iml_lift(const enum SOLU_POS solupos, const long k, const long n, \
     52               const long m, const long liftbasislen, const long extbasislen, \
     53               const mpz_t mp_basisprod, const mpz_t mp_extbasisprod, \
     54               const FiniteField *liftbasis, const FiniteField *cmbasis, \
  • new file patches/sage1.patch

    diff --git a/patches/sage1.patch b/patches/sage1.patch
    new file mode 100644
    - +  
     1diff -ruN b/src/RNSop.c a/src/RNSop.c
     2--- b/src/RNSop.c       2006-11-23 22:25:23.000000000 +0100
     3+++ a/src/RNSop.c       2013-06-10 23:05:18.872404179 +0200
     4@@ -46,6 +46,7 @@
     5 
     6 
     7 #include "RNSop.h"
     8+#include "tinyatlas.h"
     9 
     10 /*
     11  *
     12diff -ruN b/src/memalloc.c a/src/memalloc.c
     13--- b/src/memalloc.c    2006-11-23 22:25:23.000000000 +0100
     14+++ a/src/memalloc.c    2013-06-10 23:05:18.872404179 +0200
     15@@ -48,13 +48,16 @@
     16 
     17 #include "error.h"
     18 #include "common.h"
     19+#include "stdio.h"
     20 
     21 void *
     22 xmalloc (size_t num)
     23 {
     24   void * new = malloc(num);
     25-  if (!new)
     26-    iml_fatal ("Memory exhausted");
     27+  if (!new) {
     28+    printf("%ul\n", num);
     29+    iml_fatal ("Memory exhausted in xmalloc");
     30+  }
     31   return new;
     32 }
     33 
     34@@ -65,8 +68,10 @@
     35   if (!p)
     36     return xmalloc(num);
     37   new = realloc(p, num);
     38-  if (!new)
     39-    iml_fatal("Memory exhausted");
     40+  if (!new) {
     41+    printf("%ul\n", num);
     42+    iml_fatal("Memory exhausted in xrealloc");
     43+  }
     44   return new;
     45 }
     46 
     47@@ -76,8 +81,10 @@
     48 {
     49 #if HAVE_CALLOC
     50   void * new = calloc(num, size);
     51-  if (!new)
     52-    iml_fatal("Memory exhausted");
     53+  if (!new) {
     54+    printf("%ul\n", num);
     55+    iml_fatal("Memory exhausted in xcalloc");
     56+  }
     57 #else
     58   void * new = xmalloc(num*size);
     59   bzero(new, num*size);
     60diff -ruN b/src/nullspace.c a/src/nullspace.c
     61--- b/src/nullspace.c   2006-11-26 04:34:23.000000000 +0100
     62+++ a/src/nullspace.c   2013-06-10 23:05:18.872404179 +0200
     63@@ -44,7 +44,6 @@
     64  *
     65  */
     66 
     67-
     68 #include "nullspace.h"
     69 
     70 /*
     71@@ -187,3 +186,143 @@
     72     return s;
     73 
     74 }
     75+
     76+/*
     77+ * Calling Sequence:
     78+ *   nullspaceLong(n, m, A, mp_N_pass)
     79+ *
     80+ * Summary: Compute the right nullspace of A. In this function A is a
     81+ * 1-dimensional mpz_t array.
     82+ *
     83+ * Input:  n: long, row dimension of A
     84+ *         m: long, column dimension of A
     85+ *         A: 1-dim mpz_t array length n*m, representing n x m matrix
     86+ *            in row major order
     87+ *
     88+ * Output:
     89+ *   - *mp_N_pass: points to a 1-dim mpz_t array of length m*s, where s is the
     90+ *                dimension of the right nullspace of A
     91+ *   - the dimension s of the nullspace is returned
     92+ *
     93+ * Notes:
     94+ *   - The matrix A is represented by one-dimension array in row major order.
     95+ *   - Space for what mp_N_points to is allocated by this procedure: if the
     96+ *     nullspace is empty, mp_N_pass is set to NULL.
     97+ */
     98+
     99+long
     100+nullspaceMP(const long n, const long m, const mpz_t *A, mpz_t * *mp_N_pass)
     101+{
     102+    long i, j, k, r, s, *P, *rp, *Pt, *rpt, flag, temp;
     103+    double *DA;
     104+    FiniteField p, d = 1;
     105+    mpz_t *mp_B, *mp_N, mp_D, mp_t1, mp_t2, *C, mp_r;
     106+
     107+    mpz_init(mp_r);
     108+
     109+    P = XCALLOC(long, n + 1);
     110+    rp = XCALLOC(long, n + 1);
     111+    while (1) {
     112+       p = RandPrime(15, 19);
     113+       DA = XCALLOC(double, n * m);
     114+       for (i = 0; i < n * m; i++) {
     115+           mpz_mod_ui (mp_r, A[i], p);
     116+           DA[i] = mpz_get_d(mp_r);
     117+       }
     118+       for (i = 0; i < n + 1; i++) {
     119+           P[i] = i;
     120+           rp[i] = 0;
     121+       }
     122+       d = 1;
     123+       RowEchelonTransform(p, DA, n, m, 1, 1, 0, 0, P, rp, &d);
     124+       XFREE(DA);
     125+       r = rp[0];
     126+       s = m - r;
     127+       if (s == 0) {
     128+           *mp_N_pass = NULL;
     129+       } else if (r == 0) {
     130+           flag = 1;
     131+           for (i = 0; i < n * m; i++)
     132+               if ( mpz_cmp_si(A[i],0) )
     133+                   flag = 0;
     134+           if (!flag)
     135+               continue;
     136+           mp_N = XCALLOC(mpz_t, m * m);
     137+           for (i = 0; i < m; i++) {
     138+               for (j = 0; j < m; j++)
     139+                   mpz_init_set_ui(mp_N[i * m + j], 0);
     140+               mpz_init_set_ui(mp_N[i * m + i], 1);
     141+           }
     142+           *mp_N_pass = mp_N;
     143+       } else {                /* r>0 and s>0 */
     144+
     145+           Pt = revseq(r, n, P);
     146+           rpt = revseq(r, m, rp);
     147+
     148+           C = XCALLOC(mpz_t, r * r);
     149+           for (i = 0; i < r; i++)
     150+               for (j = 0; j < r; j++)
     151+                   mpz_init_set(C[i * r + j], A[Pt[i] * m + rpt[j]]);
     152+
     153+           mp_B = XCALLOC(mpz_t, r * s);
     154+           for (i = 0; i < r; i++)
     155+               for (j = 0; j < s; j++)
     156+                   mpz_init_set(mp_B[i * s + j], A[Pt[i] * m + rpt[r + j]]);
     157+
     158+           mpz_init(mp_D);
     159+           mp_N = XCALLOC(mpz_t, m * s);
     160+           for (i = 0; i < m * s; i++)
     161+               mpz_init(mp_N[i]);
     162+           nonsingSolvLlhsMM(RightSolu, r, s, C, mp_B, mp_N, mp_D);
     163+           mpz_neg(mp_D, mp_D);
     164+           for (i = 0; i < s; i++)
     165+               mpz_set(mp_N[(r + i) * s + i], mp_D);
     166+
     167+           XFREE(C);
     168+           for (i = 0; i < r * s; i++)
     169+               mpz_clear(mp_B[i]);
     170+           XFREE(mp_B);
     171+           mpz_clear(mp_D);
     172+
     173+           for (i = r; i >= 1; i--)
     174+               for (j = 0; j < s; j++)
     175+                   mpz_swap(mp_N[(i - 1) * s + j],
     176+                            mp_N[(rp[i] - 1) * s + j]);
     177+
     178+           *mp_N_pass = mp_N;
     179+
     180+           flag = 1;
     181+           mpz_init(mp_t1);
     182+           mpz_init(mp_t2);
     183+           for (i = r; i < n && flag; i++) {
     184+               for (j = 0; j < s && flag; j++) {
     185+                   mpz_set_ui(mp_t2, 0);
     186+                   for (k = 0; k < m; k++) {
     187+                       mpz_mul(mp_t1, mp_N[k * s + j],  A[Pt[i] * m + k]);
     188+                       mpz_add(mp_t2, mp_t2, mp_t1);
     189+                   }
     190+                   if (mpz_sgn(mp_t2) != 0)
     191+                       flag = 0;
     192+               }
     193+           }
     194+           mpz_clear(mp_t1);
     195+           mpz_clear(mp_t2);
     196+
     197+           XFREE(Pt);
     198+           XFREE(rpt);
     199+
     200+           if (!flag) {
     201+               for (i = 0; i < m * s; i++)
     202+                   mpz_clear(mp_N[i]);
     203+               XFREE(mp_N);
     204+               continue;
     205+           }
     206+       }
     207+       break;
     208+    }
     209+    XFREE(P);
     210+    XFREE(rp);
     211+
     212+    return s;
     213+
     214+}
  • new file patches/sage2.patch

    diff --git a/patches/sage2.patch b/patches/sage2.patch
    new file mode 100644
    - +  
     1# HG changeset patch
     2# User William Stein <wstein@gmail.com>
     3# Date 1172736931 28800
     4# Node ID f0a617a1c36473f86e542406cba3e90778a45c49
     5# Parent  65361f8749433213043132225730e8aaef9a2890
     6Fix some memory leaks.
     7
     8--- a/src/nullspace.c
     9+++ b/src/nullspace.c
     10@@ -273,12 +273,18 @@
     11            mp_N = XCALLOC(mpz_t, m * s);
     12            for (i = 0; i < m * s; i++)
     13                mpz_init(mp_N[i]);
     14+
     15+
     16            nonsingSolvLlhsMM(RightSolu, r, s, C, mp_B, mp_N, mp_D);
     17+
     18            mpz_neg(mp_D, mp_D);
     19            for (i = 0; i < s; i++)
     20                mpz_set(mp_N[(r + i) * s + i], mp_D);
     21 
     22+           for (i = 0; i < r*r; i++)
     23+               mpz_clear(C[i]);
     24            XFREE(C);
     25+
     26            for (i = 0; i < r * s; i++)
     27                mpz_clear(mp_B[i]);
     28            XFREE(mp_B);
     29@@ -323,6 +329,7 @@
     30     XFREE(P);
     31     XFREE(rp);
     32 
     33+    mpz_clear(mp_r);
     34     return s;
     35 
     36 }
  • .patch

    diff --git a/patches/iml-1.0.1.p6-fix-memleak-in-nullspace.c.patch b/patches/sage3_memleak.patch
    rename from patches/iml-1.0.1.p6-fix-memleak-in-nullspace.c.patch
    rename to patches/sage3_memleak.patch
    old new  
    1 --- src/src/nullspace.c.orig    2007-10-23 08:58:57.000000000 -0700
    2 +++ src/src/nullspace.c 2007-10-23 08:59:19.000000000 -0700
     1--- a/src/nullspace.c   2013-06-10 23:44:52.982405509 +0200
     2+++ b/src/nullspace.c   2007-10-23 17:59:19.000000000 +0200
    33@@ -251,7 +251,7 @@
    44            for (i = 0; i < m; i++) {
    55                for (j = 0; j < m; j++)
  • new file patches/tinyatlas.patch

    diff --git a/patches/tinyatlas.patch b/patches/tinyatlas.patch
    new file mode 100644
    - +  
     1diff -ruN iml-1.0.1-sage/src/tinyatlas.h src/src/tinyatlas.h
     2--- iml-1.0.1-sage/src/tinyatlas.h      1970-01-01 01:00:00.000000000 +0100
     3+++ src/src/tinyatlas.h 2007-03-01 04:11:42.000000000 +0100
     4@@ -0,0 +1,17 @@
     5+/*
     6+Compute Y = alpha * X + beta * Y
     7+
     8+where
     9+   N = degree of each vector
     10+   incX = X stride
     11+   incY = Y stride
     12+*/
     13+
     14+void catlas_daxpby(const int N, const double alpha, const double *X,
     15+const int incX, const double beta, double *Y, const int incY)
     16+{
     17+  int i;
     18+  for(i=0; i < N; i++) {
     19+    Y[i*incY] = alpha * X[i*incX] + beta * Y[i*incY];
     20+  }
     21+}
  • spkg-check

    diff --git a/spkg-check b/spkg-check
    a b  
    11#!/usr/bin/env bash
    22
    3 if [ "$SAGE_LOCAL" = "" ]; then
    4    echo "SAGE_LOCAL undefined ... exiting";
    5    echo "Maybe run 'sage -sh'?"
    6    exit 1
     3if [ -z "$SAGE_LOCAL" ]; then
     4    echo >&2 "SAGE_LOCAL undefined ... exiting"
     5    echo >&2 "Maybe run 'sage -sh'?"
     6    exit 1
     7fi
     8
     9cd src
     10
     11if [ "$SAGE_DEBUG" = "yes" ]; then
     12    export CFLAGS="-O0 -g $CFLAGS"
     13else
     14    export CFLAGS="-O2 -g $CFLAGS"
    715fi
    816
    917if [ "$SAGE64" = "yes" ]; then
    10    CFLAGS="-O2 -g -m64 "; export CFLAGS
    11    CPPFLAGS="-O2 -g -m64 "; export CPPFLAGS
     18    CFLAGS="-m64 $CFLAGS"
    1219fi
    1320
    14 cd src
    1521
    1622echo "Testing the IML library"
    17 
    18 make check
    19 
     23$MAKE check
    2024if [ $? -ne 0 ]; then
    21     echo "Error testing IML"
     25    echo >&2 "Error testing IML."
    2226    exit 1
    2327fi
    24 
  • spkg-install

    diff --git a/spkg-install b/spkg-install
    a b  
    11#!/usr/bin/env bash
    22
    3 if [ "$SAGE_LOCAL" = "" ]; then
    4    echo "SAGE_LOCAL undefined ... exiting";
    5    echo "Maybe run 'sage -sh'?"
    6    exit 1
     3if [ -z "$SAGE_LOCAL" ]; then
     4    echo >&2 "SAGE_LOCAL undefined ... exiting"
     5    echo >&2 "Maybe run 'sage --sh'?"
     6    exit 1
     7fi
     8
     9cd src
     10
     11# Apply patches.
     12for patch in ../patches/*.patch; do
     13    [ -r "$patch" ] || continue  # Skip non-existing or non-readable patches
     14    patch -p1 <"$patch"
     15    if [ $? -ne 0 ]; then
     16        echo >&2 "Error applying '$patch'"
     17        exit 1
     18    fi
     19done
     20
     21
     22if [ "$SAGE_DEBUG" = "yes" ]; then
     23    echo "Building a debug version of IML."
     24    export CFLAGS="-O0 -g $CFLAGS"
     25else
     26    export CFLAGS="-O2 -g $CFLAGS"
    727fi
    828
    929if [ "$SAGE64" = "yes" ]; then
    10    echo "64 bit build"
    11    CFLAGS="-O2 -g -m64 "; export CFLAGS
    12    CPPFLAGS="-O2 -g -m64 "; export CPPFLAGS
     30    echo "Building a 64-bit version of IML."
     31    CFLAGS="-m64 $CFLAGS"
    1332fi
    1433
    15 cp patches/configure src
    16 
    17 cd src
    18 
    19 if [ -f "$SAGE_LOCAL"/lib/libatlas.so ]; then
    20     ./configure --prefix="$SAGE_LOCAL" --libdir="$SAGE_LOCAL/lib" --enable-shared --with-gmp-include="$SAGE_LOCAL"/include --with-gmp-lib="$SAGE_LOCAL"/lib --with-atlas-include="$SAGE_LOCAL"/include --with-atlas-lib="$SAGE_LOCAL"/lib
     34if [ -d "$SAGE_LOCAL/include/atlas" ]; then
     35    # We actually installed ATLAS
     36    echo "Using ATLAS headers installed by Sage"
     37    ./configure --prefix="$SAGE_LOCAL" --libdir="$SAGE_LOCAL/lib" \
     38        --enable-shared --with-default="$SAGE_LOCAL"
    2139else
    22     ./configure --prefix="$SAGE_LOCAL" --libdir="$SAGE_LOCAL/lib" --enable-shared --with-gmp-include="$SAGE_LOCAL"/include --with-gmp-lib="$SAGE_LOCAL"/lib --with-atlas-include="`pwd`" --with-atlas-lib=/usr/lib/
     40    # We symlinked from a system-wide installation, so let's use GSL's header
     41    # Note that setting --with-atlas-lib to /usr/lib does not really make sense
     42    echo "Using system-wide ATLAS, using headers copied from GSL"
     43    ./configure --prefix="$SAGE_LOCAL" --libdir="$SAGE_LOCAL/lib" \
     44        --enable-shared --with-default="$SAGE_LOCAL" \
     45        --with-atlas-include="`pwd`" --with-atlas-lib=/usr/lib
    2346fi
    2447
    2548if [ $? -ne 0 ]; then
    26     echo "Error configuring IML"
     49    echo >&2 "Error configuring IML."
    2750    exit 1
    2851fi
    2952
    30 make
    31 
     53$MAKE
    3254if [ $? -ne 0 ]; then
    33     echo "Error building IML"
     55    echo >&2 "Error building IML."
    3456    exit 1
    3557fi
    3658
    37 make install
    38 
     59$MAKE install
    3960if [ $? -ne 0 ]; then
    40     echo "Error installing IML"
     61    echo >&2 "Error installing IML."
    4162    exit 1
    4263fi
    43 
  • new file spkg-src

    diff --git a/spkg-src b/spkg-src
    new file mode 100755
    - +  
     1#!/bin/sh
     2
     3# Run this after extracting the upstream sources in src/
     4
     5# Make various files executable
     6cd src
     7chmod ugo+x bootstrap configure
     8chmod ugo+x config/compile config/depcomp config/install-sh config/ltmain.sh config/missing
     9