cart_polar_ipp.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. // This file is part of OpenCV project.
  2. // It is subject to the license terms in the LICENSE file found in the top-level directory
  3. // of this distribution and at http://opencv.org/license.html
  4. #include "ipp_hal_core.hpp"
  5. #include <opencv2/core/core.hpp>
  6. #include <opencv2/core/base.hpp>
  7. int ipp_hal_polarToCart32f(const float* mag, const float* angle, float* x, float* y, int len, bool angleInDegrees)
  8. {
  9. const bool isInPlace = (x == mag) || (x == angle) || (y == mag) || (y == angle);
  10. if (isInPlace || angleInDegrees)
  11. return CV_HAL_ERROR_NOT_IMPLEMENTED;
  12. if (CV_INSTRUMENT_FUN_IPP(ippsPolarToCart_32f, mag, angle, x, y, len) < 0)
  13. return CV_HAL_ERROR_NOT_IMPLEMENTED;
  14. return CV_HAL_ERROR_OK;
  15. }
  16. int ipp_hal_polarToCart64f(const double* mag, const double* angle, double* x, double* y, int len, bool angleInDegrees)
  17. {
  18. const bool isInPlace = (x == mag) || (x == angle) || (y == mag) || (y == angle);
  19. if (isInPlace || angleInDegrees)
  20. return CV_HAL_ERROR_NOT_IMPLEMENTED;
  21. if (CV_INSTRUMENT_FUN_IPP(ippsPolarToCart_64f, mag, angle, x, y, len) < 0)
  22. return CV_HAL_ERROR_NOT_IMPLEMENTED;
  23. return CV_HAL_ERROR_OK;
  24. }