當前位置: 首頁>>代碼示例>>Java>>正文


Java CommonUtils.setThreadsBeginN_3D方法代碼示例

本文整理匯總了Java中org.jtransforms.utils.CommonUtils.setThreadsBeginN_3D方法的典型用法代碼示例。如果您正苦於以下問題:Java CommonUtils.setThreadsBeginN_3D方法的具體用法?Java CommonUtils.setThreadsBeginN_3D怎麽用?Java CommonUtils.setThreadsBeginN_3D使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.jtransforms.utils.CommonUtils的用法示例。


在下文中一共展示了CommonUtils.setThreadsBeginN_3D方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: DoubleFFT_3DTest

import org.jtransforms.utils.CommonUtils; //導入方法依賴的package包/類
/**
 * Creates a new instance of this test.
 *
 * @param numSlices
 *                   number of slices
 * @param numRows
 *                   number of rows
 * @param numColumns
 *                   number of columns
 * @param numThreads
 *                   the number of threads to be used
 * @param seed
 *                   the seed of the random generator
 */
public DoubleFFT_3DTest(final int numSlices, final int numRows,
                        final int numColumns, final int numThreads, final long seed)
{
    this.numSlices = numSlices;
    this.numRows = numRows;
    this.numCols = numColumns;
    LargeArray.setMaxSizeOf32bitArray(1);
    this.fft = new DoubleFFT_3D(numSlices, numRows, numColumns);
    this.xfft = new DoubleFFT_1D(numSlices);
    this.sfft = new DoubleFFT_2D(numRows, numColumns);
    this.random = new Random(seed);
    ConcurrencyUtils.setNumberOfThreads(numThreads);
    CommonUtils.setThreadsBeginN_3D(4);
    this.numThreads = ConcurrencyUtils.getNumberOfThreads();
}
 
開發者ID:wendykierp,項目名稱:JTransforms,代碼行數:30,代碼來源:DoubleFFT_3DTest.java

示例2: FloatFFT_3DTest

import org.jtransforms.utils.CommonUtils; //導入方法依賴的package包/類
/**
 * Creates a new instance of this test.
 *
 * @param numSlices
 *                   number of slices
 * @param numRows
 *                   number of rows
 * @param numColumns
 *                   number of columns
 * @param numThreads
 *                   the number of threads to be used
 * @param seed
 *                   the seed of the random generator
 */
public FloatFFT_3DTest(final int numSlices, final int numRows,
                       final int numColumns, final int numThreads, final long seed)
{
    this.numSlices = numSlices;
    this.numRows = numRows;
    this.numCols = numColumns;
    LargeArray.setMaxSizeOf32bitArray(1);
    this.fft = new FloatFFT_3D(numSlices, numRows, numColumns);
    this.xfft = new FloatFFT_1D(numSlices);
    this.sfft = new FloatFFT_2D(numRows, numColumns);
    this.random = new Random(seed);
    ConcurrencyUtils.setNumberOfThreads(numThreads);
    CommonUtils.setThreadsBeginN_3D(4);
    this.numThreads = ConcurrencyUtils.getNumberOfThreads();
}
 
開發者ID:wendykierp,項目名稱:JTransforms,代碼行數:30,代碼來源:FloatFFT_3DTest.java

示例3: parseArguments

import org.jtransforms.utils.CommonUtils; //導入方法依賴的package包/類
public static void parseArguments(String[] args)
{
    if (args.length > 0) {
        nthread = Integer.parseInt(args[0]);
        threadsBegin2D = Integer.parseInt(args[1]);
        threadsBegin3D = Integer.parseInt(args[2]);
        niter = Integer.parseInt(args[3]);
        doWarmup = Boolean.parseBoolean(args[4]);
        doScaling = Boolean.parseBoolean(args[5]);
        nsize = Integer.parseInt(args[6]);
        sizes1D = new long[nsize];
        sizes2D = new long[nsize];
        sizes3D = new long[nsize];
        for (int i = 0; i < nsize; i++) {
            sizes1D[i] = Integer.parseInt(args[7 + i]);
        }
        for (int i = 0; i < nsize; i++) {
            sizes2D[i] = Integer.parseInt(args[7 + nsize + i]);
        }
        for (int i = 0; i < nsize; i++) {
            sizes3D[i] = Integer.parseInt(args[7 + nsize + nsize + i]);
        }
    } else {
        System.out.println("Default settings are used.");
    }
    ConcurrencyUtils.setNumberOfThreads(nthread);
    CommonUtils.setThreadsBeginN_2D(threadsBegin2D);
    CommonUtils.setThreadsBeginN_3D(threadsBegin3D);
    System.out.println("nthred = " + nthread);
    System.out.println("threadsBegin2D = " + threadsBegin2D);
    System.out.println("threadsBegin3D = " + threadsBegin3D);
    System.out.println("niter = " + niter);
    System.out.println("doWarmup = " + doWarmup);
    System.out.println("doScaling = " + doScaling);
    System.out.println("nsize = " + nsize);
    System.out.println("sizes1D[] = " + Arrays.toString(sizes1D));
    System.out.println("sizes2D[] = " + Arrays.toString(sizes2D));
    System.out.println("sizes3D[] = " + Arrays.toString(sizes3D));
}
 
開發者ID:wendykierp,項目名稱:JTransforms,代碼行數:40,代碼來源:BenchmarkFloatFFT.java

示例4: DoubleDST_3DTest

import org.jtransforms.utils.CommonUtils; //導入方法依賴的package包/類
/**
 * Creates a new instance of this test.
 *
 * @param numSlices
 *                   number of slices
 * @param numRows
 *                   number of rows
 * @param numColumns
 *                   number of columns
 * @param numThreads
 *                   the number of threads to be used
 * @param seed
 *                   the seed of the random generator
 */
public DoubleDST_3DTest(final int numSlices, final int numRows,
                        final int numColumns, final int numThreads, final long seed)
{
    this.numSlices = numSlices;
    this.numRows = numRows;
    this.numCols = numColumns;
    LargeArray.setMaxSizeOf32bitArray(1);
    this.dst = new DoubleDST_3D(numSlices, numRows, numCols);
    this.random = new Random(seed);
    ConcurrencyUtils.setNumberOfThreads(numThreads);
    CommonUtils.setThreadsBeginN_3D(1);
    this.numThreads = ConcurrencyUtils.getNumberOfThreads();
}
 
開發者ID:wendykierp,項目名稱:JTransforms,代碼行數:28,代碼來源:DoubleDST_3DTest.java

示例5: FloatDST_3DTest

import org.jtransforms.utils.CommonUtils; //導入方法依賴的package包/類
/**
 * Creates a new instance of this test.
 *
 * @param numSlices
 *                   number of slices
 * @param numRows
 *                   number of rows
 * @param numColumns
 *                   number of columns
 * @param numThreads
 *                   the number of threads to be used
 * @param seed
 *                   the seed of the random generator
 */
public FloatDST_3DTest(final int numSlices, final int numRows,
                       final int numColumns, final int numThreads, final long seed)
{
    this.numSlices = numSlices;
    this.numRows = numRows;
    this.numCols = numColumns;
    LargeArray.setMaxSizeOf32bitArray(1);
    this.dst = new FloatDST_3D(numSlices, numRows, numCols);
    this.random = new Random(seed);
    ConcurrencyUtils.setNumberOfThreads(numThreads);
    CommonUtils.setThreadsBeginN_3D(1);
    this.numThreads = ConcurrencyUtils.getNumberOfThreads();
}
 
開發者ID:wendykierp,項目名稱:JTransforms,代碼行數:28,代碼來源:FloatDST_3DTest.java

示例6: DoubleDCT_3DTest

import org.jtransforms.utils.CommonUtils; //導入方法依賴的package包/類
/**
 * Creates a new instance of this test.
 *
 * @param numSlices
 *                   number of slices
 * @param numRows
 *                   number of rows
 * @param numColumns
 *                   number of columns
 * @param numThreads
 *                   the number of threads to be used
 * @param seed
 *                   the seed of the random generator
 */
public DoubleDCT_3DTest(final int numSlices, final int numRows,
                        final int numColumns, final int numThreads, final long seed)
{
    this.numSlices = numSlices;
    this.numRows = numRows;
    this.numCols = numColumns;
    LargeArray.setMaxSizeOf32bitArray(1);
    this.dct = new DoubleDCT_3D(numSlices, numRows, numCols);
    this.random = new Random(seed);
    ConcurrencyUtils.setNumberOfThreads(numThreads);
    CommonUtils.setThreadsBeginN_3D(1);
    this.numThreads = ConcurrencyUtils.getNumberOfThreads();
}
 
開發者ID:wendykierp,項目名稱:JTransforms,代碼行數:28,代碼來源:DoubleDCT_3DTest.java

示例7: FloatDCT_3DTest

import org.jtransforms.utils.CommonUtils; //導入方法依賴的package包/類
/**
 * Creates a new instance of this test.
 *
 * @param numSlices
 *                   number of slices
 * @param numRows
 *                   number of rows
 * @param numColumns
 *                   number of columns
 * @param numThreads
 *                   the number of threads to be used
 * @param seed
 *                   the seed of the random generator
 */
public FloatDCT_3DTest(final int numSlices, final int numRows,
                       final int numColumns, final int numThreads, final long seed)
{
    this.numSlices = numSlices;
    this.numRows = numRows;
    this.numCols = numColumns;
    LargeArray.setMaxSizeOf32bitArray(1);
    this.dct = new FloatDCT_3D(numSlices, numRows, numCols);
    this.random = new Random(seed);
    ConcurrencyUtils.setNumberOfThreads(numThreads);
    CommonUtils.setThreadsBeginN_3D(1);
    this.numThreads = ConcurrencyUtils.getNumberOfThreads();
}
 
開發者ID:wendykierp,項目名稱:JTransforms,代碼行數:28,代碼來源:FloatDCT_3DTest.java

示例8: FloatDHT_3DTest

import org.jtransforms.utils.CommonUtils; //導入方法依賴的package包/類
/**
 * Creates a new instance of this test.
 *
 * @param numSlices
 *                   number of slices
 * @param numRows
 *                   number of rows
 * @param numColumns
 *                   number of columns
 * @param numThreads
 *                   the number of threads to be used
 * @param seed
 *                   the seed of the random generator
 */
public FloatDHT_3DTest(final int numSlices, final int numRows,
                       final int numColumns, final int numThreads, final long seed)
{
    this.numSlices = numSlices;
    this.numRows = numRows;
    this.numCols = numColumns;
    LargeArray.setMaxSizeOf32bitArray(1);
    this.dht = new FloatDHT_3D(numSlices, numRows, numCols);
    this.random = new Random(seed);
    ConcurrencyUtils.setNumberOfThreads(numThreads);
    CommonUtils.setThreadsBeginN_3D(1);
    this.numThreads = ConcurrencyUtils.getNumberOfThreads();
}
 
開發者ID:wendykierp,項目名稱:JTransforms,代碼行數:28,代碼來源:FloatDHT_3DTest.java

示例9: DoubleDHT_3DTest

import org.jtransforms.utils.CommonUtils; //導入方法依賴的package包/類
/**
 * Creates a new instance of this test.
 *
 * @param numSlices
 *                   number of slices
 * @param numRows
 *                   number of rows
 * @param numColumns
 *                   number of columns
 * @param numThreads
 *                   the number of threads to be used
 * @param seed
 *                   the seed of the random generator
 */
public DoubleDHT_3DTest(final int numSlices, final int numRows,
                        final int numColumns, final int numThreads, final long seed)
{
    this.numSlices = numSlices;
    this.numRows = numRows;
    this.numCols = numColumns;
    LargeArray.setMaxSizeOf32bitArray(1);
    this.dht = new DoubleDHT_3D(numSlices, numRows, numCols);
    this.random = new Random(seed);
    ConcurrencyUtils.setNumberOfThreads(numThreads);
    CommonUtils.setThreadsBeginN_3D(1);
    this.numThreads = ConcurrencyUtils.getNumberOfThreads();
}
 
開發者ID:wendykierp,項目名稱:JTransforms,代碼行數:28,代碼來源:DoubleDHT_3DTest.java


注:本文中的org.jtransforms.utils.CommonUtils.setThreadsBeginN_3D方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。