Skip to content

Commit

Permalink
Adding AVX asserts.
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Oct 22, 2018
1 parent 406aa8c commit d7d91cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/unit.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,13 @@ void test() {
char ascii[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 0};
char notascii[] = {128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 238, 255, 0};
assert(validate_ascii_fast(ascii, strlen(ascii)));
#ifdef __AVX2__
assert(validate_ascii_fast_avx(ascii, strlen(ascii)));
#endif
assert(!validate_ascii_fast(notascii, strlen(notascii)));
#ifdef __AVX2__
assert(!validate_ascii_fast_avx(notascii, strlen(notascii)));

#endif

__m128i cont = _mm_setr_epi8(4,0,0,0,3,0,0,2,0,1,2,0,3,0,0,1);
__m128i has_error = _mm_setzero_si128();
Expand Down

0 comments on commit d7d91cc

Please sign in to comment.