mirror of
https://github.com/drewcassidy/quicktex.git
synced 2024-09-13 06:37:34 +00:00
Compare commits
3 Commits
8b2c240094
...
a96aadc867
Author | SHA1 | Date | |
---|---|---|---|
a96aadc867 | |||
29741447cd | |||
9011718c09 |
8
.github/workflows/python-package.yml
vendored
8
.github/workflows/python-package.yml
vendored
@ -18,6 +18,12 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Set up GCC
|
||||||
|
if: runner.os == 'linux'
|
||||||
|
uses: egor-tensin/setup-gcc@v1
|
||||||
|
with:
|
||||||
|
version: 10
|
||||||
|
|
||||||
- name: Setup cmake
|
- name: Setup cmake
|
||||||
uses: jwlawson/actions-setup-cmake@v1.12
|
uses: jwlawson/actions-setup-cmake@v1.12
|
||||||
with:
|
with:
|
||||||
@ -44,7 +50,7 @@ jobs:
|
|||||||
- name: Build C side with cmake
|
- name: Build C side with cmake
|
||||||
run: |
|
run: |
|
||||||
ls
|
ls
|
||||||
cmake .
|
cmake . -DQUICKTEX_NOPYTHON=TRUE
|
||||||
cmake --build .
|
cmake --build .
|
||||||
|
|
||||||
- name: Run C tests
|
- name: Run C tests
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
|
|
||||||
# Find dependencies
|
# Find dependencies
|
||||||
find_package(Python COMPONENTS Interpreter Development.Module)
|
if (NOT QUICKTEX_NOPYTHON)
|
||||||
find_package(pybind11 CONFIG REQUIRED)
|
find_package(Python COMPONENTS Interpreter Development.Module)
|
||||||
|
find_package(pybind11 CONFIG REQUIRED)
|
||||||
|
endif ()
|
||||||
find_package(OpenMP)
|
find_package(OpenMP)
|
||||||
|
|
||||||
#Collect source files
|
#Collect source files
|
||||||
@ -13,7 +15,7 @@ set(SOURCE_FILES
|
|||||||
s3tc/bc4/BC4Block.cpp s3tc/bc4/BC4Decoder.cpp s3tc/bc4/BC4Encoder.cpp
|
s3tc/bc4/BC4Block.cpp s3tc/bc4/BC4Decoder.cpp s3tc/bc4/BC4Encoder.cpp
|
||||||
s3tc/bc5/BC5Decoder.cpp s3tc/bc5/BC5Encoder.cpp
|
s3tc/bc5/BC5Decoder.cpp s3tc/bc5/BC5Encoder.cpp
|
||||||
s3tc/interpolator/Interpolator.cpp
|
s3tc/interpolator/Interpolator.cpp
|
||||||
texture/RawTexture.cpp texture/Window.cpp)
|
texture/RawTexture.cpp texture/Window.cpp test.cpp)
|
||||||
|
|
||||||
set(BINDING_FILES
|
set(BINDING_FILES
|
||||||
_bindings.cpp
|
_bindings.cpp
|
||||||
@ -53,9 +55,11 @@ target_include_directories(quicktex PUBLIC .)
|
|||||||
set_project_warnings(quicktex)
|
set_project_warnings(quicktex)
|
||||||
set_simd_flags(quicktex)
|
set_simd_flags(quicktex)
|
||||||
|
|
||||||
# Declare python module
|
if (NOT QUICKTEX_NOPYTHON)
|
||||||
pybind11_add_module(_quicktex ${BINDING_FILES} ${HEADER_FILES})
|
# Declare python module
|
||||||
target_compile_definitions(_quicktex PRIVATE VERSION_INFO=${QUICKTEX_VERSION_INFO})
|
pybind11_add_module(_quicktex ${BINDING_FILES} ${HEADER_FILES})
|
||||||
|
target_compile_definitions(_quicktex PRIVATE VERSION_INFO=${QUICKTEX_VERSION_INFO})
|
||||||
|
|
||||||
# Link python module with implementation
|
# Link python module with implementation
|
||||||
target_link_libraries(_quicktex PUBLIC quicktex)
|
target_link_libraries(_quicktex PUBLIC quicktex)
|
||||||
|
endif ()
|
31
quicktex/test.cpp
Normal file
31
quicktex/test.cpp
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* Quicktex Texture Compression Library
|
||||||
|
Copyright (C) 2021 Andrew Cassidy <drewcassidy@me.com>
|
||||||
|
Partially derived from rgbcx.h written by Richard Geldreich <richgel99@gmail.com>
|
||||||
|
and licenced under the public domain
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <xsimd/xsimd.hpp>
|
||||||
|
|
||||||
|
#include "Matrix.h"
|
||||||
|
|
||||||
|
// Type your code here, or load an example.
|
||||||
|
namespace quicktex {
|
||||||
|
auto test(Matrix<float, 4, 1> a, Matrix<float, 4, 1> b, Matrix<float, 4, 1> c) {
|
||||||
|
return a * 7;
|
||||||
|
};
|
||||||
|
} // namespace quicktex
|
Loading…
Reference in New Issue
Block a user