@@ -1278,10 +1278,23 @@ void crc32c_pclmul_test(const void *key, int len, uint32_t seed, void *out)
1278
1278
#endif
1279
1279
1280
1280
#include " hash-garage/nmhash.h"
1281
- const char * const nmhash32_ver (" nmhash32, le:" MACRO_ITOA(NMHASH_LITTLE_ENDIAN) ", vector:" MACRO_ITOA(NMH_VECTOR) ", align:" MACRO_ITOA(NMH_ACC_ALIGN));
1282
- const char * const nmhash32x_ver (" nmhash32x, le:" MACRO_ITOA(NMHASH_LITTLE_ENDIAN) ", vector:" MACRO_ITOA(NMH_VECTOR) ", align:" MACRO_ITOA(NMH_ACC_ALIGN));
1281
+ #define NMHASH32_DESC_STR " le:" MACRO_ITOA(NMHASH_LITTLE_ENDIAN) " , " \
1282
+ " vector:" MACRO_ITOA(NMH_VECTOR) " , " \
1283
+ " align:" MACRO_ITOA(NMH_ACC_ALIGN) " , "
1284
+
1285
+ const char * const nmhash32_ver (" nmhash32, " NMHASH32_DESC_STR);
1286
+ const char * const nmhash32x_ver (" nmhash32x, " NMHASH32_DESC_STR);
1287
+ constexpr unsigned sizeof_NMH_ACC_INIT = sizeof (NMH_ACC_INIT);
1288
+ constexpr unsigned countof_NMH_ACC_INIT = sizeof (NMH_ACC_INIT)/sizeof (*NMH_ACC_INIT);
1283
1289
// objsize: 4202f0-420c7d: 2445
1284
1290
void nmhash32_test ( const void * key, int len, uint32_t seed, void * out ) {
1291
+ static bool once = false ;
1292
+ if (!once) {
1293
+ NMH_ALIGN (NMH_ACC_ALIGN) uint32_t accX[sizeof (NMH_ACC_INIT)/sizeof (*NMH_ACC_INIT)];
1294
+ NMH_ALIGN (NMH_ACC_ALIGN) uint32_t accY[sizeof (accX)/sizeof (*accX)];
1295
+ printf (" sizeof_NMH_ACC_INIT: %u\n countof_NMH_ACC_INIT: %u\n sizeof(accX): %u\n sizeof(accY): %u\n " , sizeof_NMH_ACC_INIT, countof_NMH_ACC_INIT, sizeof (accX), sizeof (accY));
1296
+ once = true ;
1297
+ }
1285
1298
const uint32_t v = NMHASH32 (key, (const size_t ) len, seed);
1286
1299
printf (" NMHASH32(%p, %d, %u) = %u\n " , key, len, seed, v);
1287
1300
*(uint32_t *)out = v;
0 commit comments