/*
* C Converted Whetstone Double Precision Benchmark
* Version 1.2 22 March 1998
*
* (c) Copyright 1998 Painter Engineering, Inc.
* All Rights Reserved.
*
* Permission is granted to use, duplicate, and
* publish this text and program as long as it
* includes this entire comment block and limited
* rights reference.
*
* Converted by Rich Painter, Painter Engineering, Inc. based on the
* www.netlib.org benchmark/whetstoned version obtained 16 March 1998.
*
* A novel approach was used here to keep the look and feel of the
* FORTRAN version. Altering the FORTRAN-based array indices,
* starting at element 1, to start at element 0 for C, would require
* numerous changes, including decrementing the variable indices by 1.
* Instead, the array E1[] was declared 1 element larger in C. This
* allows the FORTRAN index range to function without any literal or
* variable indices changes. The array element E1[0] is simply never
* used and does not alter the benchmark results.
*
* The major FORTRAN comment blocks were retained to minimize
* differences between versions. Modules N5 and N12, like in the
* FORTRAN version, have been eliminated here.
*
* An optional command-line argument has been provided [-c] to
* offer continuous repetition of the entire benchmark.
* An optional argument for setting an alternate LOOP count is also
* provided. Define PRINTOUT to cause the POUT() function to print
* outputs at various stages. Final timing measurements should be
* made with the PRINTOUT undefined.
*
* Questions and comments may be directed to the author at
* r.painter@ieee.org
*/
/*
C**********************************************************************
C Benchmark #2 -- Double Precision Whetstone (A001)
C
C o This is a REAL*8 version of
C the Whetstone benchmark program.
C
C o DO-loop semantics are ANSI-66 compatible.
C
C o Final measurements are to be made with all
C WRITE statements and FORMAT sttements removed.
C
C**********************************************************************
*/
/* standard C library headers required */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
/* the following is optional depending on the timing function used */
#include <time.h>
/* map the FORTRAN math functions, etc. to the C versions */
#define DSIN sin
#define DCOS cos
#define DATAN atan
#define DLOG log
#define DEXP exp
#define DSQRT sqrt
#define IF if
/* function prototypes */
void POUT(long N, long J, long K, double X1, double X2, double X3, double X4);
void PA(double E[]);
void P0(void);
void P3(double X, double Y, double *Z);
#define USAGE "usage: whetdc [-c] [loops]\n"
/*
COMMON T,T1,T2,E1(4),J,K,L
*/
double T,T1,T2,E1[5];
int J,K,L;
int
main(int argc, char *argv[])
{
/* used in the FORTRAN version */
long I;
long N1, N2, N3, N4, N6, N7, N8, N9, N10, N11;
double X1,X2,X3,X4,X,Y,Z;
long LOOP;
int II, JJ;
/* added for this version */
long loopstart;
long startsec, finisec;
float KIPS;
int continuous;
loopstart = 1000; /* see the note about LOOP below */
continuous = 0;
II = 1; /* start at the first arg (temp use of II here) */
while (II < argc) {
if (strncmp(argv[II], "-c", 2) == 0 || argv[II][0] == 'c') {
continuous = 1;
} else if (atol(argv[II]) > 0) {
loopstart = atol(argv[II]);
} else {
fprintf(stderr, USAGE);
return(1);
}
II++;
}
LCONT:
/*
C
C Start benchmark timing at this point.
C
*/
startsec = time(0);
/*
C
C The actual benchmark starts here.
C
*/
T = .499975;
T1 = 0.50025;
T2 = 2.0;
/*
C
C With loopcount LOOP=10, one million Whetstone instructions
C will be executed in EACH MAJOR LOOP..A MAJOR LOOP IS EXECUTED
C 'II' TIMES TO INCREASE WALL-CLOCK TIMING ACCURACY.
C
LOOP = 1000;
*/
LOOP = loopstart;
II = 1;
JJ = 1;
IILOOP:
N1 = 0;
N2 = 12 * LOOP;
N3 = 14 * LOOP;
N4 = 345 * LOOP;
N6 = 210 * LOOP;
N7 = 32 * LOOP;
N8 = 899 * LOOP;
N9 = 616 * LOOP;
N10 = 0;
N11 = 93 * LOOP;
/*
C
C Module 1: Simple identifiers
C
*/
X1 = 1.0;
X2 = -1.0;
X3 = -1.0;
X4 = -1.0;
for (I = 1; I <= N1; I++) {
X1 = (X1 + X2 + X3 - X4) * T;
X2 = (X1 + X2 - X3 + X4) * T;
X3 = (X1 - X2 + X3 + X4) * T;
X4 = (-X1+ X2 + X3 + X4) * T;
}
#ifdef PRINTOUT
IF (JJ==II)POUT(N1,N1,N1,X1,X2,X3,X4);
#endif
/*
C
C Module 2: Array elements
C
*/
E1[1] = 1.0;
E1[2] = -1.0;
E1[3] = -1.0;
E1[4] = -1.0;
for (I = 1; I <= N2; I++) {
E1[1] = ( E1[1] + E1[2] + E1[3] - E1[4]) * T;
E1[2] = ( E1[1] + E1[2] - E1[3] + E1[4]) * T;
E1[3] = ( E1[1] - E1[2] + E1[3] + E1[4]) * T;
E1[4] = (-E1[1] + E1[2] + E1[3] + E1[4]) * T;
}
#ifdef PRINTOUT
IF (JJ==II)POUT(N2,N3,N2,E1[1],E1[2],E1[3],E1[4]);
#endif
/*
C
C Module 3: Array as parameter
C
*/
for (I = 1; I <= N3; I++)
PA(E1);
#ifdef PRINTOUT
IF (JJ==II)POUT(N3,N2,N2,E1[1],E1[2],E1[3],E1[4]);
#endif
/*
C
C Module 4: Conditional jumps
C
*/
J = 1;
for (I = 1; I <= N4; I++) {
if (J == 1)
J = 2;
else
J = 3;
if (J > 2)
J = 0;
else
J = 1;
if (J < 1)
J = 1;
else
J = 0;
}
#ifdef PRINTOUT
IF (JJ==II)POUT(N4,J,J,X1,X2,X3,X4);
#endif
/*
C
C Module 5: Omitted
C Module 6: Integer arithmetic
C
*/
J = 1;
K = 2;
L = 3;
for (I = 1; I <= N6; I++) {
J = J * (K-J) * (L-K);
K = L * K - (L-J) * K;
L = (L-K) * (K+J);
E1[L-1] = J + K + L;
E1[K-1] = J * K * L;
}
#ifdef PRINTOUT
IF (JJ==II)POUT(N6,J,K,E1[1],E1[2],E1[3],E1[4]);
#endif
/*
C
C Module 7: Trigonometric functions
C
*/
X = 0.5;
Y = 0.5;
for (I = 1; I <= N7; I++) {
X = T * DATAN(T2*DSIN(X)*DCOS(X)/(DCOS(X+Y)+DCOS(X-Y)-1.0));
Y = T * DATAN(T2*DSIN(Y)*DCOS(Y)/(DCOS(X+Y)+DCOS(X-Y)-1.0));
}
#ifdef PRINTOUT
IF (JJ==II)POUT(N7,J,K,X,X,Y,Y);
#endif
/*
C
C Module 8: Procedure calls
C
*/
X = 1.0;
Y = 1.0;
Z = 1.0;
for (I = 1; I <= N8; I++)
P3(X,Y,&Z);
#ifdef PRINTOUT
IF (JJ==II)POUT(N8,J,K,X,Y,Z,Z);
#endif
/*
C
C Module 9: Array references
C
*/
J = 1;
K = 2;
L = 3;
E1[1] = 1.0;
E1[2] = 2.0;
E1[3] = 3.0;
for (I = 1; I <= N9; I++)
P0();
#ifdef PRINTOUT
IF (JJ==II)POUT(N9,J,K,E1[1],E1[2],E1[3],E1[4]);
#endif
/*
C
C Module 10: Integer arithmetic
C
*/
J = 2;
K = 3;
for (I = 1; I <= N10; I++) {
J = J + K;
K = J + K;
J = K - J;
K = K - J - J;
}
#ifdef PRINTOUT
IF (JJ==II)POUT(N10,J,K,X1,X2,X3,X4);
#endif
/*
C
C Module 11: Standard functions
C
*/
X = 0.75;
for (I = 1; I <= N11; I++)
X = DSQRT(DEXP(DLOG(X)/T1));
#ifdef PRINTOUT
IF (JJ==II)POUT(N11,J,K,X,X,X,X);
#endif
/*
C
C THIS IS THE END OF THE MAJOR LOOP.
C
*/
if (++JJ <= II)
goto IILOOP;
/*
C
C Stop benchmark timing at this point.
C
*/
finisec = time(0);
/*
C----------------------------------------------------------------
C Performance in Whetstone KIP's per second is given by
C
C (100*LOOP*II)/TIME
C
C where TIME is in seconds.
C--------------------------------------------------------------------
*/
printf("\n");
if (finisec-startsec <= 0) {
printf("Insufficient duration- Increase the LOOP count\n");
return(1);
}
printf("Loops: %ld, Iterations: %d, Duration: %ld sec.\n",
LOOP, II, finisec-startsec);
KIPS = (100.0*LOOP*II)/(float)(finisec-startsec);
if (KIPS >= 1000.0)
printf("C Converted Double Precision Whetstones: %.1f MIPS\n", KIPS/1000.0);
else
printf("C Converted Double Precision Whetstones: %.1f KIPS\n", KIPS);
if (continuous)
goto LCONT;
return(0);
}
void
PA(double E[])
{
J = 0;
L10:
E[1] = ( E[1] + E[2] + E[3] - E[4]) * T;
E[2] = ( E[1] + E[2] - E[3] + E[4]) * T;
E[3] = ( E[1] - E[2] + E[3] + E[4]) * T;
E[4] = (-E[1] + E[2] + E[3] + E[4]) / T2;
J += 1;
if (J < 6)
goto L10;
}
void
P0(void)
{
E1[J] = E1[K];
E1[K] = E1[L];
E1[L] = E1[J];
}
void
P3(double X, double Y, double *Z)
{
double X1, Y1;
X1 = X;
Y1 = Y;
X1 = T * (X1 + Y1);
Y1 = T * (X1 + Y1);
*Z = (X1 + Y1) / T2;
}
#ifdef PRINTOUT
void
POUT(long N, long J, long K, double X1, double X2, d
没有合适的资源?快使用搜索试试~ 我知道了~
20241104荣品RK3566buildroot的包文件dl8.tgz rk-linux5.10-20240828.tar
共546个文件
lock:228个
gz:146个
xz:99个
需积分: 0 0 下载量 86 浏览量
更新于2024-11-04
收藏 1.86GB TGZ 举报
荣品RD-RK3588-AHD开发板buildroot系统的包文件。rk-linux5.10-20240828.tar
我今天 需要下载的包才2GB。我 12:30开始编译的,编译完成 16点。花了3.5小时。
【原厂的包文件齐全的话,大概1.5小时搞定。】
基本上时间都用来 下载包文件了。
20241104 1659
收起资源包目录
20241104荣品RK3566buildroot的包文件dl8.tgz rk-linux5.10-20240828.tar (546个子文件)
qtwebengine-chromium-0ad2814370799a2161057d92231fe3ee00e2fe98.tar.bz2 353.27MB
qtbase-e44097b63d17ba3178a637df7fac51ddc51cb48b.tar.bz2 55.09MB
qtbase-2ffb7ad8a1079a0444b9c72affe3d19b089b60de.tar.bz2 54.86MB
qtdeclarative-b3aaf1482c48bbc0ca4f7c7934597c055afe4b6a.tar.bz2 20.73MB
qtdeclarative-51efb2ed2f071beda188270a23ac450fe4b318f7.tar.bz2 20.72MB
qtvirtualkeyboard-9fbb837b55887bec5d73fad142c853ef68db35b3.tar.bz2 12.13MB
qtvirtualkeyboard-e8ae4757dd32e8dbf69a7c57f2bc5c1e238416db.tar.bz2 12.13MB
qtquickcontrols2-0d3d39e821ea7634c174a29910c18d7101bce6f7.tar.bz2 8.44MB
qtquickcontrols-d405bf6a29bc9d6da6e3dcefbd1b88f5ed70fb1b.tar.bz2 6.17MB
qtquickcontrols-e62b8b6d2f45a79652238b33f4bbe23023004ae7.tar.bz2 6.17MB
dejavu-fonts-ttf-2.37.tar.bz2 5.18MB
qtmultimedia-76f84c545429a1b988b79f971734ef4bc3e6643f.tar.bz2 4.74MB
qtmultimedia-dc0ee181d4c56ff66c989bd3292dad7cc35e234b.tar.bz2 4.74MB
qtwebengine-v5.15.8-lts.tar.bz2 2.92MB
qtconnectivity-c5f35f89e975c2ad58c83c6b606d40ba41057f15.tar.bz2 2.84MB
busybox-1.36.0.tar.bz2 2.41MB
qtsvg-23b8cf7d833c335d7735855570c05e9e0893a9b7.tar.bz2 2.23MB
qtsvg-a9752b00a03438de8e5b080073816e12409404b7.tar.bz2 2.23MB
dropbear-2022.82.tar.bz2 2.2MB
v4l-utils-1.22.1.tar.bz2 1.99MB
pcre2-10.42.tar.bz2 1.72MB
fontconfig-2.13.1.tar.bz2 1.64MB
pcre-8.45.tar.bz2 1.51MB
alsa-utils-1.2.7.tar.bz2 1.49MB
xz-5.2.5.tar.bz2 1.41MB
make-4.2.1.tar.bz2 1.34MB
alsa-lib-1.2.7.2.tar.bz2 1.03MB
mpg123-1.25.15.tar.bz2 890KB
libsndfile-1.0.31.tar.bz2 855KB
xorgproto-2022.1.tar.bz2 850KB
iptables-1.8.7.tar.bz2 701KB
qtwayland-8faf74a7966b520f0ac3eb4d88235f8ec63b31b8.tar.bz2 591KB
qtwayland-36659e6130ed3fc2b3f0c91423408ef5ecb7b991.tar.bz2 590KB
ncurses-6.1-20190609-patch.sh.bz2 588KB
libtirpc-1.3.2.tar.bz2 501KB
alsa-plugins-1.2.6.tar.bz2 399KB
qtserialbus-f9f7eee60adac72fcf6617d164e3bf61222bb5c5.tar.bz2 392KB
qtserialbus-e34053fbda8d687e3dc294fbd5e3a88bf94a7a66.tar.bz2 391KB
libxkbfile-1.1.0.tar.bz2 356KB
qtserialport-c9abfcd5d88cb43c2a7c1d5ddecbff4cdd320694.tar.bz2 349KB
qtserialport-191e67e428522a0e2e1e8d2f3440607a9760d441.tar.bz2 349KB
libXdmcp-1.1.3.tar.bz2 325KB
libXau-1.0.9.tar.bz2 315KB
qtwebsockets-6a4991250793cd38efa5e8db858cd49c82439130.tar.bz2 289KB
mtdev-1.1.6.tar.bz2 289KB
libsocketcan-0.0.12.tar.bz2 287KB
xkbcomp-1.4.5.tar.bz2 246KB
qtwebchannel-8c842152da613f941892481d62267c73c4a4f006.tar.bz2 233KB
xtrans-1.4.0.tar.bz2 181KB
patchelf-0.9.tar.bz2 156KB
util-macros-1.19.3.tar.bz2 83KB
libpthread-stubs-0.4.tar.bz2 56KB
liblockfile_1.17-1.debian.tar.bz2 7KB
whetstone.c 8KB
dhry-c 71KB
qt5webengine-chromium-catapult-5eedfe23148a234211ba477f76fc2ea2e8529189-br1.tar.gz 136.09MB
nss-3.73.1.tar.gz 80.04MB
glibc-2.37-2-g9f8513dc64119a424b312db97cef5d87d376defa.tar.gz 36.06MB
glibc-2.36-81-g4f4d7a13edfd2fdc57c9d76e1fd6d017fb47550c.tar.gz 35.91MB
bash-5.1.16.tar.gz 10.04MB
openssl-1.1.1l.tar.gz 9.38MB
cmake-3.22.3.tar.gz 9.33MB
glmark2-2023.01.tar.gz 8.93MB
glmark2-06e78b67702b5413335ecdf1ae816da9c20f6ed9.tar.gz 8.93MB
libpsl-0.21.1.tar.gz 8.77MB
cmake-3.16.9.tar.gz 8.69MB
lcms2-2.12.tar.gz 7.08MB
ntp-4.2.8p15.tar.gz 6.69MB
libvpx-1.11.0.tar.gz 5.1MB
libsamplerate-0.1.9.tar.gz 4.14MB
libwebp-1.2.1.tar.gz 3.91MB
libxslt-1.1.34.tar.gz 3.39MB
wpa_supplicant-2.10.tar.gz 3.35MB
ncurses-6.1.tar.gz 3.21MB
wpa_supplicant-2.9.tar.gz 3.08MB
sqlite-autoconf-3390200.tar.gz 2.92MB
readline-8.1.tar.gz 2.85MB
android-platform-system-core-debian-1%8.1.0+r23-8.tar.gz 2.81MB
font-awesome-4.7.0.tar.gz 2.55MB
setuptools-62.6.0.tar.gz 2.48MB
hostapd-2.10.tar.gz 2.33MB
liberation-fonts-ttf-2.1.5.tar.gz 2.27MB
nettle-3.7.3.tar.gz 2.27MB
zstd-1.5.5.tar.gz 2.26MB
mjpegtools-2.2.1.tar.gz 2.22MB
weston-11.0.1.tar.gz 2.16MB
libjpeg-turbo-2.1.3.tar.gz 2.16MB
hostapd-2.9.tar.gz 2.14MB
libidn2-2.3.2.tar.gz 2.07MB
meson-1.1.1.tar.gz 2.03MB
meson-1.0.0.tar.gz 2MB
dbus-1.12.20.tar.gz 2MB
eudev-3.2.10.tar.gz 1.87MB
libtasn1-4.17.0.tar.gz 1.82MB
zstd-1.5.0.tar.gz 1.77MB
fuse-2.9.9.tar.gz 1.73MB
fluidsynth-2.3.2.tar.gz 1.69MB
flex-2.6.4.tar.gz 1.35MB
libffi-3.4.2.tar.gz 1.29MB
gperf-3.1.tar.gz 1.16MB
共 546 条
- 1
- 2
- 3
- 4
- 5
- 6
资源推荐
资源预览
资源评论
176 浏览量
129 浏览量
2024-11-01 上传
2021-01-30 上传
156 浏览量
120 浏览量
2023-08-26 上传
2017-09-07 上传
118 浏览量
137 浏览量
2024-10-24 上传
2024-09-24 上传
170 浏览量
149 浏览量
121 浏览量
2022-09-09 上传
2021-07-09 上传
177 浏览量
5星 · 资源好评率100%
104 浏览量
2023-03-28 上传
2023-08-26 上传
5星 · 资源好评率100%
129 浏览量
2021-10-19 上传
5星 · 资源好评率100%
105 浏览量
资源评论
南棱笑笑生
- 粉丝: 3115
- 资源: 466
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- busybox-1.31.1-46 (Android 4.1+).apk.cab
- busybox-1.30.1-41 (Android 4.0+).apk.cab
- busybox-v1_34_1-52 (Android 5.0+).apk.cab
- linuxdeploy-2.4.1-252 (Android 4.0.3+).apk.cab
- linuxdeploy-2.5.1-257 (Android 4.1+).apk.cab
- 基于springboot的教师人事档案管理系统源码(java毕业设计完整源码+LW).zip
- linuxdeploy-2.6.0-259 (Android 5.0+).apk.cab
- 基于三维成像的青少年脊柱侧弯检测方法及系统
- PotPlayerSetup64_143.exe.cab
- OneDriveSetup_v24.226.1110.0004.exe.cab
- Termux (Android 5.0+).apk.cab
- 全自动硬盘摆臂钢珠铆合机proe4.0可编辑全套技术资料100%好用.zip
- 基于springboot的考研资讯平台源码(java毕业设计完整源码+LW).zip
- 大众 揽巡 DTJ发动机.zip
- 基于springboot的口腔管家平台源码(java毕业设计完整源码+LW).zip
- 上料机输送机sw18可编辑全套技术资料100%好用.zip
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功