| 103 | } |
| 104 | |
| 105 | bool FFT::IsPlanCompatible(clfftPlanHandle ForwardPlan, const ImageBase& Real, const ImageBase& Complex) |
| 106 | { |
| 107 | if (ForwardPlan == 0) |
| 108 | return false; |
| 109 | |
| 110 | // Get values |
| 111 | clfftPrecision Precision = ENDPRECISION; |
| 112 | clfftGetPlanPrecision(ForwardPlan, &Precision); |
| 113 | |
| 114 | size_t Lengths[2] = {0}; |
| 115 | clfftGetPlanLength(ForwardPlan, CLFFT_2D, Lengths); |
| 116 | |
| 117 | size_t RealStrides[2] = {0}; |
| 118 | size_t ComplexStrides[2] = {0}; |
| 119 | clfftGetPlanInStride(ForwardPlan, CLFFT_2D, RealStrides); |
| 120 | clfftGetPlanOutStride(ForwardPlan, CLFFT_2D, ComplexStrides); |
| 121 | |
| 122 | // Compare values |
| 123 | if (Precision != CLFFT_SINGLE) |
| 124 | return false; |
| 125 | |
| 126 | if (Lengths[0] != Real.Width()) |
| 127 | return false; |
| 128 | |
| 129 | if (Lengths[1] != Real.Height()) |
| 130 | return false; |
| 131 | |
| 132 | if (RealStrides[0] != 1 || RealStrides[1] != Real.ElementStep()) |
| 133 | return false; |
| 134 | |
| 135 | if (ComplexStrides[0] != 1 || ComplexStrides[1] * 2 != Complex.ElementStep()) |
| 136 | return false; |
| 137 | |
| 138 | return true; |
| 139 | } |
| 140 | |
| 141 | void FFT::PrepareFor(const ImageBase& Real, const ImageBase& Complex) |
| 142 | { |
nothing calls this directly
no test coverage detected