mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
Build for embedded systems
This commit is contained in:
@@ -342,7 +342,23 @@ enum BorderTypes {
|
||||
#define CV_SUPPRESS_DEPRECATED_START
|
||||
#define CV_SUPPRESS_DEPRECATED_END
|
||||
#endif
|
||||
|
||||
#define CV_UNUSED(name) (void)name
|
||||
|
||||
#if defined __GNUC__ && !defined __EXCEPTIONS
|
||||
#define CV_TRY
|
||||
#define CV_CATCH(A, B) for (A B; false; )
|
||||
#define CV_CATCH_ALL if (false)
|
||||
#define CV_THROW(A) abort()
|
||||
#define CV_RETHROW() abort()
|
||||
#else
|
||||
#define CV_TRY try
|
||||
#define CV_CATCH(A, B) catch(const A & B)
|
||||
#define CV_CATCH_ALL catch(...)
|
||||
#define CV_THROW(A) throw A
|
||||
#define CV_RETHROW() throw
|
||||
#endif
|
||||
|
||||
//! @endcond
|
||||
|
||||
/*! @brief Signals an error and raises the exception.
|
||||
|
||||
@@ -32,7 +32,11 @@
|
||||
#if !defined _MSC_VER && !defined __BORLANDC__
|
||||
# if defined __cplusplus && __cplusplus >= 201103L && !defined __APPLE__
|
||||
# include <cstdint>
|
||||
typedef std::uint32_t uint;
|
||||
# ifdef __NEWLIB__
|
||||
typedef unsigned int uint;
|
||||
# else
|
||||
typedef std::uint32_t uint;
|
||||
# endif
|
||||
# else
|
||||
# include <stdint.h>
|
||||
typedef uint32_t uint;
|
||||
|
||||
@@ -122,6 +122,12 @@ public:
|
||||
explicit softfloat( const uint64_t );
|
||||
explicit softfloat( const int32_t );
|
||||
explicit softfloat( const int64_t );
|
||||
|
||||
#ifdef CV_INT32_T_IS_LONG_INT
|
||||
// for platforms with int32_t = long int
|
||||
explicit softfloat( const int a ) { *this = softfloat(static_cast<int32_t>(a)); }
|
||||
#endif
|
||||
|
||||
/** @brief Construct from float */
|
||||
explicit softfloat( const float a ) { Cv32suf s; s.f = a; v = s.u; }
|
||||
|
||||
@@ -253,6 +259,12 @@ public:
|
||||
explicit softdouble( const uint64_t );
|
||||
explicit softdouble( const int32_t );
|
||||
explicit softdouble( const int64_t );
|
||||
|
||||
#ifdef CV_INT32_T_IS_LONG_INT
|
||||
// for platforms with int32_t = long int
|
||||
explicit softdouble( const int a ) { *this = softdouble(static_cast<int32_t>(a)); }
|
||||
#endif
|
||||
|
||||
/** @brief Construct from double */
|
||||
explicit softdouble( const double a ) { Cv64suf s; s.f = a; v = s.u; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user