-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge pull request #12 from 3DFin/pgeof_new_version
pgeof2
Showing
25 changed files
with
1,447 additions
and
636 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
Language: Cpp | ||
BasedOnStyle: Google | ||
# --- | ||
#AccessModifierOffset: -4 | ||
AlignAfterOpenBracket: AlwaysBreak # Values: Align, DontAlign, AlwaysBreak | ||
AlignConsecutiveAssignments: true | ||
AlignConsecutiveDeclarations: true | ||
#AlignEscapedNewlinesLeft: true | ||
#AlignOperands: false | ||
AlignTrailingComments: false # Should be off, causes many dummy problems!! | ||
#AllowAllParametersOfDeclarationOnNextLine: true | ||
AllowShortBlocksOnASingleLine: true | ||
#AllowShortCaseLabelsOnASingleLine: false | ||
#AllowShortFunctionsOnASingleLine: Empty | ||
#AllowShortIfStatementsOnASingleLine: false | ||
#AllowShortLoopsOnASingleLine: false | ||
#AlwaysBreakAfterDefinitionReturnType: None | ||
#AlwaysBreakAfterReturnType: None | ||
#AlwaysBreakBeforeMultilineStrings: true | ||
#AlwaysBreakTemplateDeclarations: true | ||
#BinPackArguments: false | ||
#BinPackParameters: false | ||
#BraceWrapping: | ||
#AfterClass: false | ||
#AfterControlStatement: false | ||
#AfterEnum: false | ||
#AfterFunction: false | ||
#AfterNamespace: false | ||
#AfterObjCDeclaration: false | ||
#AfterStruct: false | ||
#AfterUnion: false | ||
#BeforeCatch: false | ||
#BeforeElse: true | ||
#IndentBraces: false | ||
#BreakBeforeBinaryOperators: None | ||
BreakBeforeBraces: Allman | ||
#BreakBeforeTernaryOperators: true | ||
#BreakConstructorInitializersBeforeComma: false | ||
ColumnLimit: 120 | ||
#CommentPragmas: '' | ||
#ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
#ConstructorInitializerIndentWidth: 4 | ||
#ContinuationIndentWidth: 4 | ||
#Cpp11BracedListStyle: true | ||
#DerivePointerAlignment: false | ||
#DisableFormat: false | ||
#ExperimentalAutoDetectBinPacking: false | ||
##FixNamespaceComments: true # Not applicable in 3.8 | ||
#ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] | ||
#IncludeCategories: | ||
#- Regex: '.*' | ||
#Priority: 1 | ||
IndentCaseLabels: true | ||
IndentWidth: 4 | ||
IndentWrappedFunctionNames: true | ||
#KeepEmptyLinesAtTheStartOfBlocks: true | ||
#MacroBlockBegin: '' | ||
#MacroBlockEnd: '' | ||
MaxEmptyLinesToKeep: 1 | ||
NamespaceIndentation: None | ||
#PenaltyBreakBeforeFirstCallParameter: 19 | ||
#PenaltyBreakComment: 300 | ||
#PenaltyBreakFirstLessLess: 120 | ||
#PenaltyBreakString: 1000 | ||
#PenaltyExcessCharacter: 1000000 | ||
#PenaltyReturnTypeOnItsOwnLine: 200 | ||
DerivePointerAlignment: false | ||
#PointerAlignment: Left | ||
ReflowComments: true # Should be true, otherwise clang-format doesn't touch comments | ||
SortIncludes: true | ||
#SpaceAfterCStyleCast: false | ||
SpaceBeforeAssignmentOperators: true | ||
#SpaceBeforeParens: ControlStatements | ||
#SpaceInEmptyParentheses: false | ||
#SpacesBeforeTrailingComments: 2 | ||
#SpacesInAngles: false | ||
#SpacesInContainerLiterals: true | ||
#SpacesInCStyleCastParentheses: false | ||
#SpacesInParentheses: false | ||
#SpacesInSquareBrackets: false | ||
Standard: Cpp11 | ||
TabWidth: 4 | ||
UseTab: Never # Available options are Never, Always, ForIndentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Tests | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
build: | ||
name: Tests on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-22.04, windows-2022] | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: True | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[submodule "eigen"] | ||
path = third_party/eigen | ||
url = https://gitlab.com/libeigen/eigen | ||
branch = 3.4 | ||
[submodule "nanoflann"] | ||
path = third_party/nanoflann | ||
url = https://github.com/jlblancoc/nanoflann | ||
[submodule "taskflow"] | ||
path = third_party/taskflow | ||
url = https://github.com/taskflow/taskflow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
cmake_minimum_required(VERSION 3.15...3.27) | ||
project(pgeof) | ||
find_package(Python 3.8 COMPONENTS Interpreter Development.Module REQUIRED) | ||
|
||
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) | ||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE) | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") | ||
endif() | ||
|
||
# Detect the installed nanobind package and import it into CMake | ||
execute_process( | ||
COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir | ||
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE NB_DIR) | ||
list(APPEND CMAKE_PREFIX_PATH "${NB_DIR}") | ||
find_package(nanobind CONFIG REQUIRED) | ||
|
||
nanobind_add_module(pgeof_ext NOMINSIZE STABLE_ABI LTO src/pgeof_ext.cpp) | ||
|
||
# for nanobind 2 | ||
# nanobind_add_stub( | ||
# pgeof_ext_stub | ||
# MODULE pgeof_ext | ||
# OUTPUT pgeof_ext.pyi | ||
# PYTHON_PATH $<TARGET_FILE_DIR:pgeof_ext> | ||
# DEPENDS pgeof_ext | ||
# ) | ||
|
||
# All lib are headeer only. | ||
# it's faster to include like this than using exported targets | ||
# (i.e add_subdirectories(...)) | ||
target_include_directories(pgeof_ext PRIVATE "include" "third_party/eigen" "third_party/nanoflann/include" "third_party/taskflow") | ||
|
||
install(TARGETS pgeof_ext LIBRARY DESTINATION pgeof) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.