diff --git a/src/Simd/SimdLib.h b/src/Simd/SimdLib.h index 6db01c34bd..496c92e8b0 100644 --- a/src/Simd/SimdLib.h +++ b/src/Simd/SimdLib.h @@ -89,6 +89,16 @@ typedef unsigned __int64 uint64_t; #if __cplusplus >= 201703L #define SIMD_CPP_2017_ENABLE #endif + +#if __cplusplus >= 202002L +#define SIMD_CPP_2020_ENABLE +#endif +#endif + +#if defined(SIMD_CPP_2020_ENABLE) +#define SIMD_CONSTEXPR constexpr +#else +#define SIMD_CONSTEXPR #endif #if defined(SIMD_CPP_2014_ENABLE) @@ -7296,7 +7306,7 @@ extern "C" \param [in] kernelC - a channel size of the pooling kernel in 3D case. In 2D case it must be equal to 1. \param [in] kernelY - a height of the pooling kernel. \param [in] kernelX - a width of the pooling kernel. - \param [in] strideC - a ñ-stride of the pooling in 3D case. In 2D case it must be equal to 1. + \param [in] strideC - a �-stride of the pooling in 3D case. In 2D case it must be equal to 1. \param [in] strideY - a y-stride of the pooling. \param [in] strideX - a x-stride of the pooling. \param [in] padC - a channel pad to the begin of the input image. diff --git a/src/Simd/SimdPoint.hpp b/src/Simd/SimdPoint.hpp index e5ac8d500b..59e6a27e5a 100644 --- a/src/Simd/SimdPoint.hpp +++ b/src/Simd/SimdPoint.hpp @@ -85,7 +85,7 @@ namespace Simd \param [in] tx - initial X value. \param [in] ty - initial Y value. */ - template Point(TX tx, TY ty); + template SIMD_CONSTEXPR Point(TX tx, TY ty); /*! Creates a new Point structure on the base of another point of arbitrary type. @@ -108,7 +108,7 @@ namespace Simd /*! A point destructor. */ - ~Point(); + SIMD_CONSTEXPR ~Point(); /*! Converts itself to point of arbitrary type. @@ -371,7 +371,7 @@ namespace Simd #endif template - SIMD_INLINE TD Convert(TS src) + SIMD_INLINE SIMD_CONSTEXPR TD Convert(TS src) { return (TD)src; } @@ -396,7 +396,7 @@ namespace Simd } template template - SIMD_INLINE Point::Point(TX tx, TY ty) + SIMD_INLINE SIMD_CONSTEXPR Point::Point(TX tx, TY ty) : x(Convert(tx)) , y(Convert(ty)) { @@ -419,7 +419,7 @@ namespace Simd #endif template - SIMD_INLINE Point::~Point() + SIMD_INLINE SIMD_CONSTEXPR Point::~Point() { }