| 210 | // tightly packed is inferred from strides.empty() |
| 211 | template< class T, class cl_T, class fftw_T > |
| 212 | void postcallback_complex_to_complex( data_pattern pattern, direction::direction_t direction, |
| 213 | std::vector<size_t> lengths, size_t batch, |
| 214 | std::vector<size_t> input_strides, std::vector<size_t> output_strides, |
| 215 | size_t input_distance, size_t output_distance, |
| 216 | layout::buffer_layout_t in_layout, layout::buffer_layout_t out_layout, |
| 217 | placeness::placeness_t placeness, T scale = 1.0f, bool hasUserDatatype = false ) |
| 218 | { |
| 219 | clfft<T, cl_T> test_fft( static_cast<clfftDim>(lengths.size()), &lengths[0], |
| 220 | input_strides.empty() ? NULL : &input_strides[0], |
| 221 | output_strides.empty() ? NULL : &output_strides[0], |
| 222 | batch, input_distance, output_distance, |
| 223 | cl_layout(in_layout), cl_layout(out_layout), |
| 224 | cl_placeness(placeness) ); |
| 225 | |
| 226 | fftw<T, fftw_T> reference( lengths.size(), &lengths[0], batch, c2c ); |
| 227 | |
| 228 | //initialize input |
| 229 | if( pattern == sawtooth ) |
| 230 | { |
| 231 | test_fft.set_input_to_sawtooth( 1.0f ); |
| 232 | reference.set_data_to_sawtooth( 1.0f ); |
| 233 | } |
| 234 | else if( pattern == value ) |
| 235 | { |
| 236 | test_fft.set_input_to_value( 2.0f, 2.5f ); |
| 237 | reference.set_all_data_to_value( 2.0f, 2.5f ); |
| 238 | } |
| 239 | else if( pattern == impulse ) |
| 240 | { |
| 241 | test_fft.set_input_to_impulse(); |
| 242 | reference.set_data_to_impulse(); |
| 243 | } |
| 244 | else if( pattern == erratic ) |
| 245 | { |
| 246 | test_fft.set_input_to_random(); |
| 247 | reference.set_data_to_random(); |
| 248 | } |
| 249 | else |
| 250 | { |
| 251 | throw std::runtime_error( "invalid pattern type in complex_to_complex()" ); |
| 252 | } |
| 253 | |
| 254 | // if we're starting with unequal data, we're destined for failure |
| 255 | EXPECT_EQ( true, test_fft.input_buffer() == reference.input_buffer() ); |
| 256 | |
| 257 | //set postcallback values |
| 258 | if (hasUserDatatype) |
| 259 | { |
| 260 | //test_fft.set_input_precallback_userdatatype(); |
| 261 | } |
| 262 | else |
| 263 | { |
| 264 | test_fft.set_output_postcallback(); |
| 265 | } |
| 266 | |
| 267 | if( direction == direction::forward ) |
| 268 | { |
| 269 | test_fft.set_forward_transform(); |
nothing calls this directly
no test coverage detected