Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensor support #403

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions .github/workflows/linux.yml

This file was deleted.

115 changes: 0 additions & 115 deletions .github/workflows/macos-linux-conda.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/ros_ci.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/workflows/windows-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ jobs:
cmake --build . --config Release --target install
if errorlevel 1 exit 1

:: Build stubs
git clone https://github.com/jcarpent/pybind11-stubgen.git
python "%CD%\pybind11-stubgen\pybind11_stubgen\__init__.py" -o %CONDA_PREFIX%\Lib\site-packages\eigenpy eigenpy --boost-python --ignore-invalid signature --no-setup-py --root-module-suffix ""
if errorlevel 1 exit 1

:: Testing
ctest --output-on-failure -C Release -V
if errorlevel 1 exit 1
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "cmake"]
path = cmake
url = https://github.com/jrl-umi3218/jrl-cmakemodules.git
url = https://github.com/jorisv/jrl-cmakemodules.git
2 changes: 1 addition & 1 deletion cmake
2 changes: 2 additions & 0 deletions include/eigenpy/eigenpy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ namespace eigenpy {
*/
void EIGENPY_DLLAPI enableEigenPy();

bool EIGENPY_DLLAPI withTensorSupport();

/* Enable the Eigen--Numpy serialization for the templated MatType class.*/
template <typename MatType>
void enableEigenPySpecific();
Expand Down
8 changes: 7 additions & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ set_target_properties(python PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD True)
add_library(${PYWRAP} SHARED main.cpp)
add_dependencies(python ${PYWRAP})
target_link_libraries(${PYWRAP} PUBLIC ${PROJECT_NAME})

python_build_get_target(python_build_target)
add_dependencies(${PYWRAP} ${python_build_target})

# BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS spews conversion warnings from int to
# long unsigned int. Unfortunately, using literals does not work in a macro. As
# such, this turns them off for the entire wrapper:
Expand Down Expand Up @@ -56,8 +60,10 @@ install(TARGETS ${PYWRAP} DESTINATION ${${PYWRAP}_INSTALL_DIR})
if(GENERATE_PYTHON_STUBS)
load_stubgen()

# Set PYWRAP and PROJECT_NAME as stubs dependencies PROJECT_NAME is mandatory
# (even if it's a PYWRAP dependency) to find PROJECT_NAME name DLL on windows
generate_stubs(${CMAKE_CURRENT_BINARY_DIR} ${PROJECT_NAME}
${ABSOLUTE_PYTHON_SITELIB} ${PYWRAP})
${ABSOLUTE_PYTHON_SITELIB} ${PYWRAP} ${PROJECT_NAME})
endif(GENERATE_PYTHON_STUBS)

# --- INSTALL SCRIPTS
Expand Down
8 changes: 8 additions & 0 deletions src/eigenpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,12 @@ void enableEigenPy() {
exposeNoneType();
}

bool withTensorSupport() {
#ifdef EIGENPY_WITH_TENSOR_SUPPORT
return true;
#else
return false;
#endif
}

} // namespace eigenpy
Loading