Template Function helpme::findGridSize¶
Defined in File gridsize.h
Function Documentation¶
-
template<typename T>
int helpme::findGridSize(T inputSize, const std::initializer_list<T> &requiredDivisors)¶ findGridSize FFTW likes to have transformations with dimensions of the form
where a,b,c and d are general and e+f is either 0 or 1. MKL has similar demands:a b c d e f 2 3 5 7 11 13
https://software.intel.com/en-us/articles/fft-length-and-layout-advisor/ http://www.fftw.org/fftw3_doc/Real_002ddata-DFTs.html
This routine will compute the next largest grid size subject to the constraint that the resulting size is a multiple of a given factor.
- Parameters:
inputSize – the minimum size of the grid.
requiredDivisors – list of values that must be a factor of the output grid size.
- Returns:
the adjusted grid size.