本文整理汇总了Java中edu.emory.mathcs.utils.ConcurrencyUtils.getThreadsBeginN_2D方法的典型用法代码示例。如果您正苦于以下问题:Java ConcurrencyUtils.getThreadsBeginN_2D方法的具体用法?Java ConcurrencyUtils.getThreadsBeginN_2D怎么用?Java ConcurrencyUtils.getThreadsBeginN_2D使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.emory.mathcs.utils.ConcurrencyUtils
的用法示例。
在下文中一共展示了ConcurrencyUtils.getThreadsBeginN_2D方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: FloatFFT_2D
import edu.emory.mathcs.utils.ConcurrencyUtils; //导入方法依赖的package包/类
/**
* Creates new instance of FloatFFT_2D.
*
* @param rows
* number of rows
* @param columns
* number of columns
*/
public FloatFFT_2D(int rows, int columns) {
if (rows <= 1 || columns <= 1) {
throw new IllegalArgumentException("rows and columns must be greater than 1");
}
this.rows = rows;
this.columns = columns;
if (rows * columns >= ConcurrencyUtils.getThreadsBeginN_2D()) {
this.useThreads = true;
}
if (ConcurrencyUtils.isPowerOf2(rows) && ConcurrencyUtils.isPowerOf2(columns)) {
isPowerOfTwo = true;
oldNthreads = ConcurrencyUtils.getNumberOfThreads();
nt = 8 * oldNthreads * rows;
if (2 * columns == 4 * oldNthreads) {
nt >>= 1;
} else if (2 * columns < 4 * oldNthreads) {
nt >>= 2;
}
t = new float[nt];
}
fftRows = new FloatFFT_1D(rows);
if (rows == columns) {
fftColumns = fftRows;
} else {
fftColumns = new FloatFFT_1D(columns);
}
}
示例2: DoubleFFT_2D
import edu.emory.mathcs.utils.ConcurrencyUtils; //导入方法依赖的package包/类
/**
* Creates new instance of DoubleFFT_2D.
*
* @param rows
* number of rows
* @param columns
* number of columns
*/
public DoubleFFT_2D(int rows, int columns) {
if (rows <= 1 || columns <= 1) {
throw new IllegalArgumentException("rows and columns must be greater than 1");
}
this.rows = rows;
this.columns = columns;
if (rows * columns >= ConcurrencyUtils.getThreadsBeginN_2D()) {
this.useThreads = true;
}
if (ConcurrencyUtils.isPowerOf2(rows) && ConcurrencyUtils.isPowerOf2(columns)) {
isPowerOfTwo = true;
oldNthreads = ConcurrencyUtils.getNumberOfThreads();
nt = 8 * oldNthreads * rows;
if (2 * columns == 4 * oldNthreads) {
nt >>= 1;
} else if (2 * columns < 4 * oldNthreads) {
nt >>= 2;
}
t = new double[nt];
}
fftRows = new DoubleFFT_1D(rows);
if (rows == columns) {
fftColumns = fftRows;
} else {
fftColumns = new DoubleFFT_1D(columns);
}
}
示例3: DoubleDST_2D
import edu.emory.mathcs.utils.ConcurrencyUtils; //导入方法依赖的package包/类
/**
* Creates new instance of DoubleDST_2D.
*
* @param rows
* number of rows
* @param columns
* number of columns
*/
public DoubleDST_2D(int rows, int columns) {
if (rows <= 1 || columns <= 1) {
throw new IllegalArgumentException("rows and columns must be greater than 1");
}
this.rows = rows;
this.columns = columns;
if (rows * columns >= ConcurrencyUtils.getThreadsBeginN_2D()) {
useThreads = true;
}
if (ConcurrencyUtils.isPowerOf2(rows) && ConcurrencyUtils.isPowerOf2(columns)) {
isPowerOfTwo = true;
oldNthreads = ConcurrencyUtils.getNumberOfThreads();
nt = 4 * oldNthreads * rows;
if (columns == 2 * oldNthreads) {
nt >>= 1;
} else if (columns < 2 * oldNthreads) {
nt >>= 2;
}
t = new double[nt];
}
dstColumns = new DoubleDST_1D(columns);
if (columns == rows) {
dstRows = dstColumns;
} else {
dstRows = new DoubleDST_1D(rows);
}
}
示例4: FloatDST_2D
import edu.emory.mathcs.utils.ConcurrencyUtils; //导入方法依赖的package包/类
/**
* Creates new instance of FloatDST_2D.
*
* @param rows
* number of rows
* @param columns
* number of columns
*/
public FloatDST_2D(int rows, int columns) {
if (rows <= 1 || columns <= 1) {
throw new IllegalArgumentException("rows and columns must be greater than 1");
}
this.rows = rows;
this.columns = columns;
if (rows * columns >= ConcurrencyUtils.getThreadsBeginN_2D()) {
useThreads = true;
}
if (ConcurrencyUtils.isPowerOf2(rows) && ConcurrencyUtils.isPowerOf2(columns)) {
isPowerOfTwo = true;
oldNthreads = ConcurrencyUtils.getNumberOfThreads();
nt = 4 * oldNthreads * rows;
if (columns == 2 * oldNthreads) {
nt >>= 1;
} else if (columns < 2 * oldNthreads) {
nt >>= 2;
}
t = new float[nt];
}
dstColumns = new FloatDST_1D(columns);
if (columns == rows) {
dstRows = dstColumns;
} else {
dstRows = new FloatDST_1D(rows);
}
}
示例5: DoubleDCT_2D
import edu.emory.mathcs.utils.ConcurrencyUtils; //导入方法依赖的package包/类
/**
* Creates new instance of DoubleDCT_2D.
*
* @param rows
* number of rows
* @param columns
* number of columns
*/
public DoubleDCT_2D(int rows, int columns) {
if (rows <= 1 || columns <= 1) {
throw new IllegalArgumentException("rows and columns must be greater than 1");
}
this.rows = rows;
this.columns = columns;
if (rows * columns >= ConcurrencyUtils.getThreadsBeginN_2D()) {
this.useThreads = true;
}
if (ConcurrencyUtils.isPowerOf2(rows) && ConcurrencyUtils.isPowerOf2(columns)) {
isPowerOfTwo = true;
oldNthreads = ConcurrencyUtils.getNumberOfThreads();
nt = 4 * oldNthreads * rows;
if (columns == 2 * oldNthreads) {
nt >>= 1;
} else if (columns < 2 * oldNthreads) {
nt >>= 2;
}
t = new double[nt];
}
dctColumns = new DoubleDCT_1D(columns);
if (columns == rows) {
dctRows = dctColumns;
} else {
dctRows = new DoubleDCT_1D(rows);
}
}
示例6: FloatDCT_2D
import edu.emory.mathcs.utils.ConcurrencyUtils; //导入方法依赖的package包/类
/**
* Creates new instance of FloatDCT_2D.
*
* @param rows
* number of rows
* @param columns
* number of columns
*/
public FloatDCT_2D(int rows, int columns) {
if (rows <= 1 || columns <= 1) {
throw new IllegalArgumentException("rows and columns must be greater than 1");
}
this.rows = rows;
this.columns = columns;
if (rows * columns >= ConcurrencyUtils.getThreadsBeginN_2D()) {
this.useThreads = true;
}
if (ConcurrencyUtils.isPowerOf2(rows) && ConcurrencyUtils.isPowerOf2(columns)) {
isPowerOfTwo = true;
oldNthreads = ConcurrencyUtils.getNumberOfThreads();
nt = 4 * oldNthreads * rows;
if (columns == 2 * oldNthreads) {
nt >>= 1;
} else if (columns < 2 * oldNthreads) {
nt >>= 2;
}
t = new float[nt];
}
dctColumns = new FloatDCT_1D(columns);
if (columns == rows) {
dctRows = dctColumns;
} else {
dctRows = new FloatDCT_1D(rows);
}
}
示例7: DoubleDHT_2D
import edu.emory.mathcs.utils.ConcurrencyUtils; //导入方法依赖的package包/类
/**
* Creates new instance of DoubleDHT_2D.
*
* @param rows
* number of rows
* @param column
* number of columns
*/
public DoubleDHT_2D(int rows, int column) {
if (rows <= 1 || column <= 1) {
throw new IllegalArgumentException("rows and columns must be greater than 1");
}
this.rows = rows;
this.columns = column;
if (rows * column >= ConcurrencyUtils.getThreadsBeginN_2D()) {
this.useThreads = true;
}
if (ConcurrencyUtils.isPowerOf2(rows) && ConcurrencyUtils.isPowerOf2(column)) {
isPowerOfTwo = true;
oldNthreads = ConcurrencyUtils.getNumberOfThreads();
nt = 4 * oldNthreads * rows;
if (column == 2 * oldNthreads) {
nt >>= 1;
} else if (column < 2 * oldNthreads) {
nt >>= 2;
}
t = new double[nt];
}
dhtColumns = new DoubleDHT_1D(column);
if (column == rows) {
dhtRows = dhtColumns;
} else {
dhtRows = new DoubleDHT_1D(rows);
}
}
示例8: FloatDHT_2D
import edu.emory.mathcs.utils.ConcurrencyUtils; //导入方法依赖的package包/类
/**
* Creates new instance of FloatDHT_2D.
*
* @param rows
* number of rows
* @param column
* number of columns
*/
public FloatDHT_2D(int rows, int column) {
if (rows <= 1 || column <= 1) {
throw new IllegalArgumentException("rows and columns must be greater than 1");
}
this.rows = rows;
this.columns = column;
if (rows * column >= ConcurrencyUtils.getThreadsBeginN_2D()) {
this.useThreads = true;
}
if (ConcurrencyUtils.isPowerOf2(rows) && ConcurrencyUtils.isPowerOf2(column)) {
isPowerOfTwo = true;
oldNthreads = ConcurrencyUtils.getNumberOfThreads();
nt = 4 * oldNthreads * rows;
if (column == 2 * oldNthreads) {
nt >>= 1;
} else if (column < 2 * oldNthreads) {
nt >>= 2;
}
t = new float[nt];
}
dhtColumns = new FloatDHT_1D(column);
if (column == rows) {
dhtRows = dhtColumns;
} else {
dhtRows = new FloatDHT_1D(rows);
}
}