(currently) true is in clFFT if length is a power of 2,3,5
| 44 | |
| 45 | //(currently) true is in clFFT if length is a power of 2,3,5 |
| 46 | inline bool isSupLen(dim_t length) { |
| 47 | while (length > 1) { |
| 48 | if (length % 2 == 0) { |
| 49 | length /= 2; |
| 50 | } else if (length % 3 == 0) { |
| 51 | length /= 3; |
| 52 | } else if (length % 5 == 0) { |
| 53 | length /= 5; |
| 54 | } else if (length % 7 == 0) { |
| 55 | length /= 7; |
| 56 | } else if (length % 11 == 0) { |
| 57 | length /= 11; |
| 58 | } else if (length % 13 == 0) { |
| 59 | length /= 13; |
| 60 | } else { |
| 61 | return false; |
| 62 | } |
| 63 | } |
| 64 | return true; |
| 65 | } |
| 66 | |
| 67 | void verifySupported(const int rank, const dim4 &dims) { |
| 68 | for (int i = 0; i < rank; i++) { ARG_ASSERT(1, isSupLen(dims[i])); } |