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