summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2008-06-21 20:00:22 +0000
committerjoerg <joerg@pkgsrc.org>2008-06-21 20:00:22 +0000
commit1a79319de637595870ccef0ce5d22f887ee2aacf (patch)
tree288a6f99e6758f68dc53f2b8de2eb60328cd51f9 /benchmarks
parent9368f361a6a122891482145c0e452c7bb23d4a72 (diff)
downloadpkgsrc-1a79319de637595870ccef0ce5d22f887ee2aacf.tar.gz
Fix build with GCC 4 and f2c.
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/benchfft/distinfo5
-rw-r--r--benchmarks/benchfft/patches/patch-af419
-rw-r--r--benchmarks/benchfft/patches/patch-ag423
-rw-r--r--benchmarks/benchfft/patches/patch-ah20
4 files changed, 866 insertions, 1 deletions
diff --git a/benchmarks/benchfft/distinfo b/benchmarks/benchfft/distinfo
index 6c667e79bd2..bf8ba9f5e65 100644
--- a/benchmarks/benchfft/distinfo
+++ b/benchmarks/benchfft/distinfo
@@ -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-ab) = 1c1be2e043ea9280f70dddd8082d20e929ea9d49
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 --git a/benchmarks/benchfft/patches/patch-af b/benchmarks/benchfft/patches/patch-af
new file mode 100644
index 00000000000..cd933cb2a57
--- /dev/null
+++ b/benchmarks/benchfft/patches/patch-af
@@ -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
+- 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 RTOCK1
+ C ************
+ SUBROUTINE SPSRTOCK1(NS,C,CH)
+@@ -275,103 +389,6 @@ C
+ 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 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 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 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 CFFT2
+ C ************
+@@ -514,23 +531,6 @@ C
+ RETURN
+ END
+
+-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 ABORT
+ C ************
diff --git a/benchmarks/benchfft/patches/patch-ag b/benchmarks/benchfft/patches/patch-ag
new file mode 100644
index 00000000000..9b135545c4c
--- /dev/null
+++ b/benchmarks/benchfft/patches/patch-ag
@@ -0,0 +1,423 @@
+$NetBSD: patch-ag,v 1.5 2008/06/21 20:00:22 joerg Exp $
+
+Reorder functions in use order to fix compilation with f2c.
+
+--- f_source/sciport/fftd.f.orig 2008-06-21 13:43:11.000000000 +0000
++++ f_source/sciport/fftd.f
+@@ -1,3 +1,192 @@
++C----------------------------------------------- ************
++C CABLE2
++C ************
++ SUBROUTINE SPDCABLE2(NN,WORK)
++C
++ DOUBLE PRECISION WORK(2,NN),P2,TWOPI
++ DATA TWOPI /6.2831853071795864769252867665590057683943388D0/
++C
++ N = 2 * NN
++ P2 = TWOPI/N
++ DO 10 I=1, NN
++ WORK(1,I) = DCOS(P2 * (I-1))
++ WORK(2,I) = DSIN(P2 * (I-1))
++ 10 CONTINUE
++ RETURN
++ END
++
++C----------------------------------------------- ************
++C RCONV2
++C ************
++ SUBROUTINE SPDRCONV2(N,CY,C,CH)
++C
++ DOUBLE COMPLEX CY(1)
++ DOUBLE PRECISION CH(N/2,2),P(2,1),C(2,N/2)
++ DOUBLE PRECISION X,Y,Z,Z1
++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) = DCMPLX(P(1,1),0.0D0)
++ CY(N2+1) = DCMPLX(P(2,1),0.0D0)
++ 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) = DCMPLX(P(1,1),P(2,1))
++ K = K - 1
++ 10 CONTINUE
++ RETURN
++ END
++
++C----------------------------------------------- ************
++C RCONV1
++C ************
++ SUBROUTINE SPDRCONV1(N,CY,C,CH)
++C
++ DOUBLE COMPLEX CY(1)
++ DOUBLE PRECISION CH(N/2,2),P(2,1),C(2,N/2)
++ DOUBLE PRECISION X,Y,Z,Z1
++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) = DCMPLX(P(1,1),0.0D0)
++ CY(N2+1) = DCMPLX(P(2,1),0.0D0)
++ 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) = DCMPLX(P(1,1),P(2,1))
++ K = K - 1
++ 10 CONTINUE
++ RETURN
++ END
++
++C----------------------------------------------- ************
++C RTOCK3
++C ************
++ SUBROUTINE SPDRTOCK3(LS,NS,C,CH,CH2)
++C
++ DOUBLE COMPLEX WYK,C(NS,LS,2),CH(NS,2,LS)
++ DOUBLE PRECISION CH2(2,NS,LS,2)
++C
++ IF (LS .GT. NS) GOTO 30
++ DO 600 I=1, LS
++ DO 600 J=1, NS
++ WYK =CONJG(DCMPLX(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(DCMPLX(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 RABLE1
++C ************
++ SUBROUTINE SPDRABLE1(NN,WORK)
++C
++ DOUBLE PRECISION WORK(NN,2),P2,TWOPI
++ DATA TWOPI /6.2831853071795864769252867665590057683943388D0/
++C
++ N = 2 * NN
++ P2 = TWOPI/N
++ DO 10 I=1, NN
++ WORK(I,1) = DCOS(P2 * (I-1))
++ WORK(I,2) = DSIN(P2 * (I-1))
++ 10 CONTINUE
++ RETURN
++ END
++
++C----------------------------------------------- ************
++C RTOCK2
++C ************
++ SUBROUTINE SPDRTOCK2(LS,NS,C,CH,CH2)
++C
++ DOUBLE COMPLEX WYK,C(NS,LS,2),CH(NS,2,LS)
++ DOUBLE PRECISION CH2(2,NS,LS,2)
++C
++ IF (LS .GT. NS) GOTO 20
++ DO 200 I=1, LS
++ DO 200 J=1, NS
++ WYK = DCMPLX(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 = DCMPLX(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 SPDCRBLE1(NN,WORK)
++C
++ DOUBLE PRECISION WORK(NN,2),P2,TWOPI
++ DATA TWOPI /6.2831853071795864769252867665590057683943388D0/
++C
++ N = 2 * NN
++ P2 = TWOPI/N
++ DO 10 I=1, NN
++ WORK(I,1) = DCOS(P2 * (I-1))
++ WORK(I,2) = DSIN(P2 * (I-1))
++ 10 CONTINUE
++ RETURN
++ END
++
++C----------------------------------------------- ************
++C CRFORM
++C ************
++ SUBROUTINE SPDCRFORM(IX,NS,NDIV2,CX,C,CH2)
++C
++ DOUBLE COMPLEX CX(1),WYK1,C(NS,2),WYK
++ DOUBLE PRECISION 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) * DCMPLX(CH2(I,2),CH2(I,1))
++ WYK1 = CONJG(CX(NDIV2-K+2))
++ C(I,2)= CX(K)+WYK1+ (CX(K) -WYK1) * DCMPLX(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) * DCMPLX(-CH2(I,2),CH2(I,1))
++ WYK1 = CONJG(CX(NDIV2-K+2))
++ C(I,2)= CX(K)+WYK1 +(CX(K) -WYK1) * DCMPLX(-CH2(K,2),CH2(K,1))
++ K = K + 1
++ 20 CONTINUE
++ RETURN
++ END
++
+ C------------------------------------------------------------- ************
+ C CRFFT2
+ C ************
+@@ -62,36 +251,6 @@ C
+ END
+
+ C----------------------------------------------- ************
+-C CRFORM
+-C ************
+- SUBROUTINE SPDCRFORM(IX,NS,NDIV2,CX,C,CH2)
+-C
+- DOUBLE COMPLEX CX(1),WYK1,C(NS,2),WYK
+- DOUBLE PRECISION 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) * DCMPLX(CH2(I,2),CH2(I,1))
+- WYK1 = CONJG(CX(NDIV2-K+2))
+- C(I,2)= CX(K)+WYK1+ (CX(K) -WYK1) * DCMPLX(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) * DCMPLX(-CH2(I,2),CH2(I,1))
+- WYK1 = CONJG(CX(NDIV2-K+2))
+- C(I,2)= CX(K)+WYK1 +(CX(K) -WYK1) * DCMPLX(-CH2(K,2),CH2(K,1))
+- K = K + 1
+- 20 CONTINUE
+- RETURN
+- END
+-
+-C----------------------------------------------- ************
+ C CROCK1
+ C ************
+ SUBROUTINE SPDCROCK1(NS,C,CH)
+@@ -157,23 +316,6 @@ C
+ RETURN
+ END
+
+-C----------------------------------------------- ************
+-C CRBLE1
+-C ************
+- SUBROUTINE SPDCRBLE1(NN,WORK)
+-C
+- DOUBLE PRECISION WORK(NN,2),P2,TWOPI
+- DATA TWOPI /6.2831853071795864769252867665590057683943388D0/
+-C
+- N = 2 * NN
+- P2 = TWOPI/N
+- DO 10 I=1, NN
+- WORK(I,1) = DCOS(P2 * (I-1))
+- WORK(I,2) = DSIN(P2 * (I-1))
+- 10 CONTINUE
+- RETURN
+- END
+-
+ C------------------------------------------------------------- ************
+ C RCFFT2
+ C ************
+@@ -236,32 +378,6 @@ C
+ END
+
+ C----------------------------------------------- ************
+-C RTOCK2
+-C ************
+- SUBROUTINE SPDRTOCK2(LS,NS,C,CH,CH2)
+-C
+- DOUBLE COMPLEX WYK,C(NS,LS,2),CH(NS,2,LS)
+- DOUBLE PRECISION CH2(2,NS,LS,2)
+-C
+- IF (LS .GT. NS) GOTO 20
+- DO 200 I=1, LS
+- DO 200 J=1, NS
+- WYK = DCMPLX(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 = DCMPLX(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 RTOCK1
+ C ************
+ SUBROUTINE SPDRTOCK1(NS,C,CH)
+@@ -275,105 +391,6 @@ C
+ RETURN
+ END
+
+-C----------------------------------------------- ************
+-C RTOCK3
+-C ************
+- SUBROUTINE SPDRTOCK3(LS,NS,C,CH,CH2)
+-C
+- DOUBLE COMPLEX WYK,C(NS,LS,2),CH(NS,2,LS)
+- DOUBLE PRECISION CH2(2,NS,LS,2)
+-C
+- IF (LS .GT. NS) GOTO 30
+- DO 600 I=1, LS
+- DO 600 J=1, NS
+- WYK =CONJG(DCMPLX(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(DCMPLX(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 RABLE1
+-C ************
+- SUBROUTINE SPDRABLE1(NN,WORK)
+-C
+- DOUBLE PRECISION WORK(NN,2),P2,TWOPI
+- DATA TWOPI /6.2831853071795864769252867665590057683943388D0/
+-C
+- N = 2 * NN
+- P2 = TWOPI/N
+- DO 10 I=1, NN
+- WORK(I,1) = DCOS(P2 * (I-1))
+- WORK(I,2) = DSIN(P2 * (I-1))
+- 10 CONTINUE
+- RETURN
+- END
+-
+-C----------------------------------------------- ************
+-C RCONV1
+-C ************
+- SUBROUTINE SPDRCONV1(N,CY,C,CH)
+-C
+- DOUBLE COMPLEX CY(1)
+- DOUBLE PRECISION CH(N/2,2),P(2,1),C(2,N/2)
+- DOUBLE PRECISION X,Y,Z,Z1
+-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) = DCMPLX(P(1,1),0.0D0)
+- CY(N2+1) = DCMPLX(P(2,1),0.0D0)
+- 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) = DCMPLX(P(1,1),P(2,1))
+- K = K - 1
+- 10 CONTINUE
+- RETURN
+- END
+-
+-C----------------------------------------------- ************
+-C RCONV2
+-C ************
+- SUBROUTINE SPDRCONV2(N,CY,C,CH)
+-C
+- DOUBLE COMPLEX CY(1)
+- DOUBLE PRECISION CH(N/2,2),P(2,1),C(2,N/2)
+- DOUBLE PRECISION X,Y,Z,Z1
+-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) = DCMPLX(P(1,1),0.0D0)
+- CY(N2+1) = DCMPLX(P(2,1),0.0D0)
+- 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) = DCMPLX(P(1,1),P(2,1))
+- K = K - 1
+- 10 CONTINUE
+- RETURN
+- END
+-
+ C------------------------------------------------------------- ************
+ C CFFT2
+ C ************
+@@ -516,23 +533,6 @@ C
+ RETURN
+ END
+
+-C----------------------------------------------- ************
+-C CABLE2
+-C ************
+- SUBROUTINE SPDCABLE2(NN,WORK)
+-C
+- DOUBLE PRECISION WORK(2,NN),P2,TWOPI
+- DATA TWOPI /6.2831853071795864769252867665590057683943388D0/
+-C
+- N = 2 * NN
+- P2 = TWOPI/N
+- DO 10 I=1, NN
+- WORK(1,I) = DCOS(P2 * (I-1))
+- WORK(2,I) = DSIN(P2 * (I-1))
+- 10 CONTINUE
+- RETURN
+- END
+-
+ C------------------------------------------------------------- ************
+ C ABORT
+ C ************
diff --git a/benchmarks/benchfft/patches/patch-ah b/benchmarks/benchfft/patches/patch-ah
new file mode 100644
index 00000000000..95b2c916993
--- /dev/null
+++ b/benchmarks/benchfft/patches/patch-ah
@@ -0,0 +1,20 @@
+$NetBSD: patch-ah,v 1.1 2008/06/21 20:00:22 joerg Exp $
+
+--- c_source/fourier.c.orig 2008-06-21 13:47:28.000000000 +0000
++++ c_source/fourier.c
+@@ -7,6 +7,7 @@
+
+ static split(COMPLEX*,unsigned,unsigned,COMPLEX*);
+ static join(COMPLEX*,unsigned,unsigned,COMPLEX*);
++static unsigned radix (unsigned);
+
+
+
+@@ -24,7 +25,6 @@ unsigned n;
+ COMPLEX *out;
+ {
+ unsigned r;
+- unsigned radix ();
+
+ if ((r = radix (n)) < n)
+ split (in, r, n / r, out);