From b245f5f5420a08c1f36111011dfe7092d560b60a Mon Sep 17 00:00:00 2001 From: Jeroen Baert <3607063+Forceflow@users.noreply.github.com> Date: Sat, 18 Sep 2021 11:50:01 +0200 Subject: [PATCH 1/5] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d9a83cd..98ed251 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ * 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**. +No compilation required, 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 @@ -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: From aec3785bc5fc93eb314eb13294872747ea0ed99e Mon Sep 17 00:00:00 2001 From: Jeroen Baert <3607063+Forceflow@users.noreply.github.com> Date: Sat, 18 Sep 2021 11:50:27 +0200 Subject: [PATCH 2/5] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 98ed251..ec94508 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ * 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 -No compilation required, 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**. +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: From 051a39f0cfa004ea689ddcecffa851e45c139291 Mon Sep 17 00:00:00 2001 From: Jeroen Baert <3607063+Forceflow@users.noreply.github.com> Date: Sat, 18 Sep 2021 11:57:45 +0200 Subject: [PATCH 3/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ec94508..56a3c34 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Libmorton v0.2.7b -[](https://travis-ci.org/Forceflow/libmorton) [](https://opensource.org/licenses/MIT) [](https://www.paypal.me/forceflow) +[](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. From 30fa236e04afa8bc7bd9070aa78a979fbfeb2a33 Mon Sep 17 00:00:00 2001 From: Jeroen Baert <3607063+Forceflow@users.noreply.github.com> Date: Sat, 18 Sep 2021 12:48:24 +0200 Subject: [PATCH 4/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 56a3c34..54dfb55 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Libmorton v0.2.7b +# 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)*. From 314f8f69808336928b366eb2e5a75d8b921fee84 Mon Sep 17 00:00:00 2001 From: Jeroen Baert <3607063+Forceflow@users.noreply.github.com> Date: Sat, 18 Sep 2021 12:48:56 +0200 Subject: [PATCH 5/5] Update CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fec721..e4b3b76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # CMake version >= 3.15.0 required because of https://github.com/Forceflow/libmorton/issues/62 # CMake version >= 3.8.2 required because of c++11 cmake_minimum_required(VERSION 3.15.0) -project(libmorton VERSION 0.2.7) +project(libmorton VERSION 0.2.8) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOMINMAX=1")