Macro Definition Documentation

#define hwloc_bitmap_foreach_begin

(

id,

bitmap

)

Loop macro iterating on bitmap bitmap.

index is the loop variable; it should be an unsigned int. The first iteration will set index to the lowest index in the bitmap. Successive iterations will iterate through, in order, all remaining indexes that in the bitmap. To be specific: each iteration will return a value for index such that hwloc_bitmap_isset(bitmap, index) is true.

The assert prevents the loop from being infinite if the bitmap is infinite.