@ -692,8 +692,8 @@ typedef unsigned long posh_u64_t;
# define POSH_64BIT_INTEGER 1
typedef__int64posh_i64_t;
typedefunsigned__int64posh_u64_t;
# define POSH_I64( x ) ((posh_i64_t)x)
# define POSH_U64( x ) ((posh_u64_t)x)
# define POSH_I64( x ) ((posh_i64_t)(x##i64))
# define POSH_U64( x ) ((posh_u64_t)(x##ui64))
# define POSH_I64_PRINTF_PREFIX "I64"
#elif defined __GNUC__ || defined __MWERKS__ || defined __SUNPRO_C || defined __SUNPRO_CC || defined __APPLE_CC__ || defined POSH_OS_IRIX || defined _LONG_LONG || defined _CRAYC
// I'm always confused about which quantizer to use. I think we should choose a quantizer based on how the values are expanded later and this is generally using the 'exact endpoints' rule.
// Quantize a [0, 1] full precision float, using exact endpoints.
inlinefloatquantizeFloat(floatf,intbits){
floatscale=(1<<bits)-1;
inlinefloatquantizeFloat(floatf,uintbits){
nvDebugCheck(bits<=16);
floatscale=float((1<<bits)-1);
floatoffset=0.0f;
returnfloor(saturate(f)*scale+offset)/scale;
}
// Quantize a [0, 1] full precision float, using uniform bins.