diff --git a/3party/eigen/.gitlab-ci.yml b/3party/eigen/.gitlab-ci.yml deleted file mode 100644 index e5a3c00..0000000 --- a/3party/eigen/.gitlab-ci.yml +++ /dev/null @@ -1,23 +0,0 @@ -# This file is part of Eigen, a lightweight C++ template library -# for linear algebra. -# -# Copyright (C) 2020 Arm Ltd. and Contributors -# -# This Source Code Form is subject to the terms of the Mozilla -# Public License v. 2.0. If a copy of the MPL was not distributed -# with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -stages: - - buildsmoketests - - smoketests - - build - - test - -variables: - BUILDDIR: builddir - EIGEN_CI_CMAKE_GENEATOR: "Ninja" - -include: - - "/ci/smoketests.gitlab-ci.yml" - - "/ci/build.gitlab-ci.yml" - - "/ci/test.gitlab-ci.yml" diff --git a/3party/eigen/.gitlab/issue_templates/Bug Report.md b/3party/eigen/.gitlab/issue_templates/Bug Report.md deleted file mode 100644 index 0c49b0f..0000000 --- a/3party/eigen/.gitlab/issue_templates/Bug Report.md +++ /dev/null @@ -1,69 +0,0 @@ - - -### Summary - - -### Environment - -- **Operating System** : Windows/Linux -- **Architecture** : x64/Arm64/PowerPC ... -- **Eigen Version** : 3.3.9 -- **Compiler Version** : Gcc7.0 -- **Compile Flags** : -O3 -march=native -- **Vector Extension** : SSE/AVX/NEON ... - -### Minimal Example - - -```cpp -//show your code here -``` - -### Steps to reproduce - - -1. first step -2. second step -3. ... - -### What is the current *bug* behavior? - - -### What is the expected *correct* behavior? - - -### Relevant logs - - - -### Warning Messages - - - -### Benchmark scripts and results - - -### Anything else that might help - - -- [ ] Have a plan to fix this issue. diff --git a/3party/eigen/.gitlab/issue_templates/Feature Request.md b/3party/eigen/.gitlab/issue_templates/Feature Request.md deleted file mode 100644 index 2c6f908..0000000 --- a/3party/eigen/.gitlab/issue_templates/Feature Request.md +++ /dev/null @@ -1,7 +0,0 @@ -### Describe the feature you would like to be implemented. - -### Would such a feature be useful for other users? Why? - -### Any hints on how to implement the requested feature? - -### Additional resources diff --git a/3party/eigen/.gitlab/merge_request_templates/Merge Request Template.md b/3party/eigen/.gitlab/merge_request_templates/Merge Request Template.md deleted file mode 100644 index 3fe963a..0000000 --- a/3party/eigen/.gitlab/merge_request_templates/Merge Request Template.md +++ /dev/null @@ -1,26 +0,0 @@ - - -### Reference issue - - -### What does this implement/fix? - - -### Additional information - diff --git a/3party/eigen/.hgeol b/3party/eigen/.hgeol deleted file mode 100644 index 5327df1..0000000 --- a/3party/eigen/.hgeol +++ /dev/null @@ -1,11 +0,0 @@ -[patterns] -*.sh = LF -*.MINPACK = CRLF -scripts/*.in = LF -debug/msvc/*.dat = CRLF -debug/msvc/*.natvis = CRLF -unsupported/test/mpreal/*.* = CRLF -** = native - -[repository] -native = LF diff --git a/CMakeLists.txt b/CMakeLists.txt index 511b150..3af56b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 2.8) -project(sled LANGUAGES C CXX) +cmake_minimum_required(VERSION 3.10) +project(sled VERSION 3.10 LANGUAGES C CXX) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/include/sled/byte_order.h b/include/sled/byte_order.h index 6251ff7..db34ead 100644 --- a/include/sled/byte_order.h +++ b/include/sled/byte_order.h @@ -26,6 +26,25 @@ #define __BIG_ENDIAN BIG_ENDIAN #define __LITTLE_ENDIAN LITTLE_ENDIAN #define __PDP_ENDIAN PDP_ENDIAN +#elif defined(__EMSCRIPTEN__) +#define htobe16(x) __builtin_bswap16(x) +#define htole16(x) (x) +#define be16toh(x) __builtin_bswap16(x) +#define le16toh(x) (x) + +#define htobe32(x) __builtin_bswap32(x) +#define htole32(x) (x) +#define be32toh(x) __builtin_bswap32(x) +#define le32toh(x) (x) + +#define htobe64(x) __builtin_bswap64(x) +#define htole64(x) (x) +#define be64toh(x) __builtin_bswap64(x) +#define le64toh(x) (x) +// #define __BYTE_ORDER __BYTE_ORDER__ +// #define __BIG_ENDIAN __ORDER_BIG_ENDIAN__ +// #define __LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__ +// #define __PDP_ENDIAN __ORDER_PDP_ENDIAN__ #endif inline uint16_t @@ -52,4 +71,4 @@ NetworkToHost32(uint32_t n) return be32toh(n); } -#endif // SLED_BYTE_ORDER_H +#endif// SLED_BYTE_ORDER_H