Dependencies

../_images/dependencies.svg

Default dependencies of the ipc::toolkit library. Edge colour is the link scope; a dashed edge marks an optional dependency, enabled by default but controlled by an IPC_TOOLKIT_WITH_* CMake option. Dependencies that are off by default are omitted. Excludes CUDA and Python bindings.

The IPC Toolkit depends on a handful of third-party libraries, which are used to provide various functionality.

All required dependencies are downloaded through CMake depending on the build options, and are built automatically when you build the IPC Toolkit. You do not need to install them separately.

These dependencies are all permissively licensed, and we list them here to give due credit!

Name

Purpose

License

Link

Eigen

Linear algebra

MPL-2.0

eigen.tuxfamily.org

libigl

Geometry functions and predicates

MPL-2.0

libigl.github.io

oneTBB

Multithreading

Apache-2.0

github.com/oneapi-src/oneTBB

Tight-Inclusion

Provably conservative CCD

MIT

github.com/Continuous-Collision-Detection/Tight-Inclusion

Scalable-CCD

Scalable (GPU) CCD

Apache-2.0

github.com/Continuous-Collision-Detection/Scalable-CCD

spdlog

Logger

MIT

github.com/gabime/spdlog

TinyAD

Automatic differentiation for testing and in non-performance critical smooth contact functions

MIT

github.com/microsoft/TinyAD

Optional Dependencies

Additionally, IPC Toolkit may optionally use the following libraries:

Name

Purpose

License

Link

Enabled

CMake Option

xsimd

Cross-platform SIMD library for vectorization

BSD-3-Clause

xsimd.readthedocs.io

IPC_TOOLKIT_WITH_SIMD

robin-map

Faster hashing

MIT

github.com/Tessil/robin-map

IPC_TOOLKIT_WITH_ROBIN_MAP

Abseil

Hashing utilities

Apache-2.0

abseil.io

IPC_TOOLKIT_WITH_ABSEIL

filib

Interval arithmetic for nonlinear trajectories/CCD

LGPL-2.1

github.com/zfergus/filib

IPC_TOOLKIT_WITH_FILIB

MeshFEMSparse

Block-CSC data structures for fast Hessian assembly (see ipc::MeshFEMHessianAssembler)

MIT

github.com/MeshFEM/MeshFEMSparse

IPC_TOOLKIT_WITH_MESHFEM_SPARSE

nlohmann/json

JSON parsing for profiler and tests

MIT

github.com/nlohmann/json

IPC_TOOLKIT_WITH_PROFILER

Tracy

Frame profiler

BSD-3-Clause

github.com/wolfpld/tracy

IPC_TOOLKIT_WITH_TRACY

rational-cpp

Rational arithmetic used for exact intersection checks (requires GMP to be installed at a system level)

MIT

github.io/zfergus/rational-cpp

IPC_TOOLKIT_WITH_RATIONAL_INTERSECTION

Etienne Vouga’s Collision Detection Library

Inexact CCD (included for comparison with the original IPC library)

???

github.com/evouga/collisiondetection

IPC_TOOLKIT_WITH_INEXACT_CCD

Some of these libraries are enabled by default, and some are not. You can enable or disable them by passing the appropriate CMake option when you configure the IPC Toolkit build.

Warning

xsimd is linked publicly, and the detected SIMD flags (SIMD_CXX_FLAGS, typically -march=native) are applied publicly to anything linking ipc::toolkit. This is a requirement rather than a convenience: ipc/utils/simd.hpp exposes ipc::SimdBatch<T> in the public API, and xsimd::default_arch is resolved from each translation unit’s own compiler flags. A consumer compiled without these flags therefore names a different batch type than the one instantiated inside the library, and the link fails.

The practical consequence is that your binaries are compiled for the machine that built them and will not run on hardware lacking those instructions. If you need portable binaries, set IPC_TOOLKIT_WITH_SIMD to OFF; the library then builds without xsimd and without the architecture flags.

Note

MeshFEMSparse (and its transitive dependency MeshFEMCore) is downloaded source-only and compiled into a minimal static library (matrix data structures and assembly routines; no sparse direct solvers). When enabled (the default), ipc::Potential::hessian() assembles through the block-CSC backend — several times faster than the triplet-based assembly, with identical results up to floating-point summation order — and a ipc::MeshFEMHessianAssembler held across ipc::Potential::assemble_hessian() calls additionally reuses the sparsity pattern between assemblies. It requires IPC_TOOLKIT_VERTEX_DERIVATIVE_LAYOUT=RowMajor (the default; the option is automatically disabled otherwise).

Warning

filib is licensed under LGPL-2.1 and as such it is required to be dynamically linked. Doing so automatically is a challenge, so by default we use static linkage. Enabling dynamic linkage requires copying the .so/.dylib/.dll file to the binary directory or system path. To enable this, set the CMake option FILIB_BUILD_SHARED_LIBS to ON and add this CMake code to copy the shared library object to the binary directory:

# Copy shared lib to the output directory
add_custom_command(
    TARGET ${MY_EXE_TARGET} POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_RUNTIME_DLLS:${MY_EXE_TARGET}> $<TARGET_FILE_DIR:${MY_EXE_TARGET}>
    COMMAND_EXPAND_LISTS
)

where ${MY_EXE_TARGET} is the name of your executable target. If you know a better way to handle this, please let us know!

If you would rather avoid LGPL code entirely, you can disable filib by setting IPC_TOOLKIT_WITH_FILIB to OFF. With this option disabled, CMake will not download or use any of filib’s code.

Python Bindings Dependencies

The following dependencies are optionally used when building Python bindings:

Name

Purpose

License

Link

Enabled

CMake Option

Pybind11

Python bindings

BSD-3-Clause

github.com/pybind/pybind11

IPC_TOOLKIT_BUILD_PYTHON

pybind11_json

JSON support for pybind11 (used in profiler)

MIT

github.com/pybind/pybind11_json

IPC_TOOLKIT_BUILD_PYTHON and IPC_TOOLKIT_WITH_PROFILER

Unit Test Dependencies

The following dependencies are optionally used when unit tests are enabled:

Name

Purpose

License

Link

Enabled

CMake Option

Catch2

Testing framework

BSL-1.0

github.com/catchorg/Catch2

IPC_TOOLKIT_BUILD_TESTS

finite-diff

Finite-difference comparisons

MIT

github.com/zfergus/finite-diff

IPC_TOOLKIT_BUILD_TESTS