diff --git a/README.md b/README.md index d9a83cd..54dfb55 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# Libmorton v0.2.7b -[](https://travis-ci.org/Forceflow/libmorton) [](https://opensource.org/licenses/MIT) [](https://www.paypal.me/forceflow) +# Libmorton v0.2.8 +[](https://github.com/Forceflow/libmorton/actions/workflows/cmake.yml) [](https://opensource.org/licenses/MIT) [](https://www.paypal.me/forceflow) * Libmorton is a **C++ header-only library** with methods to efficiently encode/decode 64, 32 and 16-bit Morton codes and coordinates, in 2D and 3D. *Morton order* is also known as *Z-order* or *[the Z-order curve](https://en.wikipedia.org/wiki/Z-order_curve)*. * Libmorton is a **lightweight and portable** library - the only dependencies are standard C++ headers. Architecture-specific optimizations are available. * More info and some benchmarks in these blogposts: [*Morton encoding*](http://www.forceflow.be/2013/10/07/morton-encodingdecoding-through-bit-interleaving-implementations/), [*Libmorton*](http://www.forceflow.be/2016/01/18/libmorton-a-library-for-morton-order-encoding-decoding/) and [*BMI2 instruction set*](http://www.forceflow.be/2016/11/25/using-the-bmi2-instruction-set-to-encode-decode-morton-codes/) ## Usage -Include the header `include/libmorton/morton.h`. This will always have stub functions that point to the most efficient way to encode/decode Morton codes. If you want to test out alternative (and possibly slower) methods, you can find them in `include/libmorton/morton2D.h` and `include/libmorton/morton3D.h`. **All libmorton functionality is in the `libmorton` namespace to avoid conflicts**. +Just include the header `include/libmorton/morton.h`. This will always have stub functions that point to the most efficient way to encode/decode Morton codes. If you want to test out alternative (and possibly slower) methods, you can find them in `include/libmorton/morton2D.h` and `include/libmorton/morton3D.h`. **All libmorton functionality is in the `libmorton` namespace to avoid conflicts**.
// ENCODING 2D / 3D morton codes, of length 32 and 64 bits @@ -22,7 +22,7 @@ inline void morton3D_64_decode(const uint_fast64_t morton, uint_fast32_t& x, uin## Installation -No installation is required (just download the headers and include them), but I was informed libmorton is packaged for [Microsoft's VCPKG system](https://github.com/Microsoft/vcpkg) as well, if you want a more controlled environment to install C++ packages in. +No compilation / installation is required (just download the headers and include them), but I was informed libmorton is packaged for [Microsoft's VCPKG system](https://github.com/Microsoft/vcpkg) as well, if you want a more controlled environment to install C++ packages in. ## Instruction sets In the standard case, libmorton only uses operations that are supported on pretty much any CPU you can throw it at. If you know you're compiling for a specific architecture, you might gain a speed boost in encoding/decoding operations by enabling implementations for a specific instruction set. Libmorton ships with support for: @@ -32,7 +32,7 @@ In the standard case, libmorton only uses operations that are supported on prett When using MSVC, these options can be found under _Project Properties -> Code Generation -> Enable Enhanced Instruction set_. When using GCC (version 9.0 or higher), you can use `-march=haswell` (or `-march=znver2`) for BMI2 support and `-march=icelake-client` for AVX512 support. -## Testing +## Compiling the test suite The `test` folder contains tools I use to test correctness and performance of the libmorton implementation. You can regard them as unit tests. This section is under heavy re-writing, but might contain some useful code for advanced usage. You can build the test suite: