Merge branch 'devel' into 'master' for 1.15.2 release
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
|
||||
|
||||
## Establish project ##
|
||||
|
||||
project(rkcommon VERSION 1.15.1 LANGUAGES CXX)
|
||||
project(rkcommon VERSION 1.15.2 LANGUAGES CXX)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
||||
+11
-4
@@ -27,10 +27,21 @@ using int8 = int8_t;
|
||||
// Constants
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
#ifdef ISPC
|
||||
#define inf floatbits(0x7F800000)
|
||||
#define pos_inf floatbits(0x7F800000)
|
||||
#define neg_inf floatbits(0xFF800000)
|
||||
#define nan floatbits(0x7FBFFFFF)
|
||||
#else
|
||||
constexpr float floatbits(unsigned int a)
|
||||
{
|
||||
return sycl::bit_cast<float>(a);
|
||||
}
|
||||
constexpr float inf = floatbits(0x7F800000);
|
||||
constexpr float pos_inf = floatbits(0x7F800000);
|
||||
constexpr float neg_inf = floatbits(0xFF800000);
|
||||
constexpr float nan = floatbits(0x7FBFFFFF);
|
||||
#endif
|
||||
// smallest positive normal number 2^-126 ~ 1.17549435e-38
|
||||
#define flt_min 0x1.0p-126f
|
||||
|
||||
@@ -137,10 +148,6 @@ inline float nextafter(const float a, const float b)
|
||||
{
|
||||
return sycl::nextafter(a, b);
|
||||
}
|
||||
inline float floatbits(unsigned int a)
|
||||
{
|
||||
return sycl::bit_cast<float>(a);
|
||||
}
|
||||
inline unsigned int intbits(float a)
|
||||
{
|
||||
return sycl::bit_cast<unsigned int>(a);
|
||||
|
||||
Reference in New Issue
Block a user