MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / int_as_uint

Function int_as_uint

Source/astcenc_mathlib.h:413–419  ·  view source on GitHub ↗

* @brief Signed int bit-interpreted as an unsigned integer. * * @param v The value to bitcast. * * @return The converted value. */

Source from the content-addressed store, hash-verified

411 * @return The converted value.
412 */
413static inline unsigned int int_as_uint(int v)
414{
415 // Future: Can use std:bit_cast with C++20
416 unsigned int uv;
417 std::memcpy(&uv, &v, sizeof(int));
418 return uv;
419}
420
421/**
422 * @brief Unsigned integer bit-interpreted as a signed integer.

Callers 2

safe_signed_lshFunction · 0.85
mpsnr_operatorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected