c++ - High performance comparison of signed int arrays (using Intel IPP library) -


We compare the basic arrays of two equal sizes of signed int values ​​using the operation of inequality Trying to do the & lt;, & lt; =,> And> =, in a high performance way. The values ​​that are compared will be considered in the char Orem of the same size as the input, the result will be true / false , where 0x00 means < Code> false and 0xff mean true .

To accomplish this, we are using the Intel IPP library. The problem is that the function we found is that this operation, by name, ippiCompare _ * , images and video processing, only type unsigned char ( Ipp8u) ), signed / signed short ( Ipp16s / Ipp16u ) and float ( Ipp32f ). It does not directly support signed int ( Ipp32s )

I (only) imagine two possible ways to solve it: < / P>

  • Performing an array of straight-forwarded types and comparison in more steps (it will become a small array of four arrays of size twice or four times the size) and Merge into intermediate results. / P>

  • Using any other function is directly supporting signed int arrays from the IPP or any other library which can do something in terms of performance .

But there can be other creative ways ... so I ask that you are helping it! PS: The advantage of using Intel IPP is the performance advantage for large arrays: It uses multi-value processor functions and many cores together (and perhaps more moves) together. So easy looped solution it will not be as fast AFAIK.

The link for PS2:

You can compare with PCMUDDUD, After that, a PaxDue and PackWB It will be something with

  #include & lt; Emmintrin.h & gt; Void cmp (__m128d * a, __m128d * b, v16qi * result, unsigned count) {for (unsigned i = 0; i  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -