Remove single precision concurrent dependecies on sdot BLAS vs Local implementation. 33/5633/2
Bruno JOFRET [Tue, 13 Dec 2011 14:36:22 +0000 (15:36 +0100)]
Change-Id: Iafc0eef3b2df3e37f13694227094d66c2d2bbb56

scilab/modules/elementary_functions/Makefile.am
scilab/modules/elementary_functions/Makefile.in
scilab/modules/elementary_functions/src/fortran/elementary_functions_f.vfproj
scilab/modules/elementary_functions/src/fortran/elementary_functions_f2c.vcxproj
scilab/modules/elementary_functions/src/fortran/elementary_functions_f2c.vcxproj.filters
scilab/modules/elementary_functions/src/fortran/linpack/linpack_f.vfproj
scilab/modules/elementary_functions/src/fortran/linpack/linpack_f2c.vcxproj
scilab/modules/elementary_functions/src/fortran/linpack/linpack_f2c.vcxproj.filters
scilab/modules/elementary_functions/src/fortran/linpack/spofa.f [deleted file]
scilab/modules/elementary_functions/src/fortran/sdot.f [deleted file]
scilab/modules/randlib/src/fortran/setgmn.f

index cd44097..e56b8a7 100644 (file)
@@ -131,7 +131,6 @@ LINPACK_SOURCES =    src/fortran/linpack/dgesl.f \
        src/fortran/linpack/dqrsl.f \
        src/fortran/linpack/dqrsm.f \
        src/fortran/linpack/hhdml.f \
-       src/fortran/linpack/spofa.f \
        src/fortran/linpack/wgeco.f \
        src/fortran/linpack/wgefa.f \
        src/fortran/linpack/wgesl.f \
@@ -255,8 +254,7 @@ src/fortran/wvmul.f \
 src/fortran/dmmul.f \
 src/fortran/wsqrt.f \
 src/fortran/israt.f \
-src/fortran/rat.f \
-src/fortran/sdot.f
+src/fortran/rat.f
 
 GATEWAY_C_SOURCES = sci_gateway/c/sci_isequal.c \
 sci_gateway/c/sci_matrix.c \
@@ -361,7 +359,7 @@ sci_gateway/fortran/sci_f_exp.f
 EISPACK_SOURCES = src/fortran/eispack/balbak.f
 
 # Disable optimisation of the file hqror2.f comqr3.f pade.f
-noinst_LTLIBRARIES = libdummy-elementary_functions.la 
+noinst_LTLIBRARIES = libdummy-elementary_functions.la
 
 libdummy_elementary_functions_la_SOURCES = src/fortran/eispack/hqror2.f \
        src/fortran/comqr3.f \
@@ -408,7 +406,7 @@ endif
 libscielementary_functions_la_LDFLAGS = -version-number $(SCILAB_LIBRARY_VERSION)
 
 libscielementary_functions_algo_la_SOURCES = $(SLATEC_SOURCES) $(LINPACK_SOURCES)  $(EISPACK_SOURCES) $(ELEMENTARIES_FUNCTIONS_C_SOURCES) $(ELEMENTARIES_FUNCTIONS_FORTRAN_SOURCES) $(ELEMENTARIES_FUNCTIONS_CPP_SOURCES)
-libscielementary_functions_la_SOURCES = $(GATEWAY_C_SOURCES) $(GATEWAY_FORTRAN_SOURCES) 
+libscielementary_functions_la_SOURCES = $(GATEWAY_C_SOURCES) $(GATEWAY_FORTRAN_SOURCES)
 libscielementary_functions_algo_la_CFLAGS = $(libscielementary_functions_la_CFLAGS)
 
 # For the code check (splint)
@@ -441,7 +439,7 @@ modulename=elementary_functions
 
 #### elementary_functions : Conf files ####
 libscielementary_functions_la_rootdir = $(mydatadir)
-libscielementary_functions_la_root_DATA =  license.txt 
+libscielementary_functions_la_root_DATA =  license.txt
 
 
 
index 45db9dd..8ab23c2 100644 (file)
@@ -141,8 +141,8 @@ am__objects_1 = zwrsk.lo d9b0mp.lo d9b1mp.lo d9knus.lo d9lgmc.lo \
        zunk1.lo zunk2.lo zuoik.lo dlngam.lo balanc.lo dtensbs.lo \
        pchim.lo
 am__objects_2 = dgesl.lo wpade.lo util.lo wcopy.lo dgefa.lo dgbfa.lo \
-       dgeco.lo dgedi.lo dqrdc.lo dqrsl.lo dqrsm.lo hhdml.lo spofa.lo \
-       wgeco.lo wgefa.lo wgesl.lo dpofa.lo
+       dgeco.lo dgedi.lo dqrdc.lo dqrsl.lo dqrsm.lo hhdml.lo wgeco.lo \
+       wgefa.lo wgesl.lo dpofa.lo
 am__objects_3 = balbak.lo
 am__objects_4 = libscielementary_functions_algo_la-sci_tools.lo \
        libscielementary_functions_algo_la-finite.lo \
@@ -185,7 +185,7 @@ am__objects_5 = psi.lo wasum.lo dexpm1.lo wwdiv.lo wdotcr.lo iset.lo \
        dmcopy.lo wexchn.lo isoval.lo dwrdiv.lo wipow.lo wlog.lo \
        infinity.lo dwpow1.lo wmul.lo dad.lo dset.lo dtild.lo \
        i1mach.lo dclmat.lo ortran.lo bdiag.lo wvmul.lo dmmul.lo \
-       wsqrt.lo israt.lo rat.lo sdot.lo
+       wsqrt.lo israt.lo rat.lo
 am__objects_6 =
 am_libscielementary_functions_algo_la_OBJECTS = $(am__objects_1) \
        $(am__objects_2) $(am__objects_3) $(am__objects_4) \
@@ -714,7 +714,6 @@ LINPACK_SOURCES = src/fortran/linpack/dgesl.f \
        src/fortran/linpack/dqrsl.f \
        src/fortran/linpack/dqrsm.f \
        src/fortran/linpack/hhdml.f \
-       src/fortran/linpack/spofa.f \
        src/fortran/linpack/wgeco.f \
        src/fortran/linpack/wgefa.f \
        src/fortran/linpack/wgesl.f \
@@ -838,8 +837,7 @@ src/fortran/wvmul.f \
 src/fortran/dmmul.f \
 src/fortran/wsqrt.f \
 src/fortran/israt.f \
-src/fortran/rat.f \
-src/fortran/sdot.f
+src/fortran/rat.f
 
 GATEWAY_C_SOURCES = sci_gateway/c/sci_isequal.c \
 sci_gateway/c/sci_matrix.c \
@@ -981,7 +979,7 @@ libscielementary_functions_la_CFLAGS = -I$(srcdir)/includes/ \
 @MAINTAINER_MODE_TRUE@pkglib_LTLIBRARIES = libscielementary_functions.la
 libscielementary_functions_la_LDFLAGS = -version-number $(SCILAB_LIBRARY_VERSION)
 libscielementary_functions_algo_la_SOURCES = $(SLATEC_SOURCES) $(LINPACK_SOURCES)  $(EISPACK_SOURCES) $(ELEMENTARIES_FUNCTIONS_C_SOURCES) $(ELEMENTARIES_FUNCTIONS_FORTRAN_SOURCES) $(ELEMENTARIES_FUNCTIONS_CPP_SOURCES)
-libscielementary_functions_la_SOURCES = $(GATEWAY_C_SOURCES) $(GATEWAY_FORTRAN_SOURCES) 
+libscielementary_functions_la_SOURCES = $(GATEWAY_C_SOURCES) $(GATEWAY_FORTRAN_SOURCES)
 libscielementary_functions_algo_la_CFLAGS = $(libscielementary_functions_la_CFLAGS)
 
 # For the code check (splint)
@@ -994,7 +992,7 @@ modulename = elementary_functions
 
 #### elementary_functions : Conf files ####
 libscielementary_functions_la_rootdir = $(mydatadir)
-libscielementary_functions_la_root_DATA = license.txt 
+libscielementary_functions_la_root_DATA = license.txt
 
 #### elementary_functions : init scripts ####
 libscielementary_functions_la_etcdir = $(mydatadir)/etc
@@ -2069,9 +2067,6 @@ dqrsm.lo: src/fortran/linpack/dqrsm.f
 hhdml.lo: src/fortran/linpack/hhdml.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o hhdml.lo `test -f 'src/fortran/linpack/hhdml.f' || echo '$(srcdir)/'`src/fortran/linpack/hhdml.f
 
-spofa.lo: src/fortran/linpack/spofa.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o spofa.lo `test -f 'src/fortran/linpack/spofa.f' || echo '$(srcdir)/'`src/fortran/linpack/spofa.f
-
 wgeco.lo: src/fortran/linpack/wgeco.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o wgeco.lo `test -f 'src/fortran/linpack/wgeco.f' || echo '$(srcdir)/'`src/fortran/linpack/wgeco.f
 
@@ -2441,9 +2436,6 @@ israt.lo: src/fortran/israt.f
 rat.lo: src/fortran/rat.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o rat.lo `test -f 'src/fortran/rat.f' || echo '$(srcdir)/'`src/fortran/rat.f
 
-sdot.lo: src/fortran/sdot.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o sdot.lo `test -f 'src/fortran/sdot.f' || echo '$(srcdir)/'`src/fortran/sdot.f
-
 libscielementary_functions_la-sci_f_isequal.lo: sci_gateway/fortran/sci_f_isequal.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(libscielementary_functions_la_FFLAGS) $(FFLAGS) -c -o libscielementary_functions_la-sci_f_isequal.lo `test -f 'sci_gateway/fortran/sci_f_isequal.f' || echo '$(srcdir)/'`sci_gateway/fortran/sci_f_isequal.f
 
index 9710d28..27397e7 100644 (file)
@@ -223,7 +223,6 @@ lib /DEF:"$(InputDir)integer_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:X
                <File RelativePath="..\..\sci_gateway\fortran\sci_f_tril.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_f_triu.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_f_zeros.f"/>
-               <File RelativePath=".\sdot.f"/>
                <File RelativePath=".\simple.f"/>
                <File RelativePath=".\split.f"/>
                <File RelativePath=".\urand.f"/>
index e6a925f..07f8a7b 100644 (file)
@@ -380,7 +380,6 @@ cd ..
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_tril.c" />
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_triu.c" />
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_zeros.c" />
-    <ClCompile Include="sdot.c" />
     <ClCompile Include="simple.c" />
     <ClCompile Include="split.c" />
     <ClCompile Include="urand.c" />
@@ -549,7 +548,6 @@ cd ..
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_tril.f" />
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_triu.f" />
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_zeros.f" />
-    <f2c_rule Include="sdot.f" />
     <f2c_rule Include="simple.f" />
     <f2c_rule Include="split.f" />
     <f2c_rule Include="urand.f" />
index 748ac9e..b2e0e9b 100644 (file)
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_zeros.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="sdot.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="simple.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_zeros.f">
       <Filter>Fortran files</Filter>
     </f2c_rule>
-    <f2c_rule Include="sdot.f">
-      <Filter>Fortran files</Filter>
-    </f2c_rule>
     <f2c_rule Include="simple.f">
       <Filter>Fortran files</Filter>
     </f2c_rule>
index 065de20..1d7716b 100644 (file)
@@ -101,7 +101,6 @@ lib /DEF:&quot;$(InputDir)Elementary_functions_Import.def&quot; /SUBSYSTEM:WINDO
                <File RelativePath=".\hhdml.f"/>
                <File RelativePath=".\icopy.f"/>
                <File RelativePath=".\pade.f"/>
-               <File RelativePath=".\spofa.f"/>
                <File RelativePath=".\util.f"/>
                <File RelativePath=".\wcopy.f"/>
                <File RelativePath=".\wgeco.f"/>
index 5c0458c..5bf1110 100644 (file)
@@ -252,7 +252,6 @@ cd ..
     <ClCompile Include="hhdml.c" />
     <ClCompile Include="icopy.c" />
     <ClCompile Include="pade.c" />
-    <ClCompile Include="spofa.c" />
     <ClCompile Include="util.c" />
     <ClCompile Include="wcopy.c" />
     <ClCompile Include="wgeco.c" />
@@ -273,7 +272,6 @@ cd ..
     <f2c_rule Include="hhdml.f" />
     <f2c_rule Include="icopy.f" />
     <f2c_rule Include="pade.f" />
-    <f2c_rule Include="spofa.f" />
     <f2c_rule Include="util.f" />
     <f2c_rule Include="wcopy.f" />
     <f2c_rule Include="wgeco.f" />
index c74d5ab..1d1b85e 100644 (file)
@@ -54,9 +54,6 @@
     <ClCompile Include="pade.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="spofa.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="util.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <f2c_rule Include="pade.f">
       <Filter>Fortran Files</Filter>
     </f2c_rule>
-    <f2c_rule Include="spofa.f">
-      <Filter>Fortran Files</Filter>
-    </f2c_rule>
     <f2c_rule Include="util.f">
       <Filter>Fortran Files</Filter>
     </f2c_rule>
diff --git a/scilab/modules/elementary_functions/src/fortran/linpack/spofa.f b/scilab/modules/elementary_functions/src/fortran/linpack/spofa.f
deleted file mode 100644 (file)
index 56544a1..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-*DECK SPOFA
-      SUBROUTINE spofa(a,lda,n,info)
-      INTEGER lda,n,info
-      DOUBLE PRECISION a(lda,1)
-C
-C     SPOFA FACTORS A DOUBLE PRECISION SYMMETRIC POSITIVE DEFINITE MATRIX.
-C
-C     SPOFA IS USUALLY CALLED BY SPOCO, BUT IT CAN BE CALLED
-C     DIRECTLY WITH A SAVING IN TIME IF  RCOND  IS NOT NEEDED.
-C     (TIME FOR SPOCO) = (1 + 18/N)*(TIME FOR SPOFA) .
-C
-C     ON ENTRY
-C
-C        A       DOUBLE PRECISION(LDA, N)
-C                THE SYMMETRIC MATRIX TO BE FACTORED.  ONLY THE
-C                DIAGONAL AND UPPER TRIANGLE ARE USED.
-C
-C        LDA     INTEGER
-C                THE LEADING DIMENSION OF THE ARRAY  A .
-C
-C        N       INTEGER
-C                THE ORDER OF THE MATRIX  A .
-C
-C     ON RETURN
-C
-C        A       AN UPPER TRIANGULAR MATRIX  R  SO THAT  A = TRANS(R)*R
-C                WHERE  TRANS(R)  IS THE TRANSPOSE.
-C                THE STRICT LOWER TRIANGLE IS UNALTERED.
-C                IF  INFO .NE. 0 , THE FACTORIZATION IS NOT COMPLETE.
-C
-C        INFO    INTEGER
-C                = 0  FOR NORMAL RETURN.
-C                = K  SIGNALS AN ERROR CONDITION.  THE LEADING MINOR
-C                     OF ORDER  K  IS NOT POSITIVE DEFINITE.
-C
-C     LINPACK.  THIS VERSION DATED 08/14/78 .
-C     CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB.
-C
-C     SUBROUTINES AND FUNCTIONS
-C
-C     BLAS SDOT
-C     FORTRAN SQRT
-C
-C     INTERNAL VARIABLES
-C
-      DOUBLE PRECISION sdot,t
-      DOUBLE PRECISION s
-      INTEGER j,jm1,k
-C     BEGIN BLOCK WITH ...EXITS TO 40
-C
-C
-      DO 30 j = 1,n
-          info = j
-          s = 0.0E0
-          jm1 = j - 1
-          IF (jm1.LT.1) GO TO 20
-          DO 10 k = 1,jm1
-              t = a(k,j) - sdot(k-1,a(1,k),1,a(1,j),1)
-              t = t/a(k,k)
-              a(k,j) = t
-              s = s + t*t
-   10     CONTINUE
-   20     CONTINUE
-          s = a(j,j) - s
-C     ......EXIT
-          IF (s.LE.0.0E0) GO TO 40
-          a(j,j) = sqrt(s)
-   30 CONTINUE
-      info = 0
-   40 CONTINUE
-      RETURN
-
-      END
diff --git a/scilab/modules/elementary_functions/src/fortran/sdot.f b/scilab/modules/elementary_functions/src/fortran/sdot.f
deleted file mode 100644 (file)
index 8b3796e..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-      DOUBLE PRECISION FUNCTION sdot(n,sx,incx,sy,incy)
-      DOUBLE PRECISION sx(1),sy(1),stemp
-      INTEGER i,incx,incy,ix,iy,m,mp1,n
-
-      stemp = 0.0E0
-      sdot = 0.0E0
-      IF (n.LE.0) RETURN
-      IF (incx.EQ.1 .AND. incy.EQ.1) GO TO 20
-      ix = 1
-      iy = 1
-      IF (incx.LT.0) ix = (-n+1)*incx + 1
-      IF (incy.LT.0) iy = (-n+1)*incy + 1
-      DO 10 i = 1,n
-          stemp = stemp + sx(ix)*sy(iy)
-          ix = ix + incx
-          iy = iy + incy
-   10 CONTINUE
-      sdot = stemp
-      RETURN
-
-   20 m = mod(n,5)
-      IF (m.EQ.0) GO TO 40
-      DO 30 i = 1,m
-          stemp = stemp + sx(i)*sy(i)
-   30 CONTINUE
-      IF (n.LT.5) GO TO 60
-   40 mp1 = m + 1
-      DO 50 i = mp1,n,5
-          stemp = stemp + sx(i)*sy(i) + sx(i+1)*sy(i+1) +
-     +            sx(i+2)*sy(i+2) + sx(i+3)*sy(i+3) + sx(i+4)*sy(i+4)
-   50 CONTINUE
-   60 sdot = stemp
-      RETURN
-
-      END
index 06f3e63..ab42534 100644 (file)
@@ -48,7 +48,7 @@ C
 C**********************************************************************
 C     .. Scalar Arguments ..
 C      INTEGER p
-      include 'stack.h' 
+      include 'stack.h'
       INTEGER p, ldcovm
 C     ..
 C     .. Array Arguments ..
@@ -59,7 +59,7 @@ C     .. Local Scalars ..
       INTEGER i,icount,info,j
 C     ..
 C     .. External Subroutines ..
-      EXTERNAL spofa
+      EXTERNAL dpofa
 C     ..
 C     .. Executable Statements ..
 C
@@ -76,8 +76,8 @@ C
 C
 C      Cholesky decomposition to find A s.t. trans(A)*(A) = COVM
 C
-C      CALL spofa(covm,p,p,info)
-      CALL spofa(covm,ldcovm,p,info)
+C      CALL dpofa(covm,p,p,info)
+      CALL dpofa(covm,ldcovm,p,info)
       ierr=0
       IF (.NOT. (info.NE.0)) GO TO 30
       call basout(io,wte,"Rand: COV not positive definite")