Improved the test for the pow-of-2 constraint from Mark's recommendation.
This commit is contained in:
parent
f0f677e3d6
commit
60dba3fba4
@ -48,8 +48,9 @@ void fft::transform
|
||||
{
|
||||
forAll(nn, idim)
|
||||
{
|
||||
scalar pow2 = log(scalar(nn[idim]))/log(scalar(2));
|
||||
if ((pow2 - int(pow2 + 0.5)) > SMALL)
|
||||
// Check for power of two
|
||||
unsigned int dimCount = nn[idim];
|
||||
if (!dimCount || (dimCount & (dimCount - 1)))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
|
Loading…
Reference in New Issue
Block a user