Re: Saturated integer addition in C

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 06, 2008 at 10:42:51AM +0530, Rohit Garg wrote:
> You can use sse intrinsics. They are portable c and give you saturated
> arithmetic. They are probably limited to 16 bit though.

If this is a new project, you might want to consider looking at sseplus, which
is an attempt to abstract the various Intel and AMD SSE extensions, so that you
can write the code once, and then have the code use the appropriate
instructions on the machine (for example, if your machine has the SSE4 or SSE5
instructions, and your operations could use those instructions, you would get
the direct instruction, but if not, it would be emulated using the instructions
native to the machine)
http://sseplus.sourceforge.net/

-- 
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
meissner@xxxxxxxxxxxxxxxxxx

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux