本文整理汇总了Java中edu.emory.mathcs.utils.ConcurrencyUtils.setThreadsBeginN_2D方法的典型用法代码示例。如果您正苦于以下问题:Java ConcurrencyUtils.setThreadsBeginN_2D方法的具体用法?Java ConcurrencyUtils.setThreadsBeginN_2D怎么用?Java ConcurrencyUtils.setThreadsBeginN_2D使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.emory.mathcs.utils.ConcurrencyUtils
的用法示例。
在下文中一共展示了ConcurrencyUtils.setThreadsBeginN_2D方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseArguments
import edu.emory.mathcs.utils.ConcurrencyUtils; //导入方法依赖的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[3]);
niter = Integer.parseInt(args[3]);
doWarmup = Boolean.parseBoolean(args[4]);
doScaling = Boolean.parseBoolean(args[5]);
nsize = Integer.parseInt(args[6]);
sizes1D = new int[nsize];
sizes2D = new int[nsize];
sizes3D = new int[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);
ConcurrencyUtils.setThreadsBeginN_2D(threadsBegin2D);
ConcurrencyUtils.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));
}
示例2: parseArguments
import edu.emory.mathcs.utils.ConcurrencyUtils; //导入方法依赖的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 int[nsize];
sizes2D = new int[nsize];
sizes3D = new int[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);
ConcurrencyUtils.setThreadsBeginN_2D(threadsBegin2D);
ConcurrencyUtils.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));
}
示例3: DoubleFFT_2DTest
import edu.emory.mathcs.utils.ConcurrencyUtils; //导入方法依赖的package包/类
/**
* Creates a new instance of this test.
*
* @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_2DTest(final int numRows, final int numColumns,
final int numThreads, final long seed)
{
this.numRows = numRows;
this.numCols = numColumns;
this.rfft = new DoubleFFT_1D(numColumns);
this.cfft = new DoubleFFT_1D(numRows);
this.fft = new DoubleFFT_2D(numRows, numColumns);
this.random = new Random(seed);
ConcurrencyUtils.setNumberOfThreads(numThreads);
ConcurrencyUtils.setThreadsBeginN_2D(4);
}
示例4: FloatFFT_2DTest
import edu.emory.mathcs.utils.ConcurrencyUtils; //导入方法依赖的package包/类
/**
* Creates a new instance of this test.
*
* @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_2DTest(final int numRows, final int numColumns,
final int numThreads, final long seed)
{
this.numRows = numRows;
this.numCols = numColumns;
this.rfft = new FloatFFT_1D(numColumns);
this.cfft = new FloatFFT_1D(numRows);
this.fft = new FloatFFT_2D(numRows, numColumns);
this.random = new Random(seed);
ConcurrencyUtils.setNumberOfThreads(numThreads);
ConcurrencyUtils.setThreadsBeginN_2D(4);
}