title: How can I optimize this code with ARM NEON?
body: <p>I'm trying to optimize some code in order to reduce as much as possible execution times.
  This is the code:</p>
  
  <pre><code>    int shifter=0;
  
      // now iterate through all the pairings
      UINT32_ALIAS* ptr2=(UINT32_ALIAS*)ptr;
      const BriskShortPair* max=shortPairs_+noShortPairs_;
      for(BriskShortPair* iter=shortPairs_; iter&lt;max;++iter){
          t1=*(_values+iter-&gt;i);
          t2=*(_values+iter-&gt;j);
          if(t1&gt;t2){
              *ptr2|=((1)&lt;&lt;shifter);
  
          } // else already initialized with zero
          // take care of the iterators:
          ++shifter;
          if(shifter==32){
              shifter=0;
              ++ptr2;
          }
      }
  </code></pre>
  
  <p>I was wondering if it's possible to somehow parallelize this using NEON.
  Is it possible?
  Thank you</p>
  
  <p>EDIT: The context of this code is the BRISK features detector (<a href="http://www.asl.ethz.ch/people/lestefan/personal/BRISK" rel="nofollow">http://www.asl.ethz.ch/people/lestefan/personal/BRISK</a>)
  I'm trying to optimize this code for an ARM architecture.
  The piece of code I'm referring to has the following structure:</p>
  
  <p>-an external for cycle that scans a certain number of points</p>
  
  <p>-for each one of these points there a certain number of other points around it (a fixed number) and each one of these has an intensity value associated.</p>
  
  <p>-in an internal for cycle fixed pairs of points are compared on the basis of their intensity value and the result of this comparison can be 0 or 1 and this value is put in a vector.</p>
  
  <p>The code I posted here is the internal for cycle.</p>