Displaying 20 results from an estimated 961 matches for "saturates".
Did you mean:
saturate
2015 Jan 11
2
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...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't hugely care
>>> though.
>> Actually i can't remember why that was added in the first place, i'll go
>> ahead and follow your advice here.
> Oh wait... this was to support saturating an array access into a u16...
>
> const int sat =...
2015 Jan 14
5
[LLVMdev] [RFC] Integer Saturation Intrinsics
Hi all,
The patches linked below introduce a new family of intrinsics, for
integer saturation: @llvm.usat, and @llvm.ssat (unsigned/signed).
Quoting the added documentation:
%r = call i32 @llvm.ssat.i32(i32 %x, i32 %n)
is equivalent to the expression min(max(x, -2^(n-1)), 2^(n-1)-1), itself
implementable as the following IR:
%min_sint_n = i32 ... ; the min. signed integer of
2004 Nov 03
2
speex on TI C5x fixed-point DSP
> One thing I've noticed so far in the filter_mem2 code is the calls to
> SATURATE(x, 805306368). 805306368 is 0x30000000. I was expecting that
> to be on a bit boundary, say 0x3fffffff? In which case the arithmetic
> saturation logic could be used.
I don't think it would make that big of a difference, since the
saturation is outside of the inner loop. If it's that
2015 Jan 11
2
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...> 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't hugely care
> though.
Actually i can't remember why that was added in the first place, i'll go
ahead and follow your advice here.
>> + else
>> + res.data.u16 = util_iround(imm0.reg.data.f32);
>> + break;
>>...
2011 Jun 17
0
[LLVMdev] RFC: Integer saturation intrinsics
On Fri, Jun 17, 2011 at 3:08 PM, Evan Cheng <evan.cheng at apple.com> wrote:
> Hi all,
>
> I'm proposing integer saturation intrinsics.
>
> def int_ssat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>;
> def int_usat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>;
>
> The first operand is the integer value
2011 Jun 17
5
[LLVMdev] RFC: Integer saturation intrinsics
Hi all,
I'm proposing integer saturation intrinsics.
def int_ssat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>;
def int_usat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>;
The first operand is the integer value being saturated, and second is the saturation bit position.
For scalar integer types, the semantics are:
int_ssat: x <
2004 Mar 16
2
glm questions --- saturated model
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of David Firth
> Sent: Tuesday, March 16, 2004 1:12 PM
> To: Paul Johnson
> Cc: r-help at r-project.org
> Subject: Re: [R] glm questions
>
>
> Dear Paul
>
> Here are some attempts at your questions. I hope it's of some help.
2015 Jan 19
2
[LLVMdev] Vectorization Cost Models and Multi-Instruction Patterns?
Hi all,
While tinkering with saturation instructions, I hit problems with the
cost model calculations.
The loop vectorizer cost model accumulates the individual TTI cost
model of each instruction. For saturating arithmetic, this is a gross
overestimate, since you have 2 sexts (inputs), 2 icmps + 2 selects
(for the saturation), and a truncate (output); these all fold alway.
With an intrinsic,
2011 Jun 17
2
[LLVMdev] RFC: Integer saturation intrinsics
On Jun 17, 2011, at 3:42 PM, Eli Friedman wrote:
> On Fri, Jun 17, 2011 at 3:08 PM, Evan Cheng <evan.cheng at apple.com> wrote:
>> Hi all,
>>
>> I'm proposing integer saturation intrinsics.
>>
>> def int_ssat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>;
>> def int_usat : Intrinsic<[llvm_anyint_ty],
2019 Oct 10
2
[RFC] Use of saturating intrinsics
Hello all again, take 2.
Over in D68651 I would like to make code that attempt to saturate an value (using higher bitwidth integers) use a saturating intrinsic instead. Something like this:
https://godbolt.org/z/9knBnP
As can be seen, the unsigned cases are already being matched to llvm.uadd.sat intrinsics. I am hoping to extend that to the signed cases. This has numerous benefits including
2008 Feb 05
1
Re: Problem with Blackfin assembly optimizations -- bug in fixed_bfin.h / resampler saturation???
Hi,
I just started to examine the DIV32_16 function (Blackfin ASM version), and wondered why the return value of the function inside 'fixed_bfin.h' is of type 'spx_word16_t', but the local variable 'res' which is returned by this function is of type 'spx_word32_t'. Is this a trick of optimization or a bug?
(Same question for PDIV32_16 and MAX16, too!)
best
2020 Jul 08
4
[RFC] Saturating left shift intrinsics
...rand. As with regular left shift instructions, the second operand is an unsigned quantity and must be less than the integer bitwidth.
If the true result of the operation (given infinite precision) lies outside of the maximum or minimum representable value of the signed/unsigned integer, the result saturates to the maximum or minimum depending on the sign of the shifted value.
These are useful for implementing the Embedded-C fixed-point arithmetic support in Clang, as previously detailed and discussed here:
http://lists.llvm.org/pipermail/llvm-dev/2018-August/125433.html
http://lists.llvm.org/pipermai...
2015 Jan 15
3
[LLVMdev] [RFC] Integer Saturation Intrinsics
On Thu, Jan 15, 2015 at 2:33 AM, David Chisnall <David.Chisnall at cl.cam.ac.uk
> wrote:
> A couple of questions:
>
> 1) Should this really be an intrinsic and not a flag on add? The add
> instruction already allows overflow to be either undefined or defined to
> wrap. Making it defined to saturate seems a natural extension.
>
I don't think this should be a flag on
2015 Jan 11
2
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...gt;>>> 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't hugely care
>>>>> though.
>>>> Actually i can't remember why that was added in the first place, i'll go
>>>> ahead and follow your advice here.
>>> Oh wait... this was to support saturating an array access into a u16...
>...
2018 Aug 21
4
Fixed Point Support in LLVM
If we were to create a new type down the line, I think the main
features that would distinguish them from other types are the
arbitrary width and scale. Saturation can be handled through
instructions since saturation really only takes effect after an
operation and doesn’t really describe anything about the bits in the
resulting type. Signage can similarly be managed through operations
and would be
2015 Jan 09
3
[RESEND/PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
Folding for conversions: F32->(U{16/32}, S{16/32}) and (U{16/32}, {S16/32})->F32
Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
---
.../drivers/nouveau/codegen/nv50_ir_peephole.cpp | 109 +++++++++++++++++++++
1 file changed, 109 insertions(+)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
2008 Feb 08
1
Re: Problem with Blackfin assembly optimizations -- bug in fixed_bfin.h / resampler saturation???
Hi,
I tried to figure out what the problem is -- but it seems to be totally different from what I expected.
My status at the moment is:
- computing results for "generic" and "Blackfin ASM" versions of the DIV32_16 function are the same, there is no "algorithmic bug"
- Instead, there seems some sort of memory corruption:
When I comment out the DIV32_16 function
2009 Jun 13
1
Resampler saturation
> Quoting Stephane Lesage <stephane.lesage at ateis-international.com>:
> > Is this a bug ? Is it possible to fix it ?
> > (I use version speex 1.2beta2, because newer versions just
> don't work
> > on my
> > platform)
>
> This is probable the cause. 1.2beta2 was the first release to
> include the resampler and it had many bugs. I suggest trying
2008 Feb 01
0
FW: Re: Problem with Blackfin assembly optimizations -- bug in fixed_bfin.h / resampler saturation???
Frank Lorenz a ?crit :
> And yes, the same "overflow" happens even when I disable Blackfin ASM
> optimizations.
Indeed, that shouldn't happen. Just to make sure I understand, so far
there's two problems:
1) DIV32_16() in Blackfin assembly causes problems
2) The resampler overflows
When you fix/workaround those two, is the encoder/decoder working
correctly or are there
2015 Jan 10
2
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
Folding for conversions: F32->(U{16/32}, S{16/32}) and (U{16/32}, {S16/32})->F32
Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
---
V2: beat me, whip me, split out F64
.../drivers/nouveau/codegen/nv50_ir_peephole.cpp | 81 ++++++++++++++++++++++
1 file changed, 81 insertions(+)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp