亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? seriestest.java

?? MPI for java for Distributed Programming
?? JAVA
字號:
/***************************************************************************                                                                         **             Java Grande Forum Benchmark Suite - MPJ Version 1.0         **                                                                         **                            produced by                                  **                                                                         **                  Java Grande Benchmarking Project                       **                                                                         **                                at                                       **                                                                         **                Edinburgh Parallel Computing Centre                      **                                                                         * *                email: epcc-javagrande@epcc.ed.ac.uk                     **                                                                         **                  Original version of this code by                       **                 Gabriel Zachmann (zach@igd.fhg.de)                      **                                                                         **      This version copyright (c) The University of Edinburgh, 2001.      **                         All rights reserved.                            **                                                                         ***************************************************************************//*** Class SeriesTest** Performs the transcendental/trigonometric portion of the* benchmark. This test calculates the first n fourier* coefficients of the function (x+1)^x defined on the interval* 0,2 (where n is an arbitrary number that is set to make the* test last long enough to be accurately measured by the system* clock). Results are reported in number of coefficients calculated* per sec.** The first four pairs of coefficients calculated shoud be:* (2.83777, 0), (1.04578, -1.8791), (0.2741, -1.15884), and* (0.0824148, -0.805759).*/package jgf_mpj_benchmarks.section2.series;//package series; import jgf_mpj_benchmarks.jgfutil.*; import mpi.*;class SeriesTest {// Declare class data.int array_rows; int p_array_rows; int ref_p_array_rows; int rem_p_array_rows; double [] [] p_TestArray = null;  // Array of arrays on each process.double [] [] TestArray = null;  // Array of arrays./** buildTestData**/// Instantiate array(s) to hold fourier coefficients.void buildTestData(){    // Allocate appropriate length for the double array of doubles.    if(JGFSeriesBench.rank==0) {      TestArray = new double [2][array_rows];    }    p_TestArray = new double [2][p_array_rows];}/** Do** This consists of calculating the* first n pairs of fourier coefficients of the function (x+1)^x on* the interval 0,2. n is given by array_rows, the array size.* NOTE: The # of integration steps is fixed at 1000. */void Do() throws MPIException{    double omega;       // Fundamental frequency.    int ilow;//System.out.println(" Do "+JGFSeriesBench.rank);    if(JGFSeriesBench.rank==0) {      // Start the stopwatch.      JGFInstrumentor.startTimer("Section2:Series:Kernel");       // Calculate the fourier series. Begin by calculating A[0].      TestArray[0][0]=TrapezoidIntegrate((double)0.0, // Lower bound.                              (double)2.0,            // Upper bound.                              1000,                    // # of steps.                              (double)0.0,            // No omega*n needed.                              0) / (double)2.0;       // 0 = term A[0].    } //System.out.println(" Do(1) "+JGFSeriesBench.rank);    // Calculate the fundamental frequency.    // ( 2 * pi ) / period...and since the period    // is 2, omega is simply pi.    omega = (double) 3.1415926535897932;    if(JGFSeriesBench.rank==0) {      ilow = 1;    } else {      ilow = 0;    }//System.out.println(" Do(2) "+JGFSeriesBench.rank);//System.out.println(" p_array_rows "+p_array_rows);//System.exit(0);    for (int i = ilow; i < p_array_rows; i++)    {	    //System.out.println("i :"+i);        // Calculate A[i] terms. Note, once again, that we        // can ignore the 2/period term outside the integral        // since the period is 2 and the term cancels itself        // out.//System.out.println(" Do(3) "+JGFSeriesBench.rank);        p_TestArray[0][i] = TrapezoidIntegrate((double)0.0,                          (double)2.0,                          1000,                          omega * ((double)i + (ref_p_array_rows*JGFSeriesBench.rank)),                          1);                       // 1 = cosine term.        // Calculate the B[i] terms.        p_TestArray[1][i] = TrapezoidIntegrate((double)0.0,                          (double)2.0,                          1000,                          omega * ((double)i + (ref_p_array_rows*JGFSeriesBench.rank)),                          2);                       // 2 = sine term.    }//System.out.println("barrier starts "+ JGFSeriesBench.rank);    MPI.COMM_WORLD.Barrier();//System.out.println("barrier ends "+JGFSeriesBench.rank);    // Send all the data to process 0       if(JGFSeriesBench.rank==0) {      for(int k=1;k<p_array_rows;k++){        TestArray[0][k] = p_TestArray[0][k];         TestArray[1][k] = p_TestArray[1][k];      }      for(int k=1;k<JGFSeriesBench.nprocess;k++) {//System.out.println("recv "+JGFSeriesBench.rank);MPI.COMM_WORLD.Recv(p_TestArray[0],0,p_TestArray[0].length,MPI.DOUBLE,k,k);MPI.COMM_WORLD.Recv(p_TestArray[1],0,p_TestArray[1].length,MPI.DOUBLE,k,        k+JGFSeriesBench.nprocess);        if(k==(JGFSeriesBench.nprocess-1)) {          p_array_rows = rem_p_array_rows;        }        for(int j=0;j<p_array_rows;j++){          TestArray[0][j+(ref_p_array_rows*k)] = p_TestArray[0][j];          TestArray[1][j+(ref_p_array_rows*k)] = p_TestArray[1][j];        }      }       p_array_rows = ref_p_array_rows;    } else {//System.out.println("ssend "+JGFSeriesBench.rank);      MPI.COMM_WORLD.Ssend(p_TestArray[0],0,p_TestArray[0].length,		      MPI.DOUBLE,0,JGFSeriesBench.rank);      MPI.COMM_WORLD.Ssend(p_TestArray[1],0,p_TestArray[1].length,	      MPI.DOUBLE,0,JGFSeriesBench.rank+JGFSeriesBench.nprocess);    }     MPI.COMM_WORLD.Barrier();       if(JGFSeriesBench.rank==0) {      // Stop the stopwatch.      JGFInstrumentor.stopTimer("Section2:Series:Kernel");     }}/** TrapezoidIntegrate** Perform a simple trapezoid integration on the function (x+1)**x.* x0,x1 set the lower and upper bounds of the integration.* nsteps indicates # of trapezoidal sections.* omegan is the fundamental frequency times the series member #.* select = 0 for the A[0] term, 1 for cosine terms, and 2 for* sine terms. Returns the value.*/private double TrapezoidIntegrate (double x0,     // Lower bound.                        double x1,                // Upper bound.                        int nsteps,               // # of steps.                        double omegan,            // omega * n.                        int select)               // Term type.{    double x;               // Independent variable.    double dx;              // Step size.    double rvalue;          // Return value.    // Initialize independent variable.    x = x0;    // Calculate stepsize.    dx = (x1 - x0) / (double)nsteps;    // Initialize the return value.    rvalue = thefunction(x0, omegan, select) / (double)2.0;    // Compute the other terms of the integral.    if (nsteps != 1)    {            --nsteps;               // Already done 1 step.            while (--nsteps > 0)            {                    x += dx;                    rvalue += thefunction(x, omegan, select);            }    }    // Finish computation.    rvalue=(rvalue + thefunction(x1,omegan,select) / (double)2.0) * dx;    return(rvalue);}/** thefunction** This routine selects the function to be used in the Trapezoid* integration. x is the independent variable, omegan is omega * n,* and select chooses which of the sine/cosine functions* are used. Note the special case for select=0.*/private double thefunction(double x,      // Independent variable.                double omegan,              // Omega * term.                int select)                 // Choose type.{    // Use select to pick which function we call.    switch(select)    {        case 0: return(Math.pow(x+(double)1.0,x));        case 1: return(Math.pow(x+(double)1.0,x) * Math.cos(omegan*x));        case 2: return(Math.pow(x+(double)1.0,x) * Math.sin(omegan*x));    }    // We should never reach this point, but the following    // keeps compilers from issuing a warning message.    return (0.0);}/** freeTestData** Nulls array that is created with every run and forces garbage* collection to free up memory.*/void freeTestData(){    TestArray = null;    // Destroy the array.    System.gc();         // Force garbage collection.}}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国精产品一区一区三区mba视频| 1024成人网| 久久狠狠亚洲综合| 精品国产91乱码一区二区三区| 国内成人精品2018免费看| 精品国产sm最大网站| 成人在线综合网| 亚洲欧美日韩国产另类专区| 欧美日韩国产色站一区二区三区| 日日摸夜夜添夜夜添精品视频| 日韩午夜激情免费电影| 国产成人鲁色资源国产91色综 | 久久女同性恋中文字幕| 福利一区二区在线| 亚洲欧美国产毛片在线| 欧美性生交片4| 精品一区在线看| 中文字幕中文乱码欧美一区二区| 欧洲一区二区三区在线| 久久se这里有精品| 亚洲天堂精品视频| 欧美一区二区精美| 在线看不卡av| 免费欧美在线视频| 国产亚洲欧美日韩日本| 欧美中文字幕久久| 国产一区日韩二区欧美三区| 亚洲精品国产一区二区精华液 | 欧美日韩综合在线免费观看| 麻豆精品视频在线观看视频| 综合久久国产九一剧情麻豆| 91精品在线观看入口| 国产精品一二一区| 亚洲成人在线观看视频| 欧美国产成人精品| 日韩一区二区精品葵司在线| 99精品久久只有精品| 久久 天天综合| 尤物视频一区二区| 国产欧美综合在线| 欧美一级久久久久久久大片| av不卡免费在线观看| 九色|91porny| 亚洲国产精品自拍| 国产精品卡一卡二| 精品久久久久久无| 欧美日韩一区 二区 三区 久久精品| 国产精品一区一区三区| 日本亚洲欧美天堂免费| 亚洲激情男女视频| 国产精品国产三级国产| 精品国产sm最大网站免费看| 欧美乱妇15p| 欧美怡红院视频| 成人国产精品视频| 国产精品99久久久久久久女警| 午夜精品123| 亚洲一区二区三区激情| 国产精品成人午夜| 国产欧美日韩在线视频| 日韩欧美色综合| 欧美夫妻性生活| 欧美日韩国产另类不卡| 欧美在线制服丝袜| 一本大道久久a久久综合婷婷| 国产成人精品亚洲日本在线桃色 | 亚洲一区免费在线观看| 最新不卡av在线| 中文字幕一区日韩精品欧美| 国产精品私人自拍| 国产精品视频一二三| 国产校园另类小说区| 久久久夜色精品亚洲| 精品国产一区二区国模嫣然| 欧美va在线播放| 337p日本欧洲亚洲大胆精品| 精品美女在线观看| 久久久久99精品一区| 国产亚洲欧美在线| 欧美精品一区二区三区蜜臀| 亚洲视频你懂的| 亚洲人成电影网站色mp4| 亚洲视频免费在线| 亚洲午夜一区二区| 日韩一区欧美二区| 久久福利视频一区二区| 麻豆成人av在线| 韩国三级在线一区| 国产91丝袜在线播放0| 成人av手机在线观看| 91香蕉视频污| 欧美视频第二页| 51午夜精品国产| 日韩欧美激情四射| 久久蜜桃一区二区| 亚洲欧美在线aaa| 亚洲国产毛片aaaaa无费看 | 亚洲国产欧美在线人成| 免费在线观看一区| 国产乱码精品一区二区三区av| 国产一区二区三区在线观看免费视频| 国产很黄免费观看久久| 91在线精品一区二区三区| 在线观看亚洲一区| 欧美一区二区三区系列电影| 久久久不卡影院| 一区二区三区高清不卡| 蜜桃视频一区二区三区| 国产成人精品网址| 欧美午夜一区二区三区| 日韩免费成人网| 日韩理论电影院| 另类小说视频一区二区| 成人av电影在线网| 欧美日本精品一区二区三区| 久久精品在线免费观看| 亚洲狼人国产精品| 久久精品99国产精品日本| av一区二区三区四区| 欧美一级精品大片| 亚洲欧洲日产国产综合网| 美日韩黄色大片| 91论坛在线播放| 欧美精品一区二| 午夜精品久久久久久久久久久| 国产电影一区二区三区| 欧美亚洲丝袜传媒另类| 国产精品视频麻豆| 青青青爽久久午夜综合久久午夜| 99国产精品久久久| 精品第一国产综合精品aⅴ| 亚洲欧美另类在线| 韩国三级中文字幕hd久久精品| 91福利社在线观看| 国产三级欧美三级日产三级99| 亚洲国产精品麻豆| 99久久精品久久久久久清纯| 久久综合一区二区| 石原莉奈一区二区三区在线观看| av激情成人网| 国产亚洲精品资源在线26u| 日本v片在线高清不卡在线观看| 99国内精品久久| 国产欧美日产一区| 九色|91porny| 日韩精品一区二区三区在线| 一区二区三区欧美亚洲| av电影天堂一区二区在线| 久久久久99精品一区| 老司机精品视频一区二区三区| 在线观看免费亚洲| 一区二区三区高清不卡| 欧美一区中文字幕| 亚洲成人av电影在线| 欧美吻胸吃奶大尺度电影| 亚洲黄网站在线观看| 色婷婷久久久久swag精品| 日韩美女精品在线| 99久久婷婷国产综合精品电影| 国产女同互慰高潮91漫画| 国产精品99久久久久久似苏梦涵| 精品少妇一区二区三区日产乱码 | 亚洲午夜影视影院在线观看| 91丨九色丨尤物| 亚洲天堂av一区| www.av亚洲| 成人欧美一区二区三区黑人麻豆 | 欧美人xxxx| 日本亚洲天堂网| 日韩三级.com| 国产美女久久久久| 国产日韩精品久久久| 国产高清在线观看免费不卡| 中文字幕高清一区| 91蜜桃婷婷狠狠久久综合9色| **网站欧美大片在线观看| 91丝袜国产在线播放| 亚洲国产精品一区二区尤物区| 欧美日韩精品免费观看视频| 日本美女视频一区二区| 欧美精品一区二区精品网| 丁香婷婷综合色啪| 亚洲日本在线观看| 欧美日韩综合色| 久久精品国产99| 国产精品无人区| 欧美中文字幕一区| 另类综合日韩欧美亚洲| 久久精品一区二区| 99re热这里只有精品免费视频| 亚洲精品第一国产综合野| 777亚洲妇女| 国产91精品精华液一区二区三区| 中文字幕日韩一区| 精品视频在线免费看| 国产乱一区二区| 亚洲精品水蜜桃| 日韩欧美国产一区在线观看| 成人小视频在线| 午夜精品久久久久久不卡8050|