Forgive me if this is a basic question, I tried to Google but apparently I missed the key words.
I am trying to program in clFFT, and one requirement for the length (M) of the work is such that it is divisible by the product of powers of 2, 3, 5, 7:
Supported radices clFFT supports transform sizes that are powers of 2, 3, 5, and 7. This means that the vector lengths can be a combination of powers of two, three, five, and seven; examples include 2^7,2^1∗3^1,3^2∗5^4,2^2∗3^3∗5^5, up to the limit that the device can support.
Is there a fast way to check if a number M fulfill the above requirement? Following this: How to check if an integer is a power of 3? My guess is I can combine the radices such that, if a number M is divisible by either 2^a, 3^b, 5^c and 7^d, then mod(2^a*3^b*5^c*7^d,M) should be zero, i.e. M divides 2^a*3^b*5^c*7^d, but I don't have a proof for it.