FIAS . Impressum . Privacy

nested foreeach_bit loops

Kulakov, Igor [please enable javascript to see the address]
Tue Oct 2 10:58:40 CEST 2012


Hi Matthias,

I use nested foreach_bit, everything seems to be working properly, but I get warnings. 

/Users/ikulakov/Work/HFT/work/code/AliHLTTPCCAGBTracker.cxx:1294:9: warning: declaration of '_Vc_foreach_bit_helper' shadows a previous local [-Wshadow]
/Users/ikulakov/Work/HFT/work/code/AliHLTTPCCAGBTracker.cxx:1286:5: warning: shadowed declaration is here [-Wshadow]


Here is the code:

1286: foreach_bit( int iV, h.IsValid() ) {
      float gx, gy, gz;
      h.GetGlobalCoor( iV, gx, gy, gz );
      AliHLTTPCCAParameters::CALocalToGlobal(float(h.X0()[iV]), float(h.X1()[iV]), float(h.X2()[iV]), float(h.Angle()[iV]), gx, gy, gz);
      float r = sqrt(gx*gx+gy*gy);

      for( unsigned int i2 = 0; i2 < s2.size(); ++i2 ) {
        const ITSCAHitV &h2 = s2[i2];
1294:       foreach_bit( int iV2, h2.IsValid() ) {
          float gx2, gy2, gz2;
          h2.GetGlobalCoor( iV2, gx2, gy2, gz2 );
          float r2 = sqrt(gx2*gx2+gy2*gy2);

          float gz0 = -(gz2-gz)/(r2-r)*r + gz;
          float gx0 = -(gx2-gx)/(r2-r)*r + gx;
          float gy0 = -(gy2-gy)/(r2-r)*r + gx;
          if ( abs(gz0) < maxZ && abs(gx0) < 0.1 && abs(gy0) < 0.1 )
            pvHist[(gz0/maxZ+1)*N/2]++;
        }
      }

Am I doing something wrong? Can this be fixed?



Regards,
Igor


More information about the Vc-devel mailing list
FIAS . Impressum . Privacy