pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/benchmarks/benchfft Fix build with GCC 4 and f2c.
details: https://anonhg.NetBSD.org/pkgsrc/rev/cf7f53f95a02
branches: trunk
changeset: 543665:cf7f53f95a02
user: joerg <joerg%pkgsrc.org@localhost>
date: Sat Jun 21 20:00:22 2008 +0000
description:
Fix build with GCC 4 and f2c.
diffstat:
benchmarks/benchfft/distinfo | 5 +-
benchmarks/benchfft/patches/patch-af | 419 ++++++++++++++++++++++++++++++++++
benchmarks/benchfft/patches/patch-ag | 423 +++++++++++++++++++++++++++++++++++
benchmarks/benchfft/patches/patch-ah | 20 +
4 files changed, 866 insertions(+), 1 deletions(-)
diffs (truncated from 890 to 300 lines):
diff -r 413413d7c08f -r cf7f53f95a02 benchmarks/benchfft/distinfo
--- a/benchmarks/benchfft/distinfo Sat Jun 21 19:31:03 2008 +0000
+++ b/benchmarks/benchfft/distinfo Sat Jun 21 20:00:22 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2005/12/20 17:58:51 joerg Exp $
+$NetBSD: distinfo,v 1.8 2008/06/21 20:00:22 joerg Exp $
SHA1 (benchfft-2.0.tar.gz) = b49cbad9d390e54d3afe661d51d3dce7b3d6435e
RMD160 (benchfft-2.0.tar.gz) = bd9ef45e633b8384c836e32e1e1cee877495bb26
@@ -11,3 +11,6 @@
SHA1 (patch-ac) = 24a1f01426f7e905f5033202b075786f2a632aa4
SHA1 (patch-ad) = af0b491821b32d4039dd5bc17613b2a0872d13c0
SHA1 (patch-ae) = ea3cc3719931d2d99484b5291e878a289565174f
+SHA1 (patch-af) = b301bdb6707f448fae83d1f0659ae966e3869027
+SHA1 (patch-ag) = a08153a6a8800184e7d186bf44a36f11372e853c
+SHA1 (patch-ah) = f03ce90b929b8a460157aff96facb3163d4e401c
diff -r 413413d7c08f -r cf7f53f95a02 benchmarks/benchfft/patches/patch-af
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/benchmarks/benchfft/patches/patch-af Sat Jun 21 20:00:22 2008 +0000
@@ -0,0 +1,419 @@
+$NetBSD: patch-af,v 1.5 2008/06/21 20:00:22 joerg Exp $
+
+Reorder functions in usage order to fix compilation with f2c.
+
+--- f_source/sciport/ffts.f.orig 2008-06-21 13:38:06.000000000 +0000
++++ f_source/sciport/ffts.f
+@@ -1,3 +1,190 @@
++C----------------------------------------------- ************
++C CABLE2
++C ************
++ SUBROUTINE SPSCABLE2(NN,WORK)
++C
++ REAL WORK(2,NN),TWOPI
++ DATA TWOPI /6.28318530717958647692/
++C
++ N = 2 * NN
++ P2 = TWOPI/N
++ DO 10 I=1, NN
++ WORK(1,I) = COS(P2 * (I-1))
++ WORK(2,I) = SIN(P2 * (I-1))
++ 10 CONTINUE
++ RETURN
++ END
++
++C----------------------------------------------- ************
++C RCONV2
++C ************
++ SUBROUTINE SPSRCONV2(N,CY,C,CH)
++C
++ COMPLEX CY(1)
++ REAL CH(N/2,2),P(2,1),C(2,N/2)
++C
++ N2 = N/2
++ P(1,1) = (C(1,1) + C(2,1)) * 2
++ P(2,1) = (C(1,1) - C(2,1)) * 2
++ CY(1) = CMPLX(P(1,1),0.)
++ CY(N2+1) = CMPLX(P(2,1),0.)
++ K = N2
++ DO 10 I=2, N2
++ X = C(1,I)+C(1,K)
++ Y = C(2,I)+C(2,K)
++ Z = C(1,I)-C(1,K)
++ Z1= C(2,I)-C(2,K)
++ P(1,1) = X + CH(I,1) * Y - CH(I,2) * Z
++ P(2,1) = Z1 - CH(I,2) * Y - CH(I,1) * Z
++ CY(I) = CMPLX(P(1,1),P(2,1))
++ K = K - 1
++ 10 CONTINUE
++ RETURN
++ END
++
++C----------------------------------------------- ************
++C RCONV1
++C ************
++ SUBROUTINE SPSRCONV1(N,CY,C,CH)
++C
++ COMPLEX CY(1)
++ REAL CH(N/2,2),P(2,1),C(2,N/2)
++C
++ N2 = N/2
++ P(1,1) = (C(1,1) + C(2,1)) * 2
++ P(2,1) = (C(1,1) - C(2,1)) * 2
++ CY(1) = CMPLX(P(1,1),0.)
++ CY(N2+1) = CMPLX(P(2,1),0.)
++ K = N2
++ DO 10 I=2, N2
++ X = C(1,I)+C(1,K)
++ Y = C(2,I)+C(2,K)
++ Z = C(1,I)-C(1,K)
++ Z1= C(2,I)-C(2,K)
++ P(1,1) = X + CH(I,1) * Y + CH(I,2) * Z
++ P(2,1) = Z1 + CH(I,2) * Y - CH(I,1) * Z
++ CY(I) = CMPLX(P(1,1),P(2,1))
++ K = K - 1
++ 10 CONTINUE
++ RETURN
++ END
++
++C----------------------------------------------- ************
++C CRFORM
++C ************
++ SUBROUTINE SPSRABLE1(NN,WORK)
++C
++ REAL WORK(NN,2),TWOPI
++ DATA TWOPI /6.28318530717958647692/
++C
++ N = 2 * NN
++ P2 = TWOPI/N
++ DO 10 I=1, NN
++ WORK(I,1) = COS(P2 * (I-1))
++ WORK(I,2) = SIN(P2 * (I-1))
++ 10 CONTINUE
++ RETURN
++ END
++
++C----------------------------------------------- ************
++C RTOCK3
++C ************
++ SUBROUTINE SPSRTOCK3(LS,NS,C,CH,CH2)
++C
++ COMPLEX WYK,C(NS,LS,2),CH(NS,2,LS)
++ REAL CH2(2,NS,LS,2)
++C
++ IF (LS .GT. NS) GOTO 30
++ DO 600 I=1, LS
++ DO 600 J=1, NS
++ WYK =CONJG(CMPLX(CH2(1,1,I,1),CH2(1,1,I,2))) * CH(J,2,I)
++ C(J,I,1) = CH(J,1,I) + WYK
++ C(J,I,2) = CH(J,1,I) - WYK
++ 600 CONTINUE
++ RETURN
++ 30 CONTINUE
++ DO 800 J=1, NS
++ DO 800 I=1, LS
++ WYK =CONJG(CMPLX(CH2(1,1,I,1),CH2(1,1,I,2))) * CH(J,2,I)
++ C(J,I,1) = CH(J,1,I) + WYK
++ C(J,I,2) = CH(J,1,I) - WYK
++ 800 CONTINUE
++ RETURN
++ END
++
++C----------------------------------------------- ************
++C RTOCK2
++C ************
++ SUBROUTINE SPSRTOCK2(LS,NS,C,CH,CH2)
++C
++ COMPLEX WYK,C(NS,LS,2),CH(NS,2,LS)
++ REAL CH2(2,NS,LS,2)
++C
++ IF (LS .GT. NS) GOTO 20
++ DO 200 I=1, LS
++ DO 200 J=1, NS
++ WYK = CMPLX(CH2(1,1,I,1),CH2(1,1,I,2)) * CH(J,2,I)
++ C(J,I,1) = CH(J,1,I) + WYK
++ C(J,I,2) = CH(J,1,I) - WYK
++ 200 CONTINUE
++ RETURN
++ 20 CONTINUE
++ DO 400 J=1, NS
++ DO 400 I=1, LS
++ WYK = CMPLX(CH2(1,1,I,1),CH2(1,1,I,2)) * CH(J,2,I)
++ C(J,I,1) = CH(J,1,I) + WYK
++ C(J,I,2) = CH(J,1,I) - WYK
++ 400 CONTINUE
++ RETURN
++ END
++
++C----------------------------------------------- ************
++C CRBLE1
++C ************
++ SUBROUTINE SPSCRBLE1(NN,WORK)
++C
++ REAL WORK(NN,2),TWOPI
++ DATA TWOPI /6.28318530717958647692/
++C
++ N = 2 * NN
++ P2 = TWOPI/N
++ DO 10 I=1, NN
++ WORK(I,1) = COS(P2 * (I-1))
++ WORK(I,2) = SIN(P2 * (I-1))
++ 10 CONTINUE
++ RETURN
++ END
++
++C----------------------------------------------- ************
++C CRFORM
++C ************
++ SUBROUTINE SPSCRFORM(IX,NS,NDIV2,CX,C,CH2)
++C
++ COMPLEX CX(1),WYK1,C(NS,2),WYK
++ REAL CH2(NDIV2,2)
++C
++ IF (IX .GT. 0) GOTO 50
++ K = NS + 1
++ DO 10 I=1, NS
++ WYK = CONJG(CX(NDIV2-I+2))
++ C(I,1)= CX(I)+WYK + (CX(I) - WYK) * CMPLX(CH2(I,2),CH2(I,1))
++ WYK1 = CONJG(CX(NDIV2-K+2))
++ C(I,2)= CX(K)+WYK1+ (CX(K) -WYK1) * CMPLX(CH2(K,2),CH2(K,1))
++ K = K + 1
++ 10 CONTINUE
++ RETURN
++ 50 CONTINUE
++ K = NS + 1
++ DO 20 I=1, NS
++ WYK = CONJG(CX(NDIV2-I+2))
++ C(I,1)= CX(I)+WYK + (CX(I) - WYK) * CMPLX(-CH2(I,2),CH2(I,1))
++ WYK1 = CONJG(CX(NDIV2-K+2))
++ C(I,2)= CX(K)+WYK1 +(CX(K) -WYK1) * CMPLX(-CH2(K,2),CH2(K,1))
++ K = K + 1
++ 20 CONTINUE
++ RETURN
++ END
++
+ C------------------------------------------------------------- ************
+ C CRFFT2
+ C ************
+@@ -62,36 +249,6 @@ C
+ END
+
+ C----------------------------------------------- ************
+-C CRFORM
+-C ************
+- SUBROUTINE SPSCRFORM(IX,NS,NDIV2,CX,C,CH2)
+-C
+- COMPLEX CX(1),WYK1,C(NS,2),WYK
+- REAL CH2(NDIV2,2)
+-C
+- IF (IX .GT. 0) GOTO 50
+- K = NS + 1
+- DO 10 I=1, NS
+- WYK = CONJG(CX(NDIV2-I+2))
+- C(I,1)= CX(I)+WYK + (CX(I) - WYK) * CMPLX(CH2(I,2),CH2(I,1))
+- WYK1 = CONJG(CX(NDIV2-K+2))
+- C(I,2)= CX(K)+WYK1+ (CX(K) -WYK1) * CMPLX(CH2(K,2),CH2(K,1))
+- K = K + 1
+- 10 CONTINUE
+- RETURN
+- 50 CONTINUE
+- K = NS + 1
+- DO 20 I=1, NS
+- WYK = CONJG(CX(NDIV2-I+2))
+- C(I,1)= CX(I)+WYK + (CX(I) - WYK) * CMPLX(-CH2(I,2),CH2(I,1))
+- WYK1 = CONJG(CX(NDIV2-K+2))
+- C(I,2)= CX(K)+WYK1 +(CX(K) -WYK1) * CMPLX(-CH2(K,2),CH2(K,1))
+- K = K + 1
+- 20 CONTINUE
+- RETURN
+- END
+-
+-C----------------------------------------------- ************
+ C CROCK1
+ C ************
+ SUBROUTINE SPSCROCK1(NS,C,CH)
+@@ -157,23 +314,6 @@ C
+ RETURN
+ END
+
+-C----------------------------------------------- ************
+-C CRBLE1
+-C ************
+- SUBROUTINE SPSCRBLE1(NN,WORK)
+-C
+- REAL WORK(NN,2),TWOPI
+- DATA TWOPI /6.28318530717958647692/
+-C
+- N = 2 * NN
+- P2 = TWOPI/N
+- DO 10 I=1, NN
+- WORK(I,1) = COS(P2 * (I-1))
+- WORK(I,2) = SIN(P2 * (I-1))
+- 10 CONTINUE
+- RETURN
+- END
+-
+ C------------------------------------------------------------- ************
+ C RCFFT2
+ C ************
+@@ -236,32 +376,6 @@ C
+ END
+
+ C----------------------------------------------- ************
+-C RTOCK2
+-C ************
+- SUBROUTINE SPSRTOCK2(LS,NS,C,CH,CH2)
+-C
+- COMPLEX WYK,C(NS,LS,2),CH(NS,2,LS)
+- REAL CH2(2,NS,LS,2)
+-C
+- IF (LS .GT. NS) GOTO 20
+- DO 200 I=1, LS
+- DO 200 J=1, NS
+- WYK = CMPLX(CH2(1,1,I,1),CH2(1,1,I,2)) * CH(J,2,I)
+- C(J,I,1) = CH(J,1,I) + WYK
+- C(J,I,2) = CH(J,1,I) - WYK
+- 200 CONTINUE
+- RETURN
+- 20 CONTINUE
+- DO 400 J=1, NS
+- DO 400 I=1, LS
Home |
Main Index |
Thread Index |
Old Index