wojciechmula / sse-popcount Goto Github PK
View Code? Open in Web Editor NEWSIMD (SSE) population count --- http://0x80.pl/articles/sse-popcount.html
License: BSD 2-Clause "Simplified" License
SIMD (SSE) population count --- http://0x80.pl/articles/sse-popcount.html
License: BSD 2-Clause "Simplified" License
Recreate old versions(without manual unrolling, using the loop I've described in the article. Just for sake of completeness.
Problem spotted in the cygwin environment.
Verify failed
Use AVX2 instructions to load data, then use YMM registers as a source for popcnt instructions. I'm curious how fast it will be.
GCC 5.3.1 works fine.
Hi Wojciech,
I use your popcnt-avx2-harley-seal
algorithm in my libpopcnt.h
. Unfortunately it fails to compile on Windows using a recent MSVC 2015 compiler version:
C:\Users\kim\Desktop\libpopcnt-master>nmake -f Makefile.msvc
Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation. All rights reserved.
cl /nologo /W3 /O2 /EHsc /D HAVE_POPCNT /arch:AVX2 /D HAVE_AVX2 test.cpp /Fotest.obj /Fetest.exe
test.cpp
c:\users\kim\desktop\libpopcnt-master\libpopcnt.h(356): error C2676: binary '&': '__m256i' does not define this operator or a conversion to a type acceptable to the predefined operator
c:\users\kim\desktop\libpopcnt-master\libpopcnt.h(356): error C2660: '_mm256_sub_epi8': function does not take 1 arguments
c:\users\kim\desktop\libpopcnt-master\libpopcnt.h(357): error C2676: binary '&': '__m256i' does not define this operator or a conversion to a type acceptable to the predefined operator
c:\users\kim\desktop\libpopcnt-master\libpopcnt.h(357): error C2088: '&': illegal for union
c:\users\kim\desktop\libpopcnt-master\libpopcnt.h(357): error C2660: '_mm256_add_epi8': function does not take 1 arguments
c:\users\kim\desktop\libpopcnt-master\libpopcnt.h(358): error C2676: binary '&': '__m256i' does not define this operator or a conversion to a type acceptable to the predefined operator
c:\users\kim\desktop\libpopcnt-master\libpopcnt.h(369): error C2676: binary '^': '__m256i' does not define this operator or a conversion to a type acceptable to the predefined operator
c:\users\kim\desktop\libpopcnt-master\libpopcnt.h(370): error C2676: binary '&': '__m256i' does not define this operator or a conversion to a type acceptable to the predefined operator
c:\users\kim\desktop\libpopcnt-master\libpopcnt.h(370): error C2088: '&': illegal for union
c:\users\kim\desktop\libpopcnt-master\libpopcnt.h(371): error C2676: binary '^': '__m256i' does not define this operator or a conversion to a type acceptable to the predefined operator
c:\users\kim\desktop\libpopcnt-master\libpopcnt.h(423): error C3861: '_mm256_extract_epi64': identifier not found
c:\users\kim\desktop\libpopcnt-master\libpopcnt.h(424): error C3861: '_mm256_extract_epi64': identifier not found
c:\users\kim\desktop\libpopcnt-master\libpopcnt.h(425): error C3861: '_mm256_extract_epi64': identifier not found
c:\users\kim\desktop\libpopcnt-master\libpopcnt.h(426): error C3861: '_mm256_extract_epi64': identifier not found
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
It seems like the MSVC compiler has poor AVX2 support (e.g. the _mm256_extract_epi64
intrinsic seems to be missing)!? Have you ever tried compiling your sse-popcount
project using MSVC?
Here is a link to my libpopcnt.h
Thanks,
Kim
At least verify utility reports error.
Add an SSE version of HS algorithm, as @kimwalisch suggested.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.