Skip to content

Commit

Permalink
Merge pull request #82 from VectorCamp/feature/add-macos-support
Browse files Browse the repository at this point in the history
Minor changes to enable compilation on Mac M1
  • Loading branch information
markos authored Dec 11, 2021
2 parents 1718e33 + 467db4a commit 90018f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion examples/patbench.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
*
*/

#include <random>
#include <algorithm>
#include <cstring>
#include <chrono>
Expand Down Expand Up @@ -151,6 +152,8 @@ using std::set;
using std::min;
using std::max;
using std::copy;
using std::random_device;
using std::mt19937;

enum Criterion {
CRITERION_THROUGHPUT,
Expand Down Expand Up @@ -731,7 +734,9 @@ int main(int argc, char **argv) {
count++;
cout << "." << std::flush;
vector<unsigned> sv(s.begin(), s.end());
random_shuffle(sv.begin(), sv.end());
random_device rng;
mt19937 urng(rng());
shuffle(sv.begin(), sv.end(), urng);
unsigned groups = factor_max + 1;
for (unsigned current_group = 0; current_group < groups;
current_group++) {
Expand Down
2 changes: 1 addition & 1 deletion src/util/supervector/arch/arm/impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ really_inline SuperVector<16> SuperVector<16>::eq(SuperVector<16> const &b) cons
template <>
really_inline typename SuperVector<16>::movemask_type SuperVector<16>::movemask(void) const
{
SuperVector powers{0x8040201008040201UL};
SuperVector powers = SuperVector::dup_u64(0x8040201008040201UL);

// Compute the mask from the input
uint8x16_t mask = (uint8x16_t) vpaddlq_u32(vpaddlq_u16(vpaddlq_u8(vandq_u8(u.u8x16[0], powers.u.u8x16[0]))));
Expand Down

0 comments on commit 90018f9

Please sign in to comment.