Community
cancel
Showing results for 
Search instead for 
Did you mean: 
IDZ_A_Intel
Employee
101 Views

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

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
101 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