| 50 | |
| 51 | template <typename T, typename U> |
| 52 | void c_check_equal ( |
| 53 | const T& a, |
| 54 | const U& b |
| 55 | ) |
| 56 | { |
| 57 | DLIB_TEST(a.nr() == b.nr()); |
| 58 | DLIB_TEST(a.nc() == b.nc()); |
| 59 | typedef typename T::type type; |
| 60 | for (long r = 0; r < a.nr(); ++r) |
| 61 | { |
| 62 | for (long c = 0; c < a.nc(); ++c) |
| 63 | { |
| 64 | typename type::value_type error = std::abs(a(r,c) - b(r,c)); |
| 65 | DLIB_TEST_MSG(error < std::sqrt(std::numeric_limits<typename type::value_type>::epsilon())*eps_mul, "error: " << error << |
| 66 | " eps: " << std::sqrt(std::numeric_limits<typename type::value_type>::epsilon())*eps_mul); |
| 67 | } |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | template <typename T, typename U> |
| 72 | void assign_no_blas ( |