-
Notifications
You must be signed in to change notification settings - Fork 76
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
Added windows cross compile builds & fixed build issues #169
base: main-dev
Are you sure you want to change the base?
Conversation
8279247
to
713afd3
Compare
Also added popcnt32 intrinsic support for win32.
Fixes issue with building MacOS universal2, as both the x86 and arm feature flags can be enabled at the same time.
@ashvardanian
Functions where this happens: Plus there are other places where the StringZilla/include/stringzilla/stringzilla.h Lines 3478 to 3487 in a34d836
Other functions it occurs in: So should all of these be changed to use Also should we be running the NumPy tests when building the python binaries? |
Hey @ashbob999! Those places require the unsigned integer to be 64 bit, so it shouldn't be changed. |
Although, if I have understood the That the And because the order pointer array is populated with the data ptr from a |
@ashvardanian what should I do about the warnings for the 32-builds (for the sorting functions)? |
@ashbob999, what's the cleanest way to reproduce some of those warnings/errors with GCC/Clang? It would be easier to choose a path forward if I can better understand their nature. |
Just building it as 32-bit ( For example the warning about converting the result of StringZilla/include/stringzilla/stringzilla.h Line 3162 in dd2b949
But only a very few actually get emitted (GCC). [1/2] Building CXX object CMakeFiles/stringzilla_test_cpp14.dir/scripts/test.cpp.o
In file included from /usr/include/c++/11/cassert:44,
from ../include/stringzilla/stringzilla.hpp:57,
from ../scripts/test.cpp:21:
../scripts/test.cpp: In function ‘void test_sequence_algorithms()’:
../scripts/test.cpp:1347:90: warning: conversion from ‘__gnu_cxx::__alloc_traits<std::allocator<long long unsigned int>, long long unsigned int>::value_type’ {aka ‘long long unsigned int’} to ‘std::vector<std::__cxx11::basic_string<char> >::size_type’ {aka ‘unsigned int’} may change value [-Wconversion]
1347 | for (std::size_t i = 1; i != dataset_size; ++i) { assert(dataset[order[i - 1]] <= dataset[order[i]]); }
| ^
../scripts/test.cpp:1347:111: warning: conversion from ‘__gnu_cxx::__alloc_traits<std::allocator<long long unsigned int>, long long unsigned int>::value_type’ {aka ‘long long unsigned int’} to ‘std::vector<std::__cxx11::basic_string<char> >::size_type’ {aka ‘unsigned int’} may change value [-Wconversion]
1347 | for (std::size_t i = 1; i != dataset_size; ++i) { assert(dataset[order[i - 1]] <= dataset[order[i]]); }
| ^
[2/2] Linking CXX executable stringzilla_test_cpp14 But for whatever reason (maybe my building of the 32-bit with GCC/Clang is broken) but if I build it as 64-bit but with |
@ashbob999, great! For basic operations like |
@ashvardanian okay, that's what I was going to do. As for other APIs we'll see once I fix As for the 32-bit warnings, should we adjust them, and say there is a 4 billion limit for sorting? |
I believe it's already documented, that sorting over 4B entries is not currently supported. If not, we should mark that. |
@ashvardanian that's fine, so it should then be fine to change the size of the values in the sorting functions to |
19e6998
to
4e33434
Compare
@ashvardanian, Somehow I missed that for Would it make sense to change the type of Can you think of any better way of forcing the 4B limit on the user? |
I would stick to |
e3e8491
to
4ee87f4
Compare
Hey @ashbob999! I'll have more time to look into this next week. I want to thank you for following the git message style - it's very pleasing to see! Unlike most PRs, where I end up squashing the patches and merging under a new name, I would love to preserve your entire commit history. I'd just ask you to reformat/squash the last three commits that deviate from the style. Thanks again! |
@ashvardanian no problem, I purposely did not make them that way jsut because they were fixing issues that I noticed from previous commits in the merge. I can squash them into a single one, labelled as minor fixes (or equivalent), do you also want me to rebate to fix one in the middle a35cc50? |
sz_u32_clz
which will help catch if the tests are run withoutBMI
support.release.yml
to build x86/x64/arm64 windows versions, and included the.lib
file in the archive.stringzillite
is built without any dependencies.