fix the type used for bitfield_extract_signed (#1913)

We compute the reference values using unsigned types exclusively,
even when the input type is signed.  This fixes one place where
an signed type was inadvertently used.
This commit is contained in:
Ben Ashbaugh
2024-04-04 13:08:41 -07:00
committed by GitHub
parent 48003e9d32
commit 27e47e9e87

View File

@@ -44,7 +44,7 @@ template <typename T>
static typename std::make_unsigned<T>::type
cpu_bit_extract_signed(T tbase, cl_uint offset, cl_uint count)
{
typedef typename std::make_signed<T>::type unsigned_t;
typedef typename std::make_unsigned<T>::type unsigned_t;
assert(offset <= sizeof(T) * 8);
assert(count <= sizeof(T) * 8);