nested foreeach_bit loops
Matthias Kretz
[please enable javascript to see the address]
Tue Oct 2 13:56:47 CEST 2012
Hi Igor,
On Tuesday 02 October 2012 08:58:40 Kulakov, Igor wrote:
> 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]
>
> Am I doing something wrong? Can this be fixed?
You're doing it right. It's a "bug" in Vc. It can be fixed in Vc so that the
internal variable name includes the line number. Then you'd only get those
warnings if you do
foreach_bit(int a, mask1) { foreach_bit(int b, mask2) {
...
} }
I.e. more than one foreach_bit call in a single line of code. If you want to
try and fix it - all you need is the CAT macros and __LINE__ to add the
linenumber to the _Vc_foreach_bit_helper. I'll put it on the list of issues
for Vc 0.7.
BTW, please just send mails to vc-devel, no need to CC me explicitly.
Cheers,
Matthias
--
Dipl.-Phys. Matthias Kretz
Phone: +49 69 798 44110
+49 6221 1871682
Web: http://compeng.uni-frankfurt.de/?mkretz
SIMD easy and portable: http://compeng.uni-frankfurt.de/?vc
More information about the Vc-devel
mailing list