Compare commits

...

3 Commits

8 changed files with 674 additions and 811 deletions

View File

@ -13,23 +13,20 @@ jobs:
# cross-platform coverage. # cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}-${{ matrix.cc }}
strategy: strategy:
matrix: matrix:
include: include:
- os: macos-latest - os: macos-latest
name: "macOS Clang"
cc: "clang" cc: "clang"
cxx: "clang++" cxx: "clang++"
- os: ubuntu-latest - os: ubuntu-latest
name: "Ubuntu Clang"
cc: "clang-9" cc: "clang-9"
cxx: "clang++-9" cxx: "clang++-9"
- os: ubuntu-latest - os: ubuntu-latest
name: "Ubuntu GCC"
cc: "gcc-10" cc: "gcc-10"
cxx: "g++-10" cxx: "g++-10"
- os: windows-latest - os: windows-latest
name: "Windows MSVC"
cc: "cl" cc: "cl"
cxx: "cl" cxx: "cl"

View File

@ -30,7 +30,6 @@ target_compile_features(python_rgbcx PUBLIC cxx_std_20 c_std_11)
target_compile_features(test_rgbcx PUBLIC cxx_std_20 c_std_11) target_compile_features(test_rgbcx PUBLIC cxx_std_20 c_std_11)
set_property(TARGET python_rgbcx test_rgbcx PROPERTY INTERPROCEDURAL_OPTIMIZATION True) #enable FLTO if available set_property(TARGET python_rgbcx test_rgbcx PROPERTY INTERPROCEDURAL_OPTIMIZATION True) #enable FLTO if available
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_SYSTEM_NAME STREQUAL "Darwin") if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set_property(TARGET python_rgbcx test_rgbcx PROPERTY OSX_ARCHITECTURES_RELEASE x86_64 arm64) #Mach-O fat binary for arm and x86 set_property(TARGET python_rgbcx test_rgbcx PROPERTY OSX_ARCHITECTURES_RELEASE x86_64 arm64) #Mach-O fat binary for arm and x86
endif () endif ()

View File

@ -18,8 +18,5 @@
*/ */
#include "blocks.h" #include "blocks.h"
#include "color.h"
#include <algorithm>
#include <cassert>
// endregion // endregion

View File

@ -25,7 +25,6 @@
#include <cstdlib> #include <cstdlib>
#include "color.h" #include "color.h"
#include "util.h"
#pragma pack(push, 1) #pragma pack(push, 1)
class BC1Block { class BC1Block {

View File

@ -18,9 +18,12 @@
*/ */
#include "color.h" #include "color.h"
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>
#include "util.h"
// region Color32 implementation // region Color32 implementation
Color32::Color32() { set(0, 0, 0, 0xFF); } Color32::Color32() { set(0, 0, 0, 0xFF); }

View File

@ -18,14 +18,11 @@
*/ */
#pragma once #pragma once
#include "util.h"
#include <cassert>
#include <cstdint> #include <cstdint>
#include <cstdlib>
#pragma pack(push, 1) #pragma pack(push, 1)
class Color32 { class Color32 {
public: public:
union { union {
struct { struct {
uint8_t R; uint8_t R;

View File

@ -4,11 +4,12 @@
#include "rgbcx.h" #include "rgbcx.h"
#include <algorithm> #include <algorithm>
#include <array>
#include <cassert> #include <cassert>
#include <climits> #include <climits>
#include <cmath> #include <cmath>
#include <cstdlib>
#include <cstring> #include <cstring>
#include <type_traits>
#include "blocks.h" #include "blocks.h"
#include "color.h" #include "color.h"

File diff suppressed because it is too large Load Diff