Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
6625 Discussions

how to use IPP to find the array index for element > 0 ?

IDZ_A_Intel
Employee
195 Views
Hi:


I would like to inmplenet the code by IPP:


A is a array pointer, which may be float or int with size n:

B is a integer array pointer, to save the index of A which element is greater that zero.


int ith = 0;

for(int i = 0; i< n; i++){

if(A > 0)
B[ith++] = i;

}/*for i*/

as you know, the bottleneck is the cashe exchange, A and B could mapping the same cashe line, that make slow.

is there useful function in ipp to implement that?

thank you.
0 Kudos
1 Reply
PaulF_IntelCorp
Employee
195 Views
You might be able to implement such a search using a combination of the Threshhold and FindNearest functions. Here are some links to those functions:

http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/ippxe/ipp_manual_lnx/hh_...

http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/ippxe/ipp_manual_lnx/hh_...
Reply