GithubHelp home page GithubHelp logo

redspah / meow_hash_cpp Goto Github PK

View Code? Open in Web Editor NEW
37.0 37.0 3.0 195 KB

A cleaner rewrite of the meow hash by Casey Muratori, utilizing modern C++ features

License: zlib License

C++ 96.77% Makefile 0.07% C 2.54% CMake 0.16% CMake 0.16% CMake 0.16% CMake 0.16%

meow_hash_cpp's Introduction

Jill of all things, master of one or two

  • she/her

Professional C++ programmer, wannabe writer, amateur game designer, Pokémon fan

Find out more at my personal webiste.

meow_hash_cpp's People

Contributors

redspah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

meow_hash_cpp's Issues

does not work with gcc and clang

This rewrite is not as functional as original code. It does not compile with gcc and clang.

First error - intrin.h is not available on non-Windows platforms.
After changing intrin.h to x86intrin.h, following errors happen (test.cpp only includes mewo_hash.hpp, nothing else):

$ clang++ -std=c++17 test.cpp
In file included from test.cpp:1:
./meow_hash.hpp:137:33: error: expected a qualified name after 'typename'
        using hash_type32_t = typename hash_type_t<32>;
                                       ^
./meow_hash.hpp:138:33: error: expected a qualified name after 'typename'
        using hash_type64_t = typename hash_type_t<64>;
                                       ^
./meow_hash.hpp:139:34: error: expected a qualified name after 'typename'
        using hash_type128_t = typename hash_type_t<128>;
                                        ^
./meow_hash.hpp:140:34: error: expected a qualified name after 'typename'
        using hash_type256_t = typename hash_type_t<256>;
                                        ^
./meow_hash.hpp:141:34: error: expected a qualified name after 'typename'
        using hash_type512_t = typename hash_type_t<512>;
                                        ^
./meow_hash.hpp:175:37: error: declaration of 'N' shadows template parameter
                hash_type_t<N>& operator[](size_t N)
                                                  ^
./meow_hash.hpp:144:19: note: template parameter is declared here
        template <size_t N>
                         ^
./meow_hash.hpp:180:43: error: declaration of 'N' shadows template parameter
                const hash_type_t<N>& operator[](size_t N) const
                                                        ^
./meow_hash.hpp:144:19: note: template parameter is declared here
        template <size_t N>
                         ^
7 errors generated.

Similar errors also from gcc.

Tried with clang 7.0.0, and gcc 8.2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.