search for: uint16_max

Displaying 20 results from an estimated 41 matches for "uint16_max".

2015 Jan 09
3
[RESEND/PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...); /* make sure bld is init'ed */ + switch(i->dType) { + case TYPE_U16: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, + UINT16_MAX)); + else + res.data.u16 = util_iround(imm0.reg.data.f32); + break; + case TYPE_F64: + if (i->saturate) + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f64, 0, + UINT16_MAX)); +...
2015 Jan 11
2
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...*/ > + switch(i->dType) { > + case TYPE_U16: > + switch (i->sType) { > + case TYPE_F32: > + if (i->saturate) > + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, > + UINT16_MAX)); > + else > + res.data.u16 = util_iround(imm0.reg.data.f32); > + break; > + default: > + return; > + } This won't get hit for the U32 -> U16 conversion though right? Did you test that case? Am I misreading/mis...
2015 Jan 11
2
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...> + switch (i->sType) { >>>>> + case TYPE_F32: >>>>> + if (i->saturate) >>>>> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >>>>> + UINT16_MAX)); >>>>> + else >>>>> + res.data.u16 = util_iround(imm0.reg.data.f32); >>>>> + break; >>>>> + default: >>>>> + return; >>>>> + } >>>> &...
2014 Jul 05
1
[PATCH v4] nv50/ir: Handle OP_CVT when folding constant expressions
...ase TYPE_U16: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) { + int32_t conv = util_iround(imm0.reg.data.f32); + res.data.u16 = (conv < 0) ? 0 : CLAMP((uint32_t)conv, 0, + UINT16_MAX); + } + else res.data.u16 = util_iround(imm0.reg.data.f32); + break; + case TYPE_F64: + if (i->saturate) { + int32_t conv = util_iround(imm0.reg.data.f64); + res.data.u16 = (conv < 0) ? 0 : CLAMP((uint32_t)conv, 0...
2015 Jan 11
2
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...; + case TYPE_U16: >>> + switch (i->sType) { >>> + case TYPE_F32: >>> + if (i->saturate) >>> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >>> + UINT16_MAX)); >>> + else >>> + res.data.u16 = util_iround(imm0.reg.data.f32); >>> + break; >>> + default: >>> + return; >>> + } >> >> This won't get hit for the U32 -> U16 con...
2015 Jan 11
2
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...witch (i->sType) { >>>>>> + case TYPE_F32: >>>>>> + if (i->saturate) >>>>>> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >>>>>> + UINT16_MAX)); >>>>> Where did this saturate stuff come from? It doesn't make sense to >>>>> saturate to a non-float dtype. I'd go ahead and just >>>>> assert(!i->saturate) in the int dtype cases. >>>>> >>>>> One does wonder...
2015 Jan 11
2
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...16: >>>> + switch (i->sType) { >>>> + case TYPE_F32: >>>> + if (i->saturate) >>>> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >>>> + UINT16_MAX)); >>> Where did this saturate stuff come from? It doesn't make sense to >>> saturate to a non-float dtype. I'd go ahead and just >>> assert(!i->saturate) in the int dtype cases. >>> >>> One does wonder what the hw does if the float doesn'...
2015 Jan 11
2
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...>dType) { >> + case TYPE_U16: >> + switch (i->sType) { >> + case TYPE_F32: >> + if (i->saturate) >> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >> + UINT16_MAX)); > Where did this saturate stuff come from? It doesn't make sense to > saturate to a non-float dtype. I'd go ahead and just > assert(!i->saturate) in the int dtype cases. > > One does wonder what the hw does if the float doesn't fit in the > destination... whether...
2015 Jan 10
0
[RESEND/PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...*/ > + switch(i->dType) { > + case TYPE_U16: > + switch (i->sType) { > + case TYPE_F32: > + if (i->saturate) > + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, > + UINT16_MAX)); > + else > + res.data.u16 = util_iround(imm0.reg.data.f32); > + break; > + case TYPE_F64: The F64 stuff needs more thought, as I don't think we can always store the f64 immediates. In my patches, I just outlaw fp64 immediates in the fi...
2004 Jul 14
1
[LLVMdev] Constants.cpp:368: error: `INT8_MAX' undeclared (first use this function)
...IN' undeclared (first use this function) Constants.cpp: In static member function `static bool llvm::ConstantUInt::isValueValidForType(const llvm::Type*, long long unsigned int)': Constants.cpp:387: error: `UINT8_MAX' undeclared (first use this function) Constants.cpp:389: error: `UINT16_MAX' undeclared (first use this function) Constants.cpp:391: error: `UINT32_MAX' undeclared (first use this function) gmake[2]: *** [/usr/local/src/llvm/lib/VMCore/Debug/Constants.lo] Error 1 ----------------------------------- Does anyone have an idea where to #include or #define these consta...
2014 Jul 06
0
[PATCH v5] nv50/ir: Handle OP_CVT when folding constant expressions
...); /* make sure bld is init'ed */ + switch(i->dType) { + case TYPE_U16: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, + UINT16_MAX)); + else + res.data.u16 = util_iround(imm0.reg.data.f32); + break; + case TYPE_F64: + if (i->saturate) + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f64, 0, + UINT16_MAX)); +...
2015 Jan 10
2
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...); /* make sure bld is init'ed */ + switch(i->dType) { + case TYPE_U16: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, + UINT16_MAX)); + else + res.data.u16 = util_iround(imm0.reg.data.f32); + break; + default: + return; + } + i->setSrc(0, bld.mkImm(res.data.u16)); + break; + case TYPE_U32: + switch (i->sType) { + case TYPE...
2004 Jul 15
2
[LLVMdev] Constants.cpp:368: error: `INT8_MAX' undeclared(firstuse this function)
...INT8_MAX - SCHAR_MAX //signed INT8_MIN - SCHAR_MIN //signed INT16_MAX - SHRT_MAX //signed INT16_MIN - SHRT_MIN //signed INT32_MAX - LONG_MAX //signed INT32_MIN - LONG_MIN //signed ... UINT8_MAX - CHAR_MIN //unsigned - #define _CHAR_UNSIGNED || __CHAR_UNSIGNED__ UINT8_MIN - (implicitly 0?) UINT16_MAX - USHRT_MAX //unsigned UINT16_MIN - (implicitly 0?) UINT32_MAX - ULONG_MAX //unsigned UINT32_MIN - (implicitly 0?) /Henrik _________________________________________________________________ F� alle de nye og sjove ikoner med MSN Messenger http://www.msn.dk/messenger
2015 Jan 11
0
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...; + case TYPE_U16: >>> + switch (i->sType) { >>> + case TYPE_F32: >>> + if (i->saturate) >>> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >>> + UINT16_MAX)); >> >> Where did this saturate stuff come from? It doesn't make sense to >> saturate to a non-float dtype. I'd go ahead and just >> assert(!i->saturate) in the int dtype cases. >> >> One does wonder what the hw does if the float doesn't fit in th...
2015 Jan 11
0
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...>dType) { >> + case TYPE_U16: >> + switch (i->sType) { >> + case TYPE_F32: >> + if (i->saturate) >> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >> + UINT16_MAX)); >> + else >> + res.data.u16 = util_iround(imm0.reg.data.f32); >> + break; >> + default: >> + return; >> + } > This won't get hit for the U32 -> U16 conversion though right? Did you > te...
2015 Jan 11
0
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...16: >>>> + switch (i->sType) { >>>> + case TYPE_F32: >>>> + if (i->saturate) >>>> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >>>> + UINT16_MAX)); >>>> + else >>>> + res.data.u16 = util_iround(imm0.reg.data.f32); >>>> + break; >>>> + default: >>>> + return; >>>> + } >>> This won't get hit for th...
2015 Jan 11
0
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...); /* make sure bld is init'ed */ + switch(i->dType) { + case TYPE_U16: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, + UINT16_MAX)); + else + res.data.u16 = util_iround(imm0.reg.data.f32); + break; + default: + return; + } + i->setSrc(0, bld.mkImm(res.data.u16)); + break; + case TYPE_U32: + assert(!i->saturate); + switch (...
2004 Jul 14
0
[LLVMdev] Constants.cpp:368: error: `INT8_MAX' undeclared(firstuse this function)
...HAR_MAX //signed INT8_MIN - SCHAR_MIN //signed INT16_MAX - SHRT_MAX //signed INT16_MIN - SHRT_MIN //signed INT32_MAX - LONG_MAX //signed INT32_MIN - LONG_MIN //signed ... UINT8_MAX - CHAR_MIN //unsigned #define _CHAR_UNSIGNED || __CHAR_UNSIGNED__ UINT8_MIN - (implicitly defined as 0?) UINT16_MAX - USHRT_MAX //unsigned UINT16_MIN - (implicitly defined as 0?) UINT32_MAX - ULONG_MAX //unsigned UINT32_MIN - (implicitly defined as 0?) /Henrik _________________________________________________________________ F� alle de nye og sjove ikoner med MSN Messenger http://www.msn.dk/messenger
2015 Jan 11
0
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...> + switch (i->sType) { >>>>> + case TYPE_F32: >>>>> + if (i->saturate) >>>>> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >>>>> + UINT16_MAX)); >>>> >>>> Where did this saturate stuff come from? It doesn't make sense to >>>> saturate to a non-float dtype. I'd go ahead and just >>>> assert(!i->saturate) in the int dtype cases. >>>> >>>> One does wonder wha...
2015 Jan 11
0
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...*/ > + switch(i->dType) { > + case TYPE_U16: > + switch (i->sType) { > + case TYPE_F32: > + if (i->saturate) > + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, > + UINT16_MAX)); Where did this saturate stuff come from? It doesn't make sense to saturate to a non-float dtype. I'd go ahead and just assert(!i->saturate) in the int dtype cases. One does wonder what the hw does if the float doesn't fit in the destination... whether it saturates or not. I don&...