-
Notifications
You must be signed in to change notification settings - Fork 12
SWAR Demos on ARM #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8f0c3b6
f7f6059
009200a
2726369
9fe9998
f26dc78
9d25aa7
48b32bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| #include "atoi.h" | ||
|
|
||
| #include "zoo/pp/platform.h" | ||
| #include <vector> | ||
| #include <string> | ||
| #include <cstring> | ||
|
|
@@ -119,17 +119,28 @@ struct CorpusStringLength { | |
| } | ||
| }; | ||
|
|
||
|
|
||
| #if ZOO_CONFIGURED_TO_USE_AVX() | ||
| #define AVX2_STRLEN_CORPUS_X_LIST \ | ||
| X(ZOO_AVX, zoo::avx2_strlen) | ||
| #else | ||
| #define AVX2_STRLEN_CORPUS_X_LIST /* nothing */ | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am going to immediately add cases to this X list, you'll see this was the proper way to encapsulate this. Do you have "bandwidth" to help me do the equivalent for ARM? basically I can give you a diff patch that enables ARM, and hopefully it'll work, but if it doesn't you could fix it, of course that I will be online to help if you want
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yup, i can add a patch if that helps. also feel free to push to this branch and i can pull and check it and fix errors i face |
||
| #endif | ||
|
|
||
|
|
||
| #define STRLEN_CORPUS_X_LIST \ | ||
| X(LIBC_STRLEN, strlen) \ | ||
| X(ZOO_STRLEN, zoo::c_strLength) \ | ||
| X(ZOO_NATURAL_STRLEN, zoo::c_strLength_natural) \ | ||
| X(ZOO_MANUAL_STRLEN, zoo::c_strLength_manualComparison) \ | ||
| X(ZOO_AVX, zoo::avx2_strlen) \ | ||
| X(GENERIC_GLIBC_STRLEN, STRLEN_old) | ||
| X(GENERIC_GLIBC_STRLEN, STRLEN_old) \ | ||
| AVX2_STRLEN_CORPUS_X_LIST | ||
thecppzoo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| #define X(Typename, FunctionToCall) \ | ||
| struct Invoke##Typename { int operator()(const char *p) { return FunctionToCall(p); } }; | ||
|
|
||
| PARSE8BYTES_CORPUS_X_LIST | ||
| STRLEN_CORPUS_X_LIST | ||
|
|
||
| #undef X | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,16 @@ | ||
| #ifndef ZOO_PLATFORM_MACROS_H | ||
| #define ZOO_PLATFORM_MACROS_H | ||
|
|
||
| #ifdef _MSC_VER | ||
| #ifdef __AVX2__ | ||
| #define ZOO_CONFIGURED_TO_USE_AVX() 1 | ||
| #else | ||
| #define ZOO_CONFIGURED_TO_USE_AVX() 0 | ||
| #endif | ||
|
|
||
| #ifdef _MSC_VER | ||
| #define MSVC_EMPTY_BASES __declspec(empty_bases) | ||
|
|
||
| #else | ||
|
|
||
| #define MSVC_EMPTY_BASES | ||
|
|
||
| #endif | ||
|
|
||
| #endif |
Uh oh!
There was an error while loading. Please reload this page.