/
| 424 | |
| 425 | /*****************************************************/ |
| 426 | bool points_are_about_equal( buffer<T> & other_buffer, size_t x, size_t y, size_t z, size_t batch ) |
| 427 | { |
| 428 | if( is_real() ) |
| 429 | return floats_are_about_equal<T>( real(x, y, z, batch), other_buffer.real(x, y, z, batch) ); |
| 430 | else if( is_complex() || is_hermitian() ) |
| 431 | return ( floats_are_about_equal<T>( real(x, y, z, batch), other_buffer.real(x, y, z, batch) ) && |
| 432 | floats_are_about_equal<T>( imag(x, y, z, batch), other_buffer.imag(x, y, z, batch) ) ); |
| 433 | else |
| 434 | throw std::runtime_error( "invalid layout in points_are_about_equal()" ); |
| 435 | } |
| 436 | |
| 437 | /*****************************************************/ |
| 438 | size_t buffer_mismatches( buffer<T> & other_buffer, bool compare_method) |