static __always_inline unsignedlong __arch_hweight64(__u64 w)
{ if (__is_defined(MARCH_HAS_Z15_FEATURES)) return popcnt_z15(w); if (__is_defined(MARCH_HAS_Z196_FEATURES)) {
w = popcnt_z196(w);
w += w >> 32;
w += w >> 16;
w += w >> 8; return w & 0xff;
} return __sw_hweight64(w);
}
static __always_inline unsignedint __arch_hweight32(unsignedint w)
{ if (__is_defined(MARCH_HAS_Z15_FEATURES)) return popcnt_z15(w); if (__is_defined(MARCH_HAS_Z196_FEATURES)) {
w = popcnt_z196(w);
w += w >> 16;
w += w >> 8; return w & 0xff;
} return __sw_hweight32(w);
}
static __always_inline unsignedint __arch_hweight16(unsignedint w)
{ if (__is_defined(MARCH_HAS_Z15_FEATURES)) return popcnt_z15((unsignedshort)w); if (__is_defined(MARCH_HAS_Z196_FEATURES)) {
w = popcnt_z196(w);
w += w >> 8; return w & 0xff;
} return __sw_hweight16(w);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.