Compare commits
1 Commits
temp-viewp
...
tmp-eevee-
Author | SHA1 | Date | |
---|---|---|---|
a60215f058 |
@@ -1,8 +1,6 @@
|
||||
# The warnings below are disabled because they are too pedantic and not worth fixing.
|
||||
# Some of them will be enabled as part of the Clang-Tidy task, see T78535.
|
||||
|
||||
# NOTE: No comments in the list below is allowed. Clang-tidy will ignore items after comments in the lists flag list.
|
||||
# This is because the comment is not a valid list item and it will stop parsing flags if a list item is a comment.
|
||||
Checks: >
|
||||
-*,
|
||||
readability-*,
|
||||
@@ -16,9 +14,10 @@ Checks: >
|
||||
-readability-make-member-function-const,
|
||||
-readability-suspicious-call-argument,
|
||||
-readability-redundant-member-init,
|
||||
|
||||
-readability-misleading-indentation,
|
||||
|
||||
-readability-use-anyofallof,
|
||||
-readability-identifier-length,
|
||||
|
||||
-readability-function-cognitive-complexity,
|
||||
|
||||
@@ -36,8 +35,6 @@ Checks: >
|
||||
|
||||
-bugprone-redundant-branch-condition,
|
||||
|
||||
-bugprone-suspicious-include,
|
||||
|
||||
modernize-*,
|
||||
-modernize-use-auto,
|
||||
-modernize-use-trailing-return-type,
|
||||
@@ -45,6 +42,8 @@ Checks: >
|
||||
-modernize-use-nodiscard,
|
||||
-modernize-loop-convert,
|
||||
-modernize-pass-by-value,
|
||||
# Cannot be enabled yet, because using raw string literals in tests breaks
|
||||
# the windows compiler currently.
|
||||
-modernize-raw-string-literal,
|
||||
-modernize-return-braced-init-list
|
||||
|
||||
|
@@ -34,15 +34,6 @@ indent_style = space
|
||||
indent_size = 2
|
||||
max_line_length = 99
|
||||
|
||||
# Tom's Obvious Minimal Language
|
||||
[*.toml]
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
max_line_length = 120
|
||||
|
||||
# reStructuredText
|
||||
[*.rst]
|
||||
charset = utf-8
|
||||
|
@@ -300,9 +300,6 @@ option(WITH_USD "Enable Universal Scene Description (USD) Suppor
|
||||
# 3D format support
|
||||
# Disable opencollada when we don't have precompiled libs
|
||||
option(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.org)" ON)
|
||||
option(WITH_IO_WAVEFRONT_OBJ "Enable Wavefront-OBJ 3D file format support (*.obj)" ON)
|
||||
option(WITH_IO_STL "Enable STL 3D file format support (*.stl)" ON)
|
||||
option(WITH_IO_GPENCIL "Enable grease-pencil file format IO (*.svg, *.pdf)" ON)
|
||||
|
||||
# Sound output
|
||||
option(WITH_SDL "Enable SDL for sound" ON)
|
||||
@@ -442,9 +439,14 @@ endif()
|
||||
|
||||
# AMD HIP
|
||||
if(NOT APPLE)
|
||||
option(WITH_CYCLES_DEVICE_HIP "Enable Cycles AMD HIP support" ON)
|
||||
if(WIN32)
|
||||
option(WITH_CYCLES_DEVICE_HIP "Enable Cycles AMD HIP support" ON)
|
||||
else()
|
||||
option(WITH_CYCLES_DEVICE_HIP "Enable Cycles AMD HIP support" OFF)
|
||||
endif()
|
||||
|
||||
option(WITH_CYCLES_HIP_BINARIES "Build Cycles AMD HIP binaries" OFF)
|
||||
set(CYCLES_HIP_BINARIES_ARCH gfx1010 gfx1011 gfx1012 gfx1030 gfx1031 gfx1032 gfx1034 gfx1035 CACHE STRING "AMD HIP architectures to build binaries for")
|
||||
set(CYCLES_HIP_BINARIES_ARCH gfx1010 gfx1011 gfx1012 gfx1030 gfx1031 gfx1032 gfx1034 CACHE STRING "AMD HIP architectures to build binaries for")
|
||||
mark_as_advanced(WITH_CYCLES_DEVICE_HIP)
|
||||
mark_as_advanced(CYCLES_HIP_BINARIES_ARCH)
|
||||
endif()
|
||||
@@ -489,7 +491,7 @@ if((UNIX AND NOT APPLE) OR (CMAKE_GENERATOR MATCHES "^Visual Studio.+"))
|
||||
endif()
|
||||
|
||||
option(WITH_BOOST "Enable features depending on boost" ON)
|
||||
option(WITH_TBB "Enable multithreading. TBB is also required for features such as Cycles, OpenVDB and USD" ON)
|
||||
option(WITH_TBB "Enable features depending on TBB (OpenVDB, OpenImageDenoise, sculpt multithreading)" ON)
|
||||
|
||||
# TBB malloc is only supported on for windows currently
|
||||
if(WIN32)
|
||||
@@ -768,7 +770,6 @@ endif()
|
||||
|
||||
set_and_warn_dependency(WITH_PYTHON WITH_CYCLES OFF)
|
||||
set_and_warn_dependency(WITH_PYTHON WITH_DRACO OFF)
|
||||
set_and_warn_dependency(WITH_PYTHON WITH_MOD_FLUID OFF)
|
||||
|
||||
if(WITH_DRACO AND NOT WITH_PYTHON_INSTALL)
|
||||
message(STATUS "WITH_DRACO requires WITH_PYTHON_INSTALL to be ON, disabling WITH_DRACO for now")
|
||||
@@ -785,9 +786,7 @@ set_and_warn_dependency(WITH_BOOST WITH_OPENCOLORIO OFF)
|
||||
set_and_warn_dependency(WITH_BOOST WITH_QUADRIFLOW OFF)
|
||||
set_and_warn_dependency(WITH_BOOST WITH_USD OFF)
|
||||
set_and_warn_dependency(WITH_BOOST WITH_ALEMBIC OFF)
|
||||
if(WITH_CYCLES)
|
||||
set_and_warn_dependency(WITH_PUGIXML WITH_CYCLES_OSL OFF)
|
||||
endif()
|
||||
set_and_warn_dependency(WITH_PUGIXML WITH_CYCLES_OSL OFF)
|
||||
set_and_warn_dependency(WITH_PUGIXML WITH_OPENIMAGEIO OFF)
|
||||
|
||||
if(WITH_BOOST AND NOT (WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
|
||||
@@ -812,9 +811,6 @@ set_and_warn_dependency(WITH_IMAGE_OPENEXR WITH_OPENCOLORIO OFF)
|
||||
# Haru needs `TIFFFaxBlackCodes` & `TIFFFaxWhiteCodes` symbols from TIFF.
|
||||
set_and_warn_dependency(WITH_IMAGE_TIFF WITH_HARU OFF)
|
||||
|
||||
# USD needs OpenSubDiv, since that is used by the Cycles Hydra render delegate.
|
||||
set_and_warn_dependency(WITH_OPENSUBDIV WITH_USD OFF)
|
||||
|
||||
# auto enable openimageio for cycles
|
||||
if(WITH_CYCLES)
|
||||
set(WITH_OPENIMAGEIO ON)
|
||||
@@ -941,10 +937,7 @@ set(PLATFORM_CFLAGS)
|
||||
set(C_WARNINGS)
|
||||
set(CXX_WARNINGS)
|
||||
|
||||
# NOTE: These flags are intended for situations where where it's impractical to
|
||||
# suppress warnings by modifying the code or for code which is maintained externally.
|
||||
# For GCC this typically means adding `-Wno-*` arguments to negate warnings
|
||||
# that are useful in the general case.
|
||||
# for gcc -Wno-blah-blah
|
||||
set(C_REMOVE_STRICT_FLAGS)
|
||||
set(CXX_REMOVE_STRICT_FLAGS)
|
||||
|
||||
@@ -1464,6 +1457,14 @@ if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure Ceres
|
||||
|
||||
if(WITH_LIBMV)
|
||||
# We always have C++11 which includes unordered_map.
|
||||
set(CERES_DEFINES "-DCERES_STD_UNORDERED_MAP;-DCERES_USE_CXX_THREADS")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Extra limits to number of jobs running in parallel for some kind os tasks.
|
||||
# Only supported by Ninja build system currently.
|
||||
@@ -1540,6 +1541,7 @@ endif()
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_CAST_ALIGN -Wcast-align)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_RETURN_TYPE -Werror=return-type)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_VLA -Werror=vla)
|
||||
@@ -1624,18 +1626,6 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_IMPLICIT_FALLTHROUGH -Wimplicit-fallthrough=5)
|
||||
endif()
|
||||
|
||||
|
||||
#----------------------
|
||||
# Suppress Strict Flags
|
||||
#
|
||||
# Exclude the following warnings from this list:
|
||||
# - `-Wno-address`:
|
||||
# This can give useful hints that point to bugs/misleading logic.
|
||||
# - `-Wno-strict-prototypes`:
|
||||
# No need to support older C-style prototypes.
|
||||
#
|
||||
# If code in `./extern/` needs to suppress these flags that can be done on a case-by-case basis.
|
||||
|
||||
# flags to undo strict flags
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_DEPRECATED_DECLARATIONS -Wno-deprecated-declarations)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
|
||||
@@ -1691,9 +1681,6 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
# ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_MACROS -Wunused-macros)
|
||||
# ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNUSED_MACROS -Wunused-macros)
|
||||
|
||||
#----------------------
|
||||
# Suppress Strict Flags
|
||||
|
||||
# flags to undo strict flags
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_VARIABLE -Wno-unused-variable)
|
||||
@@ -1759,7 +1746,6 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
||||
"/wd4828" # The file contains a character that is illegal
|
||||
"/wd4996" # identifier was declared deprecated
|
||||
"/wd4661" # no suitable definition provided for explicit template instantiation request
|
||||
"/wd4848" # 'no_unique_address' is a vendor extension in C++17
|
||||
# errors:
|
||||
"/we4013" # 'function' undefined; assuming extern returning int
|
||||
"/we4133" # incompatible pointer types
|
||||
|
28
GNUmakefile
28
GNUmakefile
@@ -120,7 +120,7 @@ Utilities
|
||||
Updates git and all submodules but not svn.
|
||||
|
||||
* format:
|
||||
Format source code using clang-format & autopep8 (uses PATHS if passed in). For example::
|
||||
Format source code using clang (uses PATHS if passed in). For example::
|
||||
|
||||
make format PATHS="source/blender/blenlib source/blender/blenkernel"
|
||||
|
||||
@@ -130,7 +130,6 @@ Environment Variables
|
||||
* BUILD_DIR: Override default build path.
|
||||
* PYTHON: Use this for the Python command (used for checking tools).
|
||||
* NPROCS: Number of processes to use building (auto-detect when omitted).
|
||||
* AUTOPEP8: Command used for Python code-formatting (used for the format target).
|
||||
|
||||
Documentation Targets
|
||||
Not associated with building Blender.
|
||||
@@ -207,27 +206,6 @@ ifeq ($(OS_NCASE),darwin)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Set the LIBDIR, an empty string when not found.
|
||||
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_${CPU})
|
||||
ifeq (, $(LIBDIR))
|
||||
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_centos7_${CPU})
|
||||
endif
|
||||
ifeq (, $(LIBDIR))
|
||||
LIBDIR:=$(wildcard ../lib/${OS_NCASE})
|
||||
endif
|
||||
|
||||
# Use the autopep8 module in ../lib/ (which can be executed via Python directly).
|
||||
# Otherwise the "autopep8" command can be used.
|
||||
ifndef AUTOPEP8
|
||||
ifneq (, $(LIBDIR))
|
||||
AUTOPEP8:=$(wildcard $(LIBDIR)/python/lib/python3.10/site-packages/autopep8.py)
|
||||
endif
|
||||
ifeq (, $(AUTOPEP8))
|
||||
AUTOPEP8:=autopep8
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# additional targets for the build configuration
|
||||
|
||||
@@ -549,8 +527,8 @@ update_code: .FORCE
|
||||
@$(PYTHON) ./build_files/utils/make_update.py --no-libraries
|
||||
|
||||
format: .FORCE
|
||||
@PATH="${LIBDIR}/llvm/bin/:$(PATH)" $(PYTHON) source/tools/utils_maintenance/clang_format_paths.py $(PATHS)
|
||||
@$(PYTHON) source/tools/utils_maintenance/autopep8_format_paths.py --autopep8-command="$(AUTOPEP8)" $(PATHS)
|
||||
@PATH="../lib/${OS_NCASE}_${CPU}/llvm/bin/:../lib/${OS_NCASE}_centos7_${CPU}/llvm/bin/:../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \
|
||||
$(PYTHON) source/tools/utils_maintenance/clang_format_paths.py $(PATHS)
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
@@ -54,6 +54,9 @@ include(cmake/freetype.cmake)
|
||||
include(cmake/freeglut.cmake)
|
||||
include(cmake/glew.cmake)
|
||||
include(cmake/alembic.cmake)
|
||||
include(cmake/glfw.cmake)
|
||||
include(cmake/clew.cmake)
|
||||
include(cmake/cuew.cmake)
|
||||
include(cmake/opensubdiv.cmake)
|
||||
include(cmake/sdl.cmake)
|
||||
include(cmake/opencollada.cmake)
|
||||
|
12
build_files/build_environment/cmake/clew.cmake
Normal file
12
build_files/build_environment/cmake/clew.cmake
Normal file
@@ -0,0 +1,12 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(CLEW_EXTRA_ARGS)
|
||||
|
||||
ExternalProject_Add(external_clew
|
||||
URL file://${PACKAGE_DIR}/${CLEW_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${CLEW_HASH_TYPE}=${CLEW_HASH}
|
||||
PREFIX ${BUILD_DIR}/clew
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CLEW_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/clew
|
||||
)
|
13
build_files/build_environment/cmake/cuew.cmake
Normal file
13
build_files/build_environment/cmake/cuew.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(CUEW_EXTRA_ARGS)
|
||||
|
||||
ExternalProject_Add(external_cuew
|
||||
URL file://${PACKAGE_DIR}/${CUEW_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${CUEW_HASH_TYPE}=${CUEW_HASH}
|
||||
PREFIX ${BUILD_DIR}/cuew
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/cuew/src/external_cuew < ${PATCH_DIR}/cuew.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/cuew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CUEW_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/cuew
|
||||
)
|
@@ -39,6 +39,10 @@ download_source(FREETYPE)
|
||||
download_source(GLEW)
|
||||
download_source(FREEGLUT)
|
||||
download_source(ALEMBIC)
|
||||
download_source(GLFW)
|
||||
download_source(CLEW)
|
||||
download_source(GLFW)
|
||||
download_source(CUEW)
|
||||
download_source(OPENSUBDIV)
|
||||
download_source(SDL)
|
||||
download_source(OPENCOLLADA)
|
||||
|
12
build_files/build_environment/cmake/glfw.cmake
Normal file
12
build_files/build_environment/cmake/glfw.cmake
Normal file
@@ -0,0 +1,12 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(GLFW_EXTRA_ARGS)
|
||||
|
||||
ExternalProject_Add(external_glfw
|
||||
URL file://${PACKAGE_DIR}/${GLFW_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${GLFW_HASH_TYPE}=${GLFW_HASH}
|
||||
PREFIX ${BUILD_DIR}/glfw
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glfw -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${GLFW_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/glfw
|
||||
)
|
@@ -87,7 +87,7 @@ harvest(jpeg/lib jpeg/lib "libjpeg.a")
|
||||
harvest(lame/lib ffmpeg/lib "*.a")
|
||||
if(NOT APPLE)
|
||||
harvest(level-zero/include/level_zero level-zero/include/level_zero "*.h")
|
||||
harvest(level-zero/lib level-zero/lib "*.so*")
|
||||
harvest(level-zero/lib level-zero/lib "*.a")
|
||||
endif()
|
||||
harvest(llvm/bin llvm/bin "clang-format")
|
||||
if(BUILD_CLANG_TOOLS)
|
||||
@@ -146,8 +146,8 @@ harvest(openjpeg/lib openjpeg/lib "*.a")
|
||||
harvest(opensubdiv/include opensubdiv/include "*.h")
|
||||
harvest(opensubdiv/lib opensubdiv/lib "*.a")
|
||||
harvest(openvdb/include/openvdb openvdb/include/openvdb "*.h")
|
||||
harvest(openvdb/include/nanovdb openvdb/include/nanovdb "*.h")
|
||||
harvest(openvdb/lib openvdb/lib "*.a")
|
||||
harvest(nanovdb/nanovdb nanovdb/include/nanovdb "*.h")
|
||||
harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h")
|
||||
harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a")
|
||||
harvest(osl/bin osl/bin "oslc")
|
||||
|
@@ -53,8 +53,7 @@ add_dependencies(
|
||||
external_opencolorio
|
||||
external_yamlcpp
|
||||
external_expat
|
||||
external_imath
|
||||
external_pystring
|
||||
external_openexr
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
|
@@ -10,16 +10,20 @@ set(OPENSUBDIV_EXTRA_ARGS
|
||||
-DNO_OMP=ON
|
||||
-DNO_TBB=OFF
|
||||
-DNO_CUDA=ON
|
||||
-DNO_OPENCL=ON
|
||||
-DNO_CLEW=ON
|
||||
-DNO_OPENCL=OFF
|
||||
-DNO_CLEW=OFF
|
||||
-DNO_OPENGL=OFF
|
||||
-DNO_METAL=OFF
|
||||
-DNO_DX=ON
|
||||
-DNO_TESTS=ON
|
||||
-DNO_GLTESTS=ON
|
||||
-DNO_GLEW=ON
|
||||
-DNO_GLFW=ON
|
||||
-DNO_GLEW=OFF
|
||||
-DNO_GLFW=OFF
|
||||
-DNO_GLFW_X11=ON
|
||||
-DGLEW_INCLUDE_DIR=${LIBDIR}/glew/include
|
||||
-DGLEW_LIBRARY=${LIBDIR}/glew/lib/libGLEW${LIBEXT}
|
||||
-DGLFW_INCLUDE_DIR=${LIBDIR}/glfw/include
|
||||
-DGLFW_LIBRARIES=${LIBDIR}/glfw/lib/glfw3${LIBEXT}
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
@@ -27,12 +31,19 @@ if(WIN32)
|
||||
${OPENSUBDIV_EXTRA_ARGS}
|
||||
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
|
||||
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb.lib
|
||||
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
|
||||
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
|
||||
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
|
||||
-DCUEW_LIBRARY=${LIBDIR}/cuew/lib/cuew${LIBEXT}
|
||||
)
|
||||
else()
|
||||
set(OPENSUBDIV_EXTRA_ARGS
|
||||
${OPENSUBDIV_EXTRA_ARGS}
|
||||
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
|
||||
-DTBB_tbb_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
|
||||
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
|
||||
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
|
||||
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/static/${LIBPREFIX}clew${LIBEXT}
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -64,5 +75,9 @@ endif()
|
||||
|
||||
add_dependencies(
|
||||
external_opensubdiv
|
||||
external_glew
|
||||
external_glfw
|
||||
external_clew
|
||||
external_cuew
|
||||
external_tbb
|
||||
)
|
||||
|
@@ -15,7 +15,7 @@ ExternalProject_Add(external_python_site_packages
|
||||
CONFIGURE_COMMAND ${PIP_CONFIGURE_COMMAND}
|
||||
BUILD_COMMAND ""
|
||||
PREFIX ${BUILD_DIR}/site_packages
|
||||
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install --no-cache-dir ${SITE_PACKAGES_EXTRA} cython==${CYTHON_VERSION} idna==${IDNA_VERSION} charset-normalizer==${CHARSET_NORMALIZER_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} zstandard==${ZSTANDARD_VERSION} autopep8==${AUTOPEP8_VERSION} pycodestyle==${PYCODESTYLE_VERSION} toml==${TOML_VERSION} --no-binary :all:
|
||||
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install --no-cache-dir ${SITE_PACKAGES_EXTRA} cython==${CYTHON_VERSION} idna==${IDNA_VERSION} charset-normalizer==${CHARSET_NORMALIZER_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} zstandard==${ZSTANDARD_VERSION} --no-binary :all:
|
||||
)
|
||||
|
||||
if(USE_PIP_NUMPY)
|
||||
|
@@ -11,3 +11,12 @@ ExternalProject_Add(external_robinmap
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/robinmap ${DEFAULT_CMAKE_FLAGS} ${ROBINMAP_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/robinmap
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_robinmap after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zstd/include/ ${HARVEST_TARGET}/zstd/include/
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -25,6 +25,7 @@ set(USD_EXTRA_ARGS
|
||||
-DOpenImageIO_ROOT=${LIBDIR}/openimageio
|
||||
-DOPENEXR_LIBRARIES=${LIBDIR}/imath/lib/imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/imath/include
|
||||
-DOSL_ROOT=${LIBDIR}/osl
|
||||
-DPXR_ENABLE_PYTHON_SUPPORT=OFF
|
||||
-DPXR_BUILD_IMAGING=ON
|
||||
-DPXR_BUILD_TESTS=OFF
|
||||
@@ -35,22 +36,8 @@ set(USD_EXTRA_ARGS
|
||||
-DPXR_ENABLE_OPENVDB_SUPPORT=OFF
|
||||
-DPYTHON_EXECUTABLE=${PYTHON_BINARY}
|
||||
-DPXR_BUILD_MONOLITHIC=ON
|
||||
# OSL is an optional dependency of the Imaging module. However, since that
|
||||
# module was included for its support for converting primitive shapes (sphere,
|
||||
# cube, etc.) to geometry, it's not necessary. Disabling it will make it
|
||||
# simpler to build Blender; currently only Cycles uses OSL.
|
||||
-DPXR_ENABLE_OSL_SUPPORT=OFF
|
||||
# GL support on Linux also links to X11 libraries. Enabling it would break
|
||||
# headless or Wayland-only builds. OpenGL support would be useful if someone
|
||||
# wants to work on a Hydra viewport in Blender; when that's actually being
|
||||
# worked on, we could patch in a new PXR_ENABLE_X11_SUPPORT option (to
|
||||
# separate OpenGL from X11) and contribute it upstream.
|
||||
-DPXR_ENABLE_GL_SUPPORT=OFF
|
||||
# Disable Metal since USD fails to build this when OpenGL is disabled.
|
||||
-DPXR_ENABLE_METAL_SUPPORT=OFF
|
||||
# OIIO is used for loading image textures in Hydra Storm / Embree renderers,
|
||||
# which we don't use.
|
||||
-DPXR_BUILD_OPENIMAGEIO_PLUGIN=OFF
|
||||
-DPXR_ENABLE_OSL_SUPPORT=ON
|
||||
-DPXR_BUILD_OPENIMAGEIO_PLUGIN=ON
|
||||
# USD 22.03 does not support OCIO 2.x
|
||||
# Tracking ticket https://github.com/PixarAnimationStudios/USD/issues/1386
|
||||
-DPXR_BUILD_OPENCOLORIO_PLUGIN=OFF
|
||||
@@ -83,7 +70,9 @@ add_dependencies(
|
||||
external_usd
|
||||
external_tbb
|
||||
external_boost
|
||||
external_openimageio
|
||||
external_opensubdiv
|
||||
external_osl
|
||||
)
|
||||
|
||||
# Since USD 21.11 the libraries are prefixed with "usd_", i.e. "libusd_m.a" became "libusd_usd_m.a".
|
||||
|
@@ -98,6 +98,27 @@ set(ALEMBIC_HASH 2cd8d6e5a3ac4a014e24a4b04f4fadf9)
|
||||
set(ALEMBIC_HASH_TYPE MD5)
|
||||
set(ALEMBIC_FILE alembic-${ALEMBIC_VERSION}.tar.gz)
|
||||
|
||||
# hash is for 3.1.2
|
||||
set(GLFW_GIT_UID 30306e54705c3adae9fe082c816a3be71963485c)
|
||||
set(GLFW_URI https://github.com/glfw/glfw/archive/${GLFW_GIT_UID}.zip)
|
||||
set(GLFW_HASH 20cacb1613da7eeb092f3ac4f6b2b3d0)
|
||||
set(GLFW_HASH_TYPE MD5)
|
||||
set(GLFW_FILE glfw-${GLFW_GIT_UID}.zip)
|
||||
|
||||
# latest uid in git as of 2016-04-01
|
||||
set(CLEW_GIT_UID 277db43f6cafe8b27c6f1055f69dc67da4aeb299)
|
||||
set(CLEW_URI https://github.com/OpenCLWrangler/clew/archive/${CLEW_GIT_UID}.zip)
|
||||
set(CLEW_HASH 2c699d10ed78362e71f56fae2a4c5f98)
|
||||
set(CLEW_HASH_TYPE MD5)
|
||||
set(CLEW_FILE clew-${CLEW_GIT_UID}.zip)
|
||||
|
||||
# latest uid in git as of 2016-04-01
|
||||
set(CUEW_GIT_UID 1744972026de9cf27c8a7dc39cf39cd83d5f922f)
|
||||
set(CUEW_URI https://github.com/CudaWrangler/cuew/archive/${CUEW_GIT_UID}.zip)
|
||||
set(CUEW_HASH 86760d62978ebfd96cd93f5aa1abaf4a)
|
||||
set(CUEW_HASH_TYPE MD5)
|
||||
set(CUEW_FILE cuew-${CUEW_GIT_UID}.zip)
|
||||
|
||||
set(OPENSUBDIV_VERSION v3_4_4)
|
||||
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.tar.gz)
|
||||
set(OPENSUBDIV_HASH 39ecc5caf0abebc943d1ce131855e76e)
|
||||
@@ -204,9 +225,6 @@ set(CYTHON_VERSION 0.29.26)
|
||||
# The version of the zstd library used to build the Python package should match ZSTD_VERSION defined below.
|
||||
# At this time of writing, 0.17.0 was already released, but built against zstd 1.5.1, while we use 1.5.0.
|
||||
set(ZSTANDARD_VERSION 0.16.0)
|
||||
set(AUTOPEP8_VERSION 1.6.0)
|
||||
set(PYCODESTYLE_VERSION 2.8.0)
|
||||
set(TOML_VERSION 0.10.2)
|
||||
|
||||
set(NUMPY_VERSION 1.22.0)
|
||||
set(NUMPY_SHORT_VERSION 1.22)
|
||||
|
@@ -37,6 +37,10 @@ graph[autosize = false, size = "25.7,8.3!", resolution = 300, overlap = false, s
|
||||
external_openimageio -- external_webp;
|
||||
external_openimageio -- external_opencolorio_extra;
|
||||
external_openmp -- external_clang;
|
||||
external_opensubdiv -- external_glew;
|
||||
external_opensubdiv -- external_glfw;
|
||||
external_opensubdiv -- external_clew;
|
||||
external_opensubdiv -- external_cuew;
|
||||
external_opensubdiv -- external_tbb;
|
||||
openvdb -- external_tbb;
|
||||
openvdb -- external_boost;
|
||||
|
@@ -36,19 +36,19 @@ getopt \
|
||||
-o s:i:t:h \
|
||||
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,\
|
||||
with-all,with-opencollada,with-jack,with-pulseaudio,with-embree,with-oidn,with-nanovdb,\
|
||||
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,ver-xr-openxr:,ver-level-zero:\
|
||||
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,ver-xr-openxr:,\
|
||||
force-all,force-python,force-boost,force-tbb,\
|
||||
force-ocio,force-imath,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\
|
||||
force-ffmpeg,force-opencollada,force-alembic,force-embree,force-oidn,force-usd,\
|
||||
force-xr-openxr,force-level-zero,\
|
||||
force-xr-openxr,\
|
||||
build-all,build-python,build-boost,build-tbb,\
|
||||
build-ocio,build-imath,build-openexr,build-oiio,build-llvm,build-osl,build-osd,build-openvdb,\
|
||||
build-ffmpeg,build-opencollada,build-alembic,build-embree,build-oidn,build-usd,\
|
||||
build-xr-openxr,build-level-zero,\
|
||||
build-xr-openxr,\
|
||||
skip-python,skip-boost,skip-tbb,\
|
||||
skip-ocio,skip-imath,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-osd,skip-openvdb,\
|
||||
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree,skip-oidn,skip-usd,\
|
||||
skip-xr-openxr,skip-level-zero \
|
||||
skip-xr-openxr \
|
||||
-- "$@" \
|
||||
)
|
||||
|
||||
@@ -165,9 +165,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--ver-xr-openxr=<ver>
|
||||
Force version of OpenXR-SDK.
|
||||
|
||||
--ver-level-zero=<ver>
|
||||
Force version of OneAPI Level Zero library.
|
||||
|
||||
Note about the --ver-foo options:
|
||||
It may not always work as expected (some libs are actually checked out from a git rev...), yet it might help
|
||||
to fix some build issues (like LLVM mismatch with the version used by your graphic system).
|
||||
@@ -229,9 +226,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--build-xr-openxr
|
||||
Force the build of OpenXR-SDK.
|
||||
|
||||
--build-level-zero=<ver>
|
||||
Force the build of OneAPI Level Zero library.
|
||||
|
||||
Note about the --build-foo options:
|
||||
* They force the script to prefer building dependencies rather than using available packages.
|
||||
This may make things simpler and allow working around some distribution bugs, but on the other hand it will
|
||||
@@ -299,9 +293,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--force-xr-openxr
|
||||
Force the rebuild of OpenXR-SDK.
|
||||
|
||||
--force-level-zero=<ver>
|
||||
Force the rebuild of OneAPI Level Zero library.
|
||||
|
||||
Note about the --force-foo options:
|
||||
* They obviously only have an effect if those libraries are built by this script
|
||||
(i.e. if there is no available and satisfactory package)!
|
||||
@@ -360,10 +351,7 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
Unconditionally skip Universal Scene Description installation/building.
|
||||
|
||||
--skip-xr-openxr
|
||||
Unconditionally skip OpenXR-SDK installation/building.
|
||||
|
||||
--skip-level-zero=<ver>
|
||||
Unconditionally skip OneAPI Level Zero installation/building.\""
|
||||
Unconditionally skip OpenXR-SDK installation/building.\""
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Main Vars
|
||||
@@ -551,10 +539,10 @@ ALEMBIC_FORCE_BUILD=false
|
||||
ALEMBIC_FORCE_REBUILD=false
|
||||
ALEMBIC_SKIP=false
|
||||
|
||||
USD_VERSION="22.03"
|
||||
USD_VERSION_SHORT="22.03"
|
||||
USD_VERSION="21.02"
|
||||
USD_VERSION_SHORT="21.02"
|
||||
USD_VERSION_MIN="20.05"
|
||||
USD_VERSION_MEX="23.00"
|
||||
USD_VERSION_MEX="22.00"
|
||||
USD_FORCE_BUILD=false
|
||||
USD_FORCE_REBUILD=false
|
||||
USD_SKIP=false
|
||||
@@ -585,13 +573,14 @@ OIDN_SKIP=false
|
||||
|
||||
ISPC_VERSION="1.17.0"
|
||||
|
||||
LEVEL_ZERO_VERSION="1.7.15"
|
||||
LEVEL_ZERO_VERSION_SHORT="1.7"
|
||||
LEVEL_ZERO_VERSION_MIN="1.7"
|
||||
LEVEL_ZERO_VERSION_MEX="2.0"
|
||||
LEVEL_ZERO_FORCE_BUILD=false
|
||||
LEVEL_ZERO_FORCE_REBUILD=false
|
||||
LEVEL_ZERO_SKIP=false
|
||||
FFMPEG_VERSION="4.4"
|
||||
FFMPEG_VERSION_SHORT="4.4"
|
||||
FFMPEG_VERSION_MIN="3.0"
|
||||
FFMPEG_VERSION_MEX="5.0"
|
||||
FFMPEG_FORCE_BUILD=false
|
||||
FFMPEG_FORCE_REBUILD=false
|
||||
FFMPEG_SKIP=false
|
||||
_ffmpeg_list_sep=";"
|
||||
|
||||
XR_OPENXR_VERSION="1.0.22"
|
||||
XR_OPENXR_VERSION_SHORT="1.0"
|
||||
@@ -601,15 +590,6 @@ XR_OPENXR_FORCE_BUILD=false
|
||||
XR_OPENXR_FORCE_REBUILD=false
|
||||
XR_OPENXR_SKIP=false
|
||||
|
||||
FFMPEG_VERSION="5.0"
|
||||
FFMPEG_VERSION_SHORT="5.0"
|
||||
FFMPEG_VERSION_MIN="4.0"
|
||||
FFMPEG_VERSION_MEX="6.0"
|
||||
FFMPEG_FORCE_BUILD=false
|
||||
FFMPEG_FORCE_REBUILD=false
|
||||
FFMPEG_SKIP=false
|
||||
_ffmpeg_list_sep=";"
|
||||
|
||||
# FFMPEG optional libs.
|
||||
VORBIS_USE=false
|
||||
VORBIS_DEV=""
|
||||
@@ -801,12 +781,6 @@ while true; do
|
||||
XR_OPENXR_VERSION_SHORT=$XR_OPENXR_VERSION
|
||||
shift; shift; continue
|
||||
;;
|
||||
--ver-level-zero)
|
||||
LEVEL_ZERO_VERSION="$2"
|
||||
LEVEL_ZERO_VERSION_MIN=$LEVEL_ZERO_VERSION
|
||||
LEVEL_ZERO_VERSION_SHORT=$LEVEL_ZERO_VERSION
|
||||
shift; shift; continue
|
||||
;;
|
||||
--build-all)
|
||||
PYTHON_FORCE_BUILD=true
|
||||
BOOST_FORCE_BUILD=true
|
||||
@@ -826,7 +800,6 @@ while true; do
|
||||
ALEMBIC_FORCE_BUILD=true
|
||||
USD_FORCE_BUILD=true
|
||||
XR_OPENXR_FORCE_BUILD=true
|
||||
LEVEL_ZERO_FORCE_BUILD=true
|
||||
shift; continue
|
||||
;;
|
||||
--build-python)
|
||||
@@ -884,9 +857,6 @@ while true; do
|
||||
--build-xr-openxr)
|
||||
XR_OPENXR_FORCE_BUILD=true; shift; continue
|
||||
;;
|
||||
--build-level-zero)
|
||||
LEVEL_ZERO_FORCE_BUILD=true; shift; continue
|
||||
;;
|
||||
--force-all)
|
||||
PYTHON_FORCE_REBUILD=true
|
||||
BOOST_FORCE_REBUILD=true
|
||||
@@ -906,7 +876,6 @@ while true; do
|
||||
ALEMBIC_FORCE_REBUILD=true
|
||||
USD_FORCE_REBUILD=true
|
||||
XR_OPENXR_FORCE_REBUILD=true
|
||||
LEVEL_ZERO_FORCE_REBUILD=true
|
||||
shift; continue
|
||||
;;
|
||||
--force-python)
|
||||
@@ -964,9 +933,6 @@ while true; do
|
||||
--force-xr-openxr)
|
||||
XR_OPENXR_FORCE_REBUILD=true; shift; continue
|
||||
;;
|
||||
--force-level-zero)
|
||||
LEVEL_ZERO_FORCE_REBUILD=true; shift; continue
|
||||
;;
|
||||
--skip-python)
|
||||
PYTHON_SKIP=true; shift; continue
|
||||
;;
|
||||
@@ -1021,9 +987,6 @@ while true; do
|
||||
--skip-xr-openxr)
|
||||
XR_OPENXR_SKIP=true; shift; continue
|
||||
;;
|
||||
--skip-level-zero)
|
||||
LEVEL_ZERO_SKIP=true; shift; continue
|
||||
;;
|
||||
--)
|
||||
# no more arguments to parse
|
||||
break
|
||||
@@ -1165,16 +1128,14 @@ OIDN_SOURCE=( "https://github.com/OpenImageDenoise/oidn/releases/download/v${OID
|
||||
|
||||
ISPC_BINARY=( "https://github.com/ispc/ispc/releases/download/v${ISPC_VERSION}/ispc-v${ISPC_VERSION}-linux.tar.gz" )
|
||||
|
||||
FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" )
|
||||
|
||||
XR_OPENXR_USE_REPO=false
|
||||
XR_OPENXR_SOURCE=("https://github.com/KhronosGroup/OpenXR-SDK/archive/release-${XR_OPENXR_VERSION}.tar.gz")
|
||||
XR_OPENXR_SOURCE_REPO=("https://github.com/KhronosGroup/OpenXR-SDK.git")
|
||||
XR_OPENXR_REPO_UID="458984d7f59d1ae6dc1b597d94b02e4f7132eaba"
|
||||
XR_OPENXR_REPO_BRANCH="master"
|
||||
|
||||
LEVEL_ZERO_SOURCE=("https://github.com/oneapi-src/level-zero/archive/refs/tags/v${LEVEL_ZERO_VERSION}.tar.gz")
|
||||
|
||||
FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" )
|
||||
|
||||
# C++11 is required now
|
||||
CXXFLAGS_BACK=$CXXFLAGS
|
||||
CXXFLAGS="$CXXFLAGS -std=c++11"
|
||||
@@ -1226,8 +1187,7 @@ You may also want to build them yourself (optional ones are [between brackets]):
|
||||
* [OpenImageDenoise $OIDN_VERSION] (from $OIDN_SOURCE).
|
||||
* [Alembic $ALEMBIC_VERSION] (from $ALEMBIC_SOURCE).
|
||||
* [Universal Scene Description $USD_VERSION] (from $USD_SOURCE).
|
||||
* [OpenXR-SDK $XR_OPENXR_VERSION] (from $XR_OPENXR_SOURCE).
|
||||
* [OneAPI Level Zero $LEVEL_ZERO_VERSION] (from $LEVEL_ZERO_SOURCE).\""
|
||||
* [OpenXR-SDK $XR_OPENXR_VERSION] (from $XR_OPENXR_SOURCE).\""
|
||||
|
||||
if [ "$DO_SHOW_DEPS" = true ]; then
|
||||
PRINT ""
|
||||
@@ -3862,103 +3822,6 @@ compile_XR_OpenXR_SDK() {
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Build OneAPI Level Zero library.
|
||||
|
||||
_init_level_zero() {
|
||||
_src=$SRC/level-zero-$LEVEL_ZERO_VERSION
|
||||
_git=false
|
||||
_inst=$INST/level-zero-$LEVEL_ZERO_VERSION_SHORT
|
||||
_inst_shortcut=$INST/level-zero
|
||||
}
|
||||
|
||||
_update_deps_level_zero() {
|
||||
:
|
||||
}
|
||||
|
||||
clean_Level_Zero() {
|
||||
_init_level_zero
|
||||
if [ -d $_inst ]; then
|
||||
# Force rebuilding the dependencies if needed.
|
||||
_update_deps_level_zero false true
|
||||
fi
|
||||
_clean
|
||||
}
|
||||
|
||||
compile_Level_Zero() {
|
||||
if [ "$NO_BUILD" = true ]; then
|
||||
WARNING "--no-build enabled, Level Zero will not be compiled!"
|
||||
return
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
level_zero_magic=1
|
||||
_init_level_zero
|
||||
|
||||
# Force having own builds for the dependencies.
|
||||
_update_deps_level_zero true false
|
||||
|
||||
# Clean install if needed!
|
||||
magic_compile_check level-zero-$LEVEL_ZERO_VERSION $level_zero_magic
|
||||
if [ $? -eq 1 -o "$LEVEL_ZERO_FORCE_REBUILD" = true ]; then
|
||||
clean_Level_Zero
|
||||
fi
|
||||
|
||||
if [ ! -d $_inst ]; then
|
||||
INFO "Building Level-Zero-$LEVEL_ZERO_VERSION"
|
||||
|
||||
# Force rebuilding the dependencies.
|
||||
_update_deps_level_zero true true
|
||||
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
|
||||
download LEVEL_ZERO_SOURCE[@] "$_src.tar.gz"
|
||||
INFO "Unpacking Level-Zero-$LEVEL_ZERO_VERSION"
|
||||
tar -C $SRC -xf $_src.tar.gz
|
||||
fi
|
||||
|
||||
cd $_src
|
||||
|
||||
# Always refresh the whole build!
|
||||
if [ -d build ]; then
|
||||
rm -rf build
|
||||
fi
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
# Keep flags in sync with LEVEL_ZERO_EXTRA_ARGS in level-zero.cmake!
|
||||
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
||||
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
||||
|
||||
cmake $cmake_d ..
|
||||
|
||||
make -j$THREADS && make install
|
||||
make clean
|
||||
|
||||
if [ ! -d $_inst ]; then
|
||||
ERROR "Level-Zero-$LEVEL_ZERO_VERSION failed to compile, exiting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
magic_compile_set level-zero-$LEVEL_ZERO_VERSION $level_zero_magic
|
||||
|
||||
cd $CWD
|
||||
INFO "Done compiling Level-Zero-$LEVEL_ZERO_VERSION!"
|
||||
else
|
||||
INFO "Own Level-Zero-$LEVEL_ZERO_VERSION is up to date, nothing to do!"
|
||||
INFO "If you want to force rebuild of this lib, use the --force-level-zero option."
|
||||
fi
|
||||
|
||||
if [ -d $_inst ]; then
|
||||
_create_inst_shortcut
|
||||
fi
|
||||
run_ldconfig "level-zero"
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Install on DEB-like
|
||||
|
||||
@@ -4595,18 +4458,6 @@ install_DEB() {
|
||||
PRINT ""
|
||||
compile_XR_OpenXR_SDK
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$LEVEL_ZERO_SKIP" = true ]; then
|
||||
WARNING "Skipping Level Zero installation, as requested..."
|
||||
elif [ "$LEVEL_ZERO_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced Level Zero building, as requested..."
|
||||
compile_Level_Zero
|
||||
else
|
||||
# No package currently!
|
||||
PRINT ""
|
||||
compile_Level_Zero
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -5293,18 +5144,6 @@ install_RPM() {
|
||||
# No package currently!
|
||||
compile_XR_OpenXR_SDK
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$LEVEL_ZERO_SKIP" = true ]; then
|
||||
WARNING "Skipping Level Zero installation, as requested..."
|
||||
elif [ "$LEVEL_ZERO_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced Level Zero building, as requested..."
|
||||
compile_Level_Zero
|
||||
else
|
||||
# No package currently!
|
||||
PRINT ""
|
||||
compile_Level_Zero
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -5882,18 +5721,6 @@ install_ARCH() {
|
||||
# No package currently!
|
||||
compile_XR_OpenXR_SDK
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$LEVEL_ZERO_SKIP" = true ]; then
|
||||
WARNING "Skipping Level Zero installation, as requested..."
|
||||
elif [ "$LEVEL_ZERO_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced Level Zero building, as requested..."
|
||||
compile_Level_Zero
|
||||
else
|
||||
# No package currently!
|
||||
PRINT ""
|
||||
compile_Level_Zero
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -6068,14 +5895,6 @@ install_OTHER() {
|
||||
INFO "Forced OpenXR-SDK building, as requested..."
|
||||
compile_XR_OpenXR_SDK
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$LEVEL_ZERO_SKIP" = true ]; then
|
||||
WARNING "Skipping Level Zero installation, as requested..."
|
||||
elif [ "$LEVEL_ZERO_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced Level Zero building, as requested..."
|
||||
compile_Level_Zero
|
||||
fi
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
@@ -6318,18 +6137,6 @@ print_info() {
|
||||
fi
|
||||
fi
|
||||
|
||||
# Not yet available in Blender.
|
||||
#~ if [ "$LEVEL_ZERO_SKIP" = false ]; then
|
||||
#~ _1="-D WITH_LEVEL_ZERO=ON"
|
||||
#~ PRINT " $_1"
|
||||
#~ _buildargs="$_buildargs $_1"
|
||||
#~ if [ -d $INST/level-zero ]; then
|
||||
#~ _1="-D LEVEL_ZERO_ROOT_DIR=$INST/level-zero"
|
||||
#~ PRINT " $_1"
|
||||
#~ _buildargs="$_buildargs $_1"
|
||||
#~ fi
|
||||
#~ fi
|
||||
|
||||
PRINT ""
|
||||
PRINT "Or even simpler, just run (in your blender-source dir):"
|
||||
PRINT " make -j$THREADS BUILD_CMAKE_ARGS=\"$_buildargs\""
|
||||
|
26
build_files/build_environment/patches/cuew.diff
Normal file
26
build_files/build_environment/patches/cuew.diff
Normal file
@@ -0,0 +1,26 @@
|
||||
--- CmakeLists.txt.orig 2015-12-31 03:46:41 -0700
|
||||
+++ CMakeLists.txt 2016-04-01 13:28:33 -0600
|
||||
@@ -22,3 +22,10 @@
|
||||
|
||||
add_executable(testcuew cuewTest/cuewTest.c include/cuew.h)
|
||||
target_link_libraries(testcuew cuew ${CMAKE_DL_LIBS})
|
||||
+
|
||||
+install(TARGETS cuew
|
||||
+ LIBRARY DESTINATION lib COMPONENT libraries
|
||||
+ ARCHIVE DESTINATION lib/static COMPONENT libraries)
|
||||
+
|
||||
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/cuew.h
|
||||
+ DESTINATION include/)
|
||||
\ No newline at end of file
|
||||
--- src/cuew.c 2016-04-01 13:41:43 -0600
|
||||
+++ src/cuew.c 2016-04-01 13:41:11 -0600
|
||||
@@ -15,7 +15,9 @@
|
||||
*/
|
||||
|
||||
#ifdef _MSC_VER
|
||||
+#if _MSC_VER < 1900
|
||||
# define snprintf _snprintf
|
||||
+#endif
|
||||
# define popen _popen
|
||||
# define pclose _pclose
|
||||
# define _CRT_SECURE_NO_WARNINGS
|
374
build_files/build_environment/patches/nanovdb.diff
Normal file
374
build_files/build_environment/patches/nanovdb.diff
Normal file
@@ -0,0 +1,374 @@
|
||||
Index: nanovdb/nanovdb/NanoVDB.h
|
||||
===================================================================
|
||||
--- a/nanovdb/nanovdb/NanoVDB.h (revision 62751)
|
||||
+++ b/nanovdb/nanovdb/NanoVDB.h (working copy)
|
||||
@@ -152,8 +152,8 @@
|
||||
|
||||
#endif // __CUDACC_RTC__
|
||||
|
||||
-#ifdef __CUDACC__
|
||||
-// Only define __hostdev__ when using NVIDIA CUDA compiler
|
||||
+#if defined(__CUDACC__) || defined(__HIP__)
|
||||
+// Only define __hostdev__ when using NVIDIA CUDA or HIP compiler
|
||||
#define __hostdev__ __host__ __device__
|
||||
#else
|
||||
#define __hostdev__
|
||||
@@ -461,7 +461,7 @@
|
||||
/// Maximum floating-point values
|
||||
template<typename T>
|
||||
struct Maximum;
|
||||
-#ifdef __CUDA_ARCH__
|
||||
+#if defined(__CUDA_ARCH__) || defined(__HIP__)
|
||||
template<>
|
||||
struct Maximum<int>
|
||||
{
|
||||
@@ -1006,10 +1006,10 @@
|
||||
using Vec3i = Vec3<int>;
|
||||
|
||||
/// @brief Return a single precision floating-point vector of this coordinate
|
||||
-Vec3f Coord::asVec3s() const { return Vec3f(float(mVec[0]), float(mVec[1]), float(mVec[2])); }
|
||||
+inline __hostdev__ Vec3f Coord::asVec3s() const { return Vec3f(float(mVec[0]), float(mVec[1]), float(mVec[2])); }
|
||||
|
||||
/// @brief Return a double precision floating-point vector of this coordinate
|
||||
-Vec3d Coord::asVec3d() const { return Vec3d(double(mVec[0]), double(mVec[1]), double(mVec[2])); }
|
||||
+inline __hostdev__ Vec3d Coord::asVec3d() const { return Vec3d(double(mVec[0]), double(mVec[1]), double(mVec[2])); }
|
||||
|
||||
// ----------------------------> Vec4 <--------------------------------------
|
||||
|
||||
@@ -1820,7 +1820,7 @@
|
||||
}; // Map
|
||||
|
||||
template<typename Mat4T>
|
||||
-void Map::set(const Mat4T& mat, const Mat4T& invMat, double taper)
|
||||
+__hostdev__ void Map::set(const Mat4T& mat, const Mat4T& invMat, double taper)
|
||||
{
|
||||
float * mf = mMatF, *vf = mVecF;
|
||||
float* mif = mInvMatF;
|
||||
@@ -2170,7 +2170,7 @@
|
||||
}; // Class Grid
|
||||
|
||||
template<typename TreeT>
|
||||
-int Grid<TreeT>::findBlindDataForSemantic(GridBlindDataSemantic semantic) const
|
||||
+__hostdev__ int Grid<TreeT>::findBlindDataForSemantic(GridBlindDataSemantic semantic) const
|
||||
{
|
||||
for (uint32_t i = 0, n = blindDataCount(); i < n; ++i)
|
||||
if (blindMetaData(i).mSemantic == semantic)
|
||||
@@ -2328,7 +2328,7 @@
|
||||
}; // Tree class
|
||||
|
||||
template<typename RootT>
|
||||
-void Tree<RootT>::extrema(ValueType& min, ValueType& max) const
|
||||
+__hostdev__ void Tree<RootT>::extrema(ValueType& min, ValueType& max) const
|
||||
{
|
||||
min = this->root().valueMin();
|
||||
max = this->root().valueMax();
|
||||
@@ -2336,7 +2336,7 @@
|
||||
|
||||
template<typename RootT>
|
||||
template<typename NodeT>
|
||||
-const NodeT* Tree<RootT>::getNode(uint32_t i) const
|
||||
+__hostdev__ const NodeT* Tree<RootT>::getNode(uint32_t i) const
|
||||
{
|
||||
static_assert(is_same<TreeNodeT<NodeT::LEVEL>, NodeT>::value, "Tree::getNode: unvalid node type");
|
||||
NANOVDB_ASSERT(i < DataType::mCount[NodeT::LEVEL]);
|
||||
@@ -2345,7 +2345,7 @@
|
||||
|
||||
template<typename RootT>
|
||||
template<int LEVEL>
|
||||
-const typename TreeNode<Tree<RootT>, LEVEL>::type* Tree<RootT>::getNode(uint32_t i) const
|
||||
+__hostdev__ const typename TreeNode<Tree<RootT>, LEVEL>::type* Tree<RootT>::getNode(uint32_t i) const
|
||||
{
|
||||
NANOVDB_ASSERT(i < DataType::mCount[LEVEL]);
|
||||
return reinterpret_cast<const TreeNodeT<LEVEL>*>(reinterpret_cast<const uint8_t*>(this) + DataType::mBytes[LEVEL]) + i;
|
||||
@@ -2353,7 +2353,7 @@
|
||||
|
||||
template<typename RootT>
|
||||
template<typename NodeT>
|
||||
-NodeT* Tree<RootT>::getNode(uint32_t i)
|
||||
+__hostdev__ NodeT* Tree<RootT>::getNode(uint32_t i)
|
||||
{
|
||||
static_assert(is_same<TreeNodeT<NodeT::LEVEL>, NodeT>::value, "Tree::getNode: invalid node type");
|
||||
NANOVDB_ASSERT(i < DataType::mCount[NodeT::LEVEL]);
|
||||
@@ -2362,7 +2362,7 @@
|
||||
|
||||
template<typename RootT>
|
||||
template<int LEVEL>
|
||||
-typename TreeNode<Tree<RootT>, LEVEL>::type* Tree<RootT>::getNode(uint32_t i)
|
||||
+__hostdev__ typename TreeNode<Tree<RootT>, LEVEL>::type* Tree<RootT>::getNode(uint32_t i)
|
||||
{
|
||||
NANOVDB_ASSERT(i < DataType::mCount[LEVEL]);
|
||||
return reinterpret_cast<TreeNodeT<LEVEL>*>(reinterpret_cast<uint8_t*>(this) + DataType::mBytes[LEVEL]) + i;
|
||||
@@ -2370,7 +2370,7 @@
|
||||
|
||||
template<typename RootT>
|
||||
template<typename NodeT>
|
||||
-uint32_t Tree<RootT>::getNodeID(const NodeT& node) const
|
||||
+__hostdev__ uint32_t Tree<RootT>::getNodeID(const NodeT& node) const
|
||||
{
|
||||
static_assert(is_same<TreeNodeT<NodeT::LEVEL>, NodeT>::value, "Tree::getNodeID: invalid node type");
|
||||
const NodeT* first = reinterpret_cast<const NodeT*>(reinterpret_cast<const uint8_t*>(this) + DataType::mBytes[NodeT::LEVEL]);
|
||||
@@ -2380,7 +2380,7 @@
|
||||
|
||||
template<typename RootT>
|
||||
template<typename NodeT>
|
||||
-uint32_t Tree<RootT>::getLinearOffset(const NodeT& node) const
|
||||
+__hostdev__ uint32_t Tree<RootT>::getLinearOffset(const NodeT& node) const
|
||||
{
|
||||
return this->getNodeID(node) + DataType::mPFSum[NodeT::LEVEL];
|
||||
}
|
||||
@@ -3366,7 +3366,7 @@
|
||||
}; // LeafNode class
|
||||
|
||||
template<typename ValueT, typename CoordT, template<uint32_t> class MaskT, uint32_t LOG2DIM>
|
||||
-inline void LeafNode<ValueT, CoordT, MaskT, LOG2DIM>::updateBBox()
|
||||
+inline __hostdev__ void LeafNode<ValueT, CoordT, MaskT, LOG2DIM>::updateBBox()
|
||||
{
|
||||
static_assert(LOG2DIM == 3, "LeafNode::updateBBox: only supports LOGDIM = 3!");
|
||||
if (!this->isActive()) return;
|
||||
Index: nanovdb/nanovdb/util/SampleFromVoxels.h
|
||||
===================================================================
|
||||
--- a/nanovdb/nanovdb/util/SampleFromVoxels.h (revision 62751)
|
||||
+++ b/nanovdb/nanovdb/util/SampleFromVoxels.h (working copy)
|
||||
@@ -22,7 +22,7 @@
|
||||
#define NANOVDB_SAMPLE_FROM_VOXELS_H_HAS_BEEN_INCLUDED
|
||||
|
||||
// Only define __hostdev__ when compiling as NVIDIA CUDA
|
||||
-#ifdef __CUDACC__
|
||||
+#if defined(__CUDACC__) || defined(__HIP__)
|
||||
#define __hostdev__ __host__ __device__
|
||||
#else
|
||||
#include <cmath> // for floor
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()(const Vec3T& xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()(const Vec3T& xyz) const
|
||||
{
|
||||
const CoordT ijk = Round<CoordT>(xyz);
|
||||
if (ijk != mPos) {
|
||||
@@ -147,7 +147,7 @@
|
||||
}
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()(const CoordT& ijk) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()(const CoordT& ijk) const
|
||||
{
|
||||
if (ijk != mPos) {
|
||||
mPos = ijk;
|
||||
@@ -158,7 +158,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, false>::operator()(const Vec3T& xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, false>::operator()(const Vec3T& xyz) const
|
||||
{
|
||||
return mAcc.getValue(Round<CoordT>(xyz));
|
||||
}
|
||||
@@ -195,7 +195,7 @@
|
||||
}; // TrilinearSamplerBase
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-void TrilinearSampler<TreeOrAccT>::stencil(CoordT& ijk, ValueT (&v)[2][2][2]) const
|
||||
+__hostdev__ void TrilinearSampler<TreeOrAccT>::stencil(CoordT& ijk, ValueT (&v)[2][2][2]) const
|
||||
{
|
||||
v[0][0][0] = mAcc.getValue(ijk); // i, j, k
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType TrilinearSampler<TreeOrAccT>::sample(const Vec3T<RealT> &uvw, const ValueT (&v)[2][2][2])
|
||||
+__hostdev__ typename TreeOrAccT::ValueType TrilinearSampler<TreeOrAccT>::sample(const Vec3T<RealT> &uvw, const ValueT (&v)[2][2][2])
|
||||
{
|
||||
#if 0
|
||||
auto lerp = [](ValueT a, ValueT b, ValueT w){ return fma(w, b-a, a); };// = w*(b-a) + a
|
||||
@@ -239,7 +239,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-Vec3T<typename TreeOrAccT::ValueType> TrilinearSampler<TreeOrAccT>::gradient(const Vec3T<RealT> &uvw, const ValueT (&v)[2][2][2])
|
||||
+__hostdev__ Vec3T<typename TreeOrAccT::ValueType> TrilinearSampler<TreeOrAccT>::gradient(const Vec3T<RealT> &uvw, const ValueT (&v)[2][2][2])
|
||||
{
|
||||
static_assert(std::is_floating_point<ValueT>::value, "TrilinearSampler::gradient requires a floating-point type");
|
||||
#if 0
|
||||
@@ -270,7 +270,7 @@
|
||||
}
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-bool TrilinearSampler<TreeOrAccT>::zeroCrossing(const ValueT (&v)[2][2][2])
|
||||
+__hostdev__ bool TrilinearSampler<TreeOrAccT>::zeroCrossing(const ValueT (&v)[2][2][2])
|
||||
{
|
||||
static_assert(std::is_floating_point<ValueT>::value, "TrilinearSampler::zeroCrossing requires a floating-point type");
|
||||
const bool less = v[0][0][0] < ValueT(0);
|
||||
@@ -363,7 +363,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, true>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, true>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
this->cache(xyz);
|
||||
return BaseT::sample(xyz, mVal);
|
||||
@@ -370,7 +370,7 @@
|
||||
}
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, true>::operator()(const CoordT &ijk) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, true>::operator()(const CoordT &ijk) const
|
||||
{
|
||||
return ijk == mPos ? mVal[0][0][0] : BaseT::mAcc.getValue(ijk);
|
||||
}
|
||||
@@ -377,7 +377,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, true>::gradient(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, true>::gradient(Vec3T<RealT> xyz) const
|
||||
{
|
||||
this->cache(xyz);
|
||||
return BaseT::gradient(xyz, mVal);
|
||||
@@ -393,7 +393,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-void SampleFromVoxels<TreeOrAccT, 1, true>::cache(Vec3T<RealT>& xyz) const
|
||||
+__hostdev__ void SampleFromVoxels<TreeOrAccT, 1, true>::cache(Vec3T<RealT>& xyz) const
|
||||
{
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
if (ijk != mPos) {
|
||||
@@ -406,7 +406,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
ValueT val[2][2][2];
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
@@ -418,7 +418,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
auto lerp = [](ValueT a, ValueT b, RealT w) { return a + ValueT(w) * (b - a); };
|
||||
|
||||
@@ -463,7 +463,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-inline Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, false>::gradient(Vec3T<RealT> xyz) const
|
||||
+inline __hostdev__ Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, false>::gradient(Vec3T<RealT> xyz) const
|
||||
{
|
||||
ValueT val[2][2][2];
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
@@ -473,7 +473,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-bool SampleFromVoxels<TreeOrAccT, 1, false>::zeroCrossing(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ bool SampleFromVoxels<TreeOrAccT, 1, false>::zeroCrossing(Vec3T<RealT> xyz) const
|
||||
{
|
||||
ValueT val[2][2][2];
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
@@ -510,7 +510,7 @@
|
||||
}; // TriquadraticSamplerBase
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-void TriquadraticSampler<TreeOrAccT>::stencil(const CoordT &ijk, ValueT (&v)[3][3][3]) const
|
||||
+__hostdev__ void TriquadraticSampler<TreeOrAccT>::stencil(const CoordT &ijk, ValueT (&v)[3][3][3]) const
|
||||
{
|
||||
CoordT p(ijk[0] - 1, 0, 0);
|
||||
for (int dx = 0; dx < 3; ++dx, ++p[0]) {
|
||||
@@ -526,7 +526,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType TriquadraticSampler<TreeOrAccT>::sample(const Vec3T<RealT> &uvw, const ValueT (&v)[3][3][3])
|
||||
+__hostdev__ typename TreeOrAccT::ValueType TriquadraticSampler<TreeOrAccT>::sample(const Vec3T<RealT> &uvw, const ValueT (&v)[3][3][3])
|
||||
{
|
||||
auto kernel = [](const ValueT* value, double weight)->ValueT {
|
||||
return weight * (weight * (0.5f * (value[0] + value[2]) - value[1]) +
|
||||
@@ -545,7 +545,7 @@
|
||||
}
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-bool TriquadraticSampler<TreeOrAccT>::zeroCrossing(const ValueT (&v)[3][3][3])
|
||||
+__hostdev__ bool TriquadraticSampler<TreeOrAccT>::zeroCrossing(const ValueT (&v)[3][3][3])
|
||||
{
|
||||
static_assert(std::is_floating_point<ValueT>::value, "TrilinearSampler::zeroCrossing requires a floating-point type");
|
||||
const bool less = v[0][0][0] < ValueT(0);
|
||||
@@ -624,7 +624,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, true>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, true>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
this->cache(xyz);
|
||||
return BaseT::sample(xyz, mVal);
|
||||
@@ -631,7 +631,7 @@
|
||||
}
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, true>::operator()(const CoordT &ijk) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, true>::operator()(const CoordT &ijk) const
|
||||
{
|
||||
return ijk == mPos ? mVal[1][1][1] : BaseT::mAcc.getValue(ijk);
|
||||
}
|
||||
@@ -646,7 +646,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-void SampleFromVoxels<TreeOrAccT, 2, true>::cache(Vec3T<RealT>& xyz) const
|
||||
+__hostdev__ void SampleFromVoxels<TreeOrAccT, 2, true>::cache(Vec3T<RealT>& xyz) const
|
||||
{
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
if (ijk != mPos) {
|
||||
@@ -657,7 +657,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, false>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, false>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
ValueT val[3][3][3];
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
@@ -667,7 +667,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-bool SampleFromVoxels<TreeOrAccT, 2, false>::zeroCrossing(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ bool SampleFromVoxels<TreeOrAccT, 2, false>::zeroCrossing(Vec3T<RealT> xyz) const
|
||||
{
|
||||
ValueT val[3][3][3];
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
@@ -710,7 +710,7 @@
|
||||
}; // TricubicSampler
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-void TricubicSampler<TreeOrAccT>::stencil(const CoordT& ijk, ValueT (&C)[64]) const
|
||||
+__hostdev__ void TricubicSampler<TreeOrAccT>::stencil(const CoordT& ijk, ValueT (&C)[64]) const
|
||||
{
|
||||
auto fetch = [&](int i, int j, int k) -> ValueT& { return C[((i + 1) << 4) + ((j + 1) << 2) + k + 1]; };
|
||||
|
||||
@@ -929,7 +929,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 3, true>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 3, true>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
this->cache(xyz);
|
||||
return BaseT::sample(xyz, mC);
|
||||
@@ -937,7 +937,7 @@
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-void SampleFromVoxels<TreeOrAccT, 3, true>::cache(Vec3T<RealT>& xyz) const
|
||||
+__hostdev__ void SampleFromVoxels<TreeOrAccT, 3, true>::cache(Vec3T<RealT>& xyz) const
|
||||
{
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
if (ijk != mPos) {
|
@@ -99,321 +99,3 @@ diff -Naur openvdb-8.0.0/openvdb/openvdb/version.rc.in openvdb/openvdb/openvdb/v
|
||||
+
|
||||
+ END
|
||||
+END
|
||||
diff --git a/nanovdb/nanovdb/NanoVDB.h b/nanovdb/nanovdb/NanoVDB.h
|
||||
index cc2e54b77..703d2eabc 100644
|
||||
--- a/nanovdb/nanovdb/NanoVDB.h
|
||||
+++ b/nanovdb/nanovdb/NanoVDB.h
|
||||
@@ -161,8 +161,8 @@ typedef unsigned long long uint64_t;
|
||||
|
||||
#endif // __CUDACC_RTC__
|
||||
|
||||
-#ifdef __CUDACC__
|
||||
-// Only define __hostdev__ when using NVIDIA CUDA compiler
|
||||
+#if defined(__CUDACC__) || defined(__HIP__)
|
||||
+// Only define __hostdev__ when using NVIDIA CUDA or HIP compiler
|
||||
#define __hostdev__ __host__ __device__
|
||||
#else
|
||||
#define __hostdev__
|
||||
@@ -611,7 +611,7 @@ struct Delta<double>
|
||||
/// Maximum floating-point values
|
||||
template<typename T>
|
||||
struct Maximum;
|
||||
-#ifdef __CUDA_ARCH__
|
||||
+#if defined(__CUDA_ARCH__) || defined(__HIP__)
|
||||
template<>
|
||||
struct Maximum<int>
|
||||
{
|
||||
@@ -1176,10 +1176,10 @@ using Vec3f = Vec3<float>;
|
||||
using Vec3i = Vec3<int>;
|
||||
|
||||
/// @brief Return a single precision floating-point vector of this coordinate
|
||||
-Vec3f Coord::asVec3s() const { return Vec3f(float(mVec[0]), float(mVec[1]), float(mVec[2])); }
|
||||
+__hostdev__ inline Vec3f Coord::asVec3s() const { return Vec3f(float(mVec[0]), float(mVec[1]), float(mVec[2])); }
|
||||
|
||||
/// @brief Return a double precision floating-point vector of this coordinate
|
||||
-Vec3d Coord::asVec3d() const { return Vec3d(double(mVec[0]), double(mVec[1]), double(mVec[2])); }
|
||||
+__hostdev__ inline Vec3d Coord::asVec3d() const { return Vec3d(double(mVec[0]), double(mVec[1]), double(mVec[2])); }
|
||||
|
||||
// ----------------------------> Vec4 <--------------------------------------
|
||||
|
||||
@@ -2042,7 +2042,7 @@ struct Map
|
||||
}; // Map
|
||||
|
||||
template<typename Mat4T>
|
||||
-void Map::set(const Mat4T& mat, const Mat4T& invMat, double taper)
|
||||
+__hostdev__ void Map::set(const Mat4T& mat, const Mat4T& invMat, double taper)
|
||||
{
|
||||
float * mf = mMatF, *vf = mVecF;
|
||||
float* mif = mInvMatF;
|
||||
@@ -2486,7 +2486,7 @@ class Grid : private GridData
|
||||
}; // Class Grid
|
||||
|
||||
template<typename TreeT>
|
||||
-int Grid<TreeT>::findBlindDataForSemantic(GridBlindDataSemantic semantic) const
|
||||
+__hostdev__ int Grid<TreeT>::findBlindDataForSemantic(GridBlindDataSemantic semantic) const
|
||||
{
|
||||
for (uint32_t i = 0, n = this->blindDataCount(); i < n; ++i)
|
||||
if (this->blindMetaData(i).mSemantic == semantic)
|
||||
@@ -2671,7 +2671,7 @@ class Tree : private TreeData<RootT::LEVEL>
|
||||
}; // Tree class
|
||||
|
||||
template<typename RootT>
|
||||
-void Tree<RootT>::extrema(ValueType& min, ValueType& max) const
|
||||
+__hostdev__ void Tree<RootT>::extrema(ValueType& min, ValueType& max) const
|
||||
{
|
||||
min = this->root().minimum();
|
||||
max = this->root().maximum();
|
||||
@@ -3880,7 +3880,7 @@ class LeafNode : private LeafData<BuildT, CoordT, MaskT, Log2Dim>
|
||||
}; // LeafNode class
|
||||
|
||||
template<typename ValueT, typename CoordT, template<uint32_t> class MaskT, uint32_t LOG2DIM>
|
||||
-inline void LeafNode<ValueT, CoordT, MaskT, LOG2DIM>::updateBBox()
|
||||
+__hostdev__ inline void LeafNode<ValueT, CoordT, MaskT, LOG2DIM>::updateBBox()
|
||||
{
|
||||
static_assert(LOG2DIM == 3, "LeafNode::updateBBox: only supports LOGDIM = 3!");
|
||||
if (!this->isActive()) return;
|
||||
diff --git a/nanovdb/nanovdb/util/SampleFromVoxels.h b/nanovdb/nanovdb/util/SampleFromVoxels.h
|
||||
index 852123dac..e779d66cf 100644
|
||||
--- a/nanovdb/nanovdb/util/SampleFromVoxels.h
|
||||
+++ b/nanovdb/nanovdb/util/SampleFromVoxels.h
|
||||
@@ -22,7 +22,7 @@
|
||||
#define NANOVDB_SAMPLE_FROM_VOXELS_H_HAS_BEEN_INCLUDED
|
||||
|
||||
// Only define __hostdev__ when compiling as NVIDIA CUDA
|
||||
-#ifdef __CUDACC__
|
||||
+#if defined(__CUDACC__) || defined(__HIP__)
|
||||
#define __hostdev__ __host__ __device__
|
||||
#else
|
||||
#include <cmath> // for floor
|
||||
@@ -136,7 +136,7 @@ class SampleFromVoxels<TreeOrAccT, 0, false>
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()(const Vec3T& xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()(const Vec3T& xyz) const
|
||||
{
|
||||
const CoordT ijk = Round<CoordT>(xyz);
|
||||
if (ijk != mPos) {
|
||||
@@ -147,7 +147,7 @@ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()
|
||||
}
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()(const CoordT& ijk) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()(const CoordT& ijk) const
|
||||
{
|
||||
if (ijk != mPos) {
|
||||
mPos = ijk;
|
||||
@@ -158,7 +158,7 @@ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, false>::operator()(const Vec3T& xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, false>::operator()(const Vec3T& xyz) const
|
||||
{
|
||||
return mAcc.getValue(Round<CoordT>(xyz));
|
||||
}
|
||||
@@ -195,7 +195,7 @@ class TrilinearSampler
|
||||
}; // TrilinearSamplerBase
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-void TrilinearSampler<TreeOrAccT>::stencil(CoordT& ijk, ValueT (&v)[2][2][2]) const
|
||||
+__hostdev__ void TrilinearSampler<TreeOrAccT>::stencil(CoordT& ijk, ValueT (&v)[2][2][2]) const
|
||||
{
|
||||
v[0][0][0] = mAcc.getValue(ijk); // i, j, k
|
||||
|
||||
@@ -224,7 +224,7 @@ void TrilinearSampler<TreeOrAccT>::stencil(CoordT& ijk, ValueT (&v)[2][2][2]) co
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType TrilinearSampler<TreeOrAccT>::sample(const Vec3T<RealT> &uvw, const ValueT (&v)[2][2][2])
|
||||
+__hostdev__ typename TreeOrAccT::ValueType TrilinearSampler<TreeOrAccT>::sample(const Vec3T<RealT> &uvw, const ValueT (&v)[2][2][2])
|
||||
{
|
||||
#if 0
|
||||
auto lerp = [](ValueT a, ValueT b, ValueT w){ return fma(w, b-a, a); };// = w*(b-a) + a
|
||||
@@ -239,7 +239,7 @@ typename TreeOrAccT::ValueType TrilinearSampler<TreeOrAccT>::sample(const Vec3T<
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-Vec3T<typename TreeOrAccT::ValueType> TrilinearSampler<TreeOrAccT>::gradient(const Vec3T<RealT> &uvw, const ValueT (&v)[2][2][2])
|
||||
+__hostdev__ Vec3T<typename TreeOrAccT::ValueType> TrilinearSampler<TreeOrAccT>::gradient(const Vec3T<RealT> &uvw, const ValueT (&v)[2][2][2])
|
||||
{
|
||||
static_assert(is_floating_point<ValueT>::value, "TrilinearSampler::gradient requires a floating-point type");
|
||||
#if 0
|
||||
@@ -270,7 +270,7 @@ Vec3T<typename TreeOrAccT::ValueType> TrilinearSampler<TreeOrAccT>::gradient(con
|
||||
}
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-bool TrilinearSampler<TreeOrAccT>::zeroCrossing(const ValueT (&v)[2][2][2])
|
||||
+__hostdev__ bool TrilinearSampler<TreeOrAccT>::zeroCrossing(const ValueT (&v)[2][2][2])
|
||||
{
|
||||
static_assert(is_floating_point<ValueT>::value, "TrilinearSampler::zeroCrossing requires a floating-point type");
|
||||
const bool less = v[0][0][0] < ValueT(0);
|
||||
@@ -363,21 +363,21 @@ class SampleFromVoxels<TreeOrAccT, 1, true> : public TrilinearSampler<TreeOrAccT
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, true>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, true>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
this->cache(xyz);
|
||||
return BaseT::sample(xyz, mVal);
|
||||
}
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, true>::operator()(const CoordT &ijk) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, true>::operator()(const CoordT &ijk) const
|
||||
{
|
||||
return ijk == mPos ? mVal[0][0][0] : BaseT::mAcc.getValue(ijk);
|
||||
}
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, true>::gradient(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, true>::gradient(Vec3T<RealT> xyz) const
|
||||
{
|
||||
this->cache(xyz);
|
||||
return BaseT::gradient(xyz, mVal);
|
||||
@@ -393,7 +393,7 @@ __hostdev__ bool SampleFromVoxels<TreeOrAccT, 1, true>::zeroCrossing(Vec3T<RealT
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-void SampleFromVoxels<TreeOrAccT, 1, true>::cache(Vec3T<RealT>& xyz) const
|
||||
+__hostdev__ void SampleFromVoxels<TreeOrAccT, 1, true>::cache(Vec3T<RealT>& xyz) const
|
||||
{
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
if (ijk != mPos) {
|
||||
@@ -406,7 +406,7 @@ void SampleFromVoxels<TreeOrAccT, 1, true>::cache(Vec3T<RealT>& xyz) const
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
ValueT val[2][2][2];
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
@@ -418,7 +418,7 @@ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator(
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
auto lerp = [](ValueT a, ValueT b, RealT w) { return a + ValueT(w) * (b - a); };
|
||||
|
||||
@@ -463,7 +463,7 @@ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator(
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-inline Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, false>::gradient(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ inline Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, false>::gradient(Vec3T<RealT> xyz) const
|
||||
{
|
||||
ValueT val[2][2][2];
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
@@ -473,7 +473,7 @@ inline Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, fal
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-bool SampleFromVoxels<TreeOrAccT, 1, false>::zeroCrossing(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ bool SampleFromVoxels<TreeOrAccT, 1, false>::zeroCrossing(Vec3T<RealT> xyz) const
|
||||
{
|
||||
ValueT val[2][2][2];
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
@@ -510,7 +510,7 @@ class TriquadraticSampler
|
||||
}; // TriquadraticSamplerBase
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-void TriquadraticSampler<TreeOrAccT>::stencil(const CoordT &ijk, ValueT (&v)[3][3][3]) const
|
||||
+__hostdev__ void TriquadraticSampler<TreeOrAccT>::stencil(const CoordT &ijk, ValueT (&v)[3][3][3]) const
|
||||
{
|
||||
CoordT p(ijk[0] - 1, 0, 0);
|
||||
for (int dx = 0; dx < 3; ++dx, ++p[0]) {
|
||||
@@ -526,7 +526,7 @@ void TriquadraticSampler<TreeOrAccT>::stencil(const CoordT &ijk, ValueT (&v)[3][
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType TriquadraticSampler<TreeOrAccT>::sample(const Vec3T<RealT> &uvw, const ValueT (&v)[3][3][3])
|
||||
+__hostdev__ typename TreeOrAccT::ValueType TriquadraticSampler<TreeOrAccT>::sample(const Vec3T<RealT> &uvw, const ValueT (&v)[3][3][3])
|
||||
{
|
||||
auto kernel = [](const ValueT* value, double weight)->ValueT {
|
||||
return weight * (weight * (0.5f * (value[0] + value[2]) - value[1]) +
|
||||
@@ -545,7 +545,7 @@ typename TreeOrAccT::ValueType TriquadraticSampler<TreeOrAccT>::sample(const Vec
|
||||
}
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-bool TriquadraticSampler<TreeOrAccT>::zeroCrossing(const ValueT (&v)[3][3][3])
|
||||
+__hostdev__ bool TriquadraticSampler<TreeOrAccT>::zeroCrossing(const ValueT (&v)[3][3][3])
|
||||
{
|
||||
static_assert(is_floating_point<ValueT>::value, "TrilinearSampler::zeroCrossing requires a floating-point type");
|
||||
const bool less = v[0][0][0] < ValueT(0);
|
||||
@@ -624,14 +624,14 @@ class SampleFromVoxels<TreeOrAccT, 2, true> : public TriquadraticSampler<TreeOrA
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, true>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, true>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
this->cache(xyz);
|
||||
return BaseT::sample(xyz, mVal);
|
||||
}
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, true>::operator()(const CoordT &ijk) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, true>::operator()(const CoordT &ijk) const
|
||||
{
|
||||
return ijk == mPos ? mVal[1][1][1] : BaseT::mAcc.getValue(ijk);
|
||||
}
|
||||
@@ -646,7 +646,7 @@ __hostdev__ bool SampleFromVoxels<TreeOrAccT, 2, true>::zeroCrossing(Vec3T<RealT
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-void SampleFromVoxels<TreeOrAccT, 2, true>::cache(Vec3T<RealT>& xyz) const
|
||||
+__hostdev__ void SampleFromVoxels<TreeOrAccT, 2, true>::cache(Vec3T<RealT>& xyz) const
|
||||
{
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
if (ijk != mPos) {
|
||||
@@ -657,7 +657,7 @@ void SampleFromVoxels<TreeOrAccT, 2, true>::cache(Vec3T<RealT>& xyz) const
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, false>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, false>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
ValueT val[3][3][3];
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
@@ -667,7 +667,7 @@ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, false>::operator(
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-bool SampleFromVoxels<TreeOrAccT, 2, false>::zeroCrossing(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ bool SampleFromVoxels<TreeOrAccT, 2, false>::zeroCrossing(Vec3T<RealT> xyz) const
|
||||
{
|
||||
ValueT val[3][3][3];
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
@@ -710,7 +710,7 @@ class TricubicSampler
|
||||
}; // TricubicSampler
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-void TricubicSampler<TreeOrAccT>::stencil(const CoordT& ijk, ValueT (&C)[64]) const
|
||||
+__hostdev__ void TricubicSampler<TreeOrAccT>::stencil(const CoordT& ijk, ValueT (&C)[64]) const
|
||||
{
|
||||
auto fetch = [&](int i, int j, int k) -> ValueT& { return C[((i + 1) << 4) + ((j + 1) << 2) + k + 1]; };
|
||||
|
||||
@@ -929,7 +929,7 @@ class SampleFromVoxels<TreeOrAccT, 3, true> : public TricubicSampler<TreeOrAccT>
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 3, true>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 3, true>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
this->cache(xyz);
|
||||
return BaseT::sample(xyz, mC);
|
||||
@@ -937,7 +937,7 @@ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 3, true>::operator()
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-void SampleFromVoxels<TreeOrAccT, 3, true>::cache(Vec3T<RealT>& xyz) const
|
||||
+__hostdev__ void SampleFromVoxels<TreeOrAccT, 3, true>::cache(Vec3T<RealT>& xyz) const
|
||||
{
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
if (ijk != mPos) {
|
||||
|
||||
|
@@ -25,78 +25,3 @@ diff -Naur usd_orig/cmake/defaults/msvcdefaults.cmake external_usd/cmake/default
|
||||
set(_PXR_CXX_FLAGS "${_PXR_CXX_FLAGS} /MP")
|
||||
set(_PXR_CXX_FLAGS "${_PXR_CXX_FLAGS} /Gm-")
|
||||
|
||||
diff --git a/pxr/base/work/singularTask.h b/pxr/base/work/singularTask.h
|
||||
--- a/pxr/base/work/singularTask.h
|
||||
+++ b/pxr/base/work/singularTask.h
|
||||
@@ -120,7 +120,7 @@
|
||||
// case we go again to ensure the task can do whatever it
|
||||
// was awakened to do. Once we successfully take the count
|
||||
// to zero, we stop.
|
||||
- size_t old = count;
|
||||
+ std::size_t old = count;
|
||||
do { _fn(); } while (
|
||||
!count.compare_exchange_strong(old, 0));
|
||||
});
|
||||
|
||||
diff --git a/pxr/usd/sdr/shaderMetadataHelpers.h b/pxr/usd/sdr/shaderMetadataHelpers.h
|
||||
--- a/pxr/usd/sdr/shaderMetadataHelpers.h
|
||||
+++ b/pxr/usd/sdr/shaderMetadataHelpers.h
|
||||
@@ -32,6 +32,8 @@
|
||||
#include "pxr/base/tf/token.h"
|
||||
#include "pxr/usd/sdr/declare.h"
|
||||
|
||||
+#include <limits>
|
||||
+
|
||||
PXR_NAMESPACE_OPEN_SCOPE
|
||||
|
||||
/// \namespace ShaderMetadataHelpers
|
||||
|
||||
diff --git a/pxr/base/arch/timing.h b/pxr/base/arch/timing.h
|
||||
index 517561f..fda5a1f 100644
|
||||
--- a/pxr/base/arch/timing.h
|
||||
+++ b/pxr/base/arch/timing.h
|
||||
@@ -91,6 +91,10 @@ ArchGetTickTime()
|
||||
inline uint64_t
|
||||
ArchGetStartTickTime()
|
||||
{
|
||||
+ // BLENDER: avoid using rdtsc instruction that is not supported on older CPUs.
|
||||
+ return ArchGetTickTime();
|
||||
+
|
||||
+#if 0
|
||||
uint64_t t;
|
||||
#if defined (ARCH_OS_DARWIN)
|
||||
return ArchGetTickTime();
|
||||
@@ -123,6 +127,7 @@ ArchGetStartTickTime()
|
||||
#error "Unsupported architecture."
|
||||
#endif
|
||||
return t;
|
||||
+#endif
|
||||
}
|
||||
|
||||
/// Get a "stop" tick time for measuring an interval of time. See
|
||||
@@ -132,6 +137,10 @@ ArchGetStartTickTime()
|
||||
inline uint64_t
|
||||
ArchGetStopTickTime()
|
||||
{
|
||||
+ // BLENDER: avoid using rdtsc instruction that is not supported on older CPUs.
|
||||
+ return ArchGetTickTime();
|
||||
+
|
||||
+#if 0
|
||||
uint64_t t;
|
||||
#if defined (ARCH_OS_DARWIN)
|
||||
return ArchGetTickTime();
|
||||
@@ -162,11 +171,11 @@ ArchGetStopTickTime()
|
||||
#error "Unsupported architecture."
|
||||
#endif
|
||||
return t;
|
||||
+#endif
|
||||
}
|
||||
|
||||
-#if defined (doxygen) || \
|
||||
- (!defined(ARCH_OS_DARWIN) && defined(ARCH_CPU_INTEL) && \
|
||||
- (defined(ARCH_COMPILER_CLANG) || defined(ARCH_COMPILER_GCC)))
|
||||
+// BLENDER: avoid using rdtsc instruction that is not supported on older CPUs.
|
||||
+#if 0
|
||||
|
||||
/// A simple timer class for measuring an interval of time using the
|
||||
/// ArchTickTimer facilities.
|
||||
|
@@ -107,8 +107,8 @@ echo %DATE% %TIME% : Start > %StatusFile%
|
||||
cmake -G "%CMAKE_BUILDER%" %CMAKE_BUILD_ARCH% -Thost=x64 %SOURCE_DIR% -DPACKAGE_DIR=%BUILD_DIR%/packages -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DBUILD_MODE=Release -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/
|
||||
echo %DATE% %TIME% : Release Configuration done >> %StatusFile%
|
||||
if "%dobuild%" == "1" (
|
||||
msbuild /m:1 "ll.vcxproj" /p:Configuration=Release /fl /flp:logfile=BlenderDeps_llvm.log;Verbosity=normal
|
||||
msbuild /m:1 "BlenderDependencies.sln" /p:Configuration=Release /fl /flp:logfile=BlenderDeps.log;Verbosity=minimal /verbosity:minimal
|
||||
msbuild /m "ll.vcxproj" /p:Configuration=Release /fl /flp:logfile=BlenderDeps_llvm.log;Verbosity=normal
|
||||
msbuild /maxcpucount:1 /m "BlenderDependencies.sln" /p:Configuration=Release /fl /flp:logfile=BlenderDeps.log;Verbosity=minimal /verbosity:minimal
|
||||
echo %DATE% %TIME% : Release Build done >> %StatusFile%
|
||||
cmake --build . --target Harvest_Release_Results > Harvest_Release.txt
|
||||
)
|
||||
@@ -120,8 +120,8 @@ cd %Staging%\%BuildDir%%ARCH%D
|
||||
cmake -G "%CMAKE_BUILDER%" %CMAKE_BUILD_ARCH% -Thost=x64 %SOURCE_DIR% -DPACKAGE_DIR=%BUILD_DIR%/packages -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DCMAKE_BUILD_TYPE=Debug -DBUILD_MODE=Debug -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/ %CMAKE_DEBUG_OPTIONS%
|
||||
echo %DATE% %TIME% : Debug Configuration done >> %StatusFile%
|
||||
if "%dobuild%" == "1" (
|
||||
msbuild /m:1 "ll.vcxproj" /p:Configuration=Debug /fl /flp:logfile=BlenderDeps_llvm.log;;Verbosity=normal
|
||||
msbuild /m:1 "BlenderDependencies.sln" /p:Configuration=Debug /verbosity:n /fl /flp:logfile=BlenderDeps.log;;Verbosity=normal
|
||||
msbuild /m "ll.vcxproj" /p:Configuration=Debug /fl /flp:logfile=BlenderDeps_llvm.log;;Verbosity=normal
|
||||
msbuild /maxcpucount:1 /m "BlenderDependencies.sln" /p:Configuration=Debug /verbosity:n /fl /flp:logfile=BlenderDeps.log;;Verbosity=normal
|
||||
echo %DATE% %TIME% : Debug Build done >> %StatusFile%
|
||||
cmake --build . --target Harvest_Debug_Results> Harvest_Debug.txt
|
||||
)
|
||||
|
@@ -175,9 +175,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibsUnix DEFAULT_MSG
|
||||
IF(PYTHONLIBSUNIX_FOUND)
|
||||
# Assign cache items
|
||||
SET(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR} ${PYTHON_INCLUDE_CONFIG_DIR})
|
||||
IF(NOT WITH_PYTHON_MODULE)
|
||||
SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
|
||||
ENDIF()
|
||||
SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
|
||||
|
||||
FIND_FILE(PYTHON_SITE_PACKAGES
|
||||
NAMES
|
||||
|
@@ -64,7 +64,6 @@ ENDIF()
|
||||
MARK_AS_ADVANCED(
|
||||
USD_INCLUDE_DIR
|
||||
USD_LIBRARY_DIR
|
||||
USD_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_usd_SEARCH_DIRS)
|
||||
|
@@ -74,9 +74,4 @@ ENDIF()
|
||||
MARK_AS_ADVANCED(
|
||||
WEBP_INCLUDE_DIR
|
||||
WEBP_LIBRARY_DIR
|
||||
|
||||
# Generated names.
|
||||
WEBP_WEBPDEMUX_LIBRARY
|
||||
WEBP_WEBPMUX_LIBRARY
|
||||
WEBP_WEBP_LIBRARY
|
||||
)
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
"""
|
||||
Example linux usage
|
||||
python3 ~/blender-git/blender/build_files/cmake/cmake_netbeans_project.py ~/blender-git/cmake
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
r"""
|
||||
Example Linux usage:
|
||||
python ~/blender-git/blender/build_files/cmake/cmake_qtcreator_project.py --build-dir ~/blender-git/cmake
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import project_source_info
|
||||
import subprocess
|
||||
import sys
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import project_source_info
|
||||
import subprocess
|
||||
import sys
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
CHECKER_IGNORE_PREFIX = [
|
||||
"extern",
|
||||
"intern/moto",
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
CHECKER_IGNORE_PREFIX = [
|
||||
"extern",
|
||||
"intern/moto",
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
CHECKER_IGNORE_PREFIX = [
|
||||
"extern",
|
||||
"intern/moto",
|
||||
|
@@ -37,9 +37,6 @@ set(WITH_IMAGE_TIFF OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_WEBP OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_INPUT_NDOF OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IO_STL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IO_WAVEFRONT_OBJ OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IO_GPENCIL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_JACK OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_LLVM OFF CACHE BOOL "" FORCE)
|
||||
|
@@ -215,12 +215,7 @@ if(WITH_SDL)
|
||||
find_package(SDL2)
|
||||
set(SDL_INCLUDE_DIR ${SDL2_INCLUDE_DIRS})
|
||||
set(SDL_LIBRARY ${SDL2_LIBRARIES})
|
||||
string(APPEND PLATFORM_LINKFLAGS " -framework ForceFeedback -framework GameController")
|
||||
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
|
||||
# The minimum macOS version of the libraries makes it so this is included in SDL on arm64
|
||||
# but not x86_64.
|
||||
string(APPEND PLATFORM_LINKFLAGS " -framework CoreHaptics")
|
||||
endif()
|
||||
string(APPEND PLATFORM_LINKFLAGS " -framework ForceFeedback -framework GameController -framework CoreHaptics")
|
||||
endif()
|
||||
|
||||
set(PNG_ROOT ${LIBDIR}/png)
|
||||
|
@@ -25,7 +25,6 @@ if(UNIX AND
|
||||
unset_cache_variables("^PNG")
|
||||
unset_cache_variables("^USD")
|
||||
unset_cache_variables("^WEBP")
|
||||
unset_cache_variables("^NANOVDB")
|
||||
endif()
|
||||
|
||||
# Automatically set WebP on/off depending if libraries are available.
|
||||
@@ -36,11 +35,3 @@ if(EXISTS ${LIBDIR}/webp)
|
||||
else()
|
||||
set(WITH_IMAGE_WEBP OFF)
|
||||
endif()
|
||||
|
||||
# NanoVDB moved into openvdb.
|
||||
if(UNIX AND DEFINED NANOVDB_INCLUDE_DIR)
|
||||
if(NOT EXISTS ${NANOVDB_INCLUDE_DIR} AND
|
||||
EXISTS ${LIBDIR}/openvdb/include/nanovdb)
|
||||
unset_cache_variables("^NANOVDB")
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -104,7 +104,7 @@ string(APPEND CMAKE_MODULE_LINKER_FLAGS " /SAFESEH:NO /ignore:4099")
|
||||
list(APPEND PLATFORM_LINKLIBS
|
||||
ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 Comctl32 version
|
||||
advapi32 shfolder shell32 ole32 oleaut32 uuid psapi Dbghelp Shlwapi
|
||||
pathcch Shcore Dwmapi
|
||||
pathcch Shcore
|
||||
)
|
||||
|
||||
if(WITH_INPUT_IME)
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
"""
|
||||
Module for accessing project file data for Blender.
|
||||
|
||||
@@ -168,7 +170,7 @@ def cmake_advanced_info() -> Union[Tuple[List[str], List[Tuple[str, str]]], Tupl
|
||||
project_path = create_eclipse_project()
|
||||
|
||||
if not exists(project_path):
|
||||
print("Generating Eclipse Project File Failed: %r not found" % project_path)
|
||||
print("Generating Eclipse Prokect File Failed: %r not found" % project_path)
|
||||
return None, None
|
||||
|
||||
from xml.dom.minidom import parse
|
||||
|
@@ -1,5 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
__all__ = (
|
||||
"build_info",
|
||||
"SOURCE_DIR",
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
|
@@ -3,10 +3,13 @@ for %%X in (svn.exe) do (set SVN=%%~$PATH:X)
|
||||
for %%X in (cmake.exe) do (set CMAKE=%%~$PATH:X)
|
||||
for %%X in (ctest.exe) do (set CTEST=%%~$PATH:X)
|
||||
for %%X in (git.exe) do (set GIT=%%~$PATH:X)
|
||||
REM For python, default on 310 but if that does not exist also check
|
||||
REM the 311, 312 and finally 39 folders to see if those are there, it checks
|
||||
REM this far ahead to ensure good lib folder compatibility in the future
|
||||
REM it falls back to 3.9 just incase it is a very old lib folder.
|
||||
REM For python, default on 39 but if that does not exist also check
|
||||
REM the 310,311 and 312 folders to see if those are there, it checks
|
||||
REM this far ahead to ensure good lib folder compatibility in the future.
|
||||
set PYTHON=%BLENDER_DIR%\..\lib\win64_vc15\python\39\bin\python.exe
|
||||
if EXIST %PYTHON% (
|
||||
goto detect_python_done
|
||||
)
|
||||
set PYTHON=%BLENDER_DIR%\..\lib\win64_vc15\python\310\bin\python.exe
|
||||
if EXIST %PYTHON% (
|
||||
goto detect_python_done
|
||||
@@ -19,10 +22,6 @@ set PYTHON=%BLENDER_DIR%\..\lib\win64_vc15\python\312\bin\python.exe
|
||||
if EXIST %PYTHON% (
|
||||
goto detect_python_done
|
||||
)
|
||||
set PYTHON=%BLENDER_DIR%\..\lib\win64_vc15\python\39\bin\python.exe
|
||||
if EXIST %PYTHON% (
|
||||
goto detect_python_done
|
||||
)
|
||||
|
||||
if NOT EXIST %PYTHON% (
|
||||
echo Warning: Python not found, there is likely an issue with the library folder
|
||||
|
@@ -411,7 +411,7 @@ def main():
|
||||
# read blend header from blend file
|
||||
log.info("2: read file:")
|
||||
|
||||
if dir not in sys.path:
|
||||
if not dir in sys.path:
|
||||
sys.path.append(dir)
|
||||
import BlendFileReader
|
||||
|
||||
|
@@ -38,7 +38,7 @@ PROJECT_NAME = Blender
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = V3.3
|
||||
PROJECT_NUMBER = V3.2
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
@@ -11,6 +11,8 @@ where <path-to-blender> is the path to the Blender executable,
|
||||
and <output-filename> is where to write the generated man page.
|
||||
'''
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
|
@@ -10,7 +10,7 @@ Notes:
|
||||
|
||||
- Temporary context overrides may be nested, when this is done, members will be added to the existing overrides.
|
||||
|
||||
- Context members are restored outside the scope of the context-manager.
|
||||
- Context members are restored outside the scope of the context.
|
||||
The only exception to this is when the data is no longer available.
|
||||
|
||||
In the event windowing data was removed (for example), the state of the context is left as-is.
|
||||
|
@@ -1,46 +0,0 @@
|
||||
"""
|
||||
Image Data
|
||||
++++++++++
|
||||
|
||||
The Image data-block is a shallow wrapper around image or video file(s)
|
||||
(on disk, as packed data, or generated).
|
||||
|
||||
All actual data like the pixel buffer, size, resolution etc. is
|
||||
cached in an :class:`imbuf.types.ImBuf` image buffer (or several buffers
|
||||
in some cases, like UDIM textures, multi-views, animations...).
|
||||
|
||||
Several properties and functions of the Image data-block are then actually
|
||||
using/modifying its image buffer, and not the Image data-block itself.
|
||||
|
||||
.. warning::
|
||||
|
||||
One key limitation is that image buffers are not shared between different
|
||||
Image data-blocks, and they are not duplicated when copying an image.
|
||||
|
||||
So until a modified image buffer is saved on disk, duplicating its Image
|
||||
data-block will not propagate the underlying buffer changes to the new Image.
|
||||
|
||||
|
||||
This example script generates an Image data-block with a given size,
|
||||
change its first pixel, rescale it, and duplicates the image.
|
||||
|
||||
The duplicated image still has the same size and colors as the original image
|
||||
at its creation, all editing in the original image's buffer is 'lost' in its copy.
|
||||
"""
|
||||
|
||||
import bpy
|
||||
|
||||
image_src = bpy.data.images.new('src', 1024, 102)
|
||||
print(image_src.size)
|
||||
print(image_src.pixels[0:4])
|
||||
|
||||
image_src.scale(1024, 720)
|
||||
image_src.pixels[0:4] = (0.5, 0.5, 0.5, 0.5)
|
||||
image_src.update()
|
||||
print(image_src.size)
|
||||
print(image_src.pixels[0:4])
|
||||
|
||||
image_dest = image_src.copy()
|
||||
image_dest.update()
|
||||
print(image_dest.size)
|
||||
print(image_dest.pixels[0:4])
|
@@ -29,36 +29,3 @@ def draw():
|
||||
|
||||
|
||||
bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_PIXEL')
|
||||
|
||||
"""
|
||||
3D Image
|
||||
--------
|
||||
|
||||
Similar to the 2D Image shader, but works with 3D positions for the image vertices.
|
||||
To use this example you have to provide an image that should be displayed.
|
||||
"""
|
||||
import bpy
|
||||
import gpu
|
||||
from gpu_extras.batch import batch_for_shader
|
||||
|
||||
IMAGE_NAME = "Untitled"
|
||||
image = bpy.data.images[IMAGE_NAME]
|
||||
texture = gpu.texture.from_image(image)
|
||||
|
||||
shader = gpu.shader.from_builtin('3D_IMAGE')
|
||||
batch = batch_for_shader(
|
||||
shader, 'TRIS',
|
||||
{
|
||||
"pos": ((0, 0, 0), (0, 1, 1), (1, 1, 1), (1, 1, 1), (1, 0, 0), (0, 0, 0)),
|
||||
"texCoord": ((0, 0), (0, 1), (1, 1), (1, 1), (1, 0), (0, 0)),
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
def draw():
|
||||
shader.bind()
|
||||
shader.uniform_sampler("image", texture)
|
||||
batch.draw(shader)
|
||||
|
||||
|
||||
bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_VIEW')
|
||||
|
@@ -43,7 +43,7 @@ with offscreen.bind():
|
||||
offscreen.free()
|
||||
|
||||
|
||||
if IMAGE_NAME not in bpy.data.images:
|
||||
if not IMAGE_NAME in bpy.data.images:
|
||||
bpy.data.images.new(IMAGE_NAME, WIDTH, HEIGHT)
|
||||
image = bpy.data.images[IMAGE_NAME]
|
||||
image.scale(WIDTH, HEIGHT)
|
||||
|
@@ -1,12 +1,12 @@
|
||||
sphinx==5.0.1
|
||||
sphinx==4.1.1
|
||||
|
||||
# Sphinx dependencies that are important
|
||||
Jinja2==3.1.2
|
||||
Pygments==2.12.0
|
||||
Jinja2==3.0.1
|
||||
Pygments==2.10.0
|
||||
docutils==0.17.1
|
||||
snowballstemmer==2.2.0
|
||||
babel==2.10.1
|
||||
requests==2.27.1
|
||||
snowballstemmer==2.1.0
|
||||
babel==2.9.1
|
||||
requests==2.26.0
|
||||
|
||||
# Only needed to match the theme used for the official documentation.
|
||||
# Without this theme, the default theme will be used.
|
||||
|
@@ -4,12 +4,6 @@ OpenGL Wrapper (bgl)
|
||||
|
||||
.. module:: bgl
|
||||
|
||||
.. warning::
|
||||
|
||||
This module is deprecated and will be removed in a future release,
|
||||
when OpenGL is replaced by Metal and Vulkan.
|
||||
Use the graphics API independent :mod:`gpu` module instead.
|
||||
|
||||
This module wraps OpenGL constants and functions, making them available from
|
||||
within Blender Python.
|
||||
|
||||
|
@@ -40,6 +40,15 @@ As well as pep8 we have additional conventions used for Blender Python scripts:
|
||||
- pep8 also defines that lines should not exceed 79 characters,
|
||||
we have decided that this is too restrictive so it is optional per script.
|
||||
|
||||
Periodically we run checks for pep8 compliance on Blender scripts,
|
||||
for scripts to be included in this check add this line as a comment at the top of the script:
|
||||
|
||||
``# <pep8 compliant>``
|
||||
|
||||
To enable line length checks use this instead:
|
||||
|
||||
``# <pep8-80 compliant>``
|
||||
|
||||
|
||||
User Interface Layout
|
||||
=====================
|
||||
|
@@ -1,5 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
# This is a quite stupid script which extracts bmesh api docs from
|
||||
# 'bmesh_opdefines.c' in order to avoid having to add a lot of introspection
|
||||
# data access into the api.
|
||||
|
@@ -1,5 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
"""
|
||||
Dump the python API into a text file so we can generate changelogs.
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
bpy_types_Operator_bl_property__doc__ = (
|
||||
"""
|
||||
The name of a property to use as this operators primary property.
|
||||
|
@@ -1,3 +1,10 @@
|
||||
/* T76453: Prevent Long enum lists */
|
||||
.field-list > dd p {
|
||||
max-height: 245px;
|
||||
overflow-y: auto !important;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
/* Hide home icon in search area */
|
||||
.wy-side-nav-search > a:hover {background: none; opacity: 0.9}
|
||||
.wy-side-nav-search > a.icon::before {content: none}
|
||||
|
68
extern/audaspace/CMakeLists.txt
vendored
68
extern/audaspace/CMakeLists.txt
vendored
@@ -450,11 +450,7 @@ if(WITH_COREAUDIO)
|
||||
if(WITH_STRICT_DEPENDENCIES)
|
||||
message(FATAL_ERROR "CoreAudio not found!")
|
||||
else()
|
||||
if(AUDASPACE_STANDALONE)
|
||||
set(WITH_COREAUDIO FALSE CACHE BOOL "Build With CoreAudio" FORCE)
|
||||
else()
|
||||
set(WITH_COREAUDIO FALSE)
|
||||
endif()
|
||||
set(WITH_COREAUDIO FALSE CACHE BOOL "Build With CoreAudio" FORCE)
|
||||
message(WARNING "CoreAudio not found, plugin will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
@@ -491,11 +487,7 @@ if(WITH_FFMPEG)
|
||||
list(APPEND DLLS ${FFMPEG_DLLS})
|
||||
endif()
|
||||
else()
|
||||
if(AUDASPACE_STANDALONE)
|
||||
set(WITH_FFMPEG FALSE CACHE BOOL "Build With FFMPEG" FORCE)
|
||||
else()
|
||||
set(WITH_FFMPEG FALSE)
|
||||
endif()
|
||||
set(WITH_FFMPEG FALSE CACHE BOOL "Build With FFMPEG" FORCE)
|
||||
message(WARNING "FFMPEG not found, plugin will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
@@ -544,11 +536,7 @@ if(WITH_FFTW)
|
||||
list(APPEND DLLS ${FFTW_DLLS})
|
||||
endif()
|
||||
else()
|
||||
if(AUDASPACE_STANDALONE)
|
||||
set(WITH_FFTW FALSE CACHE BOOL "Build With FFTW" FORCE)
|
||||
else()
|
||||
set(WITH_FFTW FALSE)
|
||||
endif()
|
||||
set(WITH_FFTW FALSE CACHE BOOL "Build With FFTW" FORCE)
|
||||
message(WARNING "FFTW not found, convolution functionality will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
@@ -591,11 +579,7 @@ if(WITH_JACK)
|
||||
list(APPEND DLLS ${JACK_DLLS})
|
||||
endif()
|
||||
else()
|
||||
if(AUDASPACE_STANDALONE)
|
||||
set(WITH_JACK FALSE CACHE BOOL "Build With JACK" FORCE)
|
||||
else()
|
||||
set(WITH_JACK FALSE)
|
||||
endif()
|
||||
set(WITH_JACK FALSE CACHE BOOL "Build With JACK" FORCE)
|
||||
message(WARNING "JACK not found, plugin will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
@@ -631,11 +615,7 @@ if(WITH_LIBSNDFILE)
|
||||
list(APPEND DLLS ${LIBSNDFILE_DLLS})
|
||||
endif()
|
||||
else()
|
||||
if(AUDASPACE_STANDALONE)
|
||||
set(WITH_LIBSNDFILE FALSE CACHE BOOL "Build With LibSndFile" FORCE)
|
||||
else()
|
||||
set(WITH_LIBSNDFILE FALSE)
|
||||
endif()
|
||||
set(WITH_LIBSNDFILE FALSE CACHE BOOL "Build With LibSndFile" FORCE)
|
||||
message(WARNING "LibSndFile not found, plugin will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
@@ -669,11 +649,7 @@ if(WITH_OPENAL)
|
||||
list(APPEND DLLS ${OPENAL_DLLS})
|
||||
endif()
|
||||
else()
|
||||
if(AUDASPACE_STANDALONE)
|
||||
set(WITH_OPENAL FALSE CACHE BOOL "Build With OpenAL" FORCE)
|
||||
else()
|
||||
set(WITH_OPENAL FALSE)
|
||||
endif()
|
||||
set(WITH_OPENAL FALSE CACHE BOOL "Build With OpenAL" FORCE)
|
||||
message(WARNING "OpenAL not found, plugin will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
@@ -709,11 +685,7 @@ if(WITH_PULSEAUDIO)
|
||||
list(APPEND STATIC_PLUGINS PulseAudioDevice)
|
||||
endif()
|
||||
else()
|
||||
if(AUDASPACE_STANDALONE)
|
||||
set(WITH_PULSEAUDIO FALSE CACHE BOOL "Build With PulseAudio" FORCE)
|
||||
else()
|
||||
set(WITH_PULSEAUDIO FALSE)
|
||||
endif()
|
||||
set(WITH_PULSEAUDIO FALSE CACHE BOOL "Build With PulseAudio" FORCE)
|
||||
message(WARNING "PulseAudio not found, plugin will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
@@ -744,12 +716,8 @@ if(WITH_PYTHON)
|
||||
list(APPEND DLLS ${PYTHON_DLLS})
|
||||
endif()
|
||||
else()
|
||||
if(AUDASPACE_STANDALONE)
|
||||
set(WITH_PYTHON FALSE CACHE BOOL "Build With Python Library" FORCE)
|
||||
else()
|
||||
set(WITH_PYTHON FALSE)
|
||||
endif()
|
||||
message(WARNING "Python & NumPy libraries not found, language binding will not be built.")
|
||||
set(WITH_PYTHON FALSE CACHE BOOL "Build With Python Library" FORCE)
|
||||
message(WARNING "Python libraries not found, language binding will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -791,11 +759,7 @@ if(WITH_SDL)
|
||||
list(APPEND DLLS ${SDL_DLLS})
|
||||
endif()
|
||||
else()
|
||||
if(AUDASPACE_STANDALONE)
|
||||
set(WITH_SDL FALSE CACHE BOOL "Build With SDL" FORCE)
|
||||
else()
|
||||
set(WITH_SDL FALSE)
|
||||
endif()
|
||||
set(WITH_SDL FALSE CACHE BOOL "Build With SDL" FORCE)
|
||||
message(WARNING "SDL not found, plugin will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
@@ -1152,11 +1116,7 @@ if(WITH_DOCS)
|
||||
|
||||
add_custom_target(audaspace_doc ALL ${DOXYGEN_EXECUTABLE} Doxyfile COMMENT "Building C++ HTML documentation with Doxygen.")
|
||||
else()
|
||||
if(AUDASPACE_STANDALONE)
|
||||
set(WITH_DOCS FALSE CACHE BOOL "Build C++ HTML Documentation with Doxygen" FORCE)
|
||||
else()
|
||||
set(WITH_DOCS FALSE)
|
||||
endif()
|
||||
set(WITH_DOCS FALSE CACHE BOOL "Build C++ HTML Documentation with Doxygen" FORCE)
|
||||
message(WARNING "Doxygen (and/or dot) not found, documentation will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
@@ -1169,11 +1129,7 @@ if(WITH_BINDING_DOCS)
|
||||
|
||||
add_custom_target(bindings_doc ALL COMMAND ${PYTHON_EXECUTABLE} setup.py --build-docs ${SPHINX_EXECUTABLE} -q -b html -c "${CMAKE_CURRENT_BINARY_DIR}" -d "${CMAKE_CURRENT_BINARY_DIR}/_doctrees" "${CMAKE_CURRENT_SOURCE_DIR}/bindings/doc" "${CMAKE_CURRENT_BINARY_DIR}/doc/bindings" DEPENDS pythonmodule COMMENT "Building C/Python HTML documentation with Sphinx.")
|
||||
else()
|
||||
if(AUDASPACE_STANDALONE)
|
||||
set(WITH_BINDING_DOCS FALSE CACHE BOOL "Build C/Python HTML Documentation with Sphinx" FORCE)
|
||||
else()
|
||||
set(WITH_BINDING_DOCS FALSE)
|
||||
endif()
|
||||
set(WITH_BINDING_DOCS FALSE CACHE BOOL "Build C/Python HTML Documentation with Sphinx" FORCE)
|
||||
message(WARNING "Sphinx not found, binding documentation will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
|
10
extern/audaspace/include/util/Buffer.h
vendored
10
extern/audaspace/include/util/Buffer.h
vendored
@@ -34,7 +34,7 @@ class AUD_API Buffer
|
||||
{
|
||||
private:
|
||||
/// The size of the buffer in bytes.
|
||||
long long m_size;
|
||||
int m_size;
|
||||
|
||||
/// The pointer to the buffer memory.
|
||||
data_t* m_buffer;
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
* Creates a new buffer.
|
||||
* \param size The size of the buffer in bytes.
|
||||
*/
|
||||
Buffer(long long size = 0);
|
||||
Buffer(int size = 0);
|
||||
|
||||
/**
|
||||
* Destroys the buffer.
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
/**
|
||||
* Returns the size of the buffer in bytes.
|
||||
*/
|
||||
long long getSize() const;
|
||||
int getSize() const;
|
||||
|
||||
/**
|
||||
* Resizes the buffer.
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
* \param keep Whether to keep the old data. If the new buffer is smaller,
|
||||
* the data at the end will be lost.
|
||||
*/
|
||||
void resize(long long size, bool keep = false);
|
||||
void resize(int size, bool keep = false);
|
||||
|
||||
/**
|
||||
* Makes sure the buffer has a minimum size.
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
* \param keep Whether to keep the old data. If the new buffer is smaller,
|
||||
* the data at the end will be lost.
|
||||
*/
|
||||
void assureSize(long long size, bool keep = false);
|
||||
void assureSize(int size, bool keep = false);
|
||||
};
|
||||
|
||||
AUD_NAMESPACE_END
|
||||
|
@@ -361,7 +361,7 @@ int FFMPEGReader::read_packet(void* opaque, uint8_t* buf, int buf_size)
|
||||
{
|
||||
FFMPEGReader* reader = reinterpret_cast<FFMPEGReader*>(opaque);
|
||||
|
||||
long long size = std::min(static_cast<long long>(buf_size), reader->m_membuffer->getSize() - reader->m_membufferpos);
|
||||
int size = std::min(buf_size, reader->m_membuffer->getSize() - reader->m_membufferpos);
|
||||
|
||||
if(size < 0)
|
||||
return -1;
|
||||
|
@@ -114,7 +114,7 @@ private:
|
||||
/**
|
||||
* Reading position of the buffer.
|
||||
*/
|
||||
long long m_membufferpos;
|
||||
int m_membufferpos;
|
||||
|
||||
/**
|
||||
* Whether the audio data has to be interleaved after reading.
|
||||
|
@@ -23,9 +23,7 @@
|
||||
extern "C" {
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avio.h>
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 59
|
||||
#include <libavutil/channel_layout.h>
|
||||
#endif
|
||||
}
|
||||
|
||||
AUD_NAMESPACE_BEGIN
|
||||
@@ -400,7 +398,7 @@ FFMPEGWriter::FFMPEGWriter(std::string filename, DeviceSpecs specs, Container fo
|
||||
m_specs.rate = m_codecCtx->sample_rate;
|
||||
|
||||
#ifdef FFMPEG_OLD_CODE
|
||||
m_codecCtx->codec_id = audio_codec;
|
||||
m_codecCtx->codec_id = outputFmt->audio_codec;
|
||||
#endif
|
||||
|
||||
m_codecCtx->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||
|
8
extern/audaspace/src/util/Buffer.cpp
vendored
8
extern/audaspace/src/util/Buffer.cpp
vendored
@@ -25,7 +25,7 @@
|
||||
|
||||
AUD_NAMESPACE_BEGIN
|
||||
|
||||
Buffer::Buffer(long long size)
|
||||
Buffer::Buffer(int size)
|
||||
{
|
||||
m_size = size;
|
||||
m_buffer = (data_t*) std::malloc(size + ALIGNMENT);
|
||||
@@ -41,12 +41,12 @@ sample_t* Buffer::getBuffer() const
|
||||
return (sample_t*) ALIGN(m_buffer);
|
||||
}
|
||||
|
||||
long long Buffer::getSize() const
|
||||
int Buffer::getSize() const
|
||||
{
|
||||
return m_size;
|
||||
}
|
||||
|
||||
void Buffer::resize(long long size, bool keep)
|
||||
void Buffer::resize(int size, bool keep)
|
||||
{
|
||||
if(keep)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ void Buffer::resize(long long size, bool keep)
|
||||
m_size = size;
|
||||
}
|
||||
|
||||
void Buffer::assureSize(long long size, bool keep)
|
||||
void Buffer::assureSize(int size, bool keep)
|
||||
{
|
||||
if(m_size < size)
|
||||
resize(size, keep);
|
||||
|
18
extern/audaspace/src/util/StreamBuffer.cpp
vendored
18
extern/audaspace/src/util/StreamBuffer.cpp
vendored
@@ -18,12 +18,8 @@
|
||||
#include "util/BufferReader.h"
|
||||
#include "util/Buffer.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
// 5 sec * 48000 samples/sec * 4 bytes/sample * 6 channels
|
||||
#define BUFFER_RESIZE_BYTES 5760000
|
||||
// 90 min * 60 sec/min * 48000 samples/sec * 4 bytes/sample * 2 channels
|
||||
#define MAXIMUM_INITIAL_BUFFER_SIZE_BYTES 2073600000
|
||||
|
||||
AUD_NAMESPACE_BEGIN
|
||||
|
||||
@@ -36,15 +32,14 @@ StreamBuffer::StreamBuffer(std::shared_ptr<ISound> sound) :
|
||||
|
||||
int sample_size = AUD_SAMPLE_SIZE(m_specs);
|
||||
int length;
|
||||
long long index = 0;
|
||||
int index = 0;
|
||||
bool eos = false;
|
||||
|
||||
// get an approximated size if possible
|
||||
long long size = std::min(reader->getLength(), MAXIMUM_INITIAL_BUFFER_SIZE_BYTES / sample_size);
|
||||
long long size_increase = BUFFER_RESIZE_BYTES / sample_size;
|
||||
int size = reader->getLength();
|
||||
|
||||
if(size <= 0)
|
||||
size = size_increase;
|
||||
size = BUFFER_RESIZE_BYTES / sample_size;
|
||||
else
|
||||
size += m_specs.rate;
|
||||
|
||||
@@ -52,16 +47,13 @@ StreamBuffer::StreamBuffer(std::shared_ptr<ISound> sound) :
|
||||
while(!eos)
|
||||
{
|
||||
// increase
|
||||
m_buffer->resize(static_cast<long long>(size) * sample_size, true);
|
||||
m_buffer->resize(size*sample_size, true);
|
||||
|
||||
// read more
|
||||
length = size-index;
|
||||
reader->read(length, eos, m_buffer->getBuffer() + index * m_specs.channels);
|
||||
if(index == m_buffer->getSize() / sample_size)
|
||||
{
|
||||
size += size_increase;
|
||||
size_increase <<= 1;
|
||||
}
|
||||
size += BUFFER_RESIZE_BYTES / sample_size;
|
||||
index += length;
|
||||
}
|
||||
|
||||
|
661
extern/ceres/CMakeLists.txt
vendored
661
extern/ceres/CMakeLists.txt
vendored
@@ -1,11 +1,16 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright 2012 Blender Foundation. All rights reserved.
|
||||
|
||||
# NOTE: This file is automatically generated by bundle.sh script
|
||||
# If you're doing changes in this file, please update template
|
||||
# in that script too
|
||||
|
||||
set(INC
|
||||
.
|
||||
include
|
||||
internal
|
||||
config
|
||||
../gflags/src
|
||||
)
|
||||
|
||||
set(INC_SYS
|
||||
@@ -15,296 +20,279 @@ set(INC_SYS
|
||||
)
|
||||
|
||||
set(SRC
|
||||
include/ceres/autodiff_cost_function.h
|
||||
include/ceres/autodiff_first_order_function.h
|
||||
include/ceres/autodiff_local_parameterization.h
|
||||
include/ceres/autodiff_manifold.h
|
||||
include/ceres/c_api.h
|
||||
include/ceres/ceres.h
|
||||
include/ceres/conditioned_cost_function.h
|
||||
include/ceres/context.h
|
||||
include/ceres/cost_function.h
|
||||
include/ceres/cost_function_to_functor.h
|
||||
include/ceres/covariance.h
|
||||
include/ceres/crs_matrix.h
|
||||
include/ceres/cubic_interpolation.h
|
||||
include/ceres/dynamic_autodiff_cost_function.h
|
||||
include/ceres/dynamic_cost_function.h
|
||||
include/ceres/dynamic_cost_function_to_functor.h
|
||||
include/ceres/dynamic_numeric_diff_cost_function.h
|
||||
include/ceres/evaluation_callback.h
|
||||
include/ceres/first_order_function.h
|
||||
include/ceres/gradient_checker.h
|
||||
include/ceres/gradient_problem.h
|
||||
include/ceres/gradient_problem_solver.h
|
||||
include/ceres/iteration_callback.h
|
||||
include/ceres/jet.h
|
||||
include/ceres/jet_fwd.h
|
||||
include/ceres/line_manifold.h
|
||||
include/ceres/local_parameterization.h
|
||||
include/ceres/loss_function.h
|
||||
include/ceres/manifold.h
|
||||
include/ceres/manifold_test_utils.h
|
||||
include/ceres/normal_prior.h
|
||||
include/ceres/numeric_diff_cost_function.h
|
||||
include/ceres/numeric_diff_first_order_function.h
|
||||
include/ceres/numeric_diff_options.h
|
||||
include/ceres/ordered_groups.h
|
||||
include/ceres/problem.h
|
||||
include/ceres/product_manifold.h
|
||||
include/ceres/rotation.h
|
||||
include/ceres/sized_cost_function.h
|
||||
include/ceres/solver.h
|
||||
include/ceres/sphere_manifold.h
|
||||
include/ceres/tiny_solver.h
|
||||
include/ceres/tiny_solver_autodiff_function.h
|
||||
include/ceres/tiny_solver_cost_function_adapter.h
|
||||
include/ceres/types.h
|
||||
include/ceres/version.h
|
||||
internal/ceres/accelerate_sparse.cc
|
||||
internal/ceres/array_utils.cc
|
||||
internal/ceres/blas.cc
|
||||
internal/ceres/block_evaluate_preparer.cc
|
||||
internal/ceres/block_jacobian_writer.cc
|
||||
internal/ceres/block_jacobi_preconditioner.cc
|
||||
internal/ceres/block_random_access_dense_matrix.cc
|
||||
internal/ceres/block_random_access_diagonal_matrix.cc
|
||||
internal/ceres/block_random_access_matrix.cc
|
||||
internal/ceres/block_random_access_sparse_matrix.cc
|
||||
internal/ceres/block_sparse_matrix.cc
|
||||
internal/ceres/block_structure.cc
|
||||
internal/ceres/callbacks.cc
|
||||
internal/ceres/canonical_views_clustering.cc
|
||||
internal/ceres/c_api.cc
|
||||
internal/ceres/cgnr_solver.cc
|
||||
internal/ceres/compressed_col_sparse_matrix_utils.cc
|
||||
internal/ceres/compressed_row_jacobian_writer.cc
|
||||
internal/ceres/compressed_row_sparse_matrix.cc
|
||||
internal/ceres/conditioned_cost_function.cc
|
||||
internal/ceres/conjugate_gradients_solver.cc
|
||||
internal/ceres/context.cc
|
||||
internal/ceres/context_impl.cc
|
||||
internal/ceres/coordinate_descent_minimizer.cc
|
||||
internal/ceres/corrector.cc
|
||||
internal/ceres/covariance.cc
|
||||
internal/ceres/covariance_impl.cc
|
||||
internal/ceres/cxsparse.cc
|
||||
internal/ceres/dense_normal_cholesky_solver.cc
|
||||
internal/ceres/dense_qr_solver.cc
|
||||
internal/ceres/dense_sparse_matrix.cc
|
||||
internal/ceres/detect_structure.cc
|
||||
internal/ceres/dogleg_strategy.cc
|
||||
internal/ceres/dynamic_compressed_row_jacobian_writer.cc
|
||||
internal/ceres/dynamic_compressed_row_sparse_matrix.cc
|
||||
internal/ceres/dynamic_sparse_normal_cholesky_solver.cc
|
||||
internal/ceres/eigensparse.cc
|
||||
internal/ceres/evaluator.cc
|
||||
internal/ceres/file.cc
|
||||
internal/ceres/float_cxsparse.cc
|
||||
internal/ceres/float_suitesparse.cc
|
||||
internal/ceres/function_sample.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_d_d_d.cc
|
||||
internal/ceres/generated/schur_eliminator_d_d_d.cc
|
||||
internal/ceres/gradient_checker.cc
|
||||
internal/ceres/gradient_checking_cost_function.cc
|
||||
internal/ceres/gradient_problem.cc
|
||||
internal/ceres/gradient_problem_solver.cc
|
||||
internal/ceres/implicit_schur_complement.cc
|
||||
internal/ceres/inner_product_computer.cc
|
||||
internal/ceres/is_close.cc
|
||||
internal/ceres/iterative_refiner.cc
|
||||
internal/ceres/iterative_schur_complement_solver.cc
|
||||
internal/ceres/lapack.cc
|
||||
internal/ceres/levenberg_marquardt_strategy.cc
|
||||
internal/ceres/linear_least_squares_problems.cc
|
||||
internal/ceres/linear_operator.cc
|
||||
internal/ceres/linear_solver.cc
|
||||
internal/ceres/line_search.cc
|
||||
internal/ceres/line_search_direction.cc
|
||||
internal/ceres/line_search_minimizer.cc
|
||||
internal/ceres/line_search_preprocessor.cc
|
||||
internal/ceres/local_parameterization.cc
|
||||
internal/ceres/loss_function.cc
|
||||
internal/ceres/low_rank_inverse_hessian.cc
|
||||
internal/ceres/minimizer.cc
|
||||
internal/ceres/normal_prior.cc
|
||||
internal/ceres/parallel_for_cxx.cc
|
||||
internal/ceres/parallel_for_nothreads.cc
|
||||
internal/ceres/parallel_for_openmp.cc
|
||||
internal/ceres/parallel_utils.cc
|
||||
internal/ceres/parameter_block_ordering.cc
|
||||
internal/ceres/partitioned_matrix_view.cc
|
||||
internal/ceres/polynomial.cc
|
||||
internal/ceres/preconditioner.cc
|
||||
internal/ceres/preprocessor.cc
|
||||
internal/ceres/problem.cc
|
||||
internal/ceres/problem_impl.cc
|
||||
internal/ceres/program.cc
|
||||
internal/ceres/reorder_program.cc
|
||||
internal/ceres/residual_block.cc
|
||||
internal/ceres/residual_block_utils.cc
|
||||
internal/ceres/schur_complement_solver.cc
|
||||
internal/ceres/schur_eliminator.cc
|
||||
internal/ceres/schur_jacobi_preconditioner.cc
|
||||
internal/ceres/schur_templates.cc
|
||||
internal/ceres/scratch_evaluate_preparer.cc
|
||||
internal/ceres/single_linkage_clustering.cc
|
||||
internal/ceres/solver.cc
|
||||
internal/ceres/solver_utils.cc
|
||||
internal/ceres/sparse_cholesky.cc
|
||||
internal/ceres/sparse_matrix.cc
|
||||
internal/ceres/sparse_normal_cholesky_solver.cc
|
||||
internal/ceres/split.cc
|
||||
internal/ceres/stringprintf.cc
|
||||
internal/ceres/subset_preconditioner.cc
|
||||
internal/ceres/suitesparse.cc
|
||||
internal/ceres/thread_pool.cc
|
||||
internal/ceres/thread_token_provider.cc
|
||||
internal/ceres/triplet_sparse_matrix.cc
|
||||
internal/ceres/trust_region_minimizer.cc
|
||||
internal/ceres/trust_region_preprocessor.cc
|
||||
internal/ceres/trust_region_step_evaluator.cc
|
||||
internal/ceres/trust_region_strategy.cc
|
||||
internal/ceres/types.cc
|
||||
internal/ceres/visibility_based_preconditioner.cc
|
||||
internal/ceres/visibility.cc
|
||||
internal/ceres/wall_time.cc
|
||||
|
||||
include/ceres/internal/array_selector.h
|
||||
include/ceres/internal/autodiff.h
|
||||
include/ceres/internal/disable_warnings.h
|
||||
include/ceres/internal/eigen.h
|
||||
include/ceres/internal/fixed_array.h
|
||||
include/ceres/internal/householder_vector.h
|
||||
include/ceres/internal/integer_sequence_algorithm.h
|
||||
include/ceres/internal/jet_traits.h
|
||||
include/ceres/internal/line_parameterization.h
|
||||
include/ceres/internal/memory.h
|
||||
include/ceres/internal/numeric_diff.h
|
||||
include/ceres/internal/parameter_dims.h
|
||||
include/ceres/internal/port.h
|
||||
include/ceres/internal/reenable_warnings.h
|
||||
include/ceres/internal/sphere_manifold_functions.h
|
||||
include/ceres/internal/variadic_evaluate.h
|
||||
|
||||
internal/ceres/accelerate_sparse.cc
|
||||
internal/ceres/accelerate_sparse.h
|
||||
internal/ceres/array_utils.cc
|
||||
internal/ceres/array_utils.h
|
||||
internal/ceres/block_evaluate_preparer.cc
|
||||
internal/ceres/block_evaluate_preparer.h
|
||||
internal/ceres/block_jacobi_preconditioner.cc
|
||||
internal/ceres/block_jacobi_preconditioner.h
|
||||
internal/ceres/block_jacobian_writer.cc
|
||||
internal/ceres/block_jacobian_writer.h
|
||||
internal/ceres/block_random_access_dense_matrix.cc
|
||||
internal/ceres/block_random_access_dense_matrix.h
|
||||
internal/ceres/block_random_access_diagonal_matrix.cc
|
||||
internal/ceres/block_random_access_diagonal_matrix.h
|
||||
internal/ceres/block_random_access_matrix.cc
|
||||
internal/ceres/block_random_access_matrix.h
|
||||
internal/ceres/block_random_access_sparse_matrix.cc
|
||||
internal/ceres/block_random_access_sparse_matrix.h
|
||||
internal/ceres/block_sparse_matrix.cc
|
||||
internal/ceres/block_sparse_matrix.h
|
||||
internal/ceres/block_structure.cc
|
||||
internal/ceres/block_structure.h
|
||||
internal/ceres/c_api.cc
|
||||
internal/ceres/callbacks.cc
|
||||
internal/ceres/callbacks.h
|
||||
internal/ceres/canonical_views_clustering.cc
|
||||
internal/ceres/canonical_views_clustering.h
|
||||
internal/ceres/casts.h
|
||||
internal/ceres/cgnr_linear_operator.h
|
||||
internal/ceres/cgnr_solver.cc
|
||||
internal/ceres/cgnr_solver.h
|
||||
internal/ceres/compressed_col_sparse_matrix_utils.cc
|
||||
internal/ceres/compressed_col_sparse_matrix_utils.h
|
||||
internal/ceres/compressed_row_jacobian_writer.cc
|
||||
internal/ceres/compressed_row_jacobian_writer.h
|
||||
internal/ceres/compressed_row_sparse_matrix.cc
|
||||
internal/ceres/compressed_row_sparse_matrix.h
|
||||
internal/ceres/concurrent_queue.h
|
||||
internal/ceres/conditioned_cost_function.cc
|
||||
internal/ceres/conjugate_gradients_solver.cc
|
||||
internal/ceres/conjugate_gradients_solver.h
|
||||
internal/ceres/context.cc
|
||||
internal/ceres/context_impl.cc
|
||||
internal/ceres/context_impl.h
|
||||
internal/ceres/coordinate_descent_minimizer.cc
|
||||
internal/ceres/coordinate_descent_minimizer.h
|
||||
internal/ceres/corrector.cc
|
||||
internal/ceres/corrector.h
|
||||
internal/ceres/cost_function.cc
|
||||
internal/ceres/covariance.cc
|
||||
internal/ceres/covariance_impl.cc
|
||||
internal/ceres/covariance_impl.h
|
||||
internal/ceres/cuda_buffer.h
|
||||
internal/ceres/cxsparse.cc
|
||||
internal/ceres/cxsparse.h
|
||||
internal/ceres/dense_cholesky.cc
|
||||
internal/ceres/dense_cholesky.h
|
||||
internal/ceres/dense_jacobian_writer.h
|
||||
internal/ceres/dense_normal_cholesky_solver.cc
|
||||
internal/ceres/dense_normal_cholesky_solver.h
|
||||
internal/ceres/dense_qr.cc
|
||||
internal/ceres/dense_qr.h
|
||||
internal/ceres/dense_qr_solver.cc
|
||||
internal/ceres/dense_qr_solver.h
|
||||
internal/ceres/dense_sparse_matrix.cc
|
||||
internal/ceres/dense_sparse_matrix.h
|
||||
internal/ceres/detect_structure.cc
|
||||
internal/ceres/detect_structure.h
|
||||
internal/ceres/dogleg_strategy.cc
|
||||
internal/ceres/dogleg_strategy.h
|
||||
internal/ceres/dynamic_compressed_row_finalizer.h
|
||||
internal/ceres/dynamic_compressed_row_jacobian_writer.cc
|
||||
internal/ceres/dynamic_compressed_row_jacobian_writer.h
|
||||
internal/ceres/dynamic_compressed_row_sparse_matrix.cc
|
||||
internal/ceres/dynamic_compressed_row_sparse_matrix.h
|
||||
internal/ceres/dynamic_sparse_normal_cholesky_solver.cc
|
||||
internal/ceres/dynamic_sparse_normal_cholesky_solver.h
|
||||
internal/ceres/eigensparse.cc
|
||||
internal/ceres/eigensparse.h
|
||||
internal/ceres/evaluation_callback.cc
|
||||
internal/ceres/evaluator.cc
|
||||
internal/ceres/evaluator.h
|
||||
internal/ceres/execution_summary.h
|
||||
internal/ceres/file.cc
|
||||
internal/ceres/file.h
|
||||
internal/ceres/first_order_function.cc
|
||||
internal/ceres/float_cxsparse.cc
|
||||
internal/ceres/float_cxsparse.h
|
||||
internal/ceres/float_suitesparse.cc
|
||||
internal/ceres/float_suitesparse.h
|
||||
internal/ceres/function_sample.cc
|
||||
internal/ceres/function_sample.h
|
||||
internal/ceres/gradient_checker.cc
|
||||
internal/ceres/gradient_checking_cost_function.cc
|
||||
internal/ceres/gradient_checking_cost_function.h
|
||||
internal/ceres/gradient_problem.cc
|
||||
internal/ceres/gradient_problem_evaluator.h
|
||||
internal/ceres/gradient_problem_solver.cc
|
||||
internal/ceres/graph.h
|
||||
internal/ceres/graph_algorithms.h
|
||||
internal/ceres/implicit_schur_complement.cc
|
||||
internal/ceres/implicit_schur_complement.h
|
||||
internal/ceres/inner_product_computer.cc
|
||||
internal/ceres/inner_product_computer.h
|
||||
internal/ceres/invert_psd_matrix.h
|
||||
internal/ceres/is_close.cc
|
||||
internal/ceres/is_close.h
|
||||
internal/ceres/iteration_callback.cc
|
||||
internal/ceres/iterative_refiner.cc
|
||||
internal/ceres/iterative_refiner.h
|
||||
internal/ceres/iterative_schur_complement_solver.cc
|
||||
internal/ceres/iterative_schur_complement_solver.h
|
||||
internal/ceres/levenberg_marquardt_strategy.cc
|
||||
internal/ceres/levenberg_marquardt_strategy.h
|
||||
internal/ceres/line_search.cc
|
||||
internal/ceres/line_search.h
|
||||
internal/ceres/line_search_direction.cc
|
||||
internal/ceres/line_search_direction.h
|
||||
internal/ceres/line_search_minimizer.cc
|
||||
internal/ceres/line_search_minimizer.h
|
||||
internal/ceres/line_search_preprocessor.cc
|
||||
internal/ceres/line_search_preprocessor.h
|
||||
internal/ceres/linear_least_squares_problems.cc
|
||||
internal/ceres/linear_least_squares_problems.h
|
||||
internal/ceres/linear_operator.cc
|
||||
internal/ceres/linear_operator.h
|
||||
internal/ceres/linear_solver.cc
|
||||
internal/ceres/linear_solver.h
|
||||
internal/ceres/local_parameterization.cc
|
||||
internal/ceres/loss_function.cc
|
||||
internal/ceres/low_rank_inverse_hessian.cc
|
||||
internal/ceres/low_rank_inverse_hessian.h
|
||||
internal/ceres/manifold.cc
|
||||
internal/ceres/manifold_adapter.h
|
||||
internal/ceres/map_util.h
|
||||
internal/ceres/minimizer.cc
|
||||
internal/ceres/minimizer.h
|
||||
internal/ceres/normal_prior.cc
|
||||
internal/ceres/pair_hash.h
|
||||
internal/ceres/parallel_for.h
|
||||
internal/ceres/parallel_for_cxx.cc
|
||||
internal/ceres/parallel_for_nothreads.cc
|
||||
internal/ceres/parallel_for_openmp.cc
|
||||
internal/ceres/parallel_utils.cc
|
||||
internal/ceres/parallel_utils.h
|
||||
internal/ceres/parameter_block.h
|
||||
internal/ceres/parameter_block_ordering.cc
|
||||
internal/ceres/parameter_block_ordering.h
|
||||
internal/ceres/partitioned_matrix_view.cc
|
||||
internal/ceres/partitioned_matrix_view.h
|
||||
internal/ceres/partitioned_matrix_view_impl.h
|
||||
internal/ceres/polynomial.cc
|
||||
internal/ceres/polynomial.h
|
||||
internal/ceres/preconditioner.cc
|
||||
internal/ceres/preconditioner.h
|
||||
internal/ceres/preprocessor.cc
|
||||
internal/ceres/preprocessor.h
|
||||
internal/ceres/problem.cc
|
||||
internal/ceres/problem_impl.cc
|
||||
internal/ceres/problem_impl.h
|
||||
internal/ceres/program.cc
|
||||
internal/ceres/program.h
|
||||
internal/ceres/program_evaluator.h
|
||||
internal/ceres/random.h
|
||||
internal/ceres/reorder_program.cc
|
||||
internal/ceres/reorder_program.h
|
||||
internal/ceres/residual_block.cc
|
||||
internal/ceres/residual_block.h
|
||||
internal/ceres/residual_block_utils.cc
|
||||
internal/ceres/residual_block_utils.h
|
||||
internal/ceres/schur_complement_solver.cc
|
||||
internal/ceres/schur_complement_solver.h
|
||||
internal/ceres/schur_eliminator.cc
|
||||
internal/ceres/schur_eliminator.h
|
||||
internal/ceres/schur_eliminator_impl.h
|
||||
internal/ceres/schur_jacobi_preconditioner.cc
|
||||
internal/ceres/schur_jacobi_preconditioner.h
|
||||
internal/ceres/schur_templates.cc
|
||||
internal/ceres/schur_templates.h
|
||||
internal/ceres/scoped_thread_token.h
|
||||
internal/ceres/scratch_evaluate_preparer.cc
|
||||
internal/ceres/scratch_evaluate_preparer.h
|
||||
internal/ceres/single_linkage_clustering.cc
|
||||
internal/ceres/single_linkage_clustering.h
|
||||
internal/ceres/small_blas.h
|
||||
internal/ceres/small_blas_generic.h
|
||||
internal/ceres/solver.cc
|
||||
internal/ceres/solver_utils.cc
|
||||
internal/ceres/solver_utils.h
|
||||
internal/ceres/sparse_cholesky.cc
|
||||
internal/ceres/sparse_cholesky.h
|
||||
internal/ceres/sparse_matrix.cc
|
||||
internal/ceres/sparse_matrix.h
|
||||
internal/ceres/sparse_normal_cholesky_solver.cc
|
||||
internal/ceres/sparse_normal_cholesky_solver.h
|
||||
internal/ceres/stl_util.h
|
||||
internal/ceres/stringprintf.cc
|
||||
internal/ceres/stringprintf.h
|
||||
internal/ceres/subset_preconditioner.cc
|
||||
internal/ceres/subset_preconditioner.h
|
||||
internal/ceres/suitesparse.cc
|
||||
internal/ceres/suitesparse.h
|
||||
internal/ceres/thread_pool.cc
|
||||
internal/ceres/thread_pool.h
|
||||
internal/ceres/thread_token_provider.cc
|
||||
internal/ceres/thread_token_provider.h
|
||||
internal/ceres/triplet_sparse_matrix.cc
|
||||
internal/ceres/triplet_sparse_matrix.h
|
||||
internal/ceres/trust_region_minimizer.cc
|
||||
internal/ceres/trust_region_minimizer.h
|
||||
internal/ceres/trust_region_preprocessor.cc
|
||||
internal/ceres/trust_region_preprocessor.h
|
||||
internal/ceres/trust_region_step_evaluator.cc
|
||||
internal/ceres/trust_region_step_evaluator.h
|
||||
internal/ceres/trust_region_strategy.cc
|
||||
internal/ceres/trust_region_strategy.h
|
||||
internal/ceres/types.cc
|
||||
internal/ceres/visibility.cc
|
||||
internal/ceres/visibility.h
|
||||
internal/ceres/visibility_based_preconditioner.cc
|
||||
internal/ceres/visibility_based_preconditioner.h
|
||||
internal/ceres/wall_time.cc
|
||||
internal/ceres/wall_time.h
|
||||
|
||||
internal/ceres/generated/partitioned_matrix_view_d_d_d.cc
|
||||
internal/ceres/generated/schur_eliminator_d_d_d.cc
|
||||
include/ceres/autodiff_cost_function.h
|
||||
include/ceres/autodiff_first_order_function.h
|
||||
include/ceres/autodiff_local_parameterization.h
|
||||
include/ceres/c_api.h
|
||||
include/ceres/ceres.h
|
||||
include/ceres/conditioned_cost_function.h
|
||||
include/ceres/context.h
|
||||
include/ceres/cost_function.h
|
||||
include/ceres/cost_function_to_functor.h
|
||||
include/ceres/covariance.h
|
||||
include/ceres/crs_matrix.h
|
||||
include/ceres/cubic_interpolation.h
|
||||
include/ceres/dynamic_autodiff_cost_function.h
|
||||
include/ceres/dynamic_cost_function.h
|
||||
include/ceres/dynamic_cost_function_to_functor.h
|
||||
include/ceres/dynamic_numeric_diff_cost_function.h
|
||||
include/ceres/evaluation_callback.h
|
||||
include/ceres/first_order_function.h
|
||||
include/ceres/gradient_checker.h
|
||||
include/ceres/gradient_problem.h
|
||||
include/ceres/gradient_problem_solver.h
|
||||
include/ceres/internal/array_selector.h
|
||||
include/ceres/internal/autodiff.h
|
||||
include/ceres/internal/disable_warnings.h
|
||||
include/ceres/internal/eigen.h
|
||||
include/ceres/internal/fixed_array.h
|
||||
include/ceres/internal/householder_vector.h
|
||||
include/ceres/internal/integer_sequence_algorithm.h
|
||||
include/ceres/internal/line_parameterization.h
|
||||
include/ceres/internal/memory.h
|
||||
include/ceres/internal/numeric_diff.h
|
||||
include/ceres/internal/parameter_dims.h
|
||||
include/ceres/internal/port.h
|
||||
include/ceres/internal/reenable_warnings.h
|
||||
include/ceres/internal/variadic_evaluate.h
|
||||
include/ceres/iteration_callback.h
|
||||
include/ceres/jet.h
|
||||
include/ceres/local_parameterization.h
|
||||
include/ceres/loss_function.h
|
||||
include/ceres/normal_prior.h
|
||||
include/ceres/numeric_diff_cost_function.h
|
||||
include/ceres/numeric_diff_options.h
|
||||
include/ceres/ordered_groups.h
|
||||
include/ceres/problem.h
|
||||
include/ceres/rotation.h
|
||||
include/ceres/sized_cost_function.h
|
||||
include/ceres/solver.h
|
||||
include/ceres/tiny_solver_autodiff_function.h
|
||||
include/ceres/tiny_solver_cost_function_adapter.h
|
||||
include/ceres/tiny_solver.h
|
||||
include/ceres/types.h
|
||||
include/ceres/version.h
|
||||
internal/ceres/accelerate_sparse.h
|
||||
internal/ceres/array_utils.h
|
||||
internal/ceres/blas.h
|
||||
internal/ceres/block_evaluate_preparer.h
|
||||
internal/ceres/block_jacobian_writer.h
|
||||
internal/ceres/block_jacobi_preconditioner.h
|
||||
internal/ceres/block_random_access_dense_matrix.h
|
||||
internal/ceres/block_random_access_diagonal_matrix.h
|
||||
internal/ceres/block_random_access_matrix.h
|
||||
internal/ceres/block_random_access_sparse_matrix.h
|
||||
internal/ceres/block_sparse_matrix.h
|
||||
internal/ceres/block_structure.h
|
||||
internal/ceres/callbacks.h
|
||||
internal/ceres/canonical_views_clustering.h
|
||||
internal/ceres/casts.h
|
||||
internal/ceres/cgnr_linear_operator.h
|
||||
internal/ceres/cgnr_solver.h
|
||||
internal/ceres/compressed_col_sparse_matrix_utils.h
|
||||
internal/ceres/compressed_row_jacobian_writer.h
|
||||
internal/ceres/compressed_row_sparse_matrix.h
|
||||
internal/ceres/concurrent_queue.h
|
||||
internal/ceres/conjugate_gradients_solver.h
|
||||
internal/ceres/context_impl.h
|
||||
internal/ceres/coordinate_descent_minimizer.h
|
||||
internal/ceres/corrector.h
|
||||
internal/ceres/covariance_impl.h
|
||||
internal/ceres/cxsparse.h
|
||||
internal/ceres/dense_jacobian_writer.h
|
||||
internal/ceres/dense_normal_cholesky_solver.h
|
||||
internal/ceres/dense_qr_solver.h
|
||||
internal/ceres/dense_sparse_matrix.h
|
||||
internal/ceres/detect_structure.h
|
||||
internal/ceres/dogleg_strategy.h
|
||||
internal/ceres/dynamic_compressed_row_finalizer.h
|
||||
internal/ceres/dynamic_compressed_row_jacobian_writer.h
|
||||
internal/ceres/dynamic_compressed_row_sparse_matrix.h
|
||||
internal/ceres/dynamic_sparse_normal_cholesky_solver.h
|
||||
internal/ceres/eigensparse.h
|
||||
internal/ceres/evaluator.h
|
||||
internal/ceres/execution_summary.h
|
||||
internal/ceres/file.h
|
||||
internal/ceres/float_cxsparse.h
|
||||
internal/ceres/float_suitesparse.h
|
||||
internal/ceres/function_sample.h
|
||||
internal/ceres/gradient_checking_cost_function.h
|
||||
internal/ceres/gradient_problem_evaluator.h
|
||||
internal/ceres/graph_algorithms.h
|
||||
internal/ceres/graph.h
|
||||
internal/ceres/implicit_schur_complement.h
|
||||
internal/ceres/inner_product_computer.h
|
||||
internal/ceres/invert_psd_matrix.h
|
||||
internal/ceres/is_close.h
|
||||
internal/ceres/iterative_refiner.h
|
||||
internal/ceres/iterative_schur_complement_solver.h
|
||||
internal/ceres/lapack.h
|
||||
internal/ceres/levenberg_marquardt_strategy.h
|
||||
internal/ceres/linear_least_squares_problems.h
|
||||
internal/ceres/linear_operator.h
|
||||
internal/ceres/linear_solver.h
|
||||
internal/ceres/line_search_direction.h
|
||||
internal/ceres/line_search.h
|
||||
internal/ceres/line_search_minimizer.h
|
||||
internal/ceres/line_search_preprocessor.h
|
||||
internal/ceres/low_rank_inverse_hessian.h
|
||||
internal/ceres/map_util.h
|
||||
internal/ceres/minimizer.h
|
||||
internal/ceres/pair_hash.h
|
||||
internal/ceres/parallel_for.h
|
||||
internal/ceres/parallel_utils.h
|
||||
internal/ceres/parameter_block.h
|
||||
internal/ceres/parameter_block_ordering.h
|
||||
internal/ceres/partitioned_matrix_view.h
|
||||
internal/ceres/partitioned_matrix_view_impl.h
|
||||
internal/ceres/polynomial.h
|
||||
internal/ceres/preconditioner.h
|
||||
internal/ceres/preprocessor.h
|
||||
internal/ceres/problem_impl.h
|
||||
internal/ceres/program_evaluator.h
|
||||
internal/ceres/program.h
|
||||
internal/ceres/random.h
|
||||
internal/ceres/reorder_program.h
|
||||
internal/ceres/residual_block.h
|
||||
internal/ceres/residual_block_utils.h
|
||||
internal/ceres/schur_complement_solver.h
|
||||
internal/ceres/schur_eliminator.h
|
||||
internal/ceres/schur_eliminator_impl.h
|
||||
internal/ceres/schur_jacobi_preconditioner.h
|
||||
internal/ceres/schur_templates.h
|
||||
internal/ceres/scoped_thread_token.h
|
||||
internal/ceres/scratch_evaluate_preparer.h
|
||||
internal/ceres/single_linkage_clustering.h
|
||||
internal/ceres/small_blas_generic.h
|
||||
internal/ceres/small_blas.h
|
||||
internal/ceres/solver_utils.h
|
||||
internal/ceres/sparse_cholesky.h
|
||||
internal/ceres/sparse_matrix.h
|
||||
internal/ceres/sparse_normal_cholesky_solver.h
|
||||
internal/ceres/split.h
|
||||
internal/ceres/stl_util.h
|
||||
internal/ceres/stringprintf.h
|
||||
internal/ceres/subset_preconditioner.h
|
||||
internal/ceres/suitesparse.h
|
||||
internal/ceres/thread_pool.h
|
||||
internal/ceres/thread_token_provider.h
|
||||
internal/ceres/triplet_sparse_matrix.h
|
||||
internal/ceres/trust_region_minimizer.h
|
||||
internal/ceres/trust_region_preprocessor.h
|
||||
internal/ceres/trust_region_step_evaluator.h
|
||||
internal/ceres/trust_region_strategy.h
|
||||
internal/ceres/visibility_based_preconditioner.h
|
||||
internal/ceres/visibility.h
|
||||
internal/ceres/wall_time.h
|
||||
)
|
||||
|
||||
set(LIB
|
||||
@@ -314,48 +302,48 @@ set(LIB
|
||||
|
||||
if(WITH_LIBMV_SCHUR_SPECIALIZATIONS)
|
||||
list(APPEND SRC
|
||||
internal/ceres/generated/partitioned_matrix_view_2_2_2.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_2_3.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_2_4.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_2_d.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_3_3.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_3_4.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_3_6.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_3_9.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_3_d.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_3.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_4.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_6.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_8.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_9.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_d.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_d_d.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_3_3_3.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_4_4_2.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_4_4_3.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_4_4_4.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_4_4_d.cc
|
||||
internal/ceres/generated/schur_eliminator_2_2_2.cc
|
||||
internal/ceres/generated/schur_eliminator_2_2_3.cc
|
||||
internal/ceres/generated/schur_eliminator_2_2_4.cc
|
||||
internal/ceres/generated/schur_eliminator_2_2_d.cc
|
||||
internal/ceres/generated/schur_eliminator_2_3_3.cc
|
||||
internal/ceres/generated/schur_eliminator_2_3_4.cc
|
||||
internal/ceres/generated/schur_eliminator_2_3_6.cc
|
||||
internal/ceres/generated/schur_eliminator_2_3_9.cc
|
||||
internal/ceres/generated/schur_eliminator_2_3_d.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_3.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_4.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_6.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_8.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_9.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_d.cc
|
||||
internal/ceres/generated/schur_eliminator_2_d_d.cc
|
||||
internal/ceres/generated/schur_eliminator_3_3_3.cc
|
||||
internal/ceres/generated/schur_eliminator_4_4_2.cc
|
||||
internal/ceres/generated/schur_eliminator_4_4_3.cc
|
||||
internal/ceres/generated/schur_eliminator_4_4_4.cc
|
||||
internal/ceres/generated/schur_eliminator_4_4_d.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_2_2.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_2_3.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_2_4.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_2_d.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_3_3.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_3_4.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_3_6.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_3_9.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_3_d.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_3.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_4.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_6.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_8.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_9.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_d.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_d_d.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_3_3_3.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_4_4_2.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_4_4_3.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_4_4_4.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_4_4_d.cc
|
||||
internal/ceres/generated/schur_eliminator_2_2_2.cc
|
||||
internal/ceres/generated/schur_eliminator_2_2_3.cc
|
||||
internal/ceres/generated/schur_eliminator_2_2_4.cc
|
||||
internal/ceres/generated/schur_eliminator_2_2_d.cc
|
||||
internal/ceres/generated/schur_eliminator_2_3_3.cc
|
||||
internal/ceres/generated/schur_eliminator_2_3_4.cc
|
||||
internal/ceres/generated/schur_eliminator_2_3_6.cc
|
||||
internal/ceres/generated/schur_eliminator_2_3_9.cc
|
||||
internal/ceres/generated/schur_eliminator_2_3_d.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_3.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_4.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_6.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_8.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_9.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_d.cc
|
||||
internal/ceres/generated/schur_eliminator_2_d_d.cc
|
||||
internal/ceres/generated/schur_eliminator_3_3_3.cc
|
||||
internal/ceres/generated/schur_eliminator_4_4_2.cc
|
||||
internal/ceres/generated/schur_eliminator_4_4_3.cc
|
||||
internal/ceres/generated/schur_eliminator_4_4_4.cc
|
||||
internal/ceres/generated/schur_eliminator_4_4_d.cc
|
||||
)
|
||||
else()
|
||||
add_definitions(-DCERES_RESTRICT_SCHUR_SPECIALIZATION)
|
||||
@@ -363,5 +351,16 @@ endif()
|
||||
|
||||
add_definitions(${GFLAGS_DEFINES})
|
||||
add_definitions(${GLOG_DEFINES})
|
||||
add_definitions(${CERES_DEFINES})
|
||||
|
||||
add_definitions(
|
||||
-DCERES_HAVE_PTHREAD
|
||||
-DCERES_NO_SUITESPARSE
|
||||
-DCERES_NO_CXSPARSE
|
||||
-DCERES_NO_LAPACK
|
||||
-DCERES_NO_ACCELERATE_SPARSE
|
||||
-DCERES_HAVE_RWLOCK
|
||||
-DCERES_USE_CXX_THREADS
|
||||
)
|
||||
|
||||
blender_add_lib(extern_ceres "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
|
596
extern/ceres/ChangeLog
vendored
Normal file
596
extern/ceres/ChangeLog
vendored
Normal file
@@ -0,0 +1,596 @@
|
||||
commit 399cda773035d99eaf1f4a129a666b3c4df9d1b1
|
||||
Author: Alex Stewart <alexs.mac@gmail.com>
|
||||
Date: Fri Oct 23 19:36:08 2020 +0100
|
||||
|
||||
Update build documentation to reflect detection of Eigen via config mode
|
||||
|
||||
Change-Id: I18d5f0fc1eb51ea630164c911d935e9bffea35ce
|
||||
|
||||
commit bb127272f9b57672bca48424f2d83bc430a46eb8
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Mon Oct 19 09:28:34 2020 -0700
|
||||
|
||||
Fix typos.
|
||||
|
||||
Contributed by Ishamis@, IanBoyanZhang@, gkrobner@ & mithunjacob@.
|
||||
|
||||
Change-Id: Iab3c19a07a6f3db2486e3557dcb55bfe5de2aee5
|
||||
|
||||
commit a0ec5c32af5c5f5a52168dc2748be910dba14810
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Sun Oct 18 15:20:36 2020 -0700
|
||||
|
||||
Update version history for 2.0.0RC2
|
||||
|
||||
Change-Id: I75b7515fbf9880bd8eaea6ecd5e72ce1ae4a3a86
|
||||
|
||||
commit 3f6d2736769044e7c08c873c41a184849eea73ab
|
||||
Author: Taylor Braun-Jones <taylor@braun-jones.org>
|
||||
Date: Tue Jan 28 12:09:30 2020 -0500
|
||||
|
||||
Unify symbol visibility configuration for all compilers
|
||||
|
||||
This makes it possible to build unit tests with shared libraries on MSVC.
|
||||
|
||||
Change-Id: I1db66a80b2c78c4f3d354e35235244d17bac9809
|
||||
|
||||
commit 29c2912ee635c77f3ddf2e382a5d6a9cf9805a3d
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Tue Oct 13 12:07:06 2020 -0700
|
||||
|
||||
Unbreak the bazel build some more
|
||||
|
||||
Change-Id: I6bbf3df977a473b9b5e16a9e59da5f535f8cdc24
|
||||
|
||||
commit bf47e1a36829f62697b930241d0a353932f34090
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Tue Oct 13 10:00:22 2020 -0700
|
||||
|
||||
Fix the Bazel build.
|
||||
|
||||
1. Fix the path to eigen, now that it uses gitlab instead of bitbucket.
|
||||
2. Remove an unrecognized compiler option.
|
||||
3. Remove an obsolete benchmark.
|
||||
|
||||
This CL only unbreaks the build, it is likely that it is still not
|
||||
at par with the cmake build.
|
||||
|
||||
https://github.com/ceres-solver/ceres-solver/issues/628
|
||||
|
||||
Change-Id: I470209cbb48b6a4f499564a86b52436e0c8d98ef
|
||||
|
||||
commit 600e8c529ebbb4bb89d5baefa3d5ab6ad923706a
|
||||
Author: Nikolaus Demmel <nikolaus@nikolaus-demmel.de>
|
||||
Date: Mon Oct 12 23:00:39 2020 +0200
|
||||
|
||||
fix minor typos
|
||||
|
||||
all timing values in the summary are initialized to -1, so the one
|
||||
+1 is likely an oversight.
|
||||
|
||||
Change-Id: Ie355f3b7da08a56d49d19ca9a5bc48fe5581dee3
|
||||
|
||||
commit bdcdcc78af61a0cb85317ebee52dc804bf4ea975
|
||||
Author: Nikolaus Demmel <nikolaus@nikolaus-demmel.de>
|
||||
Date: Mon Sep 7 01:48:50 2020 +0200
|
||||
|
||||
update docs for changed cmake usage
|
||||
|
||||
- update links to cmake docs to version 3.5
|
||||
- highlight difference between dependencies with and without custom
|
||||
find modules
|
||||
- point out removal of CERES_INCLUDE_DIRS
|
||||
- point out that TBB might be linked if SuiteSparseQR is found
|
||||
- added 'Migration' section
|
||||
- fixed typos
|
||||
|
||||
Change-Id: Icbcc0e723d11f12246fb3cf09b9d7c6206195a82
|
||||
|
||||
commit 3f69e5b36a49b44344e96a26b39693a914ba80c6
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Mon Oct 12 11:46:40 2020 -0700
|
||||
|
||||
Corrections from William Rucklidge
|
||||
|
||||
Change-Id: I0b5d4808be48f68df7829c70ec93ffa67d81315d
|
||||
|
||||
commit 8bfdb02fb18551bbd5f222c5472e45eddecd42b9
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Mon Oct 12 10:07:13 2020 -0700
|
||||
|
||||
Rewrite uses of VLOG_IF and LOG_IF.
|
||||
|
||||
VLOG_IF's evaluation order is ambiguous - does it mean
|
||||
`if (cond) VLOG(lvl)` or `if (VLOG_IS_ON(lvl) && cond) LOG(INFO)`?
|
||||
In particular, the way it works now is inconsistent with the way the
|
||||
rest of the LOG macros evaluate their arguments.
|
||||
Fixing this would be hard, and the macro's behavior would still surprise
|
||||
some people. Replacing it with an if statement is simple, clear, and unambiguous.
|
||||
|
||||
Change-Id: I97a92d17a932c0a5344a1bf98d676308793ba877
|
||||
|
||||
commit d1b35ffc161fd857c7c433574ca82aa9b2db7f98
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Mon Oct 12 10:58:05 2020 -0700
|
||||
|
||||
Corrections from William Rucklidge
|
||||
|
||||
Change-Id: Ifb50e87aa915d00f9861fe1a6da0acee11bc0a94
|
||||
|
||||
commit f34e80e91f600014a3030915cf9ea28bcbc576e7
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Thu Oct 8 12:34:53 2020 -0700
|
||||
|
||||
Add dividers between licenses.
|
||||
|
||||
Change-Id: I4e4aaa15e0621c5648550cfa622fe0a79f1f4f9f
|
||||
|
||||
commit 65c397daeca77da53d16e73720b9a17edd6757ab
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Wed Oct 7 14:34:52 2020 -0700
|
||||
|
||||
Fix formatting
|
||||
|
||||
Change-Id: Ib4ca8a097059dbb8d2f3a6a888222c0188cb126e
|
||||
|
||||
commit f63b1fea9cfa48ae4530c327b10efa4985e69631
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Wed Oct 7 14:30:54 2020 -0700
|
||||
|
||||
Add the MIT license text corresponding to the libmv derived files.
|
||||
|
||||
Change-Id: Ie72fb45ae96a7892c00411eee6873db7f0e365a8
|
||||
|
||||
commit 542613c13d8b7469822aff5eec076f2cad4507ec
|
||||
Author: Nikolaus Demmel <nikolaus@nikolaus-demmel.de>
|
||||
Date: Tue Oct 6 22:48:59 2020 +0200
|
||||
|
||||
minor formatting fix for trust_region_minimizer.cc
|
||||
|
||||
Change-Id: I18ba27825fc23dd0e9e3e15dc13fc0833db01b5b
|
||||
|
||||
commit 6d9e9843d8c61cfb04cc55b9def9518f823a592a
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Mon Sep 28 11:35:37 2020 -0700
|
||||
|
||||
Remove inclusion of ceres/eigen.h
|
||||
|
||||
The initial reason for this is because of a previous reformatting CL
|
||||
triggered a macro redefinition warning in the schur eliminator. But
|
||||
actually it was worse because the reordering had caused the macro
|
||||
definition to be ignored and caused a performance regression.
|
||||
|
||||
This simplifies the generated files, fixes some formatting errors
|
||||
and recovers the performance.
|
||||
|
||||
Change-Id: I9dbeffc38743b3f24b25843feec2e26a73188413
|
||||
|
||||
commit eafeca5dcb7af8688d40a9c14b0d2fcb856c96fc
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Mon Sep 28 11:12:59 2020 -0700
|
||||
|
||||
Fix a logging bug in TrustRegionMinimizer.
|
||||
|
||||
Upon encountering an unsuccessful step (one where the cost goes up)
|
||||
the the trust region minimizer failed to populate the gradient norm
|
||||
in the IterationSummary. This would cause the gradient norm to be
|
||||
logged as zero which is incorrect. Instead it should be the gradient
|
||||
norm at the current point.
|
||||
|
||||
This CL fixes this issue.
|
||||
|
||||
Before:
|
||||
iter cost cost_change |gradient| |step| tr_ratio tr_radius ls_iter iter_time total_time
|
||||
0 1.115206e+07 0.00e+00 1.90e+07 0.00e+00 0.00e+00 1.00e+04 0 2.72e-01 1.33e+00
|
||||
1 3.687552e+06 7.46e+06 1.84e+08 2.86e+03 6.91e-01 1.06e+04 1 1.32e+00 2.65e+00
|
||||
2 3.670266e+10 -3.67e+10 0.00e+00 3.27e+03 -1.07e+04 5.30e+03 1 7.52e-01 3.40e+00
|
||||
3 4.335397e+07 -3.97e+07 0.00e+00 2.74e+03 -1.16e+01 1.32e+03 1 7.28e-01 4.13e+00
|
||||
4 1.345488e+06 2.34e+06 4.12e+07 1.55e+03 6.87e-01 1.40e+03 1 9.31e-01 5.06e+00
|
||||
5 5.376653e+05 8.08e+05 9.99e+06 6.64e+02 7.46e-01 1.59e+03 1 9.64e-01 6.03e+00
|
||||
|
||||
After:
|
||||
iter cost cost_change |gradient| |step| tr_ratio tr_radius ls_iter iter_time total_time
|
||||
0 1.115206e+07 0.00e+00 1.90e+07 0.00e+00 0.00e+00 1.00e+04 0 2.37e-01 1.13e+00
|
||||
1 3.687552e+06 7.46e+06 1.84e+08 2.86e+03 6.91e-01 1.06e+04 1 1.08e+00 2.21e+00
|
||||
2 3.670266e+10 -3.67e+10 1.84e+08 3.27e+03 -1.07e+04 5.30e+03 1 7.50e-01 2.96e+00
|
||||
3 4.335397e+07 -3.97e+07 1.84e+08 2.74e+03 -1.16e+01 1.32e+03 1 7.13e-01 3.67e+00
|
||||
4 1.345488e+06 2.34e+06 4.12e+07 1.55e+03 6.87e-01 1.40e+03 1 9.01e-01 4.57e+00
|
||||
5 5.376653e+05 8.08e+05 9.99e+06 6.64e+02 7.46e-01 1.59e+03 1 9.36e-01 5.51e+00
|
||||
|
||||
Change-Id: Iae538fe089be07c7bb219337a6f1392f7213acfe
|
||||
|
||||
commit 1fd0be916dd4ff4241bd52264b9e9170bc7e4339
|
||||
Author: Alex Stewart <alexs.mac@gmail.com>
|
||||
Date: Mon Sep 28 18:54:33 2020 +0100
|
||||
|
||||
Fix default initialisation of IterationCallback::cost
|
||||
|
||||
Change-Id: I9f529093fc09424c90dbff8e9648b90b16990623
|
||||
|
||||
commit 137bbe845577929a87f8eef979196df6a8b30ee4
|
||||
Author: Nikolaus Demmel <nikolaus@nikolaus-demmel.de>
|
||||
Date: Mon Sep 28 02:17:32 2020 +0200
|
||||
|
||||
add info about clang-format to contributing docs
|
||||
|
||||
Change-Id: I2f4dcbda2e4f36096df217d76de370103ffaa43e
|
||||
|
||||
commit d3f66d77f45482b90d01af47938289c32dd2cc08
|
||||
Author: Nikolaus Demmel <nikolaus@nikolaus-demmel.de>
|
||||
Date: Mon Sep 28 02:01:43 2020 +0200
|
||||
|
||||
fix formatting generated files (best effort)
|
||||
|
||||
- update file generator scripts / templates so generated files adhere
|
||||
to clang-format
|
||||
- A few exceptions are not fixed, where the file generation results in
|
||||
lines of different width. To properly fix this would make the code
|
||||
more complicated and it's not that important for generated files
|
||||
anyway.
|
||||
- note that generated files are excluded in ./scripts/format_all.sh
|
||||
|
||||
Change-Id: I4f42c83d1fec01242eada5e7ce6c1a5192234d37
|
||||
|
||||
commit a9c7361c8dc1d37e78d216754a4c03e8a8f1e74f
|
||||
Author: Nikolaus Demmel <nikolaus@nikolaus-demmel.de>
|
||||
Date: Mon Sep 28 02:14:29 2020 +0200
|
||||
|
||||
minor formatting fix (wrongly updated in earlier commit)
|
||||
|
||||
Change-Id: I544635fd936cb5b7f7bd9255876641cd5a9590c6
|
||||
|
||||
commit 7b8f675bfdb1d924af6a2dcc1f79bda5ace7e886
|
||||
Author: Nikolaus Demmel <nikolaus@nikolaus-demmel.de>
|
||||
Date: Sun Sep 20 21:45:24 2020 +0200
|
||||
|
||||
fix formatting for (non-generated) internal source files
|
||||
|
||||
- Change formatting standard to Cpp11. Main difference is not having
|
||||
the space between two closing >> for nested templates. We don't
|
||||
choose c++14, because older versions of clang-format (version 9
|
||||
and earlier) don't know this value yet, and it doesn't make a
|
||||
difference in the formatting.
|
||||
- Apply clang-format to all (non generated) internal source files.
|
||||
- Manually fix some code sections (clang-format on/off) and c-strings
|
||||
- Exclude some embedded external files with very different formatting
|
||||
(gtest/gmock)
|
||||
- Add script to format all source files
|
||||
|
||||
Change-Id: Ic6cea41575ad6e37c9e136dbce176b0d505dc44d
|
||||
|
||||
commit 921368ce31c42ee793cf131860abba291a7e39ad
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Wed Sep 9 09:15:37 2020 -0700
|
||||
|
||||
Fix a number of typos in covariance.h
|
||||
|
||||
Also some minor cleanups in covariance_impl.h
|
||||
|
||||
Thanks to Lorenzo Lamia for pointing these out.
|
||||
|
||||
Change-Id: Icb4012a367fdd1f249bc1e7019e0114c868e45b6
|
||||
|
||||
commit 7b6b2491cc1be0b3abb67338366d8d69bef3a402
|
||||
Author: Nikolaus Demmel <nikolaus@nikolaus-demmel.de>
|
||||
Date: Tue Sep 8 17:51:32 2020 +0200
|
||||
|
||||
fix formatting for examples
|
||||
|
||||
This is mostly just applying the existing clang format config, except:
|
||||
- Use NOLINT on overlong comment lines.
|
||||
- Wrap some sections in 'clang-format off' / 'clang format on'.
|
||||
- Manually split or join some multi-line strings.
|
||||
|
||||
Change-Id: Ia1a40eeb92112e12c3a169309afe087af55b2f4f
|
||||
|
||||
commit 82275d8a4eac4fc0bd07e17c3a41a6e429e72bfb
|
||||
Author: Nikolaus Demmel <nikolaus@nikolaus-demmel.de>
|
||||
Date: Tue Sep 8 02:00:21 2020 +0200
|
||||
|
||||
some fixes for Linux and macOS install docs
|
||||
|
||||
Linux:
|
||||
- Remove workaround for Ubuntu 14.04, which is EOL. libsuitesparse-dev
|
||||
seems to come with a shared library on 16.04 and later, so linking
|
||||
to a shared build of ceres doesn't seem to be an issue any more.
|
||||
- Add missing libgflags-dev.
|
||||
|
||||
macOS:
|
||||
- OS X is now called macOS.
|
||||
- Update homebrew link.
|
||||
- Mac homebrew the preferred method of installation.
|
||||
- Fix OpenMP instructions.
|
||||
- Remove reference to homebrew/science. Everything is in core.
|
||||
- Add missing gflags.
|
||||
|
||||
Change-Id: I633b3c7ea84a87886bfd823f8187fdd0a84737c9
|
||||
|
||||
commit 9d762d74f06b946bbd2f098de7216032d0e7b51d
|
||||
Author: Nikolaus Demmel <nikolaus@nikolaus-demmel.de>
|
||||
Date: Sun Sep 6 21:04:24 2020 +0200
|
||||
|
||||
fix formatting for public header files
|
||||
|
||||
- ensure all public headers files adhere to clang-format
|
||||
- preserve one-per-line for enums by adding trailing comma
|
||||
- preserve include order for en/disable_warning.h
|
||||
|
||||
Change-Id: I78dbd0527a294ab2ec5f074fb426e48b20c393e6
|
||||
|
||||
commit c76478c4898f3af11a6a826ac89c261205f4dd96
|
||||
Author: Nikolaus Demmel <nikolaus@nikolaus-demmel.de>
|
||||
Date: Sun Sep 6 23:29:56 2020 +0200
|
||||
|
||||
gitignore *.pyc
|
||||
|
||||
Change-Id: Ic6238a617a3c7ce92df7dcefcc44bae20c32b30b
|
||||
|
||||
commit 4e69a475cd7d7cbed983f5aebf79ae13a46e5415
|
||||
Author: Alex Stewart <alexs.mac@gmail.com>
|
||||
Date: Tue Sep 1 10:15:23 2020 +0100
|
||||
|
||||
Fix potential for mismatched release/debug TBB libraries
|
||||
|
||||
- Protect against the case when the user has multiple installs of TBB
|
||||
in their search paths and the first install does not contain debug
|
||||
libraries. In this case it is possible to get mismatched versions
|
||||
of TBB inserted into TBB_LIBRARIES.
|
||||
- Also suppresses warning about use of TBB_ROOT on modern versions of
|
||||
CMake due to CMP0074.
|
||||
|
||||
Change-Id: I2eaafdde4a028cbf6c500c63771973d85bc4723d
|
||||
|
||||
commit 8e1d8e32ad0d28c0d4d1d7b2b1ce7fc01d90b7b0
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Thu Sep 3 10:49:20 2020 -0700
|
||||
|
||||
A number of small changes.
|
||||
|
||||
1. Add a move constructor to NumericDiffCostFunction, DynamicAutoDiffCostfunction
|
||||
and DynamicNumericDiffCostFunction.
|
||||
2. Add optional ownership of the underlying functor.
|
||||
3. Update docs to reflect this as well as the variadic templates that allow an
|
||||
arbitrary number of parameter blocks.
|
||||
|
||||
Change-Id: I57bbb51fb9e75f36ec2a661b603beda270f30a19
|
||||
|
||||
commit 368a738e5281039f19587545806b7bc6f35e78f9
|
||||
Author: Julian Kent <jkflying@gmail.com>
|
||||
Date: Thu May 7 12:54:35 2020 +0200
|
||||
|
||||
AutoDiffCostFunction: optional ownership
|
||||
|
||||
Add Ownership semantics to the AutoDiffCostFunction
|
||||
|
||||
This allows several benefits, such as pointer ordering always being the
|
||||
same for numerical repeatability (due to blocks being ordered by
|
||||
pointer address), memory adjacency for better cache performance, and
|
||||
reduced allocator pressure / overhead.
|
||||
|
||||
This is then made use of in libmv by preallocating the errors and
|
||||
cost functions into vectors
|
||||
|
||||
Change-Id: Ia5b97e7249b55a463264b6e26f7a02291927c9f2
|
||||
|
||||
commit 8cbd721c199c69f127af6ef7c187ddf7e8f116f9
|
||||
Author: Morten Hannemose <morten@hannemose.dk>
|
||||
Date: Thu Sep 3 17:54:20 2020 +0200
|
||||
|
||||
Add erf and erfc to jet.h, including tests in jet_test.cc
|
||||
|
||||
erf is necessary for evaluating Gaussian functions.
|
||||
erfc was added because it is so similar to erf.
|
||||
|
||||
Change-Id: I5e470dbe013cc938fabb87cde3b0ebf26a90fff4
|
||||
|
||||
commit 31366cff299cf2a8d97b43a7533d953ff28fdc29
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Tue Sep 1 09:23:34 2020 -0700
|
||||
|
||||
Benchmarks for dynamic autodiff.
|
||||
|
||||
This patch is from Clement Courbet. courbet@google.com
|
||||
|
||||
Change-Id: I886390663644733bfa5b7b52b0c883079e793726
|
||||
|
||||
commit 29fb08aeae1ce691851724af7209fea6127523a9
|
||||
Author: Alex Stewart <alexs.mac@gmail.com>
|
||||
Date: Tue Sep 1 10:23:31 2020 +0100
|
||||
|
||||
Use CMAKE_PREFIX_PATH to pass Homebrew install location
|
||||
|
||||
- Passing HINTS disables the MODULE mode of find_package() which
|
||||
precludes users from creating their own find modules to provide
|
||||
Ceres' dependencies.
|
||||
|
||||
Change-Id: I6f2edf429331d13fe67bf61ac4b79d17579d9a57
|
||||
|
||||
commit 242c703b501ffd64d645f4016d63c8b41c381038
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Tue Aug 4 21:02:11 2020 -0700
|
||||
|
||||
Minor fixes to the documentation
|
||||
|
||||
Change-Id: I65e6f648d963b8aa640078684ce02dcde6acb87d
|
||||
|
||||
commit 79bbf95103672fa4b5485e055ff7692ee4a1f9da
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Tue Aug 4 18:26:02 2020 -0700
|
||||
|
||||
Add changelog for 2.0.0
|
||||
|
||||
Change-Id: I8acad62bfe629454ae5032732693e43fe37b97ff
|
||||
|
||||
commit 41d05f13d0ffb230d7a5a9d67ed31b0cfb35d669
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Tue Aug 4 14:56:33 2020 -0700
|
||||
|
||||
Fix lint errors in evaluation_callback_test.cc
|
||||
|
||||
Change-Id: I63eb069544ad0d8f495490fe4caa07b9f04f7ec2
|
||||
|
||||
commit 4b67903c1f96037048c83a723028c5d0991c09cf
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Tue Aug 4 14:40:50 2020 -0700
|
||||
|
||||
Remove unused variables from problem_test.cc
|
||||
|
||||
Change-Id: Ia1a13cfc6e462f6d249dcbf169ad34831dd93ec2
|
||||
|
||||
commit 10449fc3664c96d4b5454c092195432df79412f8
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Tue Aug 4 14:30:25 2020 -0700
|
||||
|
||||
Add Apache license to the LICENSE file for FixedArray
|
||||
|
||||
FixedArray implementation comes from ABSL which is Apache
|
||||
licensed.
|
||||
|
||||
Change-Id: I566dbe9d236814c95945732c6347d3bf7b508283
|
||||
|
||||
commit 8c3ecec6db26d7a66f5de8dc654475ec7aa0df14
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Tue May 26 04:44:11 2020 -0700
|
||||
|
||||
Fix some minor errors in IterationCallback docs
|
||||
|
||||
Change-Id: Id3d7f21a523ff8466868cdec542921c566bbbfa9
|
||||
|
||||
commit 7d3ffcb4234632dc51ee84c8a509d9428263070b
|
||||
Author: Alex Stewart <alexs.mac@gmail.com>
|
||||
Date: Sun Jul 26 19:42:16 2020 +0100
|
||||
|
||||
Remove forced CONFIG from find_package(Eigen3)
|
||||
|
||||
- Ceres will fail to configure if Eigen3::Eigen target is not found, and
|
||||
the minimum required Eigen version specified (3.3) exports Eigen as
|
||||
a CMake package and this is reflected in the default Ubuntu 18.04
|
||||
packages.
|
||||
- This permits users to specify their own Eigen3 detection should they
|
||||
choose to do so, but they must do so via an imported target.
|
||||
|
||||
Change-Id: I5edff117c8001770004f49012ac1ae63b66ec9c1
|
||||
|
||||
commit a029fc0f93817f20b387b707bc578dc1f1a269ae
|
||||
Author: Alex Stewart <alexs.mac@gmail.com>
|
||||
Date: Sun Jul 26 18:44:59 2020 +0100
|
||||
|
||||
Use latest FindTBB.cmake from VTK project
|
||||
|
||||
- Retrieved from [1], SHA: 0d9bbf9beb97f8f696c43a9edf1e52c082b3639b on
|
||||
2020-07-26
|
||||
- [1]: https://gitlab.kitware.com/vtk/vtk/blob/master/CMake/FindTBB.cmake
|
||||
|
||||
Change-Id: I953a8c87802a974d30ccc7c80f5229683826efbd
|
||||
|
||||
commit aa1abbc578797c6b17ee7221db31535dc249ae66
|
||||
Author: Alex Stewart <alexs.mac@gmail.com>
|
||||
Date: Sun Jul 26 19:57:31 2020 +0100
|
||||
|
||||
Replace use of GFLAGS_LIBRARIES with export gflags target
|
||||
|
||||
- As our minimum required version of gflags (2.2) exports itself as
|
||||
a CMake package and this is the case for the default 18.04 package
|
||||
we can use the gflags target directly.
|
||||
- Replaces forced use of CONFIG in find_package(gflags) with a check
|
||||
that the gflags imported target exists to avoid ambiguity with
|
||||
libgflags if installed in a default location. This permits users to
|
||||
override the gflags detection should they so choose, provided that
|
||||
they do so via an imported target.
|
||||
- Also removes some previously removed legacy GLAGS_ vars from the
|
||||
installation docs.
|
||||
|
||||
Change-Id: I015f5a751e5b22f956bbf9df692e63a6825c9f0d
|
||||
|
||||
commit db2af1be8780bbe88944775400baa2dbd3592b7d
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Mon Aug 3 04:57:08 2020 -0700
|
||||
|
||||
Add Problem::EvaluateResidualBlockAssumingParametersUnchanged
|
||||
|
||||
Simplify the semantics for Problem::EvaluateResidualBlock to
|
||||
not ignore the presence of EvaluationCallback and add another method
|
||||
EvaluateResidualBlockAssumingParametersUnchanged to handle the case
|
||||
where the user has an EvaluationCallback but knows that the parameter
|
||||
blocks do not change between calls.
|
||||
|
||||
Updated the documentation for the methods and EvaluationCallback to
|
||||
reflect these semantics.
|
||||
|
||||
Also added tests for Evaluation related methods calling i
|
||||
EvaluationCallback when its present.
|
||||
|
||||
https://github.com/ceres-solver/ceres-solver/issues/483
|
||||
|
||||
Change-Id: If0a0c95c2f1f92e9183a90df240104a69a71c46d
|
||||
|
||||
commit ab4ed32cda004befd29a0b4b02f1d907e0c4dab7
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Mon Aug 3 04:17:33 2020 -0700
|
||||
|
||||
Replace NULL with nullptr in the documentation.
|
||||
|
||||
Change-Id: I995f68770e2a4b6027c0a1d3edf5eb5132b081d7
|
||||
|
||||
commit ee280e27a6140295ef6258d24c92305628f3d508
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Fri Jul 31 16:48:06 2020 -0700
|
||||
|
||||
Allow SubsetParameterization to accept an empty vector of constant parameters.
|
||||
|
||||
Thanks to Frédéric Devernay for reporting this and providing an initial fix.
|
||||
|
||||
Change-Id: Id86a2051ab7841ecafdcfb00f4634b353a7ef3b4
|
||||
|
||||
commit 4b8c731d8a4f3fda53c642ff14a25fab6c233918
|
||||
Author: Sameer Agarwal <sameeragarwal@google.com>
|
||||
Date: Fri Jul 31 10:05:52 2020 -0700
|
||||
|
||||
Fix a bug in DynamicAutoDiffCostFunction
|
||||
|
||||
DynamicAutoDiffCostFunction::Evaluate when provided with a jacobians
|
||||
array that was non-empty but all its entries are nullptr, would
|
||||
compute num_active_parameters = 0, and then skip over all the loops
|
||||
that evaluated the CostFunctor.
|
||||
|
||||
The fix is to check if num_active_parameters == 0, and then treat
|
||||
it as the case where jacobians array is null.
|
||||
|
||||
Thanks to Ky Waegel for reporting and providing a reproduction for this.
|
||||
|
||||
Change-Id: Ib86930c2c3f722724d249f662bf88238679bbf98
|
||||
|
||||
commit 5cb5b35a930c1702278083c75769dbb4e5801045
|
||||
Author: Alex Stewart <alexs.mac@gmail.com>
|
||||
Date: Sun Jul 26 20:42:12 2020 +0100
|
||||
|
||||
Fixed incorrect argument name in RotationMatrixToQuaternion()
|
||||
|
||||
- Raised as: https://github.com/ceres-solver/ceres-solver/pull/607 by
|
||||
Frank Dellaert
|
||||
|
||||
Change-Id: Id3e9f190e814cf18206e2f8c3b1b67b995c21dd5
|
||||
|
||||
commit e39d9ed1d60dfeb58dd2a0df4622c683f87b28e3
|
||||
Author: Carl Dehlin <carl@dehlin.com>
|
||||
Date: Tue Jun 16 09:02:05 2020 +0200
|
||||
|
||||
Add a missing term and remove a superfluous word
|
||||
|
||||
Change-Id: I25f40f0bf241302b975e6fc14690aa863c0728b0
|
||||
|
||||
commit 27cab77b699a1a2b5354820c57a91c92eaeb21e3
|
||||
Author: Carl Dehlin <carl@dehlin.com>
|
||||
Date: Mon Jun 15 20:01:18 2020 +0200
|
||||
|
||||
Reformulate some sentences
|
||||
|
||||
Change-Id: I4841aa8e8522008dd816261d9ad98e5fb8ad1758
|
||||
|
||||
commit 8ac6655ce85a4462f2882fcb9e9118a7057ebe09
|
||||
Author: Carl Dehlin <carl@dehlin.com>
|
||||
Date: Mon Jun 15 19:10:12 2020 +0200
|
||||
|
||||
Fix documentation formatting issues
|
||||
|
||||
Change-Id: Iea3a6e75dc3a7376eda866ab24e535a6df84f8ea
|
234
extern/ceres/LICENSE
vendored
234
extern/ceres/LICENSE
vendored
@@ -1,6 +1,6 @@
|
||||
Ceres Solver - A fast non-linear least squares minimizer
|
||||
Copyright 2015 Google Inc. All rights reserved.
|
||||
http://ceres-solver.org/
|
||||
Copyright 2010, 2011, 2012 Google Inc. All rights reserved.
|
||||
http://code.google.com/p/ceres-solver/
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
@@ -25,233 +25,3 @@ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
----------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Some of the code in the examples directory derives from libmv, which is
|
||||
distributed under the MIT license as described below
|
||||
|
||||
|
||||
Copyright (c) 2007-2011 libmv authors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
|
3
extern/ceres/README
vendored
Normal file
3
extern/ceres/README
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
Ceres Solver - A non-linear least squares minimizer
|
||||
==================================================
|
||||
Please see ceres.pdf in docs/ for a tutorial and reference.
|
2
extern/ceres/README.blender
vendored
2
extern/ceres/README.blender
vendored
@@ -1,5 +1,5 @@
|
||||
Project: Ceres Solver
|
||||
URL: http://ceres-solver.org/
|
||||
License: BSD 3-Clause
|
||||
Upstream version 2.1.0
|
||||
Upstream version 2.0.0
|
||||
Local modifications: None
|
||||
|
18
extern/ceres/README.md
vendored
18
extern/ceres/README.md
vendored
@@ -1,18 +0,0 @@
|
||||
[](https://github.com/ceres-solver/ceres-solver/actions/workflows/android.yml)
|
||||
[](https://github.com/ceres-solver/ceres-solver/actions/workflows/linux.yml)
|
||||
[](https://github.com/ceres-solver/ceres-solver/actions/workflows/macos.yml)
|
||||
[](https://github.com/ceres-solver/ceres-solver/actions/workflows/windows.yml)
|
||||
|
||||
Ceres Solver
|
||||
============
|
||||
|
||||
Ceres Solver is an open source C++ library for modeling and solving
|
||||
large, complicated optimization problems. It is a feature rich, mature
|
||||
and performant library which has been used in production at Google
|
||||
since 2010. Ceres Solver can solve two kinds of problems.
|
||||
|
||||
1. Non-linear Least Squares problems with bounds constraints.
|
||||
2. General unconstrained optimization problems.
|
||||
|
||||
Please see [ceres-solver.org](http://ceres-solver.org/) for more
|
||||
information.
|
165
extern/ceres/bundle.sh
vendored
Executable file
165
extern/ceres/bundle.sh
vendored
Executable file
@@ -0,0 +1,165 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "x$1" = "x--i-really-know-what-im-doing" ] ; then
|
||||
echo Proceeding as requested by command line ...
|
||||
else
|
||||
echo "*** Please run again with --i-really-know-what-im-doing ..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
repo="https://ceres-solver.googlesource.com/ceres-solver"
|
||||
#branch="master"
|
||||
tag="2.0.0"
|
||||
tmp=`mktemp -d`
|
||||
checkout="$tmp/ceres"
|
||||
|
||||
GIT="git --git-dir $tmp/ceres/.git --work-tree $checkout"
|
||||
|
||||
git clone $repo $checkout
|
||||
|
||||
if [ $branch != "master" ]; then
|
||||
$GIT checkout -t remotes/origin/$branch
|
||||
else
|
||||
if [ "x$tag" != "x" ]; then
|
||||
$GIT checkout $tag
|
||||
fi
|
||||
fi
|
||||
|
||||
$GIT log -n 50 > ChangeLog
|
||||
|
||||
for p in `cat ./patches/series`; do
|
||||
echo "Applying patch $p..."
|
||||
cat ./patches/$p | patch -d $tmp/ceres -p1
|
||||
done
|
||||
|
||||
find include -type f -not -iwholename '*.svn*' -exec rm -rf {} \;
|
||||
find internal -type f -not -iwholename '*.svn*' -exec rm -rf {} \;
|
||||
|
||||
cat "files.txt" | while read f; do
|
||||
mkdir -p `dirname $f`
|
||||
cp $tmp/ceres/$f $f
|
||||
done
|
||||
|
||||
rm -rf $tmp
|
||||
|
||||
sources=`find ./include ./internal -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | sed -r 's/^\.\//\t/' | \
|
||||
grep -v -E 'schur_eliminator_[0-9]_[0-9d]_[0-9d].cc' | \
|
||||
grep -v -E 'partitioned_matrix_view_[0-9]_[0-9d]_[0-9d].cc' | sort -d`
|
||||
generated_sources=`find ./include ./internal -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | sed -r 's/^\.\//\t\t/' | \
|
||||
grep -E 'schur_eliminator_[0-9]_[0-9d]_[0-9d].cc|partitioned_matrix_view_[0-9]_[0-9d]_[0-9d].cc' | sort -d`
|
||||
headers=`find ./include ./internal -type f -iname '*.h' | sed -r 's/^\.\//\t/' | sort -d`
|
||||
|
||||
src_dir=`find ./internal -type f -iname '*.cc' -exec dirname {} \; -or -iname '*.cpp' -exec dirname {} \; -or -iname '*.c' -exec dirname {} \; | sed -r 's/^\.\//\t/' | sort -d | uniq`
|
||||
src=""
|
||||
for x in $src_dir $src_third_dir; do
|
||||
t=""
|
||||
|
||||
if test `echo "$x" | grep -c glog ` -eq 1; then
|
||||
continue;
|
||||
fi
|
||||
|
||||
if test `echo "$x" | grep -c generated` -eq 1; then
|
||||
continue;
|
||||
fi
|
||||
|
||||
if stat $x/*.cpp > /dev/null 2>&1; then
|
||||
t="src += env.Glob('`echo $x'/*.cpp'`')"
|
||||
fi
|
||||
|
||||
if stat $x/*.c > /dev/null 2>&1; then
|
||||
if [ -z "$t" ]; then
|
||||
t="src += env.Glob('`echo $x'/*.c'`')"
|
||||
else
|
||||
t="$t + env.Glob('`echo $x'/*.c'`')"
|
||||
fi
|
||||
fi
|
||||
|
||||
if stat $x/*.cc > /dev/null 2>&1; then
|
||||
if [ -z "$t" ]; then
|
||||
t="src += env.Glob('`echo $x'/*.cc'`')"
|
||||
else
|
||||
t="$t + env.Glob('`echo $x'/*.cc'`')"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$src" ]; then
|
||||
src=$t
|
||||
else
|
||||
src=`echo "$src\n$t"`
|
||||
fi
|
||||
done
|
||||
|
||||
cat > CMakeLists.txt << EOF
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2012, Blender Foundation
|
||||
# All rights reserved.
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# NOTE: This file is automatically generated by bundle.sh script
|
||||
# If you're doing changes in this file, please update template
|
||||
# in that script too
|
||||
|
||||
set(INC
|
||||
.
|
||||
include
|
||||
internal
|
||||
config
|
||||
../gflags/src
|
||||
)
|
||||
|
||||
set(INC_SYS
|
||||
\${EIGEN3_INCLUDE_DIRS}
|
||||
\${GFLAGS_INCLUDE_DIRS}
|
||||
\${GLOG_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(SRC
|
||||
${sources}
|
||||
|
||||
${headers}
|
||||
)
|
||||
|
||||
set(LIB
|
||||
\${GLOG_LIBRARIES}
|
||||
\${GFLAGS_LIBRARIES}
|
||||
)
|
||||
|
||||
if(WITH_LIBMV_SCHUR_SPECIALIZATIONS)
|
||||
list(APPEND SRC
|
||||
${generated_sources}
|
||||
)
|
||||
else()
|
||||
add_definitions(-DCERES_RESTRICT_SCHUR_SPECIALIZATION)
|
||||
endif()
|
||||
|
||||
add_definitions(\${GFLAGS_DEFINES})
|
||||
add_definitions(\${GLOG_DEFINES})
|
||||
add_definitions(\${CERES_DEFINES})
|
||||
|
||||
add_definitions(
|
||||
-DCERES_HAVE_PTHREAD
|
||||
-DCERES_NO_SUITESPARSE
|
||||
-DCERES_NO_CXSPARSE
|
||||
-DCERES_NO_LAPACK
|
||||
-DCERES_NO_ACCELERATE_SPARSE
|
||||
-DCERES_HAVE_RWLOCK
|
||||
-DCERES_USE_CXX_THREADS
|
||||
)
|
||||
|
||||
blender_add_lib(extern_ceres "\${SRC}" "\${INC}" "\${INC_SYS}" "\${LIB}")
|
||||
EOF
|
101
extern/ceres/config/ceres/internal/config.h
vendored
101
extern/ceres/config/ceres/internal/config.h
vendored
@@ -1,5 +1,5 @@
|
||||
// Ceres Solver - A fast non-linear least squares minimizer
|
||||
// Copyright 2022 Google Inc. All rights reserved.
|
||||
// Copyright 2015 Google Inc. All rights reserved.
|
||||
// http://ceres-solver.org/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
@@ -28,98 +28,21 @@
|
||||
//
|
||||
// Author: alexs.mac@gmail.com (Alex Stewart)
|
||||
|
||||
// Configuration options for Ceres.
|
||||
// Default (empty) configuration options for Ceres.
|
||||
//
|
||||
// Do not edit this file, it was automatically configured by CMake when
|
||||
// Ceres was compiled with the relevant configuration for the machine
|
||||
// on which Ceres was compiled.
|
||||
//
|
||||
// Ceres Developers: All options should have the same name as their mapped
|
||||
// CMake options, in the preconfigured version of this file
|
||||
// all options should be enclosed in '@'.
|
||||
// IMPORTANT: Most users of Ceres will not use this file, when
|
||||
// compiling Ceres with CMake, CMake will configure a new
|
||||
// config.h with the currently selected Ceres compile
|
||||
// options in <BUILD_DIR>/config, which will be added to
|
||||
// the include path for compilation, and installed with the
|
||||
// public Ceres headers. However, for some users of Ceres
|
||||
// who compile without CMake (Android), this file ensures
|
||||
// that Ceres will compile, with the user either specifying
|
||||
// manually the Ceres compile options, or passing them
|
||||
// directly through the compiler.
|
||||
|
||||
#ifndef CERES_PUBLIC_INTERNAL_CONFIG_H_
|
||||
#define CERES_PUBLIC_INTERNAL_CONFIG_H_
|
||||
|
||||
// If defined, use the LGPL code in Eigen.
|
||||
#define CERES_USE_EIGEN_SPARSE
|
||||
|
||||
// If defined, Ceres was compiled without LAPACK.
|
||||
#define CERES_NO_LAPACK
|
||||
|
||||
// If defined, Ceres was compiled without SuiteSparse.
|
||||
#define CERES_NO_SUITESPARSE
|
||||
|
||||
// If defined, Ceres was compiled without CXSparse.
|
||||
#define CERES_NO_CXSPARSE
|
||||
|
||||
// If defined, Ceres was compiled without CUDA.
|
||||
#define CERES_NO_CUDA
|
||||
|
||||
// If defined, Ceres was compiled without Apple's Accelerate framework solvers.
|
||||
#define CERES_NO_ACCELERATE_SPARSE
|
||||
|
||||
#if defined(CERES_NO_SUITESPARSE) && \
|
||||
defined(CERES_NO_ACCELERATE_SPARSE) && \
|
||||
defined(CERES_NO_CXSPARSE) && \
|
||||
!defined(CERES_USE_EIGEN_SPARSE) // NOLINT
|
||||
// If defined Ceres was compiled without any sparse linear algebra support.
|
||||
#define CERES_NO_SPARSE
|
||||
#endif
|
||||
|
||||
// If defined, Ceres was compiled without Schur specializations.
|
||||
// #define CERES_RESTRICT_SCHUR_SPECIALIZATION
|
||||
|
||||
// If defined, Ceres was compiled to use Eigen instead of hardcoded BLAS
|
||||
// routines.
|
||||
// #define CERES_NO_CUSTOM_BLAS
|
||||
|
||||
// If defined, Ceres was compiled without multithreading support.
|
||||
// #define CERES_NO_THREADS
|
||||
// If defined Ceres was compiled with OpenMP multithreading.
|
||||
// #define CERES_USE_OPENMP
|
||||
// If defined Ceres was compiled with modern C++ multithreading.
|
||||
#define CERES_USE_CXX_THREADS
|
||||
|
||||
// If defined, Ceres was compiled with a version MSVC >= 2005 which
|
||||
// deprecated the standard POSIX names for bessel functions, replacing them
|
||||
// with underscore prefixed versions (e.g. j0() -> _j0()).
|
||||
#ifdef _MSC_VER
|
||||
#define CERES_MSVC_USE_UNDERSCORE_PREFIXED_BESSEL_FUNCTIONS
|
||||
#endif
|
||||
|
||||
#if defined(CERES_USE_OPENMP)
|
||||
#if defined(CERES_USE_CXX_THREADS) || defined(CERES_NO_THREADS)
|
||||
#error CERES_USE_OPENMP is mutually exclusive to CERES_USE_CXX_THREADS and CERES_NO_THREADS
|
||||
#endif
|
||||
#elif defined(CERES_USE_CXX_THREADS)
|
||||
#if defined(CERES_USE_OPENMP) || defined(CERES_NO_THREADS)
|
||||
#error CERES_USE_CXX_THREADS is mutually exclusive to CERES_USE_OPENMP, CERES_USE_CXX_THREADS and CERES_NO_THREADS
|
||||
#endif
|
||||
#elif defined(CERES_NO_THREADS)
|
||||
#if defined(CERES_USE_OPENMP) || defined(CERES_USE_CXX_THREADS)
|
||||
#error CERES_NO_THREADS is mutually exclusive to CERES_USE_OPENMP and CERES_USE_CXX_THREADS
|
||||
#endif
|
||||
#else
|
||||
# error One of CERES_USE_OPENMP, CERES_USE_CXX_THREADS or CERES_NO_THREADS must be defined.
|
||||
#endif
|
||||
|
||||
// CERES_NO_SPARSE should be automatically defined by config.h if Ceres was
|
||||
// compiled without any sparse back-end. Verify that it has not subsequently
|
||||
// been inconsistently redefined.
|
||||
#if defined(CERES_NO_SPARSE)
|
||||
#if !defined(CERES_NO_SUITESPARSE)
|
||||
#error CERES_NO_SPARSE requires CERES_NO_SUITESPARSE.
|
||||
#endif
|
||||
#if !defined(CERES_NO_CXSPARSE)
|
||||
#error CERES_NO_SPARSE requires CERES_NO_CXSPARSE
|
||||
#endif
|
||||
#if !defined(CERES_NO_ACCELERATE_SPARSE)
|
||||
#error CERES_NO_SPARSE requires CERES_NO_ACCELERATE_SPARSE
|
||||
#endif
|
||||
#if defined(CERES_USE_EIGEN_SPARSE)
|
||||
#error CERES_NO_SPARSE requires !CERES_USE_EIGEN_SPARSE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // CERES_PUBLIC_INTERNAL_CONFIG_H_
|
||||
|
42
extern/ceres/config/ceres/internal/export.h
vendored
42
extern/ceres/config/ceres/internal/export.h
vendored
@@ -1,42 +0,0 @@
|
||||
|
||||
#ifndef CERES_EXPORT_H
|
||||
#define CERES_EXPORT_H
|
||||
|
||||
#ifdef CERES_STATIC_DEFINE
|
||||
# define CERES_EXPORT
|
||||
# define CERES_NO_EXPORT
|
||||
#else
|
||||
# ifndef CERES_EXPORT
|
||||
# ifdef ceres_EXPORTS
|
||||
/* We are building this library */
|
||||
# define CERES_EXPORT
|
||||
# else
|
||||
/* We are using this library */
|
||||
# define CERES_EXPORT
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef CERES_NO_EXPORT
|
||||
# define CERES_NO_EXPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef CERES_DEPRECATED
|
||||
# define CERES_DEPRECATED __attribute__ ((__deprecated__))
|
||||
#endif
|
||||
|
||||
#ifndef CERES_DEPRECATED_EXPORT
|
||||
# define CERES_DEPRECATED_EXPORT CERES_EXPORT CERES_DEPRECATED
|
||||
#endif
|
||||
|
||||
#ifndef CERES_DEPRECATED_NO_EXPORT
|
||||
# define CERES_DEPRECATED_NO_EXPORT CERES_NO_EXPORT CERES_DEPRECATED
|
||||
#endif
|
||||
|
||||
#if 0 /* DEFINE_NO_DEPRECATED */
|
||||
# ifndef CERES_NO_DEPRECATED
|
||||
# define CERES_NO_DEPRECATED
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* CERES_EXPORT_H */
|
318
extern/ceres/files.txt
vendored
Normal file
318
extern/ceres/files.txt
vendored
Normal file
@@ -0,0 +1,318 @@
|
||||
include/ceres/autodiff_cost_function.h
|
||||
include/ceres/autodiff_first_order_function.h
|
||||
include/ceres/autodiff_local_parameterization.h
|
||||
include/ceres/c_api.h
|
||||
include/ceres/ceres.h
|
||||
include/ceres/conditioned_cost_function.h
|
||||
include/ceres/context.h
|
||||
include/ceres/cost_function.h
|
||||
include/ceres/cost_function_to_functor.h
|
||||
include/ceres/covariance.h
|
||||
include/ceres/crs_matrix.h
|
||||
include/ceres/cubic_interpolation.h
|
||||
include/ceres/dynamic_autodiff_cost_function.h
|
||||
include/ceres/dynamic_cost_function.h
|
||||
include/ceres/dynamic_cost_function_to_functor.h
|
||||
include/ceres/dynamic_numeric_diff_cost_function.h
|
||||
include/ceres/evaluation_callback.h
|
||||
include/ceres/first_order_function.h
|
||||
include/ceres/gradient_checker.h
|
||||
include/ceres/gradient_problem.h
|
||||
include/ceres/gradient_problem_solver.h
|
||||
include/ceres/internal/array_selector.h
|
||||
include/ceres/internal/autodiff.h
|
||||
include/ceres/internal/disable_warnings.h
|
||||
include/ceres/internal/eigen.h
|
||||
include/ceres/internal/fixed_array.h
|
||||
include/ceres/internal/householder_vector.h
|
||||
include/ceres/internal/integer_sequence_algorithm.h
|
||||
include/ceres/internal/line_parameterization.h
|
||||
include/ceres/internal/memory.h
|
||||
include/ceres/internal/numeric_diff.h
|
||||
include/ceres/internal/parameter_dims.h
|
||||
include/ceres/internal/port.h
|
||||
include/ceres/internal/reenable_warnings.h
|
||||
include/ceres/internal/variadic_evaluate.h
|
||||
include/ceres/iteration_callback.h
|
||||
include/ceres/jet.h
|
||||
include/ceres/local_parameterization.h
|
||||
include/ceres/loss_function.h
|
||||
include/ceres/normal_prior.h
|
||||
include/ceres/numeric_diff_cost_function.h
|
||||
include/ceres/numeric_diff_options.h
|
||||
include/ceres/ordered_groups.h
|
||||
include/ceres/problem.h
|
||||
include/ceres/rotation.h
|
||||
include/ceres/sized_cost_function.h
|
||||
include/ceres/solver.h
|
||||
include/ceres/tiny_solver_autodiff_function.h
|
||||
include/ceres/tiny_solver_cost_function_adapter.h
|
||||
include/ceres/tiny_solver.h
|
||||
include/ceres/types.h
|
||||
include/ceres/version.h
|
||||
internal/ceres/accelerate_sparse.cc
|
||||
internal/ceres/accelerate_sparse.h
|
||||
internal/ceres/array_utils.cc
|
||||
internal/ceres/array_utils.h
|
||||
internal/ceres/blas.cc
|
||||
internal/ceres/blas.h
|
||||
internal/ceres/block_evaluate_preparer.cc
|
||||
internal/ceres/block_evaluate_preparer.h
|
||||
internal/ceres/block_jacobian_writer.cc
|
||||
internal/ceres/block_jacobian_writer.h
|
||||
internal/ceres/block_jacobi_preconditioner.cc
|
||||
internal/ceres/block_jacobi_preconditioner.h
|
||||
internal/ceres/block_random_access_dense_matrix.cc
|
||||
internal/ceres/block_random_access_dense_matrix.h
|
||||
internal/ceres/block_random_access_diagonal_matrix.cc
|
||||
internal/ceres/block_random_access_diagonal_matrix.h
|
||||
internal/ceres/block_random_access_matrix.cc
|
||||
internal/ceres/block_random_access_matrix.h
|
||||
internal/ceres/block_random_access_sparse_matrix.cc
|
||||
internal/ceres/block_random_access_sparse_matrix.h
|
||||
internal/ceres/block_sparse_matrix.cc
|
||||
internal/ceres/block_sparse_matrix.h
|
||||
internal/ceres/block_structure.cc
|
||||
internal/ceres/block_structure.h
|
||||
internal/ceres/callbacks.cc
|
||||
internal/ceres/callbacks.h
|
||||
internal/ceres/canonical_views_clustering.cc
|
||||
internal/ceres/canonical_views_clustering.h
|
||||
internal/ceres/c_api.cc
|
||||
internal/ceres/casts.h
|
||||
internal/ceres/cgnr_linear_operator.h
|
||||
internal/ceres/cgnr_solver.cc
|
||||
internal/ceres/cgnr_solver.h
|
||||
internal/ceres/compressed_col_sparse_matrix_utils.cc
|
||||
internal/ceres/compressed_col_sparse_matrix_utils.h
|
||||
internal/ceres/compressed_row_jacobian_writer.cc
|
||||
internal/ceres/compressed_row_jacobian_writer.h
|
||||
internal/ceres/compressed_row_sparse_matrix.cc
|
||||
internal/ceres/compressed_row_sparse_matrix.h
|
||||
internal/ceres/concurrent_queue.h
|
||||
internal/ceres/conditioned_cost_function.cc
|
||||
internal/ceres/conjugate_gradients_solver.cc
|
||||
internal/ceres/conjugate_gradients_solver.h
|
||||
internal/ceres/context.cc
|
||||
internal/ceres/context_impl.cc
|
||||
internal/ceres/context_impl.h
|
||||
internal/ceres/coordinate_descent_minimizer.cc
|
||||
internal/ceres/coordinate_descent_minimizer.h
|
||||
internal/ceres/corrector.cc
|
||||
internal/ceres/corrector.h
|
||||
internal/ceres/covariance.cc
|
||||
internal/ceres/covariance_impl.cc
|
||||
internal/ceres/covariance_impl.h
|
||||
internal/ceres/cxsparse.cc
|
||||
internal/ceres/cxsparse.h
|
||||
internal/ceres/dense_jacobian_writer.h
|
||||
internal/ceres/dense_normal_cholesky_solver.cc
|
||||
internal/ceres/dense_normal_cholesky_solver.h
|
||||
internal/ceres/dense_qr_solver.cc
|
||||
internal/ceres/dense_qr_solver.h
|
||||
internal/ceres/dense_sparse_matrix.cc
|
||||
internal/ceres/dense_sparse_matrix.h
|
||||
internal/ceres/detect_structure.cc
|
||||
internal/ceres/detect_structure.h
|
||||
internal/ceres/dogleg_strategy.cc
|
||||
internal/ceres/dogleg_strategy.h
|
||||
internal/ceres/dynamic_compressed_row_finalizer.h
|
||||
internal/ceres/dynamic_compressed_row_jacobian_writer.cc
|
||||
internal/ceres/dynamic_compressed_row_jacobian_writer.h
|
||||
internal/ceres/dynamic_compressed_row_sparse_matrix.cc
|
||||
internal/ceres/dynamic_compressed_row_sparse_matrix.h
|
||||
internal/ceres/dynamic_sparse_normal_cholesky_solver.cc
|
||||
internal/ceres/dynamic_sparse_normal_cholesky_solver.h
|
||||
internal/ceres/eigensparse.cc
|
||||
internal/ceres/eigensparse.h
|
||||
internal/ceres/evaluator.cc
|
||||
internal/ceres/evaluator.h
|
||||
internal/ceres/execution_summary.h
|
||||
internal/ceres/file.cc
|
||||
internal/ceres/file.h
|
||||
internal/ceres/float_cxsparse.cc
|
||||
internal/ceres/float_cxsparse.h
|
||||
internal/ceres/float_suitesparse.cc
|
||||
internal/ceres/float_suitesparse.h
|
||||
internal/ceres/function_sample.cc
|
||||
internal/ceres/function_sample.h
|
||||
internal/ceres/generated/partitioned_matrix_view_2_2_2.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_2_3.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_2_4.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_2_d.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_3_3.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_3_4.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_3_6.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_3_9.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_3_d.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_3.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_4.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_6.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_8.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_9.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_4_d.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_2_d_d.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_3_3_3.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_4_4_2.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_4_4_3.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_4_4_4.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_4_4_d.cc
|
||||
internal/ceres/generated/partitioned_matrix_view_d_d_d.cc
|
||||
internal/ceres/generated/schur_eliminator_2_2_2.cc
|
||||
internal/ceres/generated/schur_eliminator_2_2_3.cc
|
||||
internal/ceres/generated/schur_eliminator_2_2_4.cc
|
||||
internal/ceres/generated/schur_eliminator_2_2_d.cc
|
||||
internal/ceres/generated/schur_eliminator_2_3_3.cc
|
||||
internal/ceres/generated/schur_eliminator_2_3_4.cc
|
||||
internal/ceres/generated/schur_eliminator_2_3_6.cc
|
||||
internal/ceres/generated/schur_eliminator_2_3_9.cc
|
||||
internal/ceres/generated/schur_eliminator_2_3_d.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_3.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_4.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_6.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_8.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_9.cc
|
||||
internal/ceres/generated/schur_eliminator_2_4_d.cc
|
||||
internal/ceres/generated/schur_eliminator_2_d_d.cc
|
||||
internal/ceres/generated/schur_eliminator_3_3_3.cc
|
||||
internal/ceres/generated/schur_eliminator_4_4_2.cc
|
||||
internal/ceres/generated/schur_eliminator_4_4_3.cc
|
||||
internal/ceres/generated/schur_eliminator_4_4_4.cc
|
||||
internal/ceres/generated/schur_eliminator_4_4_d.cc
|
||||
internal/ceres/generated/schur_eliminator_d_d_d.cc
|
||||
internal/ceres/generate_template_specializations.py
|
||||
internal/ceres/gradient_checker.cc
|
||||
internal/ceres/gradient_checking_cost_function.cc
|
||||
internal/ceres/gradient_checking_cost_function.h
|
||||
internal/ceres/gradient_problem.cc
|
||||
internal/ceres/gradient_problem_evaluator.h
|
||||
internal/ceres/gradient_problem_solver.cc
|
||||
internal/ceres/graph_algorithms.h
|
||||
internal/ceres/graph.h
|
||||
internal/ceres/implicit_schur_complement.cc
|
||||
internal/ceres/implicit_schur_complement.h
|
||||
internal/ceres/inner_product_computer.cc
|
||||
internal/ceres/inner_product_computer.h
|
||||
internal/ceres/invert_psd_matrix.h
|
||||
internal/ceres/is_close.cc
|
||||
internal/ceres/is_close.h
|
||||
internal/ceres/iterative_refiner.cc
|
||||
internal/ceres/iterative_refiner.h
|
||||
internal/ceres/iterative_schur_complement_solver.cc
|
||||
internal/ceres/iterative_schur_complement_solver.h
|
||||
internal/ceres/lapack.cc
|
||||
internal/ceres/lapack.h
|
||||
internal/ceres/levenberg_marquardt_strategy.cc
|
||||
internal/ceres/levenberg_marquardt_strategy.h
|
||||
internal/ceres/linear_least_squares_problems.cc
|
||||
internal/ceres/linear_least_squares_problems.h
|
||||
internal/ceres/linear_operator.cc
|
||||
internal/ceres/linear_operator.h
|
||||
internal/ceres/linear_solver.cc
|
||||
internal/ceres/linear_solver.h
|
||||
internal/ceres/line_search.cc
|
||||
internal/ceres/line_search_direction.cc
|
||||
internal/ceres/line_search_direction.h
|
||||
internal/ceres/line_search.h
|
||||
internal/ceres/line_search_minimizer.cc
|
||||
internal/ceres/line_search_minimizer.h
|
||||
internal/ceres/line_search_preprocessor.cc
|
||||
internal/ceres/line_search_preprocessor.h
|
||||
internal/ceres/local_parameterization.cc
|
||||
internal/ceres/loss_function.cc
|
||||
internal/ceres/low_rank_inverse_hessian.cc
|
||||
internal/ceres/low_rank_inverse_hessian.h
|
||||
internal/ceres/map_util.h
|
||||
internal/ceres/minimizer.cc
|
||||
internal/ceres/minimizer.h
|
||||
internal/ceres/normal_prior.cc
|
||||
internal/ceres/pair_hash.h
|
||||
internal/ceres/parallel_for_cxx.cc
|
||||
internal/ceres/parallel_for.h
|
||||
internal/ceres/parallel_for_nothreads.cc
|
||||
internal/ceres/parallel_for_openmp.cc
|
||||
internal/ceres/parallel_utils.cc
|
||||
internal/ceres/parallel_utils.h
|
||||
internal/ceres/parameter_block.h
|
||||
internal/ceres/parameter_block_ordering.cc
|
||||
internal/ceres/parameter_block_ordering.h
|
||||
internal/ceres/partitioned_matrix_view.cc
|
||||
internal/ceres/partitioned_matrix_view.h
|
||||
internal/ceres/partitioned_matrix_view_impl.h
|
||||
internal/ceres/partitioned_matrix_view_template.py
|
||||
internal/ceres/polynomial.cc
|
||||
internal/ceres/polynomial.h
|
||||
internal/ceres/preconditioner.cc
|
||||
internal/ceres/preconditioner.h
|
||||
internal/ceres/preprocessor.cc
|
||||
internal/ceres/preprocessor.h
|
||||
internal/ceres/problem.cc
|
||||
internal/ceres/problem_impl.cc
|
||||
internal/ceres/problem_impl.h
|
||||
internal/ceres/program.cc
|
||||
internal/ceres/program_evaluator.h
|
||||
internal/ceres/program.h
|
||||
internal/ceres/random.h
|
||||
internal/ceres/reorder_program.cc
|
||||
internal/ceres/reorder_program.h
|
||||
internal/ceres/residual_block.cc
|
||||
internal/ceres/residual_block.h
|
||||
internal/ceres/residual_block_utils.cc
|
||||
internal/ceres/residual_block_utils.h
|
||||
internal/ceres/schur_complement_solver.cc
|
||||
internal/ceres/schur_complement_solver.h
|
||||
internal/ceres/schur_eliminator.cc
|
||||
internal/ceres/schur_eliminator.h
|
||||
internal/ceres/schur_eliminator_impl.h
|
||||
internal/ceres/schur_eliminator_template.py
|
||||
internal/ceres/schur_jacobi_preconditioner.cc
|
||||
internal/ceres/schur_jacobi_preconditioner.h
|
||||
internal/ceres/schur_templates.cc
|
||||
internal/ceres/schur_templates.h
|
||||
internal/ceres/scoped_thread_token.h
|
||||
internal/ceres/scratch_evaluate_preparer.cc
|
||||
internal/ceres/scratch_evaluate_preparer.h
|
||||
internal/ceres/single_linkage_clustering.cc
|
||||
internal/ceres/single_linkage_clustering.h
|
||||
internal/ceres/small_blas_generic.h
|
||||
internal/ceres/small_blas.h
|
||||
internal/ceres/solver.cc
|
||||
internal/ceres/solver_utils.cc
|
||||
internal/ceres/solver_utils.h
|
||||
internal/ceres/sparse_cholesky.cc
|
||||
internal/ceres/sparse_cholesky.h
|
||||
internal/ceres/sparse_matrix.cc
|
||||
internal/ceres/sparse_matrix.h
|
||||
internal/ceres/sparse_normal_cholesky_solver.cc
|
||||
internal/ceres/sparse_normal_cholesky_solver.h
|
||||
internal/ceres/split.cc
|
||||
internal/ceres/split.h
|
||||
internal/ceres/stl_util.h
|
||||
internal/ceres/stringprintf.cc
|
||||
internal/ceres/stringprintf.h
|
||||
internal/ceres/subset_preconditioner.cc
|
||||
internal/ceres/subset_preconditioner.h
|
||||
internal/ceres/suitesparse.cc
|
||||
internal/ceres/suitesparse.h
|
||||
internal/ceres/thread_pool.cc
|
||||
internal/ceres/thread_pool.h
|
||||
internal/ceres/thread_token_provider.cc
|
||||
internal/ceres/thread_token_provider.h
|
||||
internal/ceres/triplet_sparse_matrix.cc
|
||||
internal/ceres/triplet_sparse_matrix.h
|
||||
internal/ceres/trust_region_minimizer.cc
|
||||
internal/ceres/trust_region_minimizer.h
|
||||
internal/ceres/trust_region_preprocessor.cc
|
||||
internal/ceres/trust_region_preprocessor.h
|
||||
internal/ceres/trust_region_step_evaluator.cc
|
||||
internal/ceres/trust_region_step_evaluator.h
|
||||
internal/ceres/trust_region_strategy.cc
|
||||
internal/ceres/trust_region_strategy.h
|
||||
internal/ceres/types.cc
|
||||
internal/ceres/visibility_based_preconditioner.cc
|
||||
internal/ceres/visibility_based_preconditioner.h
|
||||
internal/ceres/visibility.cc
|
||||
internal/ceres/visibility.h
|
||||
internal/ceres/wall_time.cc
|
||||
internal/ceres/wall_time.h
|
||||
config/ceres/internal/config.h
|
@@ -151,8 +151,7 @@ namespace ceres {
|
||||
template <typename CostFunctor,
|
||||
int kNumResiduals, // Number of residuals, or ceres::DYNAMIC.
|
||||
int... Ns> // Number of parameters in each parameter block.
|
||||
class AutoDiffCostFunction final
|
||||
: public SizedCostFunction<kNumResiduals, Ns...> {
|
||||
class AutoDiffCostFunction : public SizedCostFunction<kNumResiduals, Ns...> {
|
||||
public:
|
||||
// Takes ownership of functor by default. Uses the template-provided
|
||||
// value for the number of residuals ("kNumResiduals").
|
||||
@@ -179,7 +178,7 @@ class AutoDiffCostFunction final
|
||||
SizedCostFunction<kNumResiduals, Ns...>::set_num_residuals(num_residuals);
|
||||
}
|
||||
|
||||
AutoDiffCostFunction(AutoDiffCostFunction&& other)
|
||||
explicit AutoDiffCostFunction(AutoDiffCostFunction&& other)
|
||||
: functor_(std::move(other.functor_)), ownership_(other.ownership_) {}
|
||||
|
||||
virtual ~AutoDiffCostFunction() {
|
||||
@@ -216,8 +215,6 @@ class AutoDiffCostFunction final
|
||||
jacobians);
|
||||
};
|
||||
|
||||
const CostFunctor& functor() const { return *functor_; }
|
||||
|
||||
private:
|
||||
std::unique_ptr<CostFunctor> functor_;
|
||||
Ownership ownership_;
|
||||
|
@@ -102,7 +102,7 @@ namespace ceres {
|
||||
// seen where instead of using a_ directly, a_ is wrapped with T(a_).
|
||||
|
||||
template <typename FirstOrderFunctor, int kNumParameters>
|
||||
class AutoDiffFirstOrderFunction final : public FirstOrderFunction {
|
||||
class AutoDiffFirstOrderFunction : public FirstOrderFunction {
|
||||
public:
|
||||
// Takes ownership of functor.
|
||||
explicit AutoDiffFirstOrderFunction(FirstOrderFunctor* functor)
|
||||
@@ -110,6 +110,8 @@ class AutoDiffFirstOrderFunction final : public FirstOrderFunction {
|
||||
static_assert(kNumParameters > 0, "kNumParameters must be positive");
|
||||
}
|
||||
|
||||
virtual ~AutoDiffFirstOrderFunction() {}
|
||||
|
||||
bool Evaluate(const double* const parameters,
|
||||
double* cost,
|
||||
double* gradient) const override {
|
||||
@@ -117,7 +119,7 @@ class AutoDiffFirstOrderFunction final : public FirstOrderFunction {
|
||||
return (*functor_)(parameters, cost);
|
||||
}
|
||||
|
||||
using JetT = Jet<double, kNumParameters>;
|
||||
typedef Jet<double, kNumParameters> JetT;
|
||||
internal::FixedArray<JetT, (256 * 7) / sizeof(JetT)> x(kNumParameters);
|
||||
for (int i = 0; i < kNumParameters; ++i) {
|
||||
x[i].a = parameters[i];
|
||||
@@ -140,8 +142,6 @@ class AutoDiffFirstOrderFunction final : public FirstOrderFunction {
|
||||
|
||||
int NumParameters() const override { return kNumParameters; }
|
||||
|
||||
const FirstOrderFunctor& functor() const { return *functor_; }
|
||||
|
||||
private:
|
||||
std::unique_ptr<FirstOrderFunctor> functor_;
|
||||
};
|
||||
|
@@ -40,10 +40,6 @@
|
||||
|
||||
namespace ceres {
|
||||
|
||||
// WARNING: LocalParameterizations are deprecated, so is
|
||||
// AutoDiffLocalParameterization. They will be removed from Ceres Solver in
|
||||
// version 2.2.0. Please use Manifolds and AutoDiffManifold instead.
|
||||
|
||||
// Create local parameterization with Jacobians computed via automatic
|
||||
// differentiation. For more information on local parameterizations,
|
||||
// see include/ceres/local_parameterization.h
|
||||
@@ -110,8 +106,7 @@ namespace ceres {
|
||||
// seen where instead of using k_ directly, k_ is wrapped with T(k_).
|
||||
|
||||
template <typename Functor, int kGlobalSize, int kLocalSize>
|
||||
class CERES_DEPRECATED_WITH_MSG("Use AutoDiffManifold instead.")
|
||||
AutoDiffLocalParameterization : public LocalParameterization {
|
||||
class AutoDiffLocalParameterization : public LocalParameterization {
|
||||
public:
|
||||
AutoDiffLocalParameterization() : functor_(new Functor()) {}
|
||||
|
||||
@@ -119,6 +114,7 @@ class CERES_DEPRECATED_WITH_MSG("Use AutoDiffManifold instead.")
|
||||
explicit AutoDiffLocalParameterization(Functor* functor)
|
||||
: functor_(functor) {}
|
||||
|
||||
virtual ~AutoDiffLocalParameterization() {}
|
||||
bool Plus(const double* x,
|
||||
const double* delta,
|
||||
double* x_plus_delta) const override {
|
||||
@@ -137,7 +133,7 @@ class CERES_DEPRECATED_WITH_MSG("Use AutoDiffManifold instead.")
|
||||
}
|
||||
|
||||
const double* parameter_ptrs[2] = {x, zero_delta};
|
||||
double* jacobian_ptrs[2] = {nullptr, jacobian};
|
||||
double* jacobian_ptrs[2] = {NULL, jacobian};
|
||||
return internal::AutoDifferentiate<
|
||||
kGlobalSize,
|
||||
internal::StaticParameterDims<kGlobalSize, kLocalSize>>(
|
||||
@@ -147,8 +143,6 @@ class CERES_DEPRECATED_WITH_MSG("Use AutoDiffManifold instead.")
|
||||
int GlobalSize() const override { return kGlobalSize; }
|
||||
int LocalSize() const override { return kLocalSize; }
|
||||
|
||||
const Functor& functor() const { return *functor_; }
|
||||
|
||||
private:
|
||||
std::unique_ptr<Functor> functor_;
|
||||
};
|
||||
|
259
extern/ceres/include/ceres/autodiff_manifold.h
vendored
259
extern/ceres/include/ceres/autodiff_manifold.h
vendored
@@ -1,259 +0,0 @@
|
||||
// Ceres Solver - A fast non-linear least squares minimizer
|
||||
// Copyright 2022 Google Inc. All rights reserved.
|
||||
// http://ceres-solver.org/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without
|
||||
// specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Author: sameeragarwal@google.com (Sameer Agarwal)
|
||||
|
||||
#ifndef CERES_PUBLIC_AUTODIFF_MANIFOLD_H_
|
||||
#define CERES_PUBLIC_AUTODIFF_MANIFOLD_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "ceres/internal/autodiff.h"
|
||||
#include "ceres/manifold.h"
|
||||
|
||||
namespace ceres {
|
||||
|
||||
// Create a Manifold with Jacobians computed via automatic differentiation. For
|
||||
// more information on manifolds, see include/ceres/manifold.h
|
||||
//
|
||||
// To get an auto differentiated manifold, you must define a class/struct with
|
||||
// templated Plus and Minus functions that compute
|
||||
//
|
||||
// x_plus_delta = Plus(x, delta);
|
||||
// y_minus_x = Minus(y, x);
|
||||
//
|
||||
// Where, x, y and x_plus_y are vectors on the manifold in the ambient space (so
|
||||
// they are kAmbientSize vectors) and delta, y_minus_x are vectors in the
|
||||
// tangent space (so they are kTangentSize vectors).
|
||||
//
|
||||
// The Functor should have the signature:
|
||||
//
|
||||
// struct Functor {
|
||||
// template <typename T>
|
||||
// bool Plus(const T* x, const T* delta, T* x_plus_delta) const;
|
||||
//
|
||||
// template <typename T>
|
||||
// bool Minus(const T* y, const T* x, T* y_minus_x) const;
|
||||
// };
|
||||
//
|
||||
// Observe that the Plus and Minus operations are templated on the parameter T.
|
||||
// The autodiff framework substitutes appropriate "Jet" objects for T in order
|
||||
// to compute the derivative when necessary. This is the same mechanism that is
|
||||
// used to compute derivatives when using AutoDiffCostFunction.
|
||||
//
|
||||
// Plus and Minus should return true if the computation is successful and false
|
||||
// otherwise, in which case the result will not be used.
|
||||
//
|
||||
// Given this Functor, the corresponding Manifold can be constructed as:
|
||||
//
|
||||
// AutoDiffManifold<Functor, kAmbientSize, kTangentSize> manifold;
|
||||
//
|
||||
// As a concrete example consider the case of Quaternions. Quaternions form a
|
||||
// three dimensional manifold embedded in R^4, i.e. they have an ambient
|
||||
// dimension of 4 and their tangent space has dimension 3. The following Functor
|
||||
// (taken from autodiff_manifold_test.cc) defines the Plus and Minus operations
|
||||
// on the Quaternion manifold:
|
||||
//
|
||||
// NOTE: The following is only used for illustration purposes. Ceres Solver
|
||||
// ships with optimized production grade QuaternionManifold implementation. See
|
||||
// manifold.h.
|
||||
//
|
||||
// This functor assumes that the quaternions are laid out as [w,x,y,z] in
|
||||
// memory, i.e. the real or scalar part is the first coordinate.
|
||||
//
|
||||
// struct QuaternionFunctor {
|
||||
// template <typename T>
|
||||
// bool Plus(const T* x, const T* delta, T* x_plus_delta) const {
|
||||
// const T squared_norm_delta =
|
||||
// delta[0] * delta[0] + delta[1] * delta[1] + delta[2] * delta[2];
|
||||
//
|
||||
// T q_delta[4];
|
||||
// if (squared_norm_delta > T(0.0)) {
|
||||
// T norm_delta = sqrt(squared_norm_delta);
|
||||
// const T sin_delta_by_delta = sin(norm_delta) / norm_delta;
|
||||
// q_delta[0] = cos(norm_delta);
|
||||
// q_delta[1] = sin_delta_by_delta * delta[0];
|
||||
// q_delta[2] = sin_delta_by_delta * delta[1];
|
||||
// q_delta[3] = sin_delta_by_delta * delta[2];
|
||||
// } else {
|
||||
// // We do not just use q_delta = [1,0,0,0] here because that is a
|
||||
// // constant and when used for automatic differentiation will
|
||||
// // lead to a zero derivative. Instead we take a first order
|
||||
// // approximation and evaluate it at zero.
|
||||
// q_delta[0] = T(1.0);
|
||||
// q_delta[1] = delta[0];
|
||||
// q_delta[2] = delta[1];
|
||||
// q_delta[3] = delta[2];
|
||||
// }
|
||||
//
|
||||
// QuaternionProduct(q_delta, x, x_plus_delta);
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// template <typename T>
|
||||
// bool Minus(const T* y, const T* x, T* y_minus_x) const {
|
||||
// T minus_x[4] = {x[0], -x[1], -x[2], -x[3]};
|
||||
// T ambient_y_minus_x[4];
|
||||
// QuaternionProduct(y, minus_x, ambient_y_minus_x);
|
||||
// T u_norm = sqrt(ambient_y_minus_x[1] * ambient_y_minus_x[1] +
|
||||
// ambient_y_minus_x[2] * ambient_y_minus_x[2] +
|
||||
// ambient_y_minus_x[3] * ambient_y_minus_x[3]);
|
||||
// if (u_norm > 0.0) {
|
||||
// T theta = atan2(u_norm, ambient_y_minus_x[0]);
|
||||
// y_minus_x[0] = theta * ambient_y_minus_x[1] / u_norm;
|
||||
// y_minus_x[1] = theta * ambient_y_minus_x[2] / u_norm;
|
||||
// y_minus_x[2] = theta * ambient_y_minus_x[3] / u_norm;
|
||||
// } else {
|
||||
// // We do not use [0,0,0] here because even though the value part is
|
||||
// // a constant, the derivative part is not.
|
||||
// y_minus_x[0] = ambient_y_minus_x[1];
|
||||
// y_minus_x[1] = ambient_y_minus_x[2];
|
||||
// y_minus_x[2] = ambient_y_minus_x[3];
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
// };
|
||||
//
|
||||
// Then given this struct, the auto differentiated Quaternion Manifold can now
|
||||
// be constructed as
|
||||
//
|
||||
// Manifold* manifold = new AutoDiffManifold<QuaternionFunctor, 4, 3>;
|
||||
|
||||
template <typename Functor, int kAmbientSize, int kTangentSize>
|
||||
class AutoDiffManifold final : public Manifold {
|
||||
public:
|
||||
AutoDiffManifold() : functor_(std::make_unique<Functor>()) {}
|
||||
|
||||
// Takes ownership of functor.
|
||||
explicit AutoDiffManifold(Functor* functor) : functor_(functor) {}
|
||||
|
||||
int AmbientSize() const override { return kAmbientSize; }
|
||||
int TangentSize() const override { return kTangentSize; }
|
||||
|
||||
bool Plus(const double* x,
|
||||
const double* delta,
|
||||
double* x_plus_delta) const override {
|
||||
return functor_->Plus(x, delta, x_plus_delta);
|
||||
}
|
||||
|
||||
bool PlusJacobian(const double* x, double* jacobian) const override;
|
||||
|
||||
bool Minus(const double* y,
|
||||
const double* x,
|
||||
double* y_minus_x) const override {
|
||||
return functor_->Minus(y, x, y_minus_x);
|
||||
}
|
||||
|
||||
bool MinusJacobian(const double* x, double* jacobian) const override;
|
||||
|
||||
const Functor& functor() const { return *functor_; }
|
||||
|
||||
private:
|
||||
std::unique_ptr<Functor> functor_;
|
||||
};
|
||||
|
||||
namespace internal {
|
||||
|
||||
// The following two helper structs are needed to interface the Plus and Minus
|
||||
// methods of the ManifoldFunctor with the automatic differentiation which
|
||||
// expects a Functor with operator().
|
||||
template <typename Functor>
|
||||
struct PlusWrapper {
|
||||
explicit PlusWrapper(const Functor& functor) : functor(functor) {}
|
||||
template <typename T>
|
||||
bool operator()(const T* x, const T* delta, T* x_plus_delta) const {
|
||||
return functor.Plus(x, delta, x_plus_delta);
|
||||
}
|
||||
const Functor& functor;
|
||||
};
|
||||
|
||||
template <typename Functor>
|
||||
struct MinusWrapper {
|
||||
explicit MinusWrapper(const Functor& functor) : functor(functor) {}
|
||||
template <typename T>
|
||||
bool operator()(const T* y, const T* x, T* y_minus_x) const {
|
||||
return functor.Minus(y, x, y_minus_x);
|
||||
}
|
||||
const Functor& functor;
|
||||
};
|
||||
} // namespace internal
|
||||
|
||||
template <typename Functor, int kAmbientSize, int kTangentSize>
|
||||
bool AutoDiffManifold<Functor, kAmbientSize, kTangentSize>::PlusJacobian(
|
||||
const double* x, double* jacobian) const {
|
||||
double zero_delta[kTangentSize];
|
||||
for (int i = 0; i < kTangentSize; ++i) {
|
||||
zero_delta[i] = 0.0;
|
||||
}
|
||||
|
||||
double x_plus_delta[kAmbientSize];
|
||||
for (int i = 0; i < kAmbientSize; ++i) {
|
||||
x_plus_delta[i] = 0.0;
|
||||
}
|
||||
|
||||
const double* parameter_ptrs[2] = {x, zero_delta};
|
||||
|
||||
// PlusJacobian is D_2 Plus(x,0) so we only need to compute the Jacobian
|
||||
// w.r.t. the second argument.
|
||||
double* jacobian_ptrs[2] = {nullptr, jacobian};
|
||||
return internal::AutoDifferentiate<
|
||||
kAmbientSize,
|
||||
internal::StaticParameterDims<kAmbientSize, kTangentSize>>(
|
||||
internal::PlusWrapper<Functor>(*functor_),
|
||||
parameter_ptrs,
|
||||
kAmbientSize,
|
||||
x_plus_delta,
|
||||
jacobian_ptrs);
|
||||
}
|
||||
|
||||
template <typename Functor, int kAmbientSize, int kTangentSize>
|
||||
bool AutoDiffManifold<Functor, kAmbientSize, kTangentSize>::MinusJacobian(
|
||||
const double* x, double* jacobian) const {
|
||||
double y_minus_x[kTangentSize];
|
||||
for (int i = 0; i < kTangentSize; ++i) {
|
||||
y_minus_x[i] = 0.0;
|
||||
}
|
||||
|
||||
const double* parameter_ptrs[2] = {x, x};
|
||||
|
||||
// MinusJacobian is D_1 Minus(x,x), so we only need to compute the Jacobian
|
||||
// w.r.t. the first argument.
|
||||
double* jacobian_ptrs[2] = {jacobian, nullptr};
|
||||
return internal::AutoDifferentiate<
|
||||
kTangentSize,
|
||||
internal::StaticParameterDims<kAmbientSize, kAmbientSize>>(
|
||||
internal::MinusWrapper<Functor>(*functor_),
|
||||
parameter_ptrs,
|
||||
kTangentSize,
|
||||
y_minus_x,
|
||||
jacobian_ptrs);
|
||||
}
|
||||
|
||||
} // namespace ceres
|
||||
|
||||
#endif // CERES_PUBLIC_AUTODIFF_MANIFOLD_H_
|
2
extern/ceres/include/ceres/c_api.h
vendored
2
extern/ceres/include/ceres/c_api.h
vendored
@@ -39,7 +39,7 @@
|
||||
#define CERES_PUBLIC_C_API_H_
|
||||
|
||||
// clang-format off
|
||||
#include "ceres/internal/export.h"
|
||||
#include "ceres/internal/port.h"
|
||||
#include "ceres/internal/disable_warnings.h"
|
||||
// clang-format on
|
||||
|
||||
|
10
extern/ceres/include/ceres/ceres.h
vendored
10
extern/ceres/include/ceres/ceres.h
vendored
@@ -1,5 +1,5 @@
|
||||
// Ceres Solver - A fast non-linear least squares minimizer
|
||||
// Copyright 2022 Google Inc. All rights reserved.
|
||||
// Copyright 2019 Google Inc. All rights reserved.
|
||||
// http://ceres-solver.org/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
@@ -35,9 +35,7 @@
|
||||
#define CERES_PUBLIC_CERES_H_
|
||||
|
||||
#include "ceres/autodiff_cost_function.h"
|
||||
#include "ceres/autodiff_first_order_function.h"
|
||||
#include "ceres/autodiff_local_parameterization.h"
|
||||
#include "ceres/autodiff_manifold.h"
|
||||
#include "ceres/conditioned_cost_function.h"
|
||||
#include "ceres/context.h"
|
||||
#include "ceres/cost_function.h"
|
||||
@@ -49,25 +47,19 @@
|
||||
#include "ceres/dynamic_cost_function_to_functor.h"
|
||||
#include "ceres/dynamic_numeric_diff_cost_function.h"
|
||||
#include "ceres/evaluation_callback.h"
|
||||
#include "ceres/first_order_function.h"
|
||||
#include "ceres/gradient_checker.h"
|
||||
#include "ceres/gradient_problem.h"
|
||||
#include "ceres/gradient_problem_solver.h"
|
||||
#include "ceres/iteration_callback.h"
|
||||
#include "ceres/jet.h"
|
||||
#include "ceres/line_manifold.h"
|
||||
#include "ceres/local_parameterization.h"
|
||||
#include "ceres/loss_function.h"
|
||||
#include "ceres/manifold.h"
|
||||
#include "ceres/numeric_diff_cost_function.h"
|
||||
#include "ceres/numeric_diff_first_order_function.h"
|
||||
#include "ceres/numeric_diff_options.h"
|
||||
#include "ceres/ordered_groups.h"
|
||||
#include "ceres/problem.h"
|
||||
#include "ceres/product_manifold.h"
|
||||
#include "ceres/sized_cost_function.h"
|
||||
#include "ceres/solver.h"
|
||||
#include "ceres/sphere_manifold.h"
|
||||
#include "ceres/types.h"
|
||||
#include "ceres/version.h"
|
||||
|
||||
|
@@ -71,18 +71,18 @@ namespace ceres {
|
||||
// ccf_residual[i] = f_i(my_cost_function_residual[i])
|
||||
//
|
||||
// and the Jacobian will be affected appropriately.
|
||||
class CERES_EXPORT ConditionedCostFunction final : public CostFunction {
|
||||
class CERES_EXPORT ConditionedCostFunction : public CostFunction {
|
||||
public:
|
||||
// Builds a cost function based on a wrapped cost function, and a
|
||||
// per-residual conditioner. Takes ownership of all of the wrapped cost
|
||||
// functions, or not, depending on the ownership parameter. Conditioners
|
||||
// may be nullptr, in which case the corresponding residual is not modified.
|
||||
// may be NULL, in which case the corresponding residual is not modified.
|
||||
//
|
||||
// The conditioners can repeat.
|
||||
ConditionedCostFunction(CostFunction* wrapped_cost_function,
|
||||
const std::vector<CostFunction*>& conditioners,
|
||||
Ownership ownership);
|
||||
~ConditionedCostFunction() override;
|
||||
virtual ~ConditionedCostFunction();
|
||||
|
||||
bool Evaluate(double const* const* parameters,
|
||||
double* residuals,
|
||||
|
8
extern/ceres/include/ceres/context.h
vendored
8
extern/ceres/include/ceres/context.h
vendored
@@ -31,8 +31,6 @@
|
||||
#ifndef CERES_PUBLIC_CONTEXT_H_
|
||||
#define CERES_PUBLIC_CONTEXT_H_
|
||||
|
||||
#include "ceres/internal/export.h"
|
||||
|
||||
namespace ceres {
|
||||
|
||||
// A global context for processing data in Ceres. This provides a mechanism to
|
||||
@@ -41,13 +39,13 @@ namespace ceres {
|
||||
// Problems, either serially or in parallel. When using it with multiple
|
||||
// Problems at the same time, they may end up contending for resources
|
||||
// (e.g. threads) managed by the Context.
|
||||
class CERES_EXPORT Context {
|
||||
class Context {
|
||||
public:
|
||||
Context();
|
||||
Context() {}
|
||||
Context(const Context&) = delete;
|
||||
void operator=(const Context&) = delete;
|
||||
|
||||
virtual ~Context();
|
||||
virtual ~Context() {}
|
||||
|
||||
// Creates a context object and the caller takes ownership.
|
||||
static Context* Create();
|
||||
|
10
extern/ceres/include/ceres/cost_function.h
vendored
10
extern/ceres/include/ceres/cost_function.h
vendored
@@ -48,7 +48,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "ceres/internal/disable_warnings.h"
|
||||
#include "ceres/internal/export.h"
|
||||
#include "ceres/internal/port.h"
|
||||
|
||||
namespace ceres {
|
||||
|
||||
@@ -63,11 +63,11 @@ namespace ceres {
|
||||
// when added with AddResidualBlock().
|
||||
class CERES_EXPORT CostFunction {
|
||||
public:
|
||||
CostFunction();
|
||||
CostFunction() : num_residuals_(0) {}
|
||||
CostFunction(const CostFunction&) = delete;
|
||||
void operator=(const CostFunction&) = delete;
|
||||
|
||||
virtual ~CostFunction();
|
||||
virtual ~CostFunction() {}
|
||||
|
||||
// Inputs:
|
||||
//
|
||||
@@ -92,8 +92,8 @@ class CERES_EXPORT CostFunction {
|
||||
// jacobians[i][r*parameter_block_size_[i] + c] =
|
||||
// d residual[r] / d parameters[i][c]
|
||||
//
|
||||
// If jacobians is nullptr, then no derivatives are returned; this is
|
||||
// the case when computing cost only. If jacobians[i] is nullptr, then
|
||||
// If jacobians is NULL, then no derivatives are returned; this is
|
||||
// the case when computing cost only. If jacobians[i] is NULL, then
|
||||
// the jacobian block corresponding to the i'th parameter block must
|
||||
// not to be returned.
|
||||
//
|
||||
|
@@ -94,11 +94,10 @@
|
||||
|
||||
#include "ceres/cost_function.h"
|
||||
#include "ceres/dynamic_cost_function_to_functor.h"
|
||||
#include "ceres/internal/export.h"
|
||||
#include "ceres/internal/fixed_array.h"
|
||||
#include "ceres/internal/parameter_dims.h"
|
||||
#include "ceres/internal/port.h"
|
||||
#include "ceres/types.h"
|
||||
#include "glog/logging.h"
|
||||
|
||||
namespace ceres {
|
||||
|
||||
|
5
extern/ceres/include/ceres/covariance.h
vendored
5
extern/ceres/include/ceres/covariance.h
vendored
@@ -35,9 +35,8 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "ceres/internal/config.h"
|
||||
#include "ceres/internal/disable_warnings.h"
|
||||
#include "ceres/internal/export.h"
|
||||
#include "ceres/internal/port.h"
|
||||
#include "ceres/types.h"
|
||||
|
||||
namespace ceres {
|
||||
@@ -146,7 +145,7 @@ class CovarianceImpl;
|
||||
// a. The rank deficiency arises from overparameterization. e.g., a
|
||||
// four dimensional quaternion used to parameterize SO(3), which is
|
||||
// a three dimensional manifold. In cases like this, the user should
|
||||
// use an appropriate LocalParameterization/Manifold. Not only will this lead
|
||||
// use an appropriate LocalParameterization. Not only will this lead
|
||||
// to better numerical behaviour of the Solver, it will also expose
|
||||
// the rank deficiency to the Covariance object so that it can
|
||||
// handle it correctly.
|
||||
|
8
extern/ceres/include/ceres/crs_matrix.h
vendored
8
extern/ceres/include/ceres/crs_matrix.h
vendored
@@ -34,17 +34,17 @@
|
||||
#include <vector>
|
||||
|
||||
#include "ceres/internal/disable_warnings.h"
|
||||
#include "ceres/internal/export.h"
|
||||
#include "ceres/internal/port.h"
|
||||
|
||||
namespace ceres {
|
||||
|
||||
// A compressed row sparse matrix used primarily for communicating the
|
||||
// Jacobian matrix to the user.
|
||||
struct CERES_EXPORT CRSMatrix {
|
||||
CRSMatrix() = default;
|
||||
CRSMatrix() : num_rows(0), num_cols(0) {}
|
||||
|
||||
int num_rows{0};
|
||||
int num_cols{0};
|
||||
int num_rows;
|
||||
int num_cols;
|
||||
|
||||
// A compressed row matrix stores its contents in three arrays,
|
||||
// rows, cols and values.
|
||||
|
26
extern/ceres/include/ceres/cubic_interpolation.h
vendored
26
extern/ceres/include/ceres/cubic_interpolation.h
vendored
@@ -32,7 +32,7 @@
|
||||
#define CERES_PUBLIC_CUBIC_INTERPOLATION_H_
|
||||
|
||||
#include "Eigen/Core"
|
||||
#include "ceres/internal/export.h"
|
||||
#include "ceres/internal/port.h"
|
||||
#include "glog/logging.h"
|
||||
|
||||
namespace ceres {
|
||||
@@ -59,8 +59,8 @@ namespace ceres {
|
||||
// http://en.wikipedia.org/wiki/Cubic_Hermite_spline
|
||||
// http://en.wikipedia.org/wiki/Bicubic_interpolation
|
||||
//
|
||||
// f if not nullptr will contain the interpolated function values.
|
||||
// dfdx if not nullptr will contain the interpolated derivative values.
|
||||
// f if not NULL will contain the interpolated function values.
|
||||
// dfdx if not NULL will contain the interpolated derivative values.
|
||||
template <int kDataDimension>
|
||||
void CubicHermiteSpline(const Eigen::Matrix<double, kDataDimension, 1>& p0,
|
||||
const Eigen::Matrix<double, kDataDimension, 1>& p1,
|
||||
@@ -69,7 +69,7 @@ void CubicHermiteSpline(const Eigen::Matrix<double, kDataDimension, 1>& p0,
|
||||
const double x,
|
||||
double* f,
|
||||
double* dfdx) {
|
||||
using VType = Eigen::Matrix<double, kDataDimension, 1>;
|
||||
typedef Eigen::Matrix<double, kDataDimension, 1> VType;
|
||||
const VType a = 0.5 * (-p0 + 3.0 * p1 - 3.0 * p2 + p3);
|
||||
const VType b = 0.5 * (2.0 * p0 - 5.0 * p1 + 4.0 * p2 - p3);
|
||||
const VType c = 0.5 * (-p0 + p2);
|
||||
@@ -79,12 +79,12 @@ void CubicHermiteSpline(const Eigen::Matrix<double, kDataDimension, 1>& p0,
|
||||
// derivative.
|
||||
|
||||
// f = ax^3 + bx^2 + cx + d
|
||||
if (f != nullptr) {
|
||||
if (f != NULL) {
|
||||
Eigen::Map<VType>(f, kDataDimension) = d + x * (c + x * (b + x * a));
|
||||
}
|
||||
|
||||
// dfdx = 3ax^2 + 2bx + c
|
||||
if (dfdx != nullptr) {
|
||||
if (dfdx != NULL) {
|
||||
Eigen::Map<VType>(dfdx, kDataDimension) = c + x * (2.0 * b + 3.0 * a * x);
|
||||
}
|
||||
}
|
||||
@@ -143,7 +143,7 @@ class CubicInterpolator {
|
||||
// The following two Evaluate overloads are needed for interfacing
|
||||
// with automatic differentiation. The first is for when a scalar
|
||||
// evaluation is done, and the second one is for when Jets are used.
|
||||
void Evaluate(const double& x, double* f) const { Evaluate(x, f, nullptr); }
|
||||
void Evaluate(const double& x, double* f) const { Evaluate(x, f, NULL); }
|
||||
|
||||
template <typename JetT>
|
||||
void Evaluate(const JetT& x, JetT* f) const {
|
||||
@@ -191,7 +191,7 @@ struct Grid1D {
|
||||
}
|
||||
|
||||
EIGEN_STRONG_INLINE void GetValue(const int n, double* f) const {
|
||||
const int idx = (std::min)((std::max)(begin_, n), end_ - 1) - begin_;
|
||||
const int idx = std::min(std::max(begin_, n), end_ - 1) - begin_;
|
||||
if (kInterleaved) {
|
||||
for (int i = 0; i < kDataDimension; ++i) {
|
||||
f[i] = static_cast<double>(data_[kDataDimension * idx + i]);
|
||||
@@ -317,10 +317,10 @@ class BiCubicInterpolator {
|
||||
// Interpolate vertically the interpolated value from each row and
|
||||
// compute the derivative along the columns.
|
||||
CubicHermiteSpline<Grid::DATA_DIMENSION>(f0, f1, f2, f3, r - row, f, dfdr);
|
||||
if (dfdc != nullptr) {
|
||||
if (dfdc != NULL) {
|
||||
// Interpolate vertically the derivative along the columns.
|
||||
CubicHermiteSpline<Grid::DATA_DIMENSION>(
|
||||
df0dc, df1dc, df2dc, df3dc, r - row, dfdc, nullptr);
|
||||
df0dc, df1dc, df2dc, df3dc, r - row, dfdc, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ class BiCubicInterpolator {
|
||||
// with automatic differentiation. The first is for when a scalar
|
||||
// evaluation is done, and the second one is for when Jets are used.
|
||||
void Evaluate(const double& r, const double& c, double* f) const {
|
||||
Evaluate(r, c, f, nullptr, nullptr);
|
||||
Evaluate(r, c, f, NULL, NULL);
|
||||
}
|
||||
|
||||
template <typename JetT>
|
||||
@@ -402,9 +402,9 @@ struct Grid2D {
|
||||
|
||||
EIGEN_STRONG_INLINE void GetValue(const int r, const int c, double* f) const {
|
||||
const int row_idx =
|
||||
(std::min)((std::max)(row_begin_, r), row_end_ - 1) - row_begin_;
|
||||
std::min(std::max(row_begin_, r), row_end_ - 1) - row_begin_;
|
||||
const int col_idx =
|
||||
(std::min)((std::max)(col_begin_, c), col_end_ - 1) - col_begin_;
|
||||
std::min(std::max(col_begin_, c), col_end_ - 1) - col_begin_;
|
||||
|
||||
const int n = (kRowMajor) ? num_cols_ * row_idx + col_idx
|
||||
: num_rows_ * col_idx + row_idx;
|
||||
|
@@ -77,17 +77,17 @@ namespace ceres {
|
||||
// pass. There is a tradeoff with the size of the passes; you may want
|
||||
// to experiment with the stride.
|
||||
template <typename CostFunctor, int Stride = 4>
|
||||
class DynamicAutoDiffCostFunction final : public DynamicCostFunction {
|
||||
class DynamicAutoDiffCostFunction : public DynamicCostFunction {
|
||||
public:
|
||||
// Takes ownership by default.
|
||||
explicit DynamicAutoDiffCostFunction(CostFunctor* functor,
|
||||
Ownership ownership = TAKE_OWNERSHIP)
|
||||
DynamicAutoDiffCostFunction(CostFunctor* functor,
|
||||
Ownership ownership = TAKE_OWNERSHIP)
|
||||
: functor_(functor), ownership_(ownership) {}
|
||||
|
||||
DynamicAutoDiffCostFunction(DynamicAutoDiffCostFunction&& other)
|
||||
explicit DynamicAutoDiffCostFunction(DynamicAutoDiffCostFunction&& other)
|
||||
: functor_(std::move(other.functor_)), ownership_(other.ownership_) {}
|
||||
|
||||
~DynamicAutoDiffCostFunction() override {
|
||||
virtual ~DynamicAutoDiffCostFunction() {
|
||||
// Manually release pointer if configured to not take ownership
|
||||
// rather than deleting only if ownership is taken. This is to
|
||||
// stay maximally compatible to old user code which may have
|
||||
@@ -105,7 +105,7 @@ class DynamicAutoDiffCostFunction final : public DynamicCostFunction {
|
||||
<< "You must call DynamicAutoDiffCostFunction::SetNumResiduals() "
|
||||
<< "before DynamicAutoDiffCostFunction::Evaluate().";
|
||||
|
||||
if (jacobians == nullptr) {
|
||||
if (jacobians == NULL) {
|
||||
return (*functor_)(parameters, residuals);
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ class DynamicAutoDiffCostFunction final : public DynamicCostFunction {
|
||||
jet_parameters[i] = &input_jets[parameter_cursor];
|
||||
|
||||
const int parameter_block_size = parameter_block_sizes()[i];
|
||||
if (jacobians[i] != nullptr) {
|
||||
if (jacobians[i] != NULL) {
|
||||
if (!in_derivative_section) {
|
||||
start_derivative_section.push_back(parameter_cursor);
|
||||
in_derivative_section = true;
|
||||
@@ -209,7 +209,7 @@ class DynamicAutoDiffCostFunction final : public DynamicCostFunction {
|
||||
parameter_cursor >=
|
||||
(start_derivative_section[current_derivative_section] +
|
||||
current_derivative_section_cursor)) {
|
||||
if (jacobians[i] != nullptr) {
|
||||
if (jacobians[i] != NULL) {
|
||||
input_jets[parameter_cursor].v[active_parameter_count] = 1.0;
|
||||
++active_parameter_count;
|
||||
++current_derivative_section_cursor;
|
||||
@@ -238,7 +238,7 @@ class DynamicAutoDiffCostFunction final : public DynamicCostFunction {
|
||||
parameter_cursor >=
|
||||
(start_derivative_section[current_derivative_section] +
|
||||
current_derivative_section_cursor)) {
|
||||
if (jacobians[i] != nullptr) {
|
||||
if (jacobians[i] != NULL) {
|
||||
for (int k = 0; k < num_residuals(); ++k) {
|
||||
jacobians[i][k * parameter_block_sizes()[i] + j] =
|
||||
output_jets[k].v[active_parameter_count];
|
||||
|
@@ -32,7 +32,6 @@
|
||||
#define CERES_PUBLIC_DYNAMIC_COST_FUNCTION_H_
|
||||
|
||||
#include "ceres/cost_function.h"
|
||||
#include "ceres/internal/disable_warnings.h"
|
||||
|
||||
namespace ceres {
|
||||
|
||||
@@ -41,6 +40,8 @@ namespace ceres {
|
||||
// parameter blocks and set the number of residuals at run time.
|
||||
class CERES_EXPORT DynamicCostFunction : public CostFunction {
|
||||
public:
|
||||
~DynamicCostFunction() {}
|
||||
|
||||
virtual void AddParameterBlock(int size) {
|
||||
mutable_parameter_block_sizes()->push_back(size);
|
||||
}
|
||||
@@ -52,6 +53,4 @@ class CERES_EXPORT DynamicCostFunction : public CostFunction {
|
||||
|
||||
} // namespace ceres
|
||||
|
||||
#include "ceres/internal/reenable_warnings.h"
|
||||
|
||||
#endif // CERES_PUBLIC_DYNAMIC_COST_FUNCTION_H_
|
||||
|
@@ -37,10 +37,8 @@
|
||||
#include <vector>
|
||||
|
||||
#include "ceres/dynamic_cost_function.h"
|
||||
#include "ceres/internal/disable_warnings.h"
|
||||
#include "ceres/internal/export.h"
|
||||
#include "ceres/internal/fixed_array.h"
|
||||
#include "glog/logging.h"
|
||||
#include "ceres/internal/port.h"
|
||||
|
||||
namespace ceres {
|
||||
|
||||
@@ -102,7 +100,7 @@ namespace ceres {
|
||||
// private:
|
||||
// DynamicCostFunctionToFunctor intrinsic_projection_;
|
||||
// };
|
||||
class CERES_EXPORT DynamicCostFunctionToFunctor {
|
||||
class DynamicCostFunctionToFunctor {
|
||||
public:
|
||||
// Takes ownership of cost_function.
|
||||
explicit DynamicCostFunctionToFunctor(CostFunction* cost_function)
|
||||
@@ -111,7 +109,7 @@ class CERES_EXPORT DynamicCostFunctionToFunctor {
|
||||
}
|
||||
|
||||
bool operator()(double const* const* parameters, double* residuals) const {
|
||||
return cost_function_->Evaluate(parameters, residuals, nullptr);
|
||||
return cost_function_->Evaluate(parameters, residuals, NULL);
|
||||
}
|
||||
|
||||
template <typename JetT>
|
||||
@@ -189,6 +187,4 @@ class CERES_EXPORT DynamicCostFunctionToFunctor {
|
||||
|
||||
} // namespace ceres
|
||||
|
||||
#include "ceres/internal/reenable_warnings.h"
|
||||
|
||||
#endif // CERES_PUBLIC_DYNAMIC_COST_FUNCTION_TO_FUNCTOR_H_
|
||||
|
@@ -77,7 +77,7 @@ namespace ceres {
|
||||
// cost_function.AddParameterBlock(10);
|
||||
// cost_function.SetNumResiduals(21);
|
||||
template <typename CostFunctor, NumericDiffMethodType method = CENTRAL>
|
||||
class DynamicNumericDiffCostFunction final : public DynamicCostFunction {
|
||||
class DynamicNumericDiffCostFunction : public DynamicCostFunction {
|
||||
public:
|
||||
explicit DynamicNumericDiffCostFunction(
|
||||
const CostFunctor* functor,
|
||||
@@ -85,10 +85,11 @@ class DynamicNumericDiffCostFunction final : public DynamicCostFunction {
|
||||
const NumericDiffOptions& options = NumericDiffOptions())
|
||||
: functor_(functor), ownership_(ownership), options_(options) {}
|
||||
|
||||
DynamicNumericDiffCostFunction(DynamicNumericDiffCostFunction&& other)
|
||||
explicit DynamicNumericDiffCostFunction(
|
||||
DynamicNumericDiffCostFunction&& other)
|
||||
: functor_(std::move(other.functor_)), ownership_(other.ownership_) {}
|
||||
|
||||
~DynamicNumericDiffCostFunction() override {
|
||||
virtual ~DynamicNumericDiffCostFunction() {
|
||||
if (ownership_ != TAKE_OWNERSHIP) {
|
||||
functor_.release();
|
||||
}
|
||||
@@ -110,7 +111,7 @@ class DynamicNumericDiffCostFunction final : public DynamicCostFunction {
|
||||
const bool status =
|
||||
internal::VariadicEvaluate<internal::DynamicParameterDims>(
|
||||
*functor_.get(), parameters, residuals);
|
||||
if (jacobians == nullptr || !status) {
|
||||
if (jacobians == NULL || !status) {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -132,7 +133,7 @@ class DynamicNumericDiffCostFunction final : public DynamicCostFunction {
|
||||
}
|
||||
|
||||
for (size_t block = 0; block < block_sizes.size(); ++block) {
|
||||
if (jacobians[block] != nullptr &&
|
||||
if (jacobians[block] != NULL &&
|
||||
!NumericDiff<CostFunctor,
|
||||
method,
|
||||
ceres::DYNAMIC,
|
||||
|
@@ -31,7 +31,7 @@
|
||||
#ifndef CERES_PUBLIC_EVALUATION_CALLBACK_H_
|
||||
#define CERES_PUBLIC_EVALUATION_CALLBACK_H_
|
||||
|
||||
#include "ceres/internal/export.h"
|
||||
#include "ceres/internal/port.h"
|
||||
|
||||
namespace ceres {
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace ceres {
|
||||
// execute faster.
|
||||
class CERES_EXPORT EvaluationCallback {
|
||||
public:
|
||||
virtual ~EvaluationCallback();
|
||||
virtual ~EvaluationCallback() {}
|
||||
|
||||
// Called before Ceres requests residuals or jacobians for a given setting of
|
||||
// the parameters. User parameters (the double* values provided to the cost
|
||||
|
@@ -31,7 +31,7 @@
|
||||
#ifndef CERES_PUBLIC_FIRST_ORDER_FUNCTION_H_
|
||||
#define CERES_PUBLIC_FIRST_ORDER_FUNCTION_H_
|
||||
|
||||
#include "ceres/internal/export.h"
|
||||
#include "ceres/internal/port.h"
|
||||
|
||||
namespace ceres {
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace ceres {
|
||||
// and its gradient.
|
||||
class CERES_EXPORT FirstOrderFunction {
|
||||
public:
|
||||
virtual ~FirstOrderFunction();
|
||||
virtual ~FirstOrderFunction() {}
|
||||
|
||||
// cost is never null. gradient may be null. The return value
|
||||
// indicates whether the evaluation was successful or not.
|
||||
|
73
extern/ceres/include/ceres/gradient_checker.h
vendored
73
extern/ceres/include/ceres/gradient_checker.h
vendored
@@ -40,12 +40,9 @@
|
||||
|
||||
#include "ceres/cost_function.h"
|
||||
#include "ceres/dynamic_numeric_diff_cost_function.h"
|
||||
#include "ceres/internal/disable_warnings.h"
|
||||
#include "ceres/internal/eigen.h"
|
||||
#include "ceres/internal/export.h"
|
||||
#include "ceres/internal/fixed_array.h"
|
||||
#include "ceres/local_parameterization.h"
|
||||
#include "ceres/manifold.h"
|
||||
#include "glog/logging.h"
|
||||
|
||||
namespace ceres {
|
||||
@@ -68,42 +65,19 @@ namespace ceres {
|
||||
// CostFunction, and then call Probe(). Check that the return value is 'true'.
|
||||
class CERES_EXPORT GradientChecker {
|
||||
public:
|
||||
// This constructor will not take ownership of the cost function or local
|
||||
// This will not take ownership of the cost function or local
|
||||
// parameterizations.
|
||||
//
|
||||
// function: The cost function to probe.
|
||||
//
|
||||
// local_parameterizations: A vector of local parameterizations, one for each
|
||||
// parameter block. May be nullptr or contain nullptrs to indicate that the
|
||||
// local_parameterizations: A vector of local parameterizations for each
|
||||
// parameter. May be NULL or contain NULL pointers to indicate that the
|
||||
// respective parameter does not have a local parameterization.
|
||||
//
|
||||
// options: Options to use for numerical differentiation.
|
||||
//
|
||||
// NOTE: This constructor is deprecated and will be removed in the next public
|
||||
// release of Ceres Solver. Please transition to using the Manifold based
|
||||
// version.
|
||||
CERES_DEPRECATED_WITH_MSG(
|
||||
"Local Parameterizations are deprecated. Use the constructor that uses "
|
||||
"Manifolds instead.")
|
||||
GradientChecker(
|
||||
const CostFunction* function,
|
||||
const std::vector<const LocalParameterization*>* local_parameterizations,
|
||||
const NumericDiffOptions& options);
|
||||
|
||||
// This will not take ownership of the cost function or manifolds.
|
||||
//
|
||||
// function: The cost function to probe.
|
||||
//
|
||||
// manifolds: A vector of manifolds for each parameter. May be nullptr or
|
||||
// contain nullptrs to indicate that the respective parameter blocks are
|
||||
// Euclidean.
|
||||
//
|
||||
// options: Options to use for numerical differentiation.
|
||||
GradientChecker(const CostFunction* function,
|
||||
const std::vector<const Manifold*>* manifolds,
|
||||
const NumericDiffOptions& options);
|
||||
~GradientChecker();
|
||||
|
||||
// Contains results from a call to Probe for later inspection.
|
||||
struct CERES_EXPORT ProbeResults {
|
||||
// The return value of the cost function.
|
||||
@@ -113,11 +87,11 @@ class CERES_EXPORT GradientChecker {
|
||||
Vector residuals;
|
||||
|
||||
// The sizes of the Jacobians below are dictated by the cost function's
|
||||
// parameter block size and residual block sizes. If a parameter block has a
|
||||
// manifold associated with it, the size of the "local" Jacobian will be
|
||||
// determined by the dimension of the manifold (which is the same as the
|
||||
// dimension of the tangent space) and residual block size, otherwise it
|
||||
// will be identical to the regular Jacobian.
|
||||
// parameter block size and residual block sizes. If a parameter block
|
||||
// has a local parameterization associated with it, the size of the "local"
|
||||
// Jacobian will be determined by the local parameterization dimension and
|
||||
// residual block size, otherwise it will be identical to the regular
|
||||
// Jacobian.
|
||||
|
||||
// Derivatives as computed by the cost function.
|
||||
std::vector<Matrix> jacobians;
|
||||
@@ -140,20 +114,20 @@ class CERES_EXPORT GradientChecker {
|
||||
};
|
||||
|
||||
// Call the cost function, compute alternative Jacobians using finite
|
||||
// differencing and compare results. If manifolds are given, the Jacobians
|
||||
// will be multiplied by the manifold Jacobians before performing the check,
|
||||
// which effectively means that all errors along the null space of the
|
||||
// manifold will be ignored. Returns false if the Jacobians don't match, the
|
||||
// cost function return false, or if a cost function returns a different
|
||||
// residual when called with a Jacobian output argument vs. calling it
|
||||
// without. Otherwise returns true.
|
||||
// differencing and compare results. If local parameterizations are given,
|
||||
// the Jacobians will be multiplied by the local parameterization Jacobians
|
||||
// before performing the check, which effectively means that all errors along
|
||||
// the null space of the local parameterization will be ignored.
|
||||
// Returns false if the Jacobians don't match, the cost function return false,
|
||||
// or if the cost function returns different residual when called with a
|
||||
// Jacobian output argument vs. calling it without. Otherwise returns true.
|
||||
//
|
||||
// parameters: The parameter values at which to probe.
|
||||
// relative_precision: A threshold for the relative difference between the
|
||||
// Jacobians. If the Jacobians differ by more than this amount, then the
|
||||
// probe fails.
|
||||
// results: On return, the Jacobians (and other information) will be stored
|
||||
// here. May be nullptr.
|
||||
// here. May be NULL.
|
||||
//
|
||||
// Returns true if no problems are detected and the difference between the
|
||||
// Jacobians is less than error_tolerance.
|
||||
@@ -166,24 +140,11 @@ class CERES_EXPORT GradientChecker {
|
||||
GradientChecker(const GradientChecker&) = delete;
|
||||
void operator=(const GradientChecker&) = delete;
|
||||
|
||||
// This bool is used to determine whether the constructor with the
|
||||
// LocalParameterizations is called or the one with Manifolds is called. If
|
||||
// the former, then the vector of manifolds is a vector of ManifoldAdapter
|
||||
// objects which we own and should be deleted. If the latter then they are
|
||||
// real Manifold objects owned by the caller and will not be deleted.
|
||||
//
|
||||
// This bool is only needed during the LocalParameterization to Manifold
|
||||
// transition, once this transition is complete the LocalParameterization
|
||||
// based constructor and this bool will be removed.
|
||||
const bool delete_manifolds_ = false;
|
||||
|
||||
std::vector<const Manifold*> manifolds_;
|
||||
std::vector<const LocalParameterization*> local_parameterizations_;
|
||||
const CostFunction* function_;
|
||||
std::unique_ptr<CostFunction> finite_diff_cost_function_;
|
||||
};
|
||||
|
||||
} // namespace ceres
|
||||
|
||||
#include "ceres/internal/reenable_warnings.h"
|
||||
|
||||
#endif // CERES_PUBLIC_GRADIENT_CHECKER_H_
|
||||
|
103
extern/ceres/include/ceres/gradient_problem.h
vendored
103
extern/ceres/include/ceres/gradient_problem.h
vendored
@@ -34,10 +34,8 @@
|
||||
#include <memory>
|
||||
|
||||
#include "ceres/first_order_function.h"
|
||||
#include "ceres/internal/disable_warnings.h"
|
||||
#include "ceres/internal/export.h"
|
||||
#include "ceres/internal/port.h"
|
||||
#include "ceres/local_parameterization.h"
|
||||
#include "ceres/manifold.h"
|
||||
|
||||
namespace ceres {
|
||||
|
||||
@@ -45,22 +43,23 @@ class FirstOrderFunction;
|
||||
|
||||
// Instances of GradientProblem represent general non-linear
|
||||
// optimization problems that must be solved using just the value of
|
||||
// the objective function and its gradient.
|
||||
|
||||
// Unlike the Problem class, which can only be used to model non-linear least
|
||||
// squares problems, instances of GradientProblem are not restricted in the form
|
||||
// of the objective function.
|
||||
// the objective function and its gradient. Unlike the Problem class,
|
||||
// which can only be used to model non-linear least squares problems,
|
||||
// instances of GradientProblem not restricted in the form of the
|
||||
// objective function.
|
||||
//
|
||||
// Structurally GradientProblem is a composition of a FirstOrderFunction and
|
||||
// optionally a Manifold.
|
||||
// Structurally GradientProblem is a composition of a
|
||||
// FirstOrderFunction and optionally a LocalParameterization.
|
||||
//
|
||||
// The FirstOrderFunction is responsible for evaluating the cost and gradient of
|
||||
// the objective function.
|
||||
// The FirstOrderFunction is responsible for evaluating the cost and
|
||||
// gradient of the objective function.
|
||||
//
|
||||
// The Manifold is responsible for going back and forth between the ambient
|
||||
// space and the local tangent space. (See manifold.h for more details). When a
|
||||
// Manifold is not provided, then the tangent space is assumed to coincide with
|
||||
// the ambient Euclidean space that the gradient vector lives in.
|
||||
// The LocalParameterization is responsible for going back and forth
|
||||
// between the ambient space and the local tangent space. (See
|
||||
// local_parameterization.h for more details). When a
|
||||
// LocalParameterization is not provided, then the tangent space is
|
||||
// assumed to coincide with the ambient Euclidean space that the
|
||||
// gradient vector lives in.
|
||||
//
|
||||
// Example usage:
|
||||
//
|
||||
@@ -79,7 +78,7 @@ class FirstOrderFunction;
|
||||
// const double y = parameters[1];
|
||||
//
|
||||
// cost[0] = (1.0 - x) * (1.0 - x) + 100.0 * (y - x * x) * (y - x * x);
|
||||
// if (gradient != nullptr) {
|
||||
// if (gradient != NULL) {
|
||||
// gradient[0] = -2.0 * (1.0 - x) - 200.0 * (y - x * x) * 2.0 * x;
|
||||
// gradient[1] = 200.0 * (y - x * x);
|
||||
// }
|
||||
@@ -90,96 +89,28 @@ class FirstOrderFunction;
|
||||
// };
|
||||
//
|
||||
// ceres::GradientProblem problem(new Rosenbrock());
|
||||
//
|
||||
// NOTE: We are currently in the process of transitioning from
|
||||
// LocalParameterization to Manifolds in the Ceres API. During this period,
|
||||
// GradientProblem will support using both Manifold and LocalParameterization
|
||||
// objects interchangably. For methods in the API affected by this change, see
|
||||
// their documentation below.
|
||||
class CERES_EXPORT GradientProblem {
|
||||
public:
|
||||
// Takes ownership of the function.
|
||||
explicit GradientProblem(FirstOrderFunction* function);
|
||||
|
||||
// Takes ownership of the function and the parameterization.
|
||||
//
|
||||
// NOTE: This constructor is deprecated and will be removed in the next public
|
||||
// release of Ceres Solver. Please move to using the Manifold based
|
||||
// constructor.
|
||||
CERES_DEPRECATED_WITH_MSG(
|
||||
"LocalParameterizations are deprecated. Please use the constructor that "
|
||||
"uses Manifold instead.")
|
||||
GradientProblem(FirstOrderFunction* function,
|
||||
LocalParameterization* parameterization);
|
||||
|
||||
// Takes ownership of the function and the manifold.
|
||||
GradientProblem(FirstOrderFunction* function, Manifold* manifold);
|
||||
|
||||
int NumParameters() const;
|
||||
|
||||
// Dimension of the manifold (and its tangent space).
|
||||
//
|
||||
// During the transition from LocalParameterization to Manifold, this method
|
||||
// reports the LocalSize of the LocalParameterization or the TangentSize of
|
||||
// the Manifold object associated with this problem.
|
||||
int NumTangentParameters() const;
|
||||
|
||||
// Dimension of the manifold (and its tangent space).
|
||||
//
|
||||
// NOTE: This method is deprecated and will be removed in the next public
|
||||
// release of Ceres Solver. Please move to using NumTangentParameters()
|
||||
// instead.
|
||||
int NumLocalParameters() const { return NumTangentParameters(); }
|
||||
int NumLocalParameters() const;
|
||||
|
||||
// This call is not thread safe.
|
||||
bool Evaluate(const double* parameters, double* cost, double* gradient) const;
|
||||
bool Plus(const double* x, const double* delta, double* x_plus_delta) const;
|
||||
|
||||
const FirstOrderFunction* function() const { return function_.get(); }
|
||||
FirstOrderFunction* mutable_function() { return function_.get(); }
|
||||
|
||||
// NOTE: During the transition from LocalParameterization to Manifold we need
|
||||
// to support both The LocalParameterization and Manifold based constructors.
|
||||
//
|
||||
// When the user uses the LocalParameterization, internally the solver will
|
||||
// wrap it in a ManifoldAdapter object and return it when manifold or
|
||||
// mutable_manifold are called.
|
||||
//
|
||||
// As a result this method will return a non-nullptr result if a Manifold or a
|
||||
// LocalParameterization was used when constructing the GradientProblem.
|
||||
const Manifold* manifold() const { return manifold_.get(); }
|
||||
Manifold* mutable_manifold() { return manifold_.get(); }
|
||||
|
||||
// If the problem is constructed without a LocalParameterization or with a
|
||||
// Manifold this method will return a nullptr.
|
||||
//
|
||||
// NOTE: This method is deprecated and will be removed in the next public
|
||||
// release of Ceres Solver.
|
||||
CERES_DEPRECATED_WITH_MSG("Use Manifolds instead.")
|
||||
const LocalParameterization* parameterization() const {
|
||||
return parameterization_.get();
|
||||
}
|
||||
|
||||
// If the problem is constructed without a LocalParameterization or with a
|
||||
// Manifold this method will return a nullptr.
|
||||
//
|
||||
// NOTE: This method is deprecated and will be removed in the next public
|
||||
// release of Ceres Solver.
|
||||
CERES_DEPRECATED_WITH_MSG("Use Manifolds instead.")
|
||||
LocalParameterization* mutable_parameterization() {
|
||||
return parameterization_.get();
|
||||
}
|
||||
|
||||
private:
|
||||
std::unique_ptr<FirstOrderFunction> function_;
|
||||
CERES_DEPRECATED_WITH_MSG("")
|
||||
std::unique_ptr<LocalParameterization> parameterization_;
|
||||
std::unique_ptr<Manifold> manifold_;
|
||||
std::unique_ptr<double[]> scratch_;
|
||||
};
|
||||
|
||||
} // namespace ceres
|
||||
|
||||
#include "ceres/internal/reenable_warnings.h"
|
||||
|
||||
#endif // CERES_PUBLIC_GRADIENT_PROBLEM_H_
|
||||
|
@@ -36,7 +36,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "ceres/internal/disable_warnings.h"
|
||||
#include "ceres/internal/export.h"
|
||||
#include "ceres/internal/port.h"
|
||||
#include "ceres/iteration_callback.h"
|
||||
#include "ceres/types.h"
|
||||
@@ -306,12 +305,8 @@ class CERES_EXPORT GradientProblemSolver {
|
||||
int num_parameters = -1;
|
||||
|
||||
// Dimension of the tangent space of the problem.
|
||||
CERES_DEPRECATED_WITH_MSG("Use num_tangent_parameters.")
|
||||
int num_local_parameters = -1;
|
||||
|
||||
// Dimension of the tangent space of the problem.
|
||||
int num_tangent_parameters = -1;
|
||||
|
||||
// Type of line search direction used.
|
||||
LineSearchDirectionType line_search_direction_type = LBFGS;
|
||||
|
||||
|
@@ -73,22 +73,20 @@ struct ArraySelector<T,
|
||||
true,
|
||||
fits_on_stack>
|
||||
: ceres::internal::FixedArray<T, max_num_elements_on_stack> {
|
||||
explicit ArraySelector(int s)
|
||||
ArraySelector(int s)
|
||||
: ceres::internal::FixedArray<T, max_num_elements_on_stack>(s) {}
|
||||
};
|
||||
|
||||
template <typename T, int num_elements, int max_num_elements_on_stack>
|
||||
struct ArraySelector<T, num_elements, max_num_elements_on_stack, false, true>
|
||||
: std::array<T, num_elements> {
|
||||
explicit ArraySelector(int s) { CHECK_EQ(s, num_elements); }
|
||||
ArraySelector(int s) { CHECK_EQ(s, num_elements); }
|
||||
};
|
||||
|
||||
template <typename T, int num_elements, int max_num_elements_on_stack>
|
||||
struct ArraySelector<T, num_elements, max_num_elements_on_stack, false, false>
|
||||
: std::vector<T> {
|
||||
explicit ArraySelector(int s) : std::vector<T>(s) {
|
||||
CHECK_EQ(s, num_elements);
|
||||
}
|
||||
ArraySelector(int s) : std::vector<T>(s) { CHECK_EQ(s, num_elements); }
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
15
extern/ceres/include/ceres/internal/autodiff.h
vendored
15
extern/ceres/include/ceres/internal/autodiff.h
vendored
@@ -132,16 +132,17 @@
|
||||
// respectively. This is how autodiff works for functors taking multiple vector
|
||||
// valued arguments (up to 6).
|
||||
//
|
||||
// Jacobian null pointers (nullptr)
|
||||
// --------------------------------
|
||||
// In general, the functions below will accept nullptr for all or some of the
|
||||
// Jacobian parameters, meaning that those Jacobians will not be computed.
|
||||
// Jacobian NULL pointers
|
||||
// ----------------------
|
||||
// In general, the functions below will accept NULL pointers for all or some of
|
||||
// the Jacobian parameters, meaning that those Jacobians will not be computed.
|
||||
|
||||
#ifndef CERES_PUBLIC_INTERNAL_AUTODIFF_H_
|
||||
#define CERES_PUBLIC_INTERNAL_AUTODIFF_H_
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <utility>
|
||||
|
||||
#include "ceres/internal/array_selector.h"
|
||||
@@ -197,7 +198,7 @@ struct Make1stOrderPerturbation {
|
||||
template <int N, int Offset, typename T, typename JetT>
|
||||
struct Make1stOrderPerturbation<N, N, Offset, T, JetT> {
|
||||
public:
|
||||
static void Apply(const T* /* NOT USED */, JetT* /* NOT USED */) {}
|
||||
static void Apply(const T* src, JetT* dst) {}
|
||||
};
|
||||
|
||||
// Calls Make1stOrderPerturbation for every parameter block.
|
||||
@@ -310,7 +311,7 @@ inline bool AutoDifferentiate(const Functor& functor,
|
||||
int dynamic_num_outputs,
|
||||
T* function_value,
|
||||
T** jacobians) {
|
||||
using JetT = Jet<T, ParameterDims::kNumParameters>;
|
||||
typedef Jet<T, ParameterDims::kNumParameters> JetT;
|
||||
using Parameters = typename ParameterDims::Parameters;
|
||||
|
||||
if (kNumResiduals != DYNAMIC) {
|
||||
|
46
extern/ceres/include/ceres/internal/eigen.h
vendored
46
extern/ceres/include/ceres/internal/eigen.h
vendored
@@ -35,39 +35,39 @@
|
||||
|
||||
namespace ceres {
|
||||
|
||||
using Vector = Eigen::Matrix<double, Eigen::Dynamic, 1>;
|
||||
using Matrix =
|
||||
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
|
||||
using VectorRef = Eigen::Map<Vector>;
|
||||
using MatrixRef = Eigen::Map<Matrix>;
|
||||
using ConstVectorRef = Eigen::Map<const Vector>;
|
||||
using ConstMatrixRef = Eigen::Map<const Matrix>;
|
||||
typedef Eigen::Matrix<double, Eigen::Dynamic, 1> Vector;
|
||||
typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>
|
||||
Matrix;
|
||||
typedef Eigen::Map<Vector> VectorRef;
|
||||
typedef Eigen::Map<Matrix> MatrixRef;
|
||||
typedef Eigen::Map<const Vector> ConstVectorRef;
|
||||
typedef Eigen::Map<const Matrix> ConstMatrixRef;
|
||||
|
||||
// Column major matrices for DenseSparseMatrix/DenseQRSolver
|
||||
using ColMajorMatrix =
|
||||
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor>;
|
||||
typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor>
|
||||
ColMajorMatrix;
|
||||
|
||||
using ColMajorMatrixRef =
|
||||
Eigen::Map<ColMajorMatrix, 0, Eigen::Stride<Eigen::Dynamic, 1>>;
|
||||
typedef Eigen::Map<ColMajorMatrix, 0, Eigen::Stride<Eigen::Dynamic, 1>>
|
||||
ColMajorMatrixRef;
|
||||
|
||||
using ConstColMajorMatrixRef =
|
||||
Eigen::Map<const ColMajorMatrix, 0, Eigen::Stride<Eigen::Dynamic, 1>>;
|
||||
typedef Eigen::Map<const ColMajorMatrix, 0, Eigen::Stride<Eigen::Dynamic, 1>>
|
||||
ConstColMajorMatrixRef;
|
||||
|
||||
// C++ does not support templated typdefs, thus the need for this
|
||||
// struct so that we can support statically sized Matrix and Maps.
|
||||
template <int num_rows = Eigen::Dynamic, int num_cols = Eigen::Dynamic>
|
||||
struct EigenTypes {
|
||||
using Matrix =
|
||||
Eigen::Matrix<double,
|
||||
num_rows,
|
||||
num_cols,
|
||||
num_cols == 1 ? Eigen::ColMajor : Eigen::RowMajor>;
|
||||
typedef Eigen::Matrix<double,
|
||||
num_rows,
|
||||
num_cols,
|
||||
num_cols == 1 ? Eigen::ColMajor : Eigen::RowMajor>
|
||||
Matrix;
|
||||
|
||||
using MatrixRef = Eigen::Map<Matrix>;
|
||||
using ConstMatrixRef = Eigen::Map<const Matrix>;
|
||||
using Vector = Eigen::Matrix<double, num_rows, 1>;
|
||||
using VectorRef = Eigen::Map<Eigen::Matrix<double, num_rows, 1>>;
|
||||
using ConstVectorRef = Eigen::Map<const Eigen::Matrix<double, num_rows, 1>>;
|
||||
typedef Eigen::Map<Matrix> MatrixRef;
|
||||
typedef Eigen::Map<const Matrix> ConstMatrixRef;
|
||||
typedef Eigen::Matrix<double, num_rows, 1> Vector;
|
||||
typedef Eigen::Map<Eigen::Matrix<double, num_rows, 1>> VectorRef;
|
||||
typedef Eigen::Map<const Eigen::Matrix<double, num_rows, 1>> ConstVectorRef;
|
||||
};
|
||||
|
||||
} // namespace ceres
|
||||
|
@@ -82,14 +82,6 @@ void ComputeHouseholderVector(const XVectorType& x,
|
||||
v->head(v->rows() - 1) /= v_pivot;
|
||||
}
|
||||
|
||||
template <typename XVectorType, typename Derived>
|
||||
typename Derived::PlainObject ApplyHouseholderVector(
|
||||
const XVectorType& y,
|
||||
const Eigen::MatrixBase<Derived>& v,
|
||||
const typename Derived::Scalar& beta) {
|
||||
return (y - v * (beta * (v.transpose() * y)));
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace ceres
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
// Ceres Solver - A fast non-linear least squares minimizer
|
||||
// Copyright 2022 Google Inc. All rights reserved.
|
||||
// Copyright 2018 Google Inc. All rights reserved.
|
||||
// http://ceres-solver.org/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
@@ -27,7 +27,6 @@
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Author: jodebo_beck@gmx.de (Johannes Beck)
|
||||
// sergiu.deitsch@gmail.com (Sergiu Deitsch)
|
||||
//
|
||||
// Algorithms to be used together with integer_sequence, like computing the sum
|
||||
// or the exclusive scan (sometimes called exclusive prefix sum) at compile
|
||||
@@ -38,8 +37,6 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "ceres/jet_fwd.h"
|
||||
|
||||
namespace ceres {
|
||||
namespace internal {
|
||||
|
||||
@@ -167,124 +164,6 @@ class ExclusiveScanT {
|
||||
template <typename Seq>
|
||||
using ExclusiveScan = typename ExclusiveScanT<Seq>::Type;
|
||||
|
||||
// Removes all elements from a integer sequence corresponding to specified
|
||||
// ValueToRemove.
|
||||
//
|
||||
// This type should not be used directly but instead RemoveValue.
|
||||
template <typename T, T ValueToRemove, typename... Sequence>
|
||||
struct RemoveValueImpl;
|
||||
|
||||
// Final filtered sequence
|
||||
template <typename T, T ValueToRemove, T... Values>
|
||||
struct RemoveValueImpl<T,
|
||||
ValueToRemove,
|
||||
std::integer_sequence<T, Values...>,
|
||||
std::integer_sequence<T>> {
|
||||
using type = std::integer_sequence<T, Values...>;
|
||||
};
|
||||
|
||||
// Found a matching value
|
||||
template <typename T, T ValueToRemove, T... Head, T... Tail>
|
||||
struct RemoveValueImpl<T,
|
||||
ValueToRemove,
|
||||
std::integer_sequence<T, Head...>,
|
||||
std::integer_sequence<T, ValueToRemove, Tail...>>
|
||||
: RemoveValueImpl<T,
|
||||
ValueToRemove,
|
||||
std::integer_sequence<T, Head...>,
|
||||
std::integer_sequence<T, Tail...>> {};
|
||||
|
||||
// Move one element from the tail to the head
|
||||
template <typename T, T ValueToRemove, T... Head, T MiddleValue, T... Tail>
|
||||
struct RemoveValueImpl<T,
|
||||
ValueToRemove,
|
||||
std::integer_sequence<T, Head...>,
|
||||
std::integer_sequence<T, MiddleValue, Tail...>>
|
||||
: RemoveValueImpl<T,
|
||||
ValueToRemove,
|
||||
std::integer_sequence<T, Head..., MiddleValue>,
|
||||
std::integer_sequence<T, Tail...>> {};
|
||||
|
||||
// Start recursion by splitting the integer sequence into two separate ones
|
||||
template <typename T, T ValueToRemove, T... Tail>
|
||||
struct RemoveValueImpl<T, ValueToRemove, std::integer_sequence<T, Tail...>>
|
||||
: RemoveValueImpl<T,
|
||||
ValueToRemove,
|
||||
std::integer_sequence<T>,
|
||||
std::integer_sequence<T, Tail...>> {};
|
||||
|
||||
// RemoveValue takes an integer Sequence of arbitrary type and removes all
|
||||
// elements matching ValueToRemove.
|
||||
//
|
||||
// In contrast to RemoveValueImpl, this implementation deduces the value type
|
||||
// eliminating the need to specify it explicitly.
|
||||
//
|
||||
// As an example, RemoveValue<std::integer_sequence<int, 1, 2, 3>, 4>::type will
|
||||
// not transform the type of the original sequence. However,
|
||||
// RemoveValue<std::integer_sequence<int, 0, 0, 2>, 2>::type will generate a new
|
||||
// sequence of type std::integer_sequence<int, 0, 0> by removing the value 2.
|
||||
template <typename Sequence, typename Sequence::value_type ValueToRemove>
|
||||
struct RemoveValue
|
||||
: RemoveValueImpl<typename Sequence::value_type, ValueToRemove, Sequence> {
|
||||
};
|
||||
|
||||
// Convenience template alias for RemoveValue.
|
||||
template <typename Sequence, typename Sequence::value_type ValueToRemove>
|
||||
using RemoveValue_t = typename RemoveValue<Sequence, ValueToRemove>::type;
|
||||
|
||||
// Determines whether the values of an integer sequence are all the same.
|
||||
//
|
||||
// The integer sequence must contain at least one value. The predicate is
|
||||
// undefined for empty sequences. The evaluation result of the predicate for a
|
||||
// sequence containing only one value is defined to be true.
|
||||
template <typename... Sequence>
|
||||
struct AreAllEqual;
|
||||
|
||||
// The predicate result for a sequence containing one element is defined to be
|
||||
// true.
|
||||
template <typename T, T Value>
|
||||
struct AreAllEqual<std::integer_sequence<T, Value>> : std::true_type {};
|
||||
|
||||
// Recursion end.
|
||||
template <typename T, T Value1, T Value2>
|
||||
struct AreAllEqual<std::integer_sequence<T, Value1, Value2>>
|
||||
: std::integral_constant<bool, Value1 == Value2> {};
|
||||
|
||||
// Recursion for sequences containing at least two elements.
|
||||
template <typename T, T Value1, T Value2, T... Values>
|
||||
// clang-format off
|
||||
struct AreAllEqual<std::integer_sequence<T, Value1, Value2, Values...> >
|
||||
: std::integral_constant
|
||||
<
|
||||
bool,
|
||||
AreAllEqual<std::integer_sequence<T, Value1, Value2> >::value &&
|
||||
AreAllEqual<std::integer_sequence<T, Value2, Values...> >::value
|
||||
>
|
||||
// clang-format on
|
||||
{};
|
||||
|
||||
// Convenience variable template for AreAllEqual.
|
||||
template <class Sequence>
|
||||
constexpr bool AreAllEqual_v = AreAllEqual<Sequence>::value;
|
||||
|
||||
// Predicate determining whether an integer sequence is either empty or all
|
||||
// values are equal.
|
||||
template <typename Sequence>
|
||||
struct IsEmptyOrAreAllEqual;
|
||||
|
||||
// Empty case.
|
||||
template <typename T>
|
||||
struct IsEmptyOrAreAllEqual<std::integer_sequence<T>> : std::true_type {};
|
||||
|
||||
// General case for sequences containing at least one value.
|
||||
template <typename T, T HeadValue, T... Values>
|
||||
struct IsEmptyOrAreAllEqual<std::integer_sequence<T, HeadValue, Values...>>
|
||||
: AreAllEqual<std::integer_sequence<T, HeadValue, Values...>> {};
|
||||
|
||||
// Convenience variable template for IsEmptyOrAreAllEqual.
|
||||
template <class Sequence>
|
||||
constexpr bool IsEmptyOrAreAllEqual_v = IsEmptyOrAreAllEqual<Sequence>::value;
|
||||
|
||||
} // namespace internal
|
||||
} // namespace ceres
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user