Skip to content

Commit 97ec98c

Browse files
authored
Merge pull request #51 from Forceflow/develop
Develop
2 parents d1e9aa0 + 45fcc1d commit 97ec98c

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Libmorton v0.2.4
1+
# Libmorton v0.2.5
22
[![Build Status](https://travis-ci.org/Forceflow/libmorton.svg?branch=master)](https://travis-ci.org/Forceflow/libmorton) [![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://opensource.org/licenses/MIT) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/forceflow)
33

44
* 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/include/morton.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ namespace libmorton {
7777
inline void morton3D_64_decode(const uint_fast64_t morton, uint_fast32_t& x, uint_fast32_t& y, uint_fast32_t& z) {
7878
m3D_d_BITALG<uint_fast64_t, uint_fast32_t>(morton, x, y, z);
7979
}
80-
#elif defined(__BMI2__) || __AVX2__
80+
#elif defined(__BMI2__) || defined(__AVX2__)
8181
inline void morton2D_32_decode(const uint_fast32_t morton, uint_fast16_t& x, uint_fast16_t& y) {
8282
m2D_d_BMI<uint_fast32_t, uint_fast16_t>(morton, x, y);
8383
}

libmorton/include/morton_BMI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#pragma once
2-
#if defined(__BMI2__) || __AVX2__
2+
#if defined(__BMI2__) || defined(__AVX2__)
33
#include <immintrin.h>
44
#include <stdint.h>
55

libmorton/include/morton_common.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
// Libmorton - Common helper methods needed in Morton encoding/decoding
44

55
#include <stdint.h>
6-
#if _MSC_VER
6+
#if defined(_MSC_VER)
77
#include <intrin.h>
88
#endif
99

1010
namespace libmorton {
1111
template<typename morton>
1212
inline bool findFirstSetBitZeroIdx(const morton x, unsigned long* firstbit_location) {
13-
#if _MSC_VER && !_WIN64
13+
#if defined(_MSC_VER) && !defined(_WIN64)
1414
// 32 BIT on 32 BIT
1515
if (sizeof(morton) <= 4) {
1616
return _BitScanReverse(firstbit_location, x) != 0;
@@ -24,10 +24,10 @@ namespace libmorton {
2424
}
2525
return _BitScanReverse(firstbit_location, (x & 0xFFFFFFFF)) != 0;
2626
}
27-
#elif _MSC_VER && _WIN64
27+
#elif defined(_MSC_VER) && defined(_WIN64)
2828
// 32 or 64 BIT on 64 BIT
2929
return _BitScanReverse64(firstbit_location, x) != 0;
30-
#elif __GNUC__
30+
#elif defined(__GNUC__)
3131
if (x == 0) {
3232
return false;
3333
}

test/libmorton_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ void parseProgramParameters(int argc, char* argv[]) {
9393
void printHeader(){
9494
cout << "LIBMORTON TEST SUITE" << endl;
9595
cout << "--------------------" << endl;
96-
#if _WIN64 || __x86_64__
96+
#if defined(_WIN64) || defined(__x86_64__)
9797
cout << "++ 64-bit version" << endl;
9898
#else
9999
cout << "++ 32-bit version" << endl;
100100
#endif
101-
#if _MSC_VER
101+
#if defined(_MSC_VER)
102102
cout << "++ Compiled using MSVC " << _MSC_VER << endl;
103-
#elif __GNUC__
103+
#elif defined(__GNUC__)
104104
cout << "++ Compiled using GCC" << endl;
105105
#endif
106106
cout << "++ Running tests until we've reached " << MAXRUNSIZE << "^3 codes" << endl;

test/timer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
#pragma once
66

7-
#if _MSC_VER
7+
#if defined(_MSC_VER)
88
#include <Windows.h>
9-
#elif __GNUC__
9+
#elif defined(__GNUC__)
1010
#include "time.h"
1111
#endif
1212

13-
#if _MSC_VER
13+
#if defined(_MSC_VER)
1414
struct Timer {
1515
double pc_frequency = 0.0;
1616
double elapsed_time_milliseconds = 0.0;

0 commit comments

Comments
 (0)