mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
minor fixes
This commit is contained in:
parent
6d8f3b9ff8
commit
41ff0962c4
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, Intel Corporation
|
* Copyright (c) 2017, Intel Corporation
|
||||||
* Copyright (c) 2020, 2021, VectorCamp PC
|
* Copyright (c) 2020-2021, VectorCamp PC
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015-2017, Intel Corporation
|
* Copyright (c) 2015-2017, Intel Corporation
|
||||||
|
* Copyright (c) 2020, 2021, VectorCamp PC
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@ -37,44 +38,6 @@
|
|||||||
#include "util/arch.h"
|
#include "util/arch.h"
|
||||||
#include "util/bitutils.h"
|
#include "util/bitutils.h"
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
#define DUMP_MSK(_t) \
|
|
||||||
static UNUSED \
|
|
||||||
void dumpMsk##_t(m##_t msk) { \
|
|
||||||
u8 * mskAsU8 = (u8 *)&msk; \
|
|
||||||
for (unsigned i = 0; i < sizeof(msk); i++) { \
|
|
||||||
u8 c = mskAsU8[i]; \
|
|
||||||
for (int j = 0; j < 8; j++) { \
|
|
||||||
if ((c >> (7-j)) & 0x1) \
|
|
||||||
printf("1"); \
|
|
||||||
else \
|
|
||||||
printf("0"); \
|
|
||||||
} \
|
|
||||||
printf(" "); \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
static UNUSED \
|
|
||||||
void dumpMsk##_t##AsChars(m##_t msk) { \
|
|
||||||
u8 * mskAsU8 = (u8 *)&msk; \
|
|
||||||
for (unsigned i = 0; i < sizeof(msk); i++) { \
|
|
||||||
u8 c = mskAsU8[i]; \
|
|
||||||
if (isprint(c)) \
|
|
||||||
printf("%c",c); \
|
|
||||||
else \
|
|
||||||
printf("."); \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
DUMP_MSK(128)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** \brief Naive byte-by-byte implementation. */
|
/** \brief Naive byte-by-byte implementation. */
|
||||||
static really_inline
|
static really_inline
|
||||||
const u8 *shuftiFwdSlow(const u8 *lo, const u8 *hi, const u8 *buf,
|
const u8 *shuftiFwdSlow(const u8 *lo, const u8 *hi, const u8 *buf,
|
||||||
@ -124,4 +87,4 @@ const u8 *shuftiDoubleExec(m128 mask1_lo, m128 mask1_hi,
|
|||||||
const u8 *buf, const u8 *buf_end) {
|
const u8 *buf, const u8 *buf_end) {
|
||||||
return shuftiDoubleExecReal<VECTORSIZE>(mask1_lo, mask1_hi, mask2_lo, mask2_hi, buf, buf_end);
|
return shuftiDoubleExecReal<VECTORSIZE>(mask1_lo, mask1_hi, mask2_lo, mask2_hi, buf, buf_end);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user