MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / fft_convolve

Function fft_convolve

src/api/c/fftconvolve.cpp:162–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162af_err fft_convolve(af_array *out, const af_array signal, const af_array filter,
163 const bool expand, const int baseDim) {
164 try {
165 const ArrayInfo &sInfo = getInfo(signal);
166 const ArrayInfo &fInfo = getInfo(filter);
167
168 af_dtype signalType = sInfo.getType();
169
170 const dim4 &sdims = sInfo.dims();
171 const dim4 &fdims = fInfo.dims();
172
173 AF_BATCH_KIND convBT = identifyBatchKind(sdims, fdims, baseDim);
174
175 ARG_ASSERT(1, (convBT != AF_BATCH_UNSUPPORTED));
176
177 af_array output;
178 switch (signalType) {
179 case f64:
180 output = fftconvolve<double>(signal, filter, expand, convBT,
181 baseDim);
182 break;
183 case f32:
184 output =
185 fftconvolve<float>(signal, filter, expand, convBT, baseDim);
186 break;
187 case u32:
188 output =
189 fftconvolve<uint>(signal, filter, expand, convBT, baseDim);
190 break;
191 case s32:
192 output =
193 fftconvolve<int>(signal, filter, expand, convBT, baseDim);
194 break;
195 case u64:
196 output =
197 fftconvolve<uintl>(signal, filter, expand, convBT, baseDim);
198 break;
199 case s64:
200 output =
201 fftconvolve<intl>(signal, filter, expand, convBT, baseDim);
202 break;
203 case u16:
204 output = fftconvolve<ushort>(signal, filter, expand, convBT,
205 baseDim);
206 break;
207 case s16:
208 output =
209 fftconvolve<short>(signal, filter, expand, convBT, baseDim);
210 break;
211 case u8:
212 output =
213 fftconvolve<uchar>(signal, filter, expand, convBT, baseDim);
214 break;
215 case s8:
216 output =
217 fftconvolve<schar>(signal, filter, expand, convBT, baseDim);
218 break;
219 case b8:

Callers 3

af_fft_convolve1Function · 0.85
af_fft_convolve2Function · 0.85
af_fft_convolve3Function · 0.85

Calls 4

swapFunction · 0.85
identifyBatchKindFunction · 0.70
getTypeMethod · 0.45
dimsMethod · 0.45

Tested by

no test coverage detected