Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7ec6329dc | ||
|
|
a28c227175 | ||
|
|
30e59dc432 | ||
|
|
3fff04fa64 | ||
|
|
a75b75617b | ||
|
|
9abae44383 | ||
|
|
7fffe564ef | ||
|
|
375c683456 | ||
|
|
960336887b | ||
|
|
6966d7453d | ||
|
|
d0b0556a6c |
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1,167 +0,0 @@
|
||||
|
||||
name: AX
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
- 'feature/**'
|
||||
- 'pr/**'
|
||||
paths-ignore:
|
||||
- 'CHANGES'
|
||||
- 'CODEOWNERS'
|
||||
- 'doc/**'
|
||||
- 'nanovdb/**'
|
||||
- 'openvdb_maya/**'
|
||||
- 'openvdb_houdini/**'
|
||||
- 'fvdb/**'
|
||||
- 'pendingchanges/**'
|
||||
- '**.md'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'CHANGES'
|
||||
- 'CODEOWNERS'
|
||||
- 'doc/**'
|
||||
- 'nanovdb/**'
|
||||
- 'openvdb_maya/**'
|
||||
- 'openvdb_houdini/**'
|
||||
- 'fvdb/**'
|
||||
- 'pendingchanges/**'
|
||||
- '**.md'
|
||||
schedule:
|
||||
# run this workflow every day 7am UTC
|
||||
- cron: '0 7 * * *'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
type:
|
||||
description: 'The type of CI to run (all, mac, linux, grammar)'
|
||||
required: true
|
||||
default: 'all'
|
||||
|
||||
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
linux-ax:
|
||||
if: |
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'linux'
|
||||
runs-on: ${{ (github.repository_owner == 'NVIDIA-Omniverse' && 'linux-amd64-cpu32') || (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
|
||||
name: >
|
||||
linux-ax:${{ matrix.config.image }}-cxx:${{ matrix.config.cxx }}-${{ matrix.config.build }}
|
||||
container:
|
||||
image: aswf/ci-openvdb:${{ matrix.config.image }}
|
||||
env:
|
||||
CXX: ${{ matrix.config.cxx }}
|
||||
CCACHE_DIR: /tmp/ccache
|
||||
strategy:
|
||||
matrix:
|
||||
# Only test unified builds (core+ax). weekly CI should test standalone
|
||||
config:
|
||||
- { image: '2023-clang15', cxx: 'clang++', build: 'Release', cmake: '' }
|
||||
- { image: '2023-clang15', cxx: 'g++', build: 'Release', cmake: '' }
|
||||
- { image: '2023-clang15', cxx: 'clang++', build: 'Debug', cmake: '' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: nanobind
|
||||
#if: contains(matrix.config.image, '2023') == false
|
||||
run: ./ci/install_nanobind.sh 2.0.0
|
||||
- name: install_gtest
|
||||
run: ./ci/install_gtest.sh 1.15.2
|
||||
- name: timestamp
|
||||
id: timestamp
|
||||
run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
|
||||
- name: ccache
|
||||
# don't use ccache for debug builds
|
||||
if: matrix.config.build == 'Release'
|
||||
id: ccache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /tmp/ccache
|
||||
key: linux-ax${{ matrix.config.image }}-${{ matrix.config.cxx }}-${{ steps.timestamp.outputs.timestamp }}
|
||||
restore-keys: linux-ax${{ matrix.config.image }}-${{ matrix.config.cxx }}-
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--build-type=${{ matrix.config.build }}
|
||||
--components='core,python,bin,axcore,axbin,axtest'
|
||||
--cargs=\"
|
||||
${{ matrix.config.cmake }}
|
||||
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
|
||||
-DUSE_EXPLICIT_INSTANTIATION=OFF
|
||||
-DOPENVDB_CXX_STRICT=ON
|
||||
\"
|
||||
- name: test
|
||||
run: cd build && ctest -V
|
||||
- name: test_doxygen_examples
|
||||
run: ./ci/extract_test_examples.sh
|
||||
# Keep ccache light by stripping out any caches not accessed in the last day
|
||||
- name: ccache_clean
|
||||
if: matrix.config.build == 'Release'
|
||||
run: ccache --evict-older-than 1d
|
||||
|
||||
macos-ax:
|
||||
if: |
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'mac'
|
||||
runs-on: ${{ matrix.config.runner }}
|
||||
name: macos-cxx:${{ matrix.config.cxx }}-llvm:${{ matrix.config.llvm }}-${{ matrix.config.build }}
|
||||
env:
|
||||
CXX: ${{ matrix.config.cxx }}
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
# Last macos runner before M1 (macos-14)
|
||||
- { runner: 'macos-13', cxx: 'clang++', build: 'Release', llvm: '15' }
|
||||
- { runner: 'macos-13', cxx: 'clang++', build: 'Release', llvm: '13' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: install_deps
|
||||
run: |
|
||||
./ci/install_macos.sh ${{ matrix.config.llvm }}
|
||||
./ci/install_tbb_macos.sh
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--build-type=${{ matrix.config.build }}
|
||||
--components="core,python,bin,axcore,axbin,axtest"
|
||||
--cargs=\"
|
||||
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
|
||||
-DUSE_EXPLICIT_INSTANTIATION=OFF
|
||||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
|
||||
-DLLVM_DIR=/opt/homebrew/opt/llvm@${{ matrix.config.llvm }}/lib/cmake/llvm
|
||||
\"
|
||||
- name: test
|
||||
run: cd build && ctest -V
|
||||
- name: test_doxygen_examples
|
||||
run: ./ci/extract_test_examples.sh
|
||||
|
||||
gen-grammar:
|
||||
if: |
|
||||
github.event_name == 'workflow_dispatch' &&
|
||||
github.event.inputs.type == 'grammar'
|
||||
runs-on: ${{ (github.repository_owner == 'NVIDIA-Omniverse' && 'linux-amd64-cpu32') || (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
|
||||
container:
|
||||
image: aswf/ci-openvdb:2023-clang15
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: build
|
||||
run: ./ci/build.sh -v --components=axgr --target=openvdb_ax_grammar --cargs=\"-DOPENVDB_AX_GRAMMAR_NO_LINES=ON\"
|
||||
- name: upload grammar
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ax_grammar
|
||||
path: ./build/openvdb_ax/openvdb_ax/openvdb_ax/grammar
|
||||
retention-days: 5
|
||||
@@ -1,193 +0,0 @@
|
||||
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
- 'feature/**'
|
||||
- 'pr/**'
|
||||
paths-ignore:
|
||||
- 'CHANGES'
|
||||
- 'CODEOWNERS'
|
||||
- 'doc/**'
|
||||
- 'openvdb_maya/**'
|
||||
- 'openvdb_houdini/**'
|
||||
- 'openvdb_ax/**'
|
||||
- 'nanovdb/**'
|
||||
- 'fvdb/**'
|
||||
- 'pendingchanges/**'
|
||||
- '**.md'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'CHANGES'
|
||||
- 'CODEOWNERS'
|
||||
- 'doc/**'
|
||||
- 'openvdb_maya/**'
|
||||
- 'openvdb_houdini/**'
|
||||
- 'openvdb_ax/**'
|
||||
- 'nanovdb/**'
|
||||
- 'fvdb/**'
|
||||
- 'pendingchanges/**'
|
||||
- '**.md'
|
||||
schedule:
|
||||
# run this workflow every day at 7am UTC except Monday
|
||||
- cron: '0 7 * * 0,2-6'
|
||||
# run this workflow Monday 7am UTC
|
||||
# warning: This pattern is checked in various places below
|
||||
- cron: '0 7 * * 1'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
type:
|
||||
description: 'The type of CI to run (all, linux, win, mac)'
|
||||
required: true
|
||||
default: 'all'
|
||||
|
||||
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
linux-vfx:
|
||||
# VFX platform jobs. These are run on the appropriate CentOS images from
|
||||
# the provided ASWF docker containers
|
||||
if: |
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'linux'
|
||||
runs-on: ${{ (github.repository_owner == 'NVIDIA-Omniverse' && 'linux-amd64-cpu32') || (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
|
||||
name: >
|
||||
linux-vfx:${{ matrix.config.image }}-
|
||||
abi:${{ matrix.config.abi }}-
|
||||
cxx:${{ matrix.config.cxx }}-
|
||||
type:${{ matrix.config.build }}
|
||||
container:
|
||||
image: aswf/ci-openvdb:${{ matrix.config.image }}
|
||||
env:
|
||||
CXX: ${{ matrix.config.cxx }}
|
||||
CCACHE_DIR: /tmp/ccache
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- { cxx: clang++, image: '2024', abi: '12', build: 'Release', cmake: '' }
|
||||
- { cxx: g++, image: '2024', abi: '12', build: 'Release', cmake: '' }
|
||||
- { cxx: clang++, image: '2024', abi: '12', build: 'Debug', cmake: '' }
|
||||
- { cxx: clang++, image: '2023', abi: '11', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' }
|
||||
- { cxx: g++, image: '2023', abi: '11', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: nanobind
|
||||
run: ./ci/install_nanobind.sh 2.0.0
|
||||
- name: glfw
|
||||
if: contains(matrix.config.image, '2023') == true
|
||||
run: ./ci/install_glfw.sh 3.3.10
|
||||
- name: install_gtest
|
||||
run: ./ci/install_gtest.sh 1.15.2
|
||||
- name: timestamp
|
||||
id: timestamp
|
||||
run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
|
||||
- name: ccache
|
||||
# don't use ccache for debug builds
|
||||
if: matrix.config.build == 'Release'
|
||||
id: ccache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /tmp/ccache
|
||||
key: linux-vfx${{ matrix.config.image }}-abi${{ matrix.config.abi }}-${{ matrix.config.cxx }}-${{ steps.timestamp.outputs.timestamp }}
|
||||
restore-keys: linux-vfx${{ matrix.config.image }}-abi${{ matrix.config.abi }}-${{ matrix.config.cxx }}-
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--build-type=${{ matrix.config.build }}
|
||||
--components=\"core,python,bin,view,render,test\"
|
||||
--cargs=\"
|
||||
${{ matrix.config.cmake }}
|
||||
-DOPENVDB_CXX_STRICT=ON
|
||||
-DOPENVDB_ABI_VERSION_NUMBER=${{ matrix.config.abi }}
|
||||
\"
|
||||
- name: test
|
||||
# Always run tests on weekly builds but skip Debug on commits as they take a while.
|
||||
# https://github.community/t/distinct-job-for-each-schedule/17811/2
|
||||
if: contains(github.event.schedule, '0 7 * * 1') || matrix.config.build == 'Release'
|
||||
run: |
|
||||
cd build && ctest -V
|
||||
cd - && ./ci/test_install.sh
|
||||
# Keep ccache light by stripping out any caches not accessed in the last day
|
||||
- name: ccache_clean
|
||||
if: matrix.config.build == 'Release'
|
||||
run: ccache --evict-older-than 1d
|
||||
|
||||
windows:
|
||||
# Windows CI. Tests a dynamic build with MD.
|
||||
if: |
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'win'
|
||||
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'windows-2022-8c-32g-300h') || 'windows-latest' }}
|
||||
name: windows
|
||||
env:
|
||||
VCPKG_DEFAULT_TRIPLET: x64-windows
|
||||
strategy:
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: path
|
||||
shell: pwsh
|
||||
run: |
|
||||
# note: system path must be modified in a previous step to it's use
|
||||
echo "$Env:VCPKG_INSTALLATION_ROOT\installed\x64-windows\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
echo "${{github.workspace}}\build\openvdb\openvdb\Release" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
- name: install
|
||||
shell: powershell
|
||||
run: .\ci\install_windows.ps1
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--config='Release'
|
||||
--components='core,bin,view,render,python,test'
|
||||
--cargs=\'
|
||||
-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF
|
||||
-DMSVC_COMPRESS_PDB=ON
|
||||
-DUSE_EXR=ON
|
||||
-DUSE_PNG=ON
|
||||
-DVCPKG_TARGET_TRIPLET=${VCPKG_DEFAULT_TRIPLET}
|
||||
-DCMAKE_TOOLCHAIN_FILE=\"${VCPKG_INSTALLATION_ROOT}\\scripts\\buildsystems\\vcpkg.cmake\"
|
||||
\'
|
||||
- name: size
|
||||
# Print the build directy size (monitor if we're hitting runner limits)
|
||||
run: du -h build
|
||||
- name: test
|
||||
run: cd build && ctest -V -C Release
|
||||
|
||||
macos:
|
||||
if: |
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'mac'
|
||||
runs-on: macos-13 # Last macos runner befor M1 (macos-14)
|
||||
env:
|
||||
CXX: clang++
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: install
|
||||
run: |
|
||||
./ci/install_macos.sh
|
||||
./ci/install_tbb_macos.sh
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--build-type=Release
|
||||
--components=\"core,python,bin,view,render,test\"
|
||||
--cargs=\'
|
||||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
|
||||
\'
|
||||
- name: test
|
||||
run: cd build && ctest -V
|
||||
+15
-89
@@ -23,14 +23,9 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
deploy:
|
||||
description: 'Deploy to openvdb-website (docs/coverage)?'
|
||||
description: 'Deploy docs?'
|
||||
required: true
|
||||
default: 'none'
|
||||
|
||||
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
default: 'false'
|
||||
|
||||
jobs:
|
||||
doxygen:
|
||||
@@ -38,21 +33,17 @@ jobs:
|
||||
env:
|
||||
CXX: g++
|
||||
container:
|
||||
# @note We can't update this as epydoc doesn't support python3. We'll
|
||||
# need to re-write the python docs to use sphinx
|
||||
image: aswf/ci-openvdb:2024
|
||||
image: aswf/ci-openvdb:2019
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v2
|
||||
- name: install_doxygen
|
||||
run: ./ci/install_doxygen.sh 1_8_11
|
||||
- name: nanobind
|
||||
#if: contains(matrix.config.image, '2023') == false
|
||||
run: ./ci/install_nanobind.sh 2.0.0
|
||||
# - name: install_epydoc
|
||||
# run: pip install epydoc
|
||||
- name: install_epydoc
|
||||
run: pip install epydoc
|
||||
- name: install_latex
|
||||
run: |
|
||||
yum -y install texlive-latex-bin texlive-dvips texlive-collection-fontsrecommended texlive-collection-latexrecommended
|
||||
run: yum -y install texlive-latex-bin texlive-dvips texlive-collection-fontsrecommended texlive-collection-latexrecommended
|
||||
- name: install_cmake
|
||||
run: ./ci/install_cmake.sh 3.15.0
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
@@ -65,13 +56,11 @@ jobs:
|
||||
-DUSE_EXPLICIT_INSTANTIATION=OFF
|
||||
-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON
|
||||
\"
|
||||
# - name: epydoc
|
||||
# run: |
|
||||
# epydoc --html -o /usr/local/share/doc/OpenVDB/html/python pyopenvdb
|
||||
- name: epydoc
|
||||
run: |
|
||||
epydoc --html -o /usr/local/share/doc/OpenVDB/html/python pyopenvdb
|
||||
- name: pre_deploy
|
||||
# Overwrite global SSH configuration
|
||||
# https://github.com/peaceiris/actions-gh-pages/issues/719
|
||||
# https://linuxhint.com/ssh-stricthostkeychecking/
|
||||
run: >
|
||||
echo "Host *
|
||||
StrictHostKeyChecking no
|
||||
@@ -82,78 +71,15 @@ jobs:
|
||||
if: |
|
||||
github.repository_owner == 'AcademySoftwareFoundation' &&
|
||||
github.event_name == 'workflow_dispatch' &&
|
||||
github.event.inputs.deploy == 'docs'
|
||||
github.event.inputs.deploy == 'true'
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
deploy_key: ${{ secrets.PRIVATE_KEY }}
|
||||
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||
publish_dir: /usr/local/share/doc/OpenVDB/html
|
||||
destination_dir: documentation/doxygen
|
||||
external_repository: AcademySoftwareFoundation/openvdb-website
|
||||
publish_branch: master
|
||||
publish_branch: doxygen
|
||||
full_commit_message: "Automatic doxygen documentation update
|
||||
- Deployed from: AcademySoftwareFoundation/openvdb ${{ github.sha }}
|
||||
|
||||
Signed-off-by: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
|
||||
|
||||
#############################################################################
|
||||
################################ Coverage ###################################
|
||||
#############################################################################
|
||||
|
||||
linux-coverage:
|
||||
if: |
|
||||
github.repository_owner == 'AcademySoftwareFoundation' &&
|
||||
github.event_name == 'workflow_dispatch' &&
|
||||
github.event.inputs.deploy == 'coverage'
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: aswf/ci-openvdb:2023
|
||||
env:
|
||||
CXX: g++
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: install_gcovr
|
||||
run: pip install gcovr
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--build-type=coverage
|
||||
--components="core,axcore,test,axtest"
|
||||
--cargs=\"-DOPENVDB_CORE_STATIC=OFF -DOPENVDB_AX_STATIC=OFF\"
|
||||
- name: test_and_gcov
|
||||
run: |
|
||||
cd build
|
||||
ctest -V
|
||||
make gcov_html
|
||||
cd -
|
||||
- name: zip_large_html
|
||||
# The index.function list is > 100mb. Just zip it and provide it as a
|
||||
# download (could instead use LFS to host but not really worth it).
|
||||
run: |
|
||||
cd build/gcov_html
|
||||
tar -czvf index.functions.html.tar.gz index.functions.html
|
||||
sed -i -e 's/index.functions.html/index.functions.html.tar.gz/g' index.html
|
||||
sed -i -e 's/List of functions/Download function index/g' index.html
|
||||
rm index.functions.html
|
||||
cd -
|
||||
- name: pre_deploy
|
||||
# Overwrite global SSH configuration
|
||||
# https://github.com/peaceiris/actions-gh-pages/issues/719
|
||||
# https://linuxhint.com/ssh-stricthostkeychecking/
|
||||
run: >
|
||||
echo "Host *
|
||||
StrictHostKeyChecking no
|
||||
UserKnownHostsFile=/dev/null
|
||||
" > /etc/ssh/ssh_config
|
||||
- name: deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||
publish_dir: ./build/gcov_html
|
||||
destination_dir: documentation/code_coverage
|
||||
external_repository: AcademySoftwareFoundation/openvdb-website
|
||||
publish_branch: master
|
||||
full_commit_message: "Automatic code coverage update
|
||||
- Deployed from: AcademySoftwareFoundation/openvdb ${{ github.sha }}
|
||||
|
||||
Signed-off-by: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
|
||||
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# GitHub Actions workflow file
|
||||
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
|
||||
name: fVDB Codebuild
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'CHANGES'
|
||||
- 'CODEOWNERS'
|
||||
- 'doc/**'
|
||||
- 'openvdb/**'
|
||||
- 'openvdb_cmd/**'
|
||||
- 'openvdb_ax/**'
|
||||
- 'openvdb_maya/**'
|
||||
- 'openvdb_houdini/**'
|
||||
- 'nanovdb/**'
|
||||
- 'pendingchanges/**'
|
||||
- '**.md'
|
||||
- 'fvdb/debug/**'
|
||||
- 'fvdb/docs/**'
|
||||
- 'fvdb/examples/**'
|
||||
- 'fvdb/notebooks/**'
|
||||
- 'fvdb/scripts/**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
# ---------------------------------------------------------------------------
|
||||
# Linux GPU (AWS CodeBuild)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
linux_gpu:
|
||||
name: 'ci-openvdb 2024'
|
||||
# Don't run on forks
|
||||
if: github.repository == 'AcademySoftwareFoundation/openvdb'
|
||||
# GH-hosted VM. The build runs in CentOS 7 'container' hard-coded in
|
||||
# AWS CodeBuild project.
|
||||
# TODO: Add support for dynamic GH Action defined CodeBuild
|
||||
# container choice.
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Verify AWS Credentials Set
|
||||
run: |
|
||||
if [ -z "${{ secrets.CODEBUILD_ID }}" ] || [ -z "${{ secrets.CODEBUILD_SECRET }}" ]; then
|
||||
echo "Error: AWS credentials secrets not properly configured"
|
||||
echo "Please ensure CODEBUILD_ID and CODEBUILD_SECRET are set in organization secrets"
|
||||
exit 1
|
||||
fi
|
||||
echo "AWS credentials secrets are configured"
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.CODEBUILD_ID }}
|
||||
aws-secret-access-key: ${{ secrets.CODEBUILD_SECRET }}
|
||||
aws-region: us-west-2
|
||||
- name: Verify AWS Authentication
|
||||
run: |
|
||||
echo "Testing AWS authentication..."
|
||||
aws sts get-caller-identity || {
|
||||
echo "Error: AWS authentication failed"
|
||||
exit 1
|
||||
}
|
||||
echo "AWS authentication successful"
|
||||
- name: CodeBuild Monitoring URLs
|
||||
run: |
|
||||
echo "🚀 Starting CodeBuild job..."
|
||||
echo "Project: OpenVDB"
|
||||
echo ""
|
||||
echo "📊 Monitor the build progress at:"
|
||||
|
||||
# Check if public builds are enabled by looking for the public project URL
|
||||
PUBLIC_URL=$(aws codebuild batch-get-projects --names OpenVDB --query 'projects[0].publicProjectUrl' --output text 2>/dev/null || echo "None")
|
||||
|
||||
if [ "$PUBLIC_URL" != "None" ] && [ "$PUBLIC_URL" != "null" ]; then
|
||||
echo "📖 Public Build Results (no sign-in required):"
|
||||
echo " $PUBLIC_URL"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
echo "🔒 AWS Console (requires sign-in):"
|
||||
echo " Project: https://console.aws.amazon.com/codesuite/codebuild/projects/OpenVDB/history"
|
||||
echo ""
|
||||
echo "ℹ️ Individual build URLs will be available once the job starts..."
|
||||
- name: Run CodeBuild
|
||||
id: codebuild
|
||||
uses: aws-actions/aws-codebuild-run-build@v1
|
||||
with:
|
||||
project-name: OpenVDB
|
||||
buildspec-override: ci/buildspec.yml
|
||||
- name: CodeBuild Results
|
||||
if: always()
|
||||
run: |
|
||||
echo "📋 CodeBuild Results:"
|
||||
echo "Build ID: ${{ steps.codebuild.outputs.aws-build-id }}"
|
||||
echo "Build Status: ${{ steps.codebuild.outputs.aws-build-status }}"
|
||||
echo ""
|
||||
echo "🔗 Detailed Build Links:"
|
||||
if [ -n "$CODEBUILD_PUBLIC_BUILD_URL" ]; then
|
||||
echo "📖 Public Build Details: $CODEBUILD_PUBLIC_BUILD_URL"
|
||||
fi
|
||||
echo "🔒 AWS Console Build Details: https://console.aws.amazon.com/codesuite/codebuild/projects/OpenVDB/build/${{ steps.codebuild.outputs.aws-build-id }}/"
|
||||
echo ""
|
||||
if [ "${{ steps.codebuild.outputs.aws-build-status }}" != "SUCCEEDED" ]; then
|
||||
echo "❌ Build failed! Check the build logs at the links above for detailed error information."
|
||||
echo "Common issues to check:"
|
||||
echo "- Build environment configuration"
|
||||
echo "- Source code compilation errors"
|
||||
echo "- Missing dependencies"
|
||||
echo "- Buildspec.yml configuration"
|
||||
else
|
||||
echo "✅ Build succeeded!"
|
||||
fi
|
||||
@@ -1,80 +0,0 @@
|
||||
name: fVDB Code Style
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "pull-request/[0-9]+"
|
||||
paths-ignore:
|
||||
- 'CHANGES'
|
||||
- 'CODEOWNERS'
|
||||
- 'doc/**'
|
||||
- 'ci/**'
|
||||
- 'openvdb/**'
|
||||
- 'openvdb_cmd/**'
|
||||
- 'openvdb_ax/**'
|
||||
- 'openvdb_maya/**'
|
||||
- 'openvdb_houdini/**'
|
||||
- 'openvdb_wolfram/**'
|
||||
- 'tsc/**'
|
||||
- 'nanovdb/**'
|
||||
- 'pendingchanges/**'
|
||||
- '**.md'
|
||||
- 'fvdb/docs/**'
|
||||
- 'fvdb/env/**'
|
||||
- 'fvdb/notebooks/**'
|
||||
|
||||
|
||||
|
||||
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test-python-black-lint:
|
||||
name: Check Python code style with black
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: psf/black@stable
|
||||
with:
|
||||
options: "--check --verbose --target-version=py311 --line-length=120"
|
||||
src: "fvdb/"
|
||||
version: "~= 24.0"
|
||||
|
||||
test-cpp-clang-format-lint:
|
||||
name: Check C++ code style with clang-format
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: DoozyX/clang-format-lint-action@v0.18.2
|
||||
with:
|
||||
source: 'fvdb/src/'
|
||||
extensions: 'h,cpp,cc,cu,cuh'
|
||||
clangFormatVersion: 18
|
||||
style: file
|
||||
|
||||
include-guards:
|
||||
name: Check include guards
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: swahtz/include-guards-check-action@master
|
||||
with:
|
||||
path: 'fvdb/src/'
|
||||
|
||||
check-spdx-identifiers:
|
||||
name: Check SPDX identifiers
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
- uses: swahtz/spdx@feature/ignore_paths
|
||||
with:
|
||||
licenses: |-
|
||||
Apache-2.0
|
||||
ignore-paths: |-
|
||||
openvdb/openvdb/math/Half.cc
|
||||
openvdb/openvdb/math/Half.h
|
||||
openvdb_wolfram/OpenVDBLink
|
||||
openvdb_ax/openvdb_ax/grammar/generated
|
||||
fvdb/projects/panoptic_segmentation/garfield/garfield
|
||||
@@ -1,186 +0,0 @@
|
||||
|
||||
name: Houdini
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
- 'feature/**'
|
||||
- 'pr/**'
|
||||
paths-ignore:
|
||||
- 'CHANGES'
|
||||
- 'CODEOWNERS'
|
||||
- 'doc/**'
|
||||
- 'nanovdb/**'
|
||||
- 'openvdb_maya/**'
|
||||
- 'fvdb/**'
|
||||
- 'pendingchanges/**'
|
||||
- '**.md'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'CHANGES'
|
||||
- 'CODEOWNERS'
|
||||
- 'doc/**'
|
||||
- 'nanovdb/**'
|
||||
- 'openvdb_maya/**'
|
||||
- 'fvdb/**'
|
||||
- 'pendingchanges/**'
|
||||
- '**.md'
|
||||
schedule:
|
||||
# run this workflow every day 7am UTC
|
||||
- cron: '0 7 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
checksecret:
|
||||
# Check that valid github secrets have been set. This isn't needed to retrieve
|
||||
# the cache, but ensures that the job doens't start with an empty cache
|
||||
name: Verify Houdini Secrets
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
HOUDINI_SECRETS: ${{ steps.check.outputs.HOUDINI_SECRETS }}
|
||||
steps:
|
||||
- id: check
|
||||
env:
|
||||
HOUDINI_CLIENT_ID: ${{ secrets.HOUDINI_CLIENT_ID }}
|
||||
HOUDINI_SECRET_KEY: ${{ secrets.HOUDINI_SECRET_KEY }}
|
||||
run: echo "HOUDINI_SECRETS=${{ env.HOUDINI_CLIENT_ID != '' && env.HOUDINI_SECRET_KEY != '' }}" >> $GITHUB_OUTPUT
|
||||
- name: Skip Next Jobs
|
||||
if: steps.check.outputs.HOUDINI_SECRETS != 'true'
|
||||
run: echo "HOUDINI_CLIENT_ID and HOUDINI_SECRET_KEY GitHub Action Secrets needs to be set to install Houdini builds"
|
||||
|
||||
linux-vfx-houdini:
|
||||
needs: [checksecret]
|
||||
if: >
|
||||
${{ needs.checksecret.outputs.HOUDINI_SECRETS == 'true' ||
|
||||
github.repository_owner == 'AcademySoftwareFoundation' }}
|
||||
runs-on: ${{ (github.repository_owner == 'NVIDIA-Omniverse' && 'linux-amd64-cpu32') || (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
|
||||
name: hou:${{ matrix.config.hou_hash }}-vfx:${{ matrix.config.image }}-cxx:${{ matrix.config.cxx }}
|
||||
container:
|
||||
image: aswf/ci-base:${{ matrix.config.image }}
|
||||
env:
|
||||
CXX: ${{ matrix.config.cxx }}
|
||||
CCACHE_DIR: /tmp/ccache
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- { cxx: clang++, image: '2024', hou_hash: '20_5', build: 'Release', components: 'core,hou,bin,view,render,python,test' }
|
||||
- { cxx: clang++, image: '2023', hou_hash: '20_5', build: 'Debug', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest' }
|
||||
- { cxx: g++, image: '2023', hou_hash: '20_5', build: 'Release', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest' }
|
||||
- { cxx: clang++, image: '2023', hou_hash: '20_0-newabi', build: 'Release', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest' }
|
||||
- { cxx: g++, image: '2023', hou_hash: '20_0-newabi', build: 'Release', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: remove zstd
|
||||
run: yum -y remove zstd
|
||||
- uses: actions/checkout@v3
|
||||
- name: nanobind
|
||||
#if: contains(matrix.config.image, '2023') == false
|
||||
run: ./ci/install_nanobind.sh 2.0.0
|
||||
- name: glfw
|
||||
if: contains(matrix.config.image, '2023') == true
|
||||
run: ./ci/install_glfw.sh 3.3.10
|
||||
- name: cppunit
|
||||
run: ./ci/install_cppunit.sh 1.15.1
|
||||
- name: install_gtest
|
||||
run: ./ci/install_gtest.sh 1.15.2
|
||||
- name: timestamp
|
||||
id: timestamp
|
||||
run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
|
||||
- name: ccache
|
||||
# don't use ccache for debug builds
|
||||
if: matrix.config.build == 'Release'
|
||||
id: ccache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /tmp/ccache
|
||||
key: linux-vfx-hou${{ matrix.config.hou_hash }}-${{ matrix.config.image }}-${{ matrix.config.cxx }}-${{ steps.timestamp.outputs.timestamp }}
|
||||
restore-keys: linux-vfx-hou${{ matrix.config.hou_hash }}-${{ matrix.config.image }}-${{ matrix.config.cxx }}-
|
||||
- name: fetch_houdini
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: hou
|
||||
key: dummy-houdini${{ matrix.config.hou_hash }}-${{ steps.timestamp.outputs.timestamp }}
|
||||
restore-keys: vdb-v5-houdini${{ matrix.config.hou_hash }}-
|
||||
- name: validate_houdini
|
||||
run: test -f "hou/hou.tar.gz"
|
||||
# Make sure that the unpacked install is NOT in the root of the OpenVDB checkout
|
||||
# otherwise CMake's install RPATHs wil not work correctly.
|
||||
- name: install_houdini
|
||||
run: |
|
||||
mkdir $HOME/houdini_install
|
||||
cp hou/hou.tar.gz $HOME/houdini_install/hou.tar.gz
|
||||
cd $HOME/houdini_install && tar -xzf hou.tar.gz && cd -
|
||||
- name: build
|
||||
run: |
|
||||
./ci/build.sh -v \
|
||||
--build-type=Release \
|
||||
--components="${{ matrix.config.components }}" \
|
||||
--cargs=\" \
|
||||
-DHOUDINI_ROOT=$HOME/houdini_install/hou \
|
||||
-DOPENVDB_BUILD_HOUDINI_ABITESTS=OFF \
|
||||
-DOPENVDB_HOUDINI_INSTALL_PREFIX=/tmp \
|
||||
-DDISABLE_CMAKE_SEARCH_PATHS=ON \
|
||||
-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON \
|
||||
\"
|
||||
- name: test
|
||||
run: cd build && ctest -V
|
||||
# Keep ccache light by stripping out any caches not accessed in the last day
|
||||
- name: ccache_clean
|
||||
if: matrix.config.build == 'Release'
|
||||
run: ccache --evict-older-than 1d
|
||||
|
||||
macos-houdini:
|
||||
needs: [checksecret]
|
||||
if: >
|
||||
${{ needs.checksecret.outputs.HOUDINI_SECRETS == 'true' ||
|
||||
github.repository_owner == 'AcademySoftwareFoundation' }}
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: fetch_houdini
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: hou
|
||||
key: dummy-houdini
|
||||
restore-keys: vdb-v5-houdini-macos-
|
||||
- name: validate_houdini
|
||||
run: test -f "hou/hou.tar.gz"
|
||||
# Make sure that the unpacked install is NOT in the root of the OpenVDB checkout
|
||||
# otherwise CMake's install RPATHs wil not work correctly.
|
||||
- name: install_houdini
|
||||
run: |
|
||||
mkdir $HOME/houdini_install
|
||||
cp hou/hou.tar.gz $HOME/houdini_install/hou.tar.gz
|
||||
cd $HOME/houdini_install && tar -xzf hou.tar.gz && cd -
|
||||
- name: install_deps
|
||||
run: ./ci/install_macos.sh 15
|
||||
- name: build
|
||||
run: |
|
||||
./ci/build.sh -v \
|
||||
--build-type=Release \
|
||||
--components="core,hou,bin,view,render,python,test,axcore,axbin" \
|
||||
--cargs=\" \
|
||||
-DHOUDINI_ROOT=$HOME/houdini_install/hou \
|
||||
-DOPENVDB_BUILD_HOUDINI_ABITESTS=OFF \
|
||||
-DOPENVDB_HOUDINI_INSTALL_PREFIX=/tmp \
|
||||
-DDISABLE_CMAKE_SEARCH_PATHS=ON \
|
||||
-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON \
|
||||
-DUSE_EXPLICIT_INSTANTIATION=OFF \
|
||||
-DTbb_INCLUDE_DIR=$HOME/houdini_install/hou/Frameworks/Houdini.framework/Versions/Current/Resources/toolkit/include/tbb \
|
||||
-DLLVM_DIR=/opt/homebrew/opt/llvm@15/lib/cmake/llvm \
|
||||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install \
|
||||
\"
|
||||
- name: test
|
||||
run: cd build && ctest -V
|
||||
@@ -1,188 +0,0 @@
|
||||
|
||||
name: NanoVDB
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
- 'feature/**'
|
||||
- 'pr/**'
|
||||
paths-ignore:
|
||||
- 'CHANGES'
|
||||
- 'CODEOWNERS'
|
||||
- 'doc/**'
|
||||
- 'openvdb_ax/**'
|
||||
- 'openvdb_maya/**'
|
||||
- 'openvdb_houdini/**'
|
||||
- 'fvdb/**'
|
||||
- 'pendingchanges/**'
|
||||
- '**.md'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'CHANGES'
|
||||
- 'CODEOWNERS'
|
||||
- 'doc/**'
|
||||
- 'openvdb_ax/**'
|
||||
- 'openvdb_maya/**'
|
||||
- 'openvdb_houdini/**'
|
||||
- 'fvdb/**'
|
||||
- 'pendingchanges/**'
|
||||
- '**.md'
|
||||
schedule:
|
||||
# run this workflow every day 7am UTC
|
||||
- cron: '0 7 * * *'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
type:
|
||||
description: 'The type of CI to run (all, linux, win, mac)'
|
||||
required: true
|
||||
default: 'all'
|
||||
|
||||
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
linux-nanovdb:
|
||||
if: |
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'linux'
|
||||
runs-on: ${{ (github.repository_owner == 'NVIDIA-Omniverse' && 'linux-amd64-cpu32') || (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
|
||||
name: >
|
||||
linux-nanovdb:cxx:${{ matrix.config.cxx }}-${{ matrix.config.build }}
|
||||
container:
|
||||
image: aswf/ci-openvdb:${{ matrix.config.image }}
|
||||
env:
|
||||
CXX: ${{ matrix.config.cxx }}
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- { cxx: g++, image: '2024', build: 'Release' }
|
||||
- { cxx: g++, image: '2024', build: 'Debug' }
|
||||
- { cxx: clang++, image: '2024', build: 'Release' }
|
||||
- { cxx: clang++, image: '2024', build: 'Debug' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: setup_cuda_12
|
||||
run: |
|
||||
yum -y install yum-utils
|
||||
echo "/usr/local/cuda-12/bin" >> $GITHUB_PATH
|
||||
echo "LD_LIBRARY_PATH=/usr/local/cuda-12/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
|
||||
- name: build
|
||||
# NOTE: CMAKE_POSITION_INDEPENDENT_CODE set to fix default behaviour change in clang 14
|
||||
# https://github.com/AcademySoftwareFoundation/aswf-docker/issues/228
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--build-type=${{ matrix.config.build }}
|
||||
--components=core,nano,nanotest,nanoexam,nanobench,nanotool
|
||||
--cargs=\'
|
||||
-DUSE_EXPLICIT_INSTANTIATION=OFF
|
||||
-DNANOVDB_USE_CUDA=ON
|
||||
-DCMAKE_CUDA_ARCHITECTURES="80"
|
||||
-DNANOVDB_USE_OPENVDB=ON
|
||||
-DCMAKE_INSTALL_PREFIX=`pwd`
|
||||
-DUSE_BLOSC=OFF
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
\'
|
||||
- name: test
|
||||
run: cd build && sudo ctest -V -E ".*cuda.*"
|
||||
|
||||
windows-nanovdb:
|
||||
if: |
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'win'
|
||||
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'windows-2022-8c-32g-300h') || 'windows-latest' }}
|
||||
env:
|
||||
VCPKG_DEFAULT_TRIPLET: 'x64-windows'
|
||||
visual_studio: "Visual Studio 17 2022"
|
||||
cuda: "12.4.0"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: path
|
||||
run: |
|
||||
# note: system path must be modified in a previous step to it's use
|
||||
echo "$Env:VCPKG_INSTALLATION_ROOT\installed\x64-windows\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
echo "${{github.workspace}}\build\openvdb\openvdb\Release" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
- name: install_cuda
|
||||
shell: powershell
|
||||
run: .\ci\install_windows_cuda.ps1
|
||||
- name: install
|
||||
shell: powershell
|
||||
run: .\ci\install_windows.ps1
|
||||
- name: build
|
||||
shell: bash
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--config=Release
|
||||
--components=core,nano,nanotest,nanoexam,nanobench,nanotool
|
||||
--cargs=\'
|
||||
-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF
|
||||
-DMSVC_COMPRESS_PDB=ON
|
||||
-DUSE_EXPLICIT_INSTANTIATION=OFF
|
||||
-DNANOVDB_USE_CUDA=ON
|
||||
-DCMAKE_CUDA_ARCHITECTURES="80"
|
||||
-DNANOVDB_USE_OPENVDB=ON
|
||||
-DVCPKG_TARGET_TRIPLET=${VCPKG_DEFAULT_TRIPLET}
|
||||
-DCMAKE_TOOLCHAIN_FILE=\"${VCPKG_INSTALLATION_ROOT}\\scripts\\buildsystems\\vcpkg.cmake\"
|
||||
\'
|
||||
- name: test
|
||||
shell: bash
|
||||
run: cd build && ctest -V -E ".*cuda.*"
|
||||
|
||||
macos-nanovdb:
|
||||
if: |
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'mac'
|
||||
runs-on: ${{ matrix.config.runner }}
|
||||
env:
|
||||
CXX: ${{ matrix.config.cxx }}
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- { runner: 'macos-13', cxx: 'clang++', build: 'Release' }
|
||||
- { runner: 'macos-13', cxx: 'clang++', build: 'Debug' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: install_deps
|
||||
run: |
|
||||
./ci/install_macos.sh
|
||||
./ci/install_tbb_macos.sh
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--build-type=${{ matrix.config.build }}
|
||||
--components=core,nano,nanotest,nanoexam,nanobench,nanotool
|
||||
--cargs=\'-DUSE_EXPLICIT_INSTANTIATION=OFF -DNANOVDB_USE_CUDA=OFF -DNANOVDB_USE_OPENVDB=ON\'
|
||||
- name: test
|
||||
run: cd build && ctest -V -E ".*cuda.*"
|
||||
|
||||
nanovdb-lite:
|
||||
if: |
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'linux'
|
||||
runs-on: ${{ (github.repository_owner == 'NVIDIA-Omniverse' && 'linux-amd64-cpu32') || (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
|
||||
container:
|
||||
image: aswf/ci-openvdb:2024
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: install_gtest
|
||||
run: ./ci/install_gtest.sh 1.15.2
|
||||
- name: build_and_test
|
||||
run: |
|
||||
cd nanovdb/nanovdb
|
||||
sudo mkdir .build
|
||||
cd .build
|
||||
sudo cmake -DUSE_EXPLICIT_INSTANTIATION=OFF -DNANOVDB_BUILD_UNITTESTS=ON -DNANOVDB_USE_OPENVDB=OFF -DNANOVDB_USE_CUDA=OFF ../
|
||||
sudo make -j8 install
|
||||
sudo ctest -V
|
||||
@@ -1,598 +0,0 @@
|
||||
# This workflow runs once a week and tests a variety of configurations,
|
||||
# dependencies and other specific or expensive checkes (sanitizers).
|
||||
# It also contains the Houdini Cache jobs which update the CI cache
|
||||
# with new Houdini releases.
|
||||
|
||||
name: Weekly
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# run this workflow Sunday 00:00 UTC
|
||||
- cron: '0 0 * * 0'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
type:
|
||||
description: 'The type of CI to run (all, houdini, latest, extra, ax, blosc, abi)'
|
||||
required: true
|
||||
default: 'all'
|
||||
|
||||
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
#############################################################################
|
||||
################################## Houdini ##################################
|
||||
#############################################################################
|
||||
|
||||
# Check that valid github secrets have been set for the ability to
|
||||
# download Houdini and cache it. The secrets are used in download_houdini.py
|
||||
checksecret:
|
||||
name: Verify Houdini Secrets
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
HOUDINI_SECRETS: ${{ steps.check.outputs.HOUDINI_SECRETS }}
|
||||
steps:
|
||||
- id: check
|
||||
env:
|
||||
HOUDINI_CLIENT_ID: ${{ secrets.HOUDINI_CLIENT_ID }}
|
||||
HOUDINI_SECRET_KEY: ${{ secrets.HOUDINI_SECRET_KEY }}
|
||||
run: echo "HOUDINI_SECRETS=${{ env.HOUDINI_CLIENT_ID != '' && env.HOUDINI_SECRET_KEY != '' }}" >> $GITHUB_OUTPUT
|
||||
- name: Skip Next Jobs
|
||||
if: steps.check.outputs.HOUDINI_SECRETS != 'true'
|
||||
run: echo "HOUDINI_CLIENT_ID and HOUDINI_SECRET_KEY GitHub Action Secrets needs to be set to install Houdini builds"
|
||||
# Explicitly error on the ASWF repo, we expect this secret to always exist
|
||||
- name: Error ASWF
|
||||
if: steps.check.outputs.HOUDINI_SECRETS != 'true' && github.repository_owner == 'AcademySoftwareFoundation'
|
||||
run: exit 1
|
||||
|
||||
# download the latest production version of Houdini X, strip out headers,
|
||||
# libraries and binaries required for building OpenVDB and put it into
|
||||
# the GitHub Actions cache
|
||||
linux_houdini:
|
||||
needs: [checksecret]
|
||||
if: |
|
||||
(needs.checksecret.outputs.HOUDINI_SECRETS == 'true') &&
|
||||
(github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'houdini')
|
||||
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
|
||||
name: linux-houdini:${{ matrix.config.hou_hash }}
|
||||
env:
|
||||
CXX: clang++
|
||||
HOUDINI_CLIENT_ID: ${{ secrets.HOUDINI_CLIENT_ID }}
|
||||
HOUDINI_SECRET_KEY: ${{ secrets.HOUDINI_SECRET_KEY }}
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- { houdini_version: '20.0', platform: 'linux_x86_64_gcc11.2', hou_hash: '20_0-newabi' }
|
||||
- { houdini_version: '20.5', platform: 'linux_x86_64_gcc11.2', hou_hash: '20_5' }
|
||||
fail-fast: false
|
||||
container:
|
||||
image: aswf/ci-base:2024
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
# We bumped from the 2021 CI image to 2023 here to fix some OpenSSL issues
|
||||
# with the Houdini download script. In so doing we broke some of the caching
|
||||
# between this job and the jobs in houdini.yml which _don't_ use the 2023
|
||||
# image yet. The issue is that the cache action will use zstd if it's
|
||||
# available to zip the cache and this causes it to be inserted with a unique
|
||||
# hash which images without zstd (i.e. the 2021/2022 images don't have
|
||||
# access to). For now, uninstall zstd here instead of installing it
|
||||
# everywhere and ask the LF to add zstd to the older base images.
|
||||
- name: remove zstd
|
||||
run: yum -y remove zstd
|
||||
- name: timestamp
|
||||
id: timestamp
|
||||
run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
|
||||
- name: download_houdini
|
||||
run: ./ci/download_houdini.sh ${{ matrix.config.houdini_version }} ${{ matrix.config.platform }} --prod
|
||||
- name: install_houdini
|
||||
run: |
|
||||
mkdir $HOME/houdini_install
|
||||
cp hou/hou.tar.gz $HOME/houdini_install/hou.tar.gz
|
||||
cd $HOME/houdini_install && tar -xzf hou.tar.gz && cd -
|
||||
- name: write_houdini_cache
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: hou
|
||||
key: vdb-v5-houdini${{ matrix.config.hou_hash }}-${{ steps.timestamp.outputs.timestamp }}
|
||||
|
||||
macos_houdini:
|
||||
needs: [checksecret]
|
||||
if: |
|
||||
(needs.checksecret.outputs.HOUDINI_SECRETS == 'true') &&
|
||||
(github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'houdini')
|
||||
# Note that macos-14 (current macos-latest) switches to M1. We could instead test
|
||||
# the arm build here instead of the x86 one.
|
||||
runs-on: macos-latest
|
||||
name: macos-houdini-20
|
||||
env:
|
||||
HOUDINI_CLIENT_ID: ${{ secrets.HOUDINI_CLIENT_ID }}
|
||||
HOUDINI_SECRET_KEY: ${{ secrets.HOUDINI_SECRET_KEY }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: timestamp
|
||||
id: timestamp
|
||||
run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
|
||||
- name: download_houdini
|
||||
run: ./ci/download_houdini.sh 20.0 macosx_arm64_clang14.0_13 --prod
|
||||
- name: install_houdini
|
||||
run: |
|
||||
mkdir $HOME/houdini_install
|
||||
cp hou/hou.tar.gz $HOME/houdini_install/hou.tar.gz
|
||||
cd $HOME/houdini_install && tar -xzf hou.tar.gz && cd -
|
||||
- name: write_houdini_cache
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: hou
|
||||
key: vdb-v5-houdini-macos-${{ steps.timestamp.outputs.timestamp }}
|
||||
|
||||
#############################################################################
|
||||
########################### Core Library Extras #############################
|
||||
#############################################################################
|
||||
|
||||
# Extra configuration tests for the OpenVDB Core library. These test a
|
||||
# variety of options with newer compilers.
|
||||
linux-extra:
|
||||
if: |
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'extra'
|
||||
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
|
||||
name: linux-extra:${{ matrix.config.name }}
|
||||
container:
|
||||
image: aswf/ci-openvdb:2024
|
||||
env:
|
||||
CXX: clang++
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- { name: 'all', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DUSE_BLOSC=ON -DUSE_ZLIB=ON -DUSE_EXR=ON -DUSE_PNG=ON' }
|
||||
- { name: 'lite', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DUSE_BLOSC=OFF -DUSE_ZLIB=OFF -DUSE_EXR=OFF -DUSE_PNG=OFF -DOPENVDB_USE_DELAYED_LOADING=OFF' }
|
||||
- { name: 'half', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DUSE_BLOSC=OFF -DUSE_IMATH_HALF=ON' }
|
||||
- { name: 'sse', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DOPENVDB_SIMD=SSE42' }
|
||||
- { name: 'avx', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DOPENVDB_SIMD=AVX' }
|
||||
- { name: 'numpy', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DUSE_NUMPY=ON -DOPENVDB_PYTHON_WRAP_ALL_GRID_TYPES=ON' }
|
||||
- { name: 'asan', build: 'asan', components: 'core,test', cmake: '-DNANOVDB_USE_OPENVDB=ON -DOPENVDB_AX_STATIC=OFF -DOPENVDB_CORE_STATIC=OFF -DUSE_BLOSC=OFF' } # We never called blosc_destroy(), so disable blosc to silence these errors
|
||||
- { name: 'ubsan', build: 'ubsan', components: 'core,test', cmake: '-DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" ' }
|
||||
- { name: 'c++20', build: 'Release', components: 'core,test', cmake: '-DCMAKE_CXX_STANDARD=20' }
|
||||
- { name: 'conf', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: nanobind
|
||||
#if: contains(container.image, '2023') == false
|
||||
run: ./ci/install_nanobind.sh 2.0.0
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--build-type=${{ matrix.config.build }}
|
||||
--components="${{ matrix.config.components }}"
|
||||
--cargs=\"-DOPENVDB_CXX_STRICT=ON ${{ matrix.config.cmake }}\"
|
||||
- name: test
|
||||
run: cd build && ctest -V
|
||||
|
||||
# Test latest dependencies, latest compilers and options
|
||||
latest:
|
||||
if: |
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'latest'
|
||||
runs-on: ${{ matrix.config.runson }}
|
||||
env:
|
||||
CXX: ${{ matrix.config.cxx }}
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- { runson: ubuntu-latest, cxx: g++, cmake: '' }
|
||||
# Disable the clang job for now. See https://github.com/actions/runner-images/issues/8659
|
||||
# - { runson: ubuntu-latest, cxx: clang++, cmake: '' }
|
||||
# @todo gcc on macos
|
||||
- { runson: macos-latest, cxx: '', cmake: '-DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm@15/bin/clang++ -DLLVM_DIR=/opt/homebrew/opt/llvm@15/lib/cmake/llvm' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: install_deps
|
||||
run: |
|
||||
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||
sudo apt-get -q install -y libboost-dev libboost-iostreams-dev libtbb-dev libblosc-dev llvm-dev libgtest-dev libcppunit-dev
|
||||
./ci/install_nanobind.sh 2.0.0
|
||||
elif [ "$RUNNER_OS" == "macOS" ]; then
|
||||
./ci/install_macos.sh 15
|
||||
./ci/install_tbb_macos.sh
|
||||
else
|
||||
echo "$RUNNER_OS not supported"; exit 1
|
||||
fi
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--build-type=Release
|
||||
--components=\"core,axcore,python,bin,render,test,axbin\"
|
||||
--cargs=\"-DCMAKE_CXX_STANDARD=20 -DOPENVDB_USE_DELAYED_LOADING=OFF -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install ${{ matrix.config.cmake }}\"
|
||||
- name: test
|
||||
run: cd build && ctest -V
|
||||
|
||||
windows:
|
||||
# Windows CI. Tests static and dynamic builds with MT and MD respectively.
|
||||
if: |
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'win'
|
||||
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'windows-2022-8c-32g-300h') || 'windows-latest' }}
|
||||
name: windows-vc:${{ matrix.config.vc }}-type:${{ matrix.config.build }}
|
||||
env:
|
||||
VCPKG_DEFAULT_TRIPLET: ${{ matrix.config.vc }}
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
# static build of blosc from vcpkg does not build internal sources.
|
||||
# USE_STATIC_DEPENDENCIES is required for IlmBase/OpenEXR defines and
|
||||
# Boost as both shared and static libs are installed.
|
||||
# USE_EXPLICIT_INSTANTIATION is disabled for debug static libraries
|
||||
# due to disk space constraints
|
||||
- { vc: 'x64-windows-static', components: 'core,bin,view,render,test', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON' }
|
||||
- { vc: 'x64-windows', components: 'core,bin,view,render,python,test', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' }
|
||||
- { vc: 'x64-windows', components: 'core,bin,view,render,python,test', build: 'Debug', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: path
|
||||
shell: pwsh
|
||||
run: |
|
||||
# note: system path must be modified in a previous step to it's use
|
||||
echo "$Env:VCPKG_INSTALLATION_ROOT\installed\${{ matrix.config.vc }}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
echo "${{github.workspace}}\build\openvdb\openvdb\${{ matrix.config.build }}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
- name: install
|
||||
shell: powershell
|
||||
run: .\ci\install_windows.ps1
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--config=${{ matrix.config.build }}
|
||||
--components=${{ matrix.config.components }}
|
||||
--cargs=\'
|
||||
${{ matrix.config.cmake }}
|
||||
-DMSVC_COMPRESS_PDB=ON
|
||||
-DUSE_EXR=ON
|
||||
-DUSE_PNG=ON
|
||||
-DVCPKG_TARGET_TRIPLET=${VCPKG_DEFAULT_TRIPLET}
|
||||
-DCMAKE_TOOLCHAIN_FILE=\"${VCPKG_INSTALLATION_ROOT}\\scripts\\buildsystems\\vcpkg.cmake\"
|
||||
\'
|
||||
- name: size
|
||||
# Print the build directy size (monitor if we're hitting runner limits)
|
||||
run: du -h build
|
||||
- name: test
|
||||
# Always run tests on weekly builds but skip Debug on commits as they take a while.
|
||||
# https://github.community/t/distinct-job-for-each-schedule/17811/2
|
||||
if: contains(github.event.schedule, '0 7 * * 1') || matrix.config.build == 'Release'
|
||||
run: cd build && ctest -V -C ${{ matrix.config.build }}
|
||||
|
||||
#############################################################################
|
||||
############################ AX Library Extras ##############################
|
||||
#############################################################################
|
||||
|
||||
linux-ax:
|
||||
if: |
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'ax'
|
||||
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
|
||||
name: >
|
||||
linux-ax:${{ matrix.config.image }}-cxx:${{ matrix.config.cxx }}-${{ matrix.config.build }}
|
||||
container:
|
||||
image: aswf/ci-openvdb:${{ matrix.config.image }}
|
||||
env:
|
||||
CXX: ${{ matrix.config.cxx }}
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
# Unified
|
||||
- { image: '2023-clang15', cxx: 'clang++', build: 'Release', components: 'core,bin,axcore,axbin,axtest', cmake: '' }
|
||||
- { image: '2023-clang15', cxx: 'g++', build: 'Release', components: 'core,bin,axcore,axbin,axtest', cmake: '' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: nanobind
|
||||
#f: contains(matrix.config.image, '2023') == false
|
||||
run: ./ci/install_nanobind.sh 2.0.0
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--build-type=${{ matrix.config.build }}
|
||||
--components=${{ matrix.config.components }}
|
||||
--cargs=\"
|
||||
${{ matrix.config.cmake }}
|
||||
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
|
||||
-DUSE_EXPLICIT_INSTANTIATION=OFF
|
||||
-DOPENVDB_CXX_STRICT=ON
|
||||
\"
|
||||
- name: clean
|
||||
if: matrix.config.components == 'core'
|
||||
run: rm -rf build
|
||||
- name: build
|
||||
if: matrix.config.components == 'core'
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--build-type=${{ matrix.config.build }}
|
||||
--components="bin,axcore,axbin,axtest,python"
|
||||
--cargs=\"
|
||||
${{ matrix.config.cmake }}
|
||||
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
|
||||
-DUSE_EXPLICIT_INSTANTIATION=OFF
|
||||
-DOPENVDB_CXX_STRICT=ON
|
||||
\"
|
||||
- name: test
|
||||
run: cd build && ctest -V
|
||||
- name: test_doxygen_examples
|
||||
run: ./ci/extract_test_examples.sh
|
||||
|
||||
macos-ax:
|
||||
if: |
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'ax'
|
||||
runs-on: macos-13
|
||||
name: macos-cxx:${{ matrix.config.cxx }}-llvm:${{ matrix.config.llvm }}-${{ matrix.config.build }}
|
||||
env:
|
||||
CXX: ${{ matrix.config.cxx }}
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- { cxx: 'clang++', build: 'Release', llvm: '15' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: install_deps
|
||||
run: |
|
||||
./ci/install_macos.sh ${{ matrix.config.llvm }}
|
||||
./ci/install_tbb_macos.sh
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--build-type=${{ matrix.config.build }}
|
||||
--components="core,python,bin,axcore,axbin,axtest"
|
||||
--cargs=\"
|
||||
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
|
||||
-DUSE_EXPLICIT_INSTANTIATION=OFF
|
||||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
|
||||
-DLLVM_DIR=/opt/homebrew/opt/llvm@${{ matrix.config.llvm }}/lib/cmake/llvm
|
||||
\"
|
||||
- name: test
|
||||
run: cd build && ctest -V
|
||||
- name: test_doxygen_examples
|
||||
run: ./ci/extract_test_examples.sh
|
||||
|
||||
windows-ax:
|
||||
if: |
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'ax'
|
||||
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'windows-2022-8c-32g-300h') || 'windows-latest' }}
|
||||
name: windows-vc:${{ matrix.config.vc }}-type:${{ matrix.config.build }}
|
||||
env:
|
||||
VCPKG_DEFAULT_TRIPLET: ${{ matrix.config.vc }}
|
||||
# Export this with '' avoid bash treating \ as escape
|
||||
VDB_INSTALL_PREFIX: '${{ github.workspace }}\\install'
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
# static build of blosc from vcpkg does not build internal sources.
|
||||
# USE_STATIC_DEPENDENCIES is required for IlmBase/OpenEXR defines and
|
||||
# Boost as both shared and static libs are installed.
|
||||
# @todo We don't currently run the axtests with shared builds of ax
|
||||
# due to symbol issues using LLVM as a static lib (which is the only
|
||||
# option on Windows).
|
||||
- { vc: 'x64-windows', crt: 'MD', components: 'core,bin,axcore,axbin,python', build: 'Release', cmake: '-DOPENVDB_CORE_STATIC=OFF -DOPENVDB_AX_STATIC=OFF' }
|
||||
- { vc: 'x64-windows-static', crt: 'MT', components: 'core,bin,axcore,axbin,axtest', build: 'Release', cmake: '-DOPENVDB_CORE_SHARED=OFF -DOPENVDB_AX_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON' }
|
||||
- { vc: 'x64-windows-static', crt: 'MTd', components: 'core,bin,axcore,axbin,axtest', build: 'Debug', cmake: '-DOPENVDB_CORE_SHARED=OFF -DOPENVDB_AX_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: llvm
|
||||
run: ./ci/install_llvm_windows.sh ${{ matrix.config.crt }}
|
||||
- name: install
|
||||
shell: powershell
|
||||
run: .\ci\install_windows.ps1
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--config=${{ matrix.config.build }}
|
||||
--components="${{ matrix.config.components }}"
|
||||
--cargs=\'
|
||||
-A x64 -G \"Visual Studio 17 2022\"
|
||||
-DVCPKG_TARGET_TRIPLET=${VCPKG_DEFAULT_TRIPLET}
|
||||
-DCMAKE_TOOLCHAIN_FILE=\"${VCPKG_INSTALLATION_ROOT}\\scripts\\buildsystems\\vcpkg.cmake\"
|
||||
-DMSVC_COMPRESS_PDB=ON
|
||||
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
|
||||
-DUSE_EXPLICIT_INSTANTIATION=OFF
|
||||
-DLLVM_DIR=\"${HOME}\\llvm_install\\lib\\cmake\\llvm\"
|
||||
-DCMAKE_INSTALL_PREFIX=\"${VDB_INSTALL_PREFIX}\"
|
||||
${{ matrix.config.cmake }}
|
||||
\'
|
||||
- name: runtime_path
|
||||
shell: pwsh
|
||||
run: |
|
||||
# note: system path must be modified in a previous step to it's use
|
||||
echo "$Env:VCPKG_INSTALLATION_ROOT\installed\${{ matrix.config.vc }}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
echo "$Env:VDB_INSTALL_PREFIX\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
- name: test
|
||||
run: cd build && ctest -V -C ${{ matrix.config.build }}
|
||||
|
||||
#############################################################################
|
||||
################################## Blosc ####################################
|
||||
#############################################################################
|
||||
|
||||
windows-nanovdb:
|
||||
if: |
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'win'
|
||||
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'windows-2022-8c-32g-300h') || 'windows-latest' }}
|
||||
env:
|
||||
VCPKG_DEFAULT_TRIPLET: ${{ matrix.config.vc }}
|
||||
visual_studio: "Visual Studio 17 2022"
|
||||
cuda: "12.4.0"
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
# static build of blosc from vcpkg does not build internal sources.
|
||||
# USE_STATIC_DEPENDENCIES is required for IlmBase/OpenEXR defines and
|
||||
# Boost as both shared and static libs are installed.
|
||||
- { vc: 'x64-windows-static', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded' }
|
||||
- { vc: 'x64-windows-static', build: 'Debug', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug' }
|
||||
- { vc: 'x64-windows', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' }
|
||||
- { vc: 'x64-windows', build: 'Debug', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: path
|
||||
shell: powershell
|
||||
run: |
|
||||
# note: system path must be modified in a previous step to it's use
|
||||
echo "$Env:VCPKG_INSTALLATION_ROOT\installed\${{ matrix.config.vc }}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
echo "${{github.workspace}}\build\openvdb\openvdb\${{ matrix.config.build }}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
- name: install_cuda
|
||||
shell: powershell
|
||||
run: .\ci\install_windows_cuda.ps1
|
||||
- name: install
|
||||
shell: powershell
|
||||
run: .\ci\install_windows.ps1
|
||||
- name: build
|
||||
shell: bash
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--config=${{ matrix.config.build }}
|
||||
--components=core,nano,nanotest,nanoexam,nanobench,nanotool
|
||||
--cargs=\'
|
||||
${{ matrix.config.cmake }}
|
||||
-DMSVC_COMPRESS_PDB=ON
|
||||
-DUSE_EXPLICIT_INSTANTIATION=OFF
|
||||
-DNANOVDB_USE_CUDA=ON
|
||||
-DCMAKE_CUDA_ARCHITECTURES="80"
|
||||
-DNANOVDB_USE_OPENVDB=ON
|
||||
-DVCPKG_TARGET_TRIPLET=${VCPKG_DEFAULT_TRIPLET}
|
||||
-DCMAKE_TOOLCHAIN_FILE=\"${VCPKG_INSTALLATION_ROOT}\\scripts\\buildsystems\\vcpkg.cmake\"
|
||||
\'
|
||||
- name: test
|
||||
shell: bash
|
||||
run: cd build && ctest -V -E ".*cuda.*"
|
||||
|
||||
#############################################################################
|
||||
################################## Blosc ####################################
|
||||
#############################################################################
|
||||
|
||||
linux-blosc:
|
||||
if: |
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'blosc'
|
||||
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
|
||||
name: linux-blosc:${{ matrix.blosc }}
|
||||
container:
|
||||
image: aswf/ci-base:2023
|
||||
strategy:
|
||||
matrix:
|
||||
blosc: ['1.18.0','1.19.0','1.20.0','1.21.0']
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: install_blosc
|
||||
run: sudo ./ci/install_blosc.sh ${{ matrix.blosc }}
|
||||
- name: build
|
||||
run: >
|
||||
sudo ./ci/build.sh -v
|
||||
--build-type=Release
|
||||
--components=\"core,test\"
|
||||
- name: test
|
||||
run: cd build && sudo ctest -V
|
||||
|
||||
#############################################################################
|
||||
################################## ABI ######################################
|
||||
#############################################################################
|
||||
|
||||
linux-abi-checker:
|
||||
if: |
|
||||
github.event_name == 'workflow_dispatch' &&
|
||||
(github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'abi')
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
# The 'abicheck' build type sets these, but older versions of the library
|
||||
# may not have this build type. See OpenVDBCXX.cmake
|
||||
CXXFLAGS: "-gdwarf-4 -g3 -ggdb -Og"
|
||||
steps:
|
||||
- name: Enable Node 16
|
||||
run: |
|
||||
echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
# Compute the latest major version - that is used as our baseline
|
||||
# note: For CI forks, make sure you have your tags synced
|
||||
- name: get_major_version
|
||||
run: |
|
||||
LATEST_VERSION_TAG=$(git tag --merged | sort --version-sort | tail -n1)
|
||||
echo "Computed latest VDB tag: ${LATEST_VERSION_TAG}"
|
||||
VDB_MAJOR_VERSION=$(echo ${LATEST_VERSION_TAG} | cut -f1 -d '.' | tr -d -c 0-9)
|
||||
echo "Using major version: ${VDB_MAJOR_VERSION}"
|
||||
echo "VDB_MAJOR_VERSION=${VDB_MAJOR_VERSION}" >> "$GITHUB_ENV"
|
||||
- name: install_deps
|
||||
run: sudo apt-get -q install -y libboost-iostreams-dev libtbb-dev libblosc-dev elfutils
|
||||
- name: install_abi_checker
|
||||
run: sudo apt-get -q install -y abi-dumper abi-compliance-checker
|
||||
- name: build_new
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--build-dir=build_new
|
||||
--build-type=abicheck
|
||||
--target=openvdb_shared
|
||||
--components=\"core\"
|
||||
--cargs=\'-DUSE_EXPLICIT_INSTANTIATION=OFF -DDISABLE_DEPENDENCY_VERSION_CHECKS=ON\'
|
||||
- name: checkout_baseline
|
||||
run: git checkout v${VDB_MAJOR_VERSION}.0.0
|
||||
- name: build_old
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--build-dir=build_old
|
||||
--build-type=abicheck
|
||||
--target=openvdb_shared
|
||||
--components=\"core\"
|
||||
--cargs=\'-DUSE_EXPLICIT_INSTANTIATION=OFF -DDISABLE_DEPENDENCY_VERSION_CHECKS=ON\'
|
||||
- name: abi_dump
|
||||
run: |
|
||||
abi-dumper build_new/openvdb/openvdb/libopenvdb.so -o ABI-NEW.dump -lver 1
|
||||
abi-dumper build_old/openvdb/openvdb/libopenvdb.so -o ABI-OLD.dump -lver 2
|
||||
# Replace the version namespace in the latest ABI dump with the baseline
|
||||
# version we're comparing against. We should probably instead build the
|
||||
# latest with the baseline version number but no CMake/defines allow us to
|
||||
# do this.
|
||||
- name: replace_symbols
|
||||
run: sed -i -E 's/openvdb([^v]*)v[0-9]*_[0-9]/openvdb\1v'${VDB_MAJOR_VERSION}'_0/g' ABI-NEW.dump
|
||||
- name: abi_check
|
||||
# -strict treats warnings as errors
|
||||
# -extended checks all member data
|
||||
# we check everything _not_ in openvdb::**::internal namespace
|
||||
run: >
|
||||
abi-compliance-checker -l OPENVDB
|
||||
-old ABI-OLD.dump
|
||||
-new ABI-NEW.dump
|
||||
-skip-internal-symbols "\d(openvdb.*internal)"
|
||||
-skip-internal-types "(openvdb.*internal)::"
|
||||
-strict
|
||||
-extended
|
||||
- name: upload_report
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: abi_report
|
||||
path: ./compat_reports/OPENVDB/2_to_1/compat_report.html
|
||||
retention-days: 5
|
||||
@@ -1,40 +0,0 @@
|
||||
|
||||
name: Whitespace
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'pendingchanges/**'
|
||||
- 'tsc/meetings/**'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'pendingchanges/**'
|
||||
- 'tsc/meetings/**'
|
||||
|
||||
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# Search the git repository for any trailing spaces excluding meeting notes and auto-generated wlt files
|
||||
trailingspaces:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: test
|
||||
run: |
|
||||
set +e
|
||||
git grep -n -I -E '^.+[ ]+$' -- ':!tsc/meetings/*' ':!pendingchanges/*' ':!*.wlt'
|
||||
test $? -eq 1
|
||||
|
||||
# Search for any tabs excluding meeting notes, image files and a few others
|
||||
spacesnottabs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: test
|
||||
run: |
|
||||
set +e
|
||||
git grep -n " " -- ':!*/whitespace.yml' ':!tsc/meetings/*' ':!*.svg' ':!*.cmd' ':!*.png' ':!pendingchanges/*' ':!*.wlt' ':!*.jpg' ':!*.gif' ':!*.mp4' ':!*.pt' ':!*.pth' ':!*.nvdb' ':!*.npz'
|
||||
test $? -eq 1
|
||||
@@ -1,4 +1 @@
|
||||
/build/*
|
||||
**/src/benchmarks/build/*
|
||||
nanovdb/nanovdb/build/*
|
||||
.DS_Store
|
||||
|
||||
@@ -1,672 +1,36 @@
|
||||
OpenVDB Version History
|
||||
=======================
|
||||
|
||||
Version 12.0.2 - In development
|
||||
|
||||
|
||||
Version 12.0.1 - April 3, 2025
|
||||
|
||||
OpenVDB:
|
||||
New features:
|
||||
- Added read and write support for OFF (Object File Format) files to vdb_tool
|
||||
|
||||
Build:
|
||||
- Fixed a build issue with vdb_render on Windows with newer versions of glew not including glu.h by default
|
||||
- Fixed issues with newer versions of clang refusing to accept older ::template syntax
|
||||
|
||||
NanoVDB:
|
||||
New features:
|
||||
- Added support for multiple GPUs to DeviceBuffer
|
||||
- Added a UnifiedBuffer class that wraps CUDA unified memory
|
||||
- Added example for multiGPU sparse convolution
|
||||
- Added CUDA utility functions for device queries
|
||||
- Added functions to independently stop and compute the elapsed time for timer classes
|
||||
|
||||
Improvements:
|
||||
- Replaced CUB's CachingDeviceAllocator with the default asynchronous stream ordered allocator in PointsToGrid for improved performance
|
||||
|
||||
Bug fix:
|
||||
- Map is now properly transposed when converting NanoVDB to OpenVDB.
|
||||
- Fixed ostream specializations being hidden within the nanovdb namespace
|
||||
- Fixed a call to a non-existent method in GridBuild.h
|
||||
|
||||
|
||||
Version 12.0.0 - October 31, 2024
|
||||
|
||||
OpenVDB is now licensed under the Apache 2.0 license, instead of the MPL 2.0 license.
|
||||
|
||||
This version introduces ABI changes relative to older major releases,
|
||||
so to preserve ABI compatibility it might be necessary to define the
|
||||
macro OPENVDB_ABI_VERSION_NUMBER=N, where, for example, N is 10 for
|
||||
Houdini 20.0 and 11 for Houdini 20.5.
|
||||
|
||||
GCC 9 is no longer supported.
|
||||
|
||||
OpenVDB:
|
||||
New features:
|
||||
- Added fillet() method in tools::LevelSetFilter to round off concave edges
|
||||
to create smoother transition between surfaces.
|
||||
|
||||
Improvements:
|
||||
- Added openvdb::assertAbort to replace cassert and a
|
||||
OPENVDB_ENABLE_ASSERTS cmake argument/compile define to toggle
|
||||
assertions in OpenVDB code, independantly of NDEBUG. Asserts are
|
||||
no longer enabled by default in when NDEBUG is absent (e.g.
|
||||
Debug builds).
|
||||
- Removed last traces of Boost when OPENVDB_USE_DELAYED_LOADING is OFF
|
||||
[Reported by Brian McKinnon]
|
||||
- RootNode code cleanup to eliminate redundant key conversion and
|
||||
to create map values in-place.
|
||||
- Add RootNode::deleteChildOrTile() to delete a child or tile of
|
||||
the root node.
|
||||
- ValueAccessors are now defined and created in the Tree class
|
||||
instead of in the Grid class so that custom Tree implementations
|
||||
may define and create their own ValueAccessors if desired.
|
||||
- Added support for PDAL to vdb_tool [Contributed by Tom Matterson]
|
||||
- LeafManager and NodeManager now use Index64 for leaf counts internally.
|
||||
- Added RootNode::probeChild() const.
|
||||
- Added RootNode::probeChild() and RootNode::probeConstChild().
|
||||
- Added RootNode::probe() and RootNode::probeConst() to query key presence,
|
||||
child node, value and active state.
|
||||
- Added InternalNode::probeChild() const.
|
||||
- Added InternalNode::probeChild() and probeChildConst() with coord access
|
||||
and optionally value and active state.
|
||||
- Added InternalNode::probeChild() and probeChildConst() with index access
|
||||
and optionally value and active state.
|
||||
- Added InternalNode::isValueOff(), LeafNode::isValueOff(),
|
||||
LeafNodeBool::isValueOff(), LeafNodeMask::isValueOff().
|
||||
- Added LeafNodeMask::probeValue(Index,val), LeafNodeBool::probeValue(Index,val).
|
||||
- Added RootNode::getValueUnsafe(), RootNode::getChildUnsafe(),
|
||||
RootNode::getConstChildUnsafe().
|
||||
- Added InternalNode::getValueUnsafe(), InternalNode::getChildUnsafe(),
|
||||
InternalNode::getConstChildUnsafe().
|
||||
- Added InternalNode::setActiveStateUnsafe(), InternalNode::setValueOnlyUnsafe(),
|
||||
InternalNode::setValueOnUnsafe(), InternalNode::setValueOffUnsafe().
|
||||
- Added InternalNode::setChildUnsafe(), InternalNode::resetChildUnsafe(),
|
||||
InternalNode::stealChildUnsafe(), InternalNode::deleteChildUnsafe().
|
||||
- For LeafNode, LeafNodeBool and LeafNodeMask - added
|
||||
LeafNode::getValueUnsafe(), LeafNode::setActiveStateunsafe(),
|
||||
LeafNode::setValueOnlyUnsafe(), LeafNode::setValueOnUnsafe(),
|
||||
LeafNode::setValueOffUnsafe().
|
||||
|
||||
ABI changes:
|
||||
- Tree::leafCount(), Tree::unallocatedLeafCount(),
|
||||
Tree::nonLeafCount() and Tree::nodeCount() now use Index64 in their
|
||||
return types instead of Index32.
|
||||
|
||||
API Changes:
|
||||
- RootNode::tileCount(), RootNode::activeTileCount() and
|
||||
RootNode::inactiveTileCount() are now public.
|
||||
- RootNode::hasKey() and RootNode::coordToKey() are now public.
|
||||
- RootNode::leafCount(), RootNode::nonLeafCount() and RootNode::nodeCount()
|
||||
now use Index64 instead of Index32. The Index32 variant is deprecated.
|
||||
- InternalNode::leafCount(), InternalNode::nonLeafCount() and
|
||||
InternalNode::nodeCount() now use Index64 instead of Index32. The Index32
|
||||
variant is deprecated.
|
||||
- LeafNode::leafCount() and LeafNode::nonLeafCount() now use Index64 instead
|
||||
of Index32. The Index32 variant is deprecated.
|
||||
|
||||
Bug Fixes:
|
||||
- Fix potential crash reading corrupt .vdb files with invalid
|
||||
blosc or zip chunks.
|
||||
[Fix thanks to Matthias Ueberheide]
|
||||
- Fix a bug in RootNode::setOrigin() where the origin was updated
|
||||
before the error was thrown potentially leaving the root in an
|
||||
invalid state.
|
||||
- Fixed a thread sanitizer issue which could cause undefined
|
||||
behaviour in VolumeToSpheres::fillWithSpheres
|
||||
[Reported by Jérémie Dumas]
|
||||
- Fixed an occurance of undefined behaviour in tools::activate
|
||||
(though this would typically not have manifested with any
|
||||
unintended behaviour)
|
||||
|
||||
NanoVDB:
|
||||
Bug fix:
|
||||
- nanovdb::readGrids works with raw grid buffer.
|
||||
|
||||
Improvements:
|
||||
- Restructure files location and namespace to be more align with
|
||||
OpenVDB. The namespaces touched by the restructuring are: io,
|
||||
cuda, util, tools, and math.
|
||||
- Add two scripts updateFiles.sh and updateFiles.py to update the
|
||||
files using NanoVDB. The script updateFiles.py works on both
|
||||
Windows and Linux. For a more complete list of changes, see API
|
||||
Changes (details).
|
||||
|
||||
- cuda::PointsToGrid supports target density.
|
||||
- Add support for NanoVDB Grid of type UInt8.
|
||||
- Add ability to use externally managed CUDA buffer.
|
||||
- Add create methods for CudaDeviceBuffer and exceptions.
|
||||
- Improve GridValidator logic, e.g. include check for grid count.
|
||||
- Add operator > and >= for class Coord according to lexicographical order.
|
||||
- Add toCodec to convert string to Codec enumeration type.
|
||||
- Add nanovdb::strlen<GridType>().
|
||||
- Add strncpy util.
|
||||
- Add NANOVDB_DISABLE_SYNC_CUDA_MALLOC that maps cudaMallocAsync
|
||||
and cudaFreeAsync to cudaMalloc and cudaFree respectively.
|
||||
- Add guard to UINT64_C.
|
||||
- Remove use of cudaMallocAsync in PointsToGrid.cuh.
|
||||
- Align PNanoVDB blind metadata to NanoVDB.
|
||||
|
||||
API Changes:
|
||||
- Change mapToGridType to toGridType.
|
||||
- Change mapToMagic to toMagic.
|
||||
- Change CpuTimer.h to Timer.h.
|
||||
|
||||
API Changes (details):
|
||||
- These APIs are now under the math namespace: Ray, DDA, HDDA,
|
||||
Vec3, Vec4, BBox, ZeroCrossing, TreeMarcher, PointTreeMarcher,
|
||||
BoxStencil, CurvatureStencil, GradStencil, WenoStencil, AlignUp,
|
||||
Min, Max, Abs, Clamp, Sqrt, Sign, Maximum, Delta, RoundDown, pi,
|
||||
isApproxZero, Round, createSampler, SampleFromVoxels.
|
||||
|
||||
- These APIs are now under the tools namespace: createNanoGrid,
|
||||
StatsMode, createLevelSetSphere, createFogVolumeSphere,
|
||||
createFogVolumeSphere, createFogVolumeSphere,
|
||||
createFogVolumeTorus, createLevelSetBox, CreateNanoGrid,
|
||||
updateGridStats, evalChecksum, validateChecksum, checkGrid,
|
||||
Extrema.
|
||||
- These APIs are now under the util namespace: is_floating_point,
|
||||
findLowestOn, findHighestOn, Range, streq, strcpy, strcat,
|
||||
empty, Split, invoke, forEach, reduce, prefixSum, is_same,
|
||||
is_specialization, PtrAdd, PtrDiff.
|
||||
|
||||
- Move nanovdb::build to nanovdb::tools::build.
|
||||
- Rename nanovdb::BBoxR to nanovdb::Vec3dBBox.
|
||||
- Rename nanovdb::BBox<nanovdb::Vec3d> to nanovdb::Vec3dBbox.
|
||||
- Move nanovdb::cudaCreateNodeManager to nanovdb::cuda::createNodeManager.
|
||||
- Move and rename nanovdb::cudaVoxelsToGrid to nanovdb::cuda::voxelsToGrid.
|
||||
- Move and rename nanovdb::cudaPointsToGrid to nanovdb::cuda::pointsToGrid.
|
||||
- Move nanovdb::DitherLUT to nanovdb::math::DitherLUT.
|
||||
- Move and rename nanovdb::PackedRGBA8 to nanovdb::math::Rgba8.
|
||||
- Move nanovdb::Rgba8 to nanovdb::math::Rgba8.
|
||||
- Move and rename nanovdb::CpuTimer to nanovdb::util::Timer.
|
||||
- Move nanovdb::GpuTimer to nanovdb::util::cuda::Timer.
|
||||
- Move and rename nanovdb::CountOn to nanovdb::util::countOn.
|
||||
|
||||
- Move util/GridHandle.h to GridHandle.h.
|
||||
- Move util/BuildGrid.h to tools/GridBuilder.h.
|
||||
- Move util/GridBuilder.h to tools/GridBuilder.h.
|
||||
- Move util/IO.h to io/IO.h.
|
||||
- Move util/CSampleFromVoxels.h to math/CSampleFromVoxels.h.
|
||||
- Move util/DitherLUT.h to math/DitherLUT.h.
|
||||
- Move util/HDDA.h to math/HDDA.h.
|
||||
- Move util/Ray.h to math/Ray.h.
|
||||
- Move util/SampleFromVoxels.h to math/SampleFromVoxels.h.
|
||||
- Move util/Stencils.h to nanovdb/math/Stencils.h.
|
||||
- Move util/CreateNanoGrid.h to tools/CreateNanoGrid.h.
|
||||
- Move and rename util/Primitives.h to tools/CreatePrimitives.h.
|
||||
- Move util/GridChecksum.h to tools/GridChecksum.h.
|
||||
- Move util/GridStats.h to tools/GridStats.h.
|
||||
- Move util/GridChecksum.h to tools/GridChecksum.h.
|
||||
- Move util/GridValidator.h to tools/GridValidator.h.
|
||||
- Move util/NanoToOpenVDB.h to tools/NanoToOpenVDB.h.
|
||||
- Move util/cuda/CudaGridChecksum.cuh to tools/cuda/CudaGridChecksum.cuh.
|
||||
- Move util/cuda/CudaGridStats.cuh to tools/cuda/CudaGridStats.cuh.
|
||||
- Move util/cuda/CudaGridValidator.cuh to tools/cuda/CudaGridValidator.cuh.
|
||||
- Move util/cuda/CudaIndexToGrid.cuh to tools/cuda/CudaIndexToGrid.cuh.
|
||||
- Move and rename util/cuda/CudaPointsToGrid.cuh to tools/cuda/PointsToGrid.cuh.
|
||||
- Move util/cuda/CudaSignedFloodFill.cuh to tools/cuda/CudaSignedFloodFill.cuh.
|
||||
- Move and rename util/cuda/CudaDeviceBuffer.h to cuda/DeviceBuffer.h.
|
||||
- Move and rename util/cuda/CudaGridHandle.cuh to cuda/GridHandle.cuh.
|
||||
- Move and rename util/cuda/CudaUtils.h to util/cuda/Util.h.
|
||||
- Move and consolidate util/cuda/GpuTimer.h to util/cuda/Timer.h.
|
||||
|
||||
Houdini:
|
||||
- When OPENVDB_ENABLE_RPATH is ON, the location of
|
||||
libopenvdb_houdini is now added to the rpath of all Houdini
|
||||
dsos.
|
||||
|
||||
Python:
|
||||
- OpenVDB Python bindings are now implemented using nanobind
|
||||
instead of pybind11
|
||||
- The OpenVDB Python module has been changed from pyopenvdb to openvdb
|
||||
- Added Python bindings for NanoVDB
|
||||
|
||||
Build:
|
||||
- Fixed an issue with OpenVDB AX's CMake on Windows where the
|
||||
static and shared library targets would have the same name
|
||||
[Reported by Nicholas Yue]
|
||||
- USE_EXPLICIT_INSTANTIATION is now disabled on Windows by default
|
||||
due to OOM linker issues.
|
||||
- Jemalloc is now the preferred allocator of choice on all
|
||||
platforms when CONCURRENT_MALLOC is set to Auto.
|
||||
- Fixed an issue with the Blosc CMake FindPackage for the OpenVDB
|
||||
Windows static library.
|
||||
|
||||
|
||||
Version 11.0.0 - November 1, 2023
|
||||
|
||||
This version introduces ABI changes relative to older major releases,
|
||||
so to preserve ABI compatibility it might be necessary to define the
|
||||
macro OPENVDB_ABI_VERSION_NUMBER=N, where, for example, N is 9 for
|
||||
Houdini 19.5 and 10 for Houdini 20.0.
|
||||
|
||||
OpenEXR 2 and Python 2 are no longer supported.
|
||||
|
||||
OpenVDB:
|
||||
Improvements:
|
||||
- Removed use of boost::any in favor of std::any.
|
||||
[Contributed by Brian McKinnon]
|
||||
|
||||
Bug Fixes:
|
||||
- Fix potential crash reading corrupt .vdb files with invalid
|
||||
blosc or zip chunks.
|
||||
[Contributed by Matthias Ueberheide]
|
||||
|
||||
NanoVDB:
|
||||
Highlights:
|
||||
- Several new tools to generate and modify NanoVDB grids on the GPU.
|
||||
- New file format that supports streaming of raw grid buffers.
|
||||
|
||||
New Features:
|
||||
- New memory efficient GridClass::IndexGrid that separates values from tree
|
||||
- 4 new GridTypes (Index, OnIndex, IndexMask, OnIndexMask) used by IndexGrid
|
||||
- Added createNanoGrid that replaces older conversion methods in GridBuilder.h,
|
||||
IndexGridBuilder.h and OpenToNanoVDB.h
|
||||
- Added cudaPointsToGrid that constructs a point device grid from a list of
|
||||
points.
|
||||
- Added cudaVoxelsToGrid that constructs a voxel device grid from a list of
|
||||
voxels.
|
||||
- Added cuda/CudaUtils.h with several cuda utility functions.
|
||||
- Added GpuTimer for timing of kernels in a specific cuda stream.
|
||||
- Added cudaIndexToGrid that converts IndexGrids into regular Grids.
|
||||
- Added cudaSignedFloodFill that performs signed-flood filling on the GPU.
|
||||
- Added cudaAddBlindData that adds blind data to an existing grid on the GPU.
|
||||
- Added cudaGridChecksum that computes checksums of device grids.
|
||||
- Added cudaGridHandle that handles grids on the GPU.
|
||||
- Added cudaNodeManager that constructs a NodeManager on the GPU.
|
||||
- Added build type Points and GridType::PointIndex for point grids.
|
||||
- Added GridType::Vec3u16 and GridType::Vec3u8 for compressed coordinates.
|
||||
- Added PrefixSum.h for concurrent computation of prefix sum on the CPU.
|
||||
|
||||
API Changes:
|
||||
- Version 32.6.0 (ABI is unchanged).
|
||||
- Transition from C++11 to C++17
|
||||
- Vec3R is deprecated, please use Vec3d instead.
|
||||
- nanoToOpenVDB now takes the index of a NanoVDB in a GridHandle.
|
||||
- GridData, InternalData and LeafData are now public.
|
||||
- GridMetaData can be copied.
|
||||
- Improvements to GridBuilder.h that allows construction of grids on CPU.
|
||||
- GridHandle's move c-tor now requires the GridBuffer to contain a valid grid.
|
||||
- Moved CudaDeviceBuffer.h to cuda/CudaDeviceBuffer.h.
|
||||
- New API for acceleration of custom random-access with ValueAccessors.
|
||||
- Added BitFlags class for convenient bit-mask operations.
|
||||
- Added Vec2/3::min/maxComponentAtomic GPU methods.
|
||||
- Added BBox::expandAtomic and BBox::intersectAtomic.
|
||||
- Added Coord::expandAtomic.
|
||||
- Added Map constructors.
|
||||
- Added Mask::DenseIterator, Mask::setOnAtomic, and Mask::setOffAtomic.
|
||||
- InternalNode::ChildIterator is now const-correct.
|
||||
- Added several new NanoVDB Build Traits.
|
||||
- Syncing PNanoVDB.h with NanoVDB.h.
|
||||
|
||||
Build:
|
||||
- Support for OpenEXR 2.X has been removed.
|
||||
- Better support for building with external package configurations
|
||||
with CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON.
|
||||
|
||||
Python:
|
||||
- Removed Python 2 support.
|
||||
[Contributed by Matthew Cong]
|
||||
- Removed explicit bindings for Math types.
|
||||
[Contributed by Matthew Cong]
|
||||
- Improved type casting for TypedMetadata.
|
||||
[Contributed by Matthew Cong]
|
||||
|
||||
|
||||
Version 10.1.0 - October 11, 2023
|
||||
|
||||
Highlights:
|
||||
- OpenVDB Python bindings are now implemented using pybind11 instead of
|
||||
Boost.Python.
|
||||
[Contributed by Matthew Cong]
|
||||
|
||||
OpenVDB:
|
||||
New features:
|
||||
- Added points::replicate() for the replication of PointDataGrid points
|
||||
and attributes.
|
||||
|
||||
Improvements:
|
||||
- Upgraded OpenVDBs internal half representation to IMath 3.1.6. Brings
|
||||
conversion support using F16C instructions (if enabled using -mf16c) and
|
||||
the removal of the exponent lookup table in favor of bit shifting.
|
||||
- OpenVDBs copy of Half.h is no longer built with an internal lookup table,
|
||||
but explicitly selects the non-LUT version and disables the creation of
|
||||
the LUT. This is required to avoid symbol conflicts with different
|
||||
namespaced OpenVDB builds.
|
||||
- Removed boost::uuid from Archive, instead std::random_device is used
|
||||
directly to generate UUID-like objects.
|
||||
- Moved all cases of file static/global variables which relied on non-trivial
|
||||
construction into function scopes as static locals. These would previously
|
||||
initialize themselves on start-up in a non-deterministic, compiler-dictated
|
||||
order(static-initialization-order-fiasco). This order is now defined by the
|
||||
program's execution.
|
||||
- Fixed the constants used in openvdb::math::Coord::hash() and
|
||||
nanovdb::Coord::hash() to correctly be prime numbers (note that this
|
||||
changes the result of these methods).
|
||||
[Contributed by Benedikt Mersch]
|
||||
- Updated tools::meshToVolume to take two new optional arguments to provide
|
||||
an interior test oracle and an interior testing method. These allow the
|
||||
default outside-flood-fill to be replaced if the actual sidedness can be
|
||||
known.
|
||||
[Contributed by Tomas Skrivan]
|
||||
- LevelSetRebuild now includes example code that demonstrates the intended
|
||||
use of the new meshToVolume interior testing parameters for the
|
||||
resampling of level sets, where the original grid is used as the true
|
||||
sign value. However, due to differences between polygonalization and
|
||||
trilinear interpolation, this behaviour is disabled and exists as a
|
||||
reference.
|
||||
- Introduced openvdb::TupleList to wrap std::tuple and provide interface
|
||||
interop methods with openvdb::TypeList.
|
||||
- Added OPENVDB_FORCE_INLINE, OPENVDB_LIKELY and OPENVDB_UNLIKELY macros.
|
||||
- Introduced openvdb::make_index_sequence to solve clang compilations
|
||||
issues with compiler built-in index_sequence implementations.
|
||||
|
||||
API changes:
|
||||
- Significant infrastructural change to the ValueAccessor header and
|
||||
implementation. All ValueAccessor specializations have been consolidated
|
||||
into a single class which supports all possible ValueAccessor configurations
|
||||
using index_sequences. Backward compatible declarations have been provided.
|
||||
The new ValueAccessor implementation is marked as final.
|
||||
- PagedArray iterators no longer derive from std::iterator
|
||||
(but remains standard compliant).
|
||||
|
||||
Bug Fixes:
|
||||
- Internal counters in tree::RangeIterator were limited to 32bit precision.
|
||||
They are now extended to size_t.
|
||||
[Reported by SpaceX]
|
||||
- Fixed a bug when compiling with -fvisibility=hidden and GCC 11 which
|
||||
would cause a crash in openvdb::initialize().
|
||||
- Fixed a bug with LeafManager which wouldn't correctly
|
||||
initialize its LeafNode array for single level Tree configurations
|
||||
i.e. RootNode<LeafNode> (bug introduced in 7.2.0).
|
||||
[Reported by @lanwatch]
|
||||
- Fixed a bug with LeafNodeBool Topology constructor with designated
|
||||
on/off values which wouldn't apply them correctly.
|
||||
[Reported by @hozhaoea]
|
||||
|
||||
OpenVDB AX:
|
||||
Improvements:
|
||||
- Added support for LLVM 15.
|
||||
|
||||
Bug Fixes:
|
||||
- Fixed a bug in AX on older X86 hardware which could cause a crash when
|
||||
accessing point attributes with half compression (bug introduced in 9.1.0).
|
||||
- Fixed an incorrect option in the `vdb_ax` command line tool where the default
|
||||
optimization level was set to NONE instead of O3 (issue introduced in 10.0.0).
|
||||
|
||||
Houdini:
|
||||
Improvements:
|
||||
- Added Preserve Holes option to VDB From Polygons that uses the
|
||||
fast winding oracle to not collapse holes in polygonal geometry.
|
||||
|
||||
Bug Fixes:
|
||||
- Fix a bug in the projection mode of the Advect Points SOP that was causing
|
||||
a segfault.
|
||||
|
||||
Build:
|
||||
- Fixed a build issue where Boost was not being pulled in when
|
||||
OPENVDB_USE_DELAYED_LOADING was set to OFF.
|
||||
- Fixed a build issue with AX on 32-bit platforms.
|
||||
[Reported by Mathieu Malaterre]
|
||||
- Fixed a compilation issue with the min() and max() methods on Stencils
|
||||
in openvdb/math/Stencils.h.
|
||||
[Reported by Samuel Mauch]
|
||||
- Fixed a compilation error that would be encountered when attempting to
|
||||
enable the SSE4.2 or AVX SIMD options on non-x86 based platforms.
|
||||
- Improved support for compiling with C++20.
|
||||
[Contributed by Denys Maletskyy and Jérémie Dumas]
|
||||
- OpenVDB's CMake no longer modifies the BUILD_SHARED_LIBS variable.
|
||||
[Reported by Maksim Shabunin]
|
||||
- Fix int-in-bool-context GCC9+ warnings by switching to use constexpr if.
|
||||
|
||||
Version 10.0.1 - November 30, 2022
|
||||
|
||||
Bug Fixes:
|
||||
- Fix uninitialized point flags in tools::VolumeToMesh which could result in
|
||||
non-deterministic results (bug introduced in 10.0.0).
|
||||
|
||||
Build:
|
||||
- Fixed CXX standard requirement for VDB components in FindOpenVDB.cmake
|
||||
|
||||
Version 10.0.0 - October 27, 2022
|
||||
|
||||
This version introduces ABI changes relative to older major releases,
|
||||
so to preserve ABI compatibility it might be necessary to define the
|
||||
macro OPENVDB_ABI_VERSION_NUMBER=N, where, for example, N is 8 for
|
||||
Houdini 19.0 and 9 for Houdini 19.5.
|
||||
|
||||
Highlights:
|
||||
- Introducing OpenVDBLink, which provides a Mathematica interface to
|
||||
OpenVDB. This link ports over access to various grid containers including
|
||||
level sets, fog volumes, vector grids, integer grids, Boolean grids,
|
||||
and mask grids. Construction, modification, combinations, visualisations,
|
||||
queries, import, export, etc. can be achieved over grids too. Any
|
||||
Mathematica 3D region that's ConstantRegionQ and BoundedRegionQ can
|
||||
be represented as a level set grid, providing a more seamless integration
|
||||
with OpenVDB.
|
||||
- Introducing a new command-line tool, dubbed vdb_tool, that can combine any
|
||||
number of the high-level tools available in openvdb/tools. For
|
||||
instance, it can convert a sequence of polygon meshes and particles to
|
||||
level sets, perform a large number of operations on these level set
|
||||
surfaces and export them as adaptive polygon meshes.
|
||||
|
||||
OpenVDB:
|
||||
Improvements:
|
||||
- Significantly improved the performance of all ValueAccessor methods which
|
||||
access LeafNode value buffer data. This improvement applies to any type
|
||||
which is delay load compatible (all default types except for bool and mask
|
||||
grids) and improves the performance of many OpenVDB tools.
|
||||
- Improved the performance of volumeToMesh by 10-15%.
|
||||
|
||||
ABI changes:
|
||||
- ABI change to openvdb::RootNode, which now has a new member that defines
|
||||
the origin of the node. For now this origin is set to a default value of
|
||||
(0,0,0), but in the near future we will allow for offsets to improve
|
||||
access performance and reduce the memory footprints.
|
||||
- Removed deprecated virtual methods from AttributeArray.
|
||||
|
||||
API changes:
|
||||
- Removed PagedArray::push_back().
|
||||
- Removed Tree visitor methods from Tree, RootNode, InternalNode and
|
||||
LeafNode classes - visit(), visit2(), visitActiveBBox().
|
||||
- Removed LeafManager::getNodes().
|
||||
- Removed tools::dilateVoxels() and tools::erodeVoxels() in favor of
|
||||
tools::dilateActiveValues() and tools::erodeActiveValues().
|
||||
- Removed tools::FindActiveValues::any() and
|
||||
tools::FindActiveValues::none().
|
||||
- StringGrid and StringTrees have been removed.
|
||||
|
||||
Bug Fixes:
|
||||
- Fixed an issue with tools::topologyToLevelSet which would previously
|
||||
ignore active tiles in the input topology.
|
||||
[Reported by Tobias Rittig]
|
||||
- Fixed a bug with ValueAccessor::addLeaf and ValueAccessor::addTile which
|
||||
wouldn't add the provided leaf nodes to the underlying tree. This bug did
|
||||
NOT affect the specialized accessors which are used by the default tree
|
||||
configuration.
|
||||
[Contributed by Andrey Zakirov]
|
||||
- Fixed a bug where ValueAccessor::probeNode<NodeT> and
|
||||
ValueAccessor:probeConstNode<NodeT> would return a nullptr if the NodeT
|
||||
type was not explicitly being cached by the accessor but the node existed
|
||||
in the tree.
|
||||
- Fixed a bug on Windows where math::Abs could truncate 64bit integer values.
|
||||
[Contributed by Edward Lam]
|
||||
- Fixed an occurrence of undefined behaviour with math::floatToInt32 and
|
||||
math::doubleToInt64.
|
||||
[Reported by Vojtěch Bubník]
|
||||
- Fixed bugs in the sum merge that produced incorrect merged grids when
|
||||
deep-copying the input nodes or when non-zero background grids were being
|
||||
used.
|
||||
- Fixed a bug in FastSweeping where voxels/tiles are left with min/max float
|
||||
values.
|
||||
- Fixed a bug in math/Tuple.h that prevented compilation with VS2017.
|
||||
|
||||
OpenVDB AX:
|
||||
Improvements:
|
||||
- Major updates to the command line interface of the vdb_ax binary, exposing
|
||||
more controls such as tile streaming, value iterator types and attribute
|
||||
bindings.
|
||||
|
||||
OpenVDB Houdini:
|
||||
New Features:
|
||||
- Add convex hull activation for VDB Activate SOP (requires 19.5).
|
||||
|
||||
Improvements:
|
||||
- Improved SDF activation to use dynamic node manager.
|
||||
|
||||
Bug Fixes:
|
||||
- Fixed a bug in VDB Visualize SOP where color values that exceed
|
||||
the range wrap around instead of being clamped.
|
||||
|
||||
NanoVDB:
|
||||
New Features:
|
||||
- Added nanovdb::IndexGrid that allows for arbitrary voxel values and even
|
||||
multiple channels to be associated with NanoVDB grids. They are more
|
||||
flexible and memory efficient than regular grids at a small cost of
|
||||
random-access performance. IndexGrids are constructed with the new
|
||||
nanovdb::IndexGridBuilder and accessed with the new
|
||||
nanovdb::ChannelAccessor.
|
||||
- Added iterators to all tree node classes for visiting inactive, active, or
|
||||
all values and child nodes.
|
||||
- NanoVDB.h now includes standalone implementations of reading and writing
|
||||
uncompressed nanovdb grids buffers.
|
||||
- Added Stats::getExtrema, which computes the min/max values of all voxels
|
||||
in a NanoVDB grid that intersects with a user-defined bounding-box.
|
||||
- Added nanovdb::Mask::countOn(int) which is essential to the new
|
||||
nanovdb::IndexGrid.
|
||||
- Added RootNode::probeChild and InternalNode::probeChild.
|
||||
|
||||
Improvements:
|
||||
- Added a new much improved nanovdb::NodeManager, that is both faster and
|
||||
more memory efficient, and that works on both the CPU and GPU. Note, it
|
||||
uses a handle for allocation (just like nanovdb::Grid) and replaces the
|
||||
old nanovdb::LeafManager which is now deprecated.
|
||||
- NanoToOpenVDB is extended to work with grids templated on Fp4, Fp8, Fp16,
|
||||
FpN, bool and ValueMask.
|
||||
- Renamed RootNode::findTile to RootNode::probeTile and made it public.
|
||||
- Made Mask::getWord return both a const and non-const reference.
|
||||
- Improved unit-tests to use explicit 32B alignment (see alignment bug-fix
|
||||
below).
|
||||
- PNanoVDB.h (a C99 port of NanoVDB.h) has been updated.
|
||||
|
||||
Bug Fixes:
|
||||
- Fixed a bug in nanovdb::HostBuffer that could produce crashes due to
|
||||
misaligned CPU memory allocations.
|
||||
- Fixed bug related to uninitialized memory in nanovdb::Grid which could
|
||||
confuse CRC32 checksum validation.
|
||||
- Fixed bugs related to the use of intrinsic functions for fast bit-counting
|
||||
in nanovdb.
|
||||
- Fixed a potential security vulnerability in NanoVDB.h related to buffer
|
||||
overflow exploits.
|
||||
|
||||
Build:
|
||||
- Added OPENVDB_USE_DELAYED_LOAD flag that enables delayed loading and
|
||||
defaults to on.
|
||||
- Add a placeholder to inject the specific revision and URL used
|
||||
to build OpenVDB, useful for 3rd party build scripts to publish
|
||||
their exact versions.
|
||||
- Fixed an issue where OPENVDB_AX_DLL was not being defined on shared
|
||||
library builds of AX, resulting in symbols not being exported.
|
||||
[Reported by Ray Molenkamp]
|
||||
- Fixed an issue where setting Tbb_INCLUDE_DIR could cause CMake failures.
|
||||
- Updated FindTBB.cmake to support newer library ABI suffixing in
|
||||
TBB 2021.5.
|
||||
- Updated FindBlosc.cmake to better handle cases where blosc is built with
|
||||
external sources.
|
||||
- Resolved LLVM deprecation warnings in AX and added support for LLVM 14.
|
||||
- On Windows (MSVC), OpenVDB is now built with extra compiler options to
|
||||
ensure stricter C++ conformance: /permissive- /Zc:throwingNew /Zc:inline.
|
||||
- On Windows (MSVC), the _USE_MATH_DEFINES macro is no longer defined when
|
||||
including <openvdb/Platform.h> (or any dependent headers). If you were
|
||||
relying on this in your own project for M_PI, M_PI_2, etc. you can add
|
||||
-D_USE_MATH_DEFINES to your own project compiler options. See
|
||||
https://docs.microsoft.com/en-us/cpp/c-runtime-library/math-constants
|
||||
for more info.
|
||||
|
||||
Version 9.1.0 - June 9, 2022
|
||||
Version 9.0.1 - In development
|
||||
|
||||
Bug Fixes:
|
||||
- Minor fix to move assignment operator in nanovdb/util/HostBuffer.h.
|
||||
This could potentially be a problem on Windows debug builds (unconfirmed).
|
||||
- Minor fix to range in openvdb/tools/LevelSetSphere.h. This could result
|
||||
in data races for multi-threaded execution (unconfirmed)
|
||||
[Reported by Tommy Hinks]
|
||||
- Fixed a bug with Tree::combineExtended which wouldn't propagate the
|
||||
resulting active state when a destination tile overlapped a source child node.
|
||||
[Reported by @frapit]
|
||||
in data races for multi-threaded execution (unconfirmed) [Reported by Tommy Hinks]
|
||||
- Fixed a bug with Tree::combineExtended which wouldn't propagate the resulting active state when a destination tile overlapped a source child node. [Reported by @frapit]
|
||||
- Fix unit tests failures with Blosc versions >= 1.19.0.
|
||||
- Fixed a regression in ax::run which wouldn't propagate exceptions
|
||||
- Fixed a bug where ax::ast::parse could return a partially constructed but
|
||||
invalid AST on failure
|
||||
- Fixed AX logger exit handling in ax::Compiler::compile and ax::ast::parse
|
||||
- Fixed an issue which could result in significant compilation times when
|
||||
instantiating TypeList<>::Unique<>
|
||||
|
||||
New features:
|
||||
- Added support for AMD's HIP API in NanoVDB
|
||||
[Contributed by Blender Foundation]
|
||||
- Added bindings mechanism to AX to allow differing data and AX attribute
|
||||
names (@) in Point and Volume executables.
|
||||
- Added support for AMD's HIP API in NanoVDB [Contributed by Blender Foundation]
|
||||
- Added bindings mechanism to AX to allow differing data and AX attribute names (@) in Point and Volume executables.
|
||||
- Added support for OpenVDB AX on Windows.
|
||||
- Added tools::memUsageIfLoaded() which returns the memory consumption of
|
||||
a deserialized VDB tree, useful if delay-loading is enabled.
|
||||
- Added points::rasterizeSpheres() and points::rasterizeSmoothSpheres()
|
||||
variants, new kernels and improved performance for OpenVDB points to
|
||||
surface rasterization.
|
||||
- Added points::rasterizeTrilinear() for OpenVDB points, fast staggered
|
||||
or colocated trilinear rasterization for scalar and vector attributes.
|
||||
- Exposed TypeList declarations in openvdb.h which denote the default set
|
||||
of types supported by OpenVDB.
|
||||
- Added points::FrustumRasterizer for efficient rasterization of OpenVDB
|
||||
points to frustum volumes with optional motion blur.
|
||||
|
||||
Improvements:
|
||||
- Added a --thread [n] argument to the vdb_ax binary.
|
||||
- Added a --copy-file-metadata option to vdb_ax. This behaviour is now
|
||||
off by default.
|
||||
- Added support for multiple input files with the vdb_ax binary using -i.
|
||||
Positional arguments as input files are deprecated.
|
||||
- Added tools::minMax() which supports multithreaded evaluation of active
|
||||
minimum and maximum values. Grid::evalMinMax() has been deprecated.
|
||||
- Significant performance improvements to AX point kernels, primarily due to
|
||||
providing AX access to attribute buffers for superior code generation.
|
||||
- vdb_print now prints both the in-core memory and total memory usage for
|
||||
VDB grids.
|
||||
- Improved build support for MinGW
|
||||
[Contributed by Mehdi Chinoune]
|
||||
- Added a new foreach method to TypeList for iterating over types without
|
||||
constructing them.
|
||||
- Added TypeList::Transform declaration for transforming TypeLists into new
|
||||
types.
|
||||
- Moved Grid::apply implementation to TypeList::apply to allow for other
|
||||
polymorphic types to invoke it.
|
||||
- Minor updates to NanoVDB to remove compiler warnings.
|
||||
- Added a --copy-file-metadata option to vdb_ax. This behaviour is now off by default.
|
||||
- Added support for multiple input files with the vdb_ax binary using -i. Positional arguments as input files are deprecated.
|
||||
- Added tools::minMax() which supports multithreaded evaluation of active minimum and maximum values. Grid::evalMinMax() has been deprecated. [Contributed by Greg Hurst]
|
||||
|
||||
Build:
|
||||
- Regenerated AX grammar with Flex 2.6.4 and Bison 3.8.2.
|
||||
- Improved locating NumPy in CMake when multiple python versions are installed.
|
||||
- Fixed an issue which could report Python as missing when using CMake 3.18
|
||||
and later on some systems.
|
||||
[Reported by Sam James]
|
||||
- Changed the way boost_python and boost_numpy are located. Both components
|
||||
must match the major/minor version of python in use. This can be
|
||||
circumvented by providing Boost_PYTHON_VERSION or
|
||||
Boost_PYTHON_VERSION_MAJOR.
|
||||
- Relocated OpenVDB binaries to a new openvdb_cmd root directory.
|
||||
- FindTBB.cmake now prioritises newer TBB installations.
|
||||
- Added option to compress PDB data in MSVC debug builds.
|
||||
- Fixed an issue which could report Python as missing when using CMake 3.18 and later on some systems. [Reported by Sam James]
|
||||
|
||||
Houdini:
|
||||
- Added Attribute Bindings to AX SOP to allow differently named AX
|
||||
attributes (@) and target point attributes/volumes.
|
||||
- Fix race condition in OpenVDB Merge SOP that could cause crashes or
|
||||
merged VDBs to not be deleted.
|
||||
- VDB Activate SOP no longer stops at the first non-VDB primitive, but
|
||||
instead just skips such primitives.
|
||||
- Added VDB Rasterize Frustum SOP for efficient rasterization of OpenVDB
|
||||
points into frustum volumes with optional motion blur.
|
||||
- Added Attribute Bindings to AX SOP to allow differently named AX attributes (@) and target point attributes/volumes.
|
||||
- Fix race condition in OpenVDB Merge SOP that could cause crashes
|
||||
or merged VDBs to not be deleted.
|
||||
|
||||
|
||||
Version 9.0.0 - October 29, 2021
|
||||
@@ -1058,7 +422,7 @@ Version 8.0.0 - December 23, 2020
|
||||
providing users with a new way of interacting with OpenVDB data. AX is
|
||||
tailored towards writing highly parallelizable and customizable OpenVDB
|
||||
volume and point kernel operations. See the documentation for more:
|
||||
https://www.openvdb.org/documentation/openvdbax.html
|
||||
https://academysoftwarefoundation.github.io/openvdb/openvdbax.html
|
||||
|
||||
New features:
|
||||
- Added tools::anyActiveVoxels and tools::anyActiveTiles that check
|
||||
|
||||
+62
-112
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
#[=======================================================================[
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
and required dependencies are expected. See the dependency documentation
|
||||
for more information:
|
||||
|
||||
https://www.openvdb.org/documentation/doxygen/dependencies.html
|
||||
https://academysoftwarefoundation.github.io/openvdb/dependencies.html
|
||||
|
||||
And the documentation on building OpenVDB for more in depth installation
|
||||
instructions:
|
||||
|
||||
https://www.openvdb.org/documentation/doxygen/build.html
|
||||
https://academysoftwarefoundation.github.io/openvdb/build.html
|
||||
|
||||
This CMakeLists file provides most available options for configuring the
|
||||
build and installation of all OpenVDB components. By default the core
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
# note: cmake_minimum_required must be called before project commands to
|
||||
# ensure policy scope is set up correctly
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
# CMP0091 allows for MSVC ABI targetting via CMAKE_MSVC_RUNTIME_LIBRARY
|
||||
# from CMake 3.15 and above. Must come before project().
|
||||
@@ -52,9 +52,9 @@ endif()
|
||||
|
||||
###### Version
|
||||
|
||||
set(OpenVDB_MAJOR_VERSION 12)
|
||||
set(OpenVDB_MAJOR_VERSION 9)
|
||||
set(OpenVDB_MINOR_VERSION 0)
|
||||
set(OpenVDB_PATCH_VERSION 2)
|
||||
set(OpenVDB_PATCH_VERSION 1)
|
||||
set(OpenVDB_VERSION "${OpenVDB_MAJOR_VERSION}.${OpenVDB_MINOR_VERSION}.${OpenVDB_PATCH_VERSION}")
|
||||
|
||||
project(OpenVDB LANGUAGES CXX VERSION ${OpenVDB_VERSION})
|
||||
@@ -64,7 +64,7 @@ project(OpenVDB LANGUAGES CXX VERSION ${OpenVDB_VERSION})
|
||||
include(CMakeDependentOption)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# Components
|
||||
# todo epydoc and pdflatex
|
||||
option(OPENVDB_BUILD_CORE "Enable the core OpenVDB library. Both static and shared versions are enabled by default" ON)
|
||||
option(OPENVDB_BUILD_BINARIES "Enable the vdb binaries. Only vdb_print is enabled by default" ON)
|
||||
option(OPENVDB_BUILD_PYTHON_MODULE "Build the pyopenvdb Python module" OFF)
|
||||
@@ -72,38 +72,24 @@ option(OPENVDB_BUILD_UNITTESTS "Build the OpenVDB unit tests" OFF)
|
||||
option(OPENVDB_BUILD_DOCS "Build the OpenVDB documentation" OFF)
|
||||
option(OPENVDB_BUILD_HOUDINI_PLUGIN "Build the Houdini plugin" OFF)
|
||||
option(OPENVDB_BUILD_HOUDINI_ABITESTS "Build the Houdini ABI tests" OFF)
|
||||
option(OPENVDB_BUILD_MAYA_PLUGIN "Build the Maya plugin" OFF)
|
||||
|
||||
option(OPENVDB_BUILD_AX "Build the OpenVDB AX library. Turns ON if USE_AX is ON." ${USE_AX})
|
||||
option(OPENVDB_BUILD_AX_UNITTESTS "Build the OpenVDB AX unit tests" OFF)
|
||||
|
||||
option(OPENVDB_BUILD_NANOVDB "Build the NanoVDB library. Turns ON if USE_NANOVDB is ON." ${USE_NANOVDB})
|
||||
|
||||
# Global options
|
||||
option(OPENVDB_BUILD_MAYA_PLUGIN "Build the Maya plugin" OFF)
|
||||
option(OPENVDB_ENABLE_RPATH "Build with RPATH information" ON)
|
||||
option(OPENVDB_ENABLE_ASSERTS "Build with asserts in OpenVDB code enabled" OFF)
|
||||
option(OPENVDB_USE_DELAYED_LOADING "Build the core OpenVDB library with delayed-loading." ON)
|
||||
option(OPENVDB_CXX_STRICT "Enable or disable pre-defined compiler warnings" OFF)
|
||||
|
||||
cmake_dependent_option(OPENVDB_INSTALL_CMAKE_MODULES
|
||||
"Install the provided OpenVDB CMake modules when building the core library"
|
||||
ON "OPENVDB_BUILD_CORE" OFF)
|
||||
option(USE_CCACHE "Build using Ccache if found on the path" ON)
|
||||
# Disable this on Windows due to linker OOM issues:
|
||||
# LNK1248: image size (XXX) exceeds maximum allowable size (FFFFFFFF)
|
||||
# https://github.com/AcademySoftwareFoundation/openvdb/issues/1718
|
||||
# https://github.com/AcademySoftwareFoundation/openvdb/issues/1624
|
||||
cmake_dependent_option(USE_EXPLICIT_INSTANTIATION "Use explicit instantiation for all supported classes
|
||||
and methods against a pre-defined list of OpenVDB trees. This makes the core library larger and slower
|
||||
to compile, but speeds up the compilation of all dependent code by bypassing the expensive template
|
||||
instantation." ON "NOT WIN32" OFF)
|
||||
option(OPENVDB_FUTURE_DEPRECATION "Generate messages for upcoming deprecation" ON)
|
||||
option(OPENVDB_ENABLE_UNINSTALL "Adds a CMake uninstall target." ON)
|
||||
option(USE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." OFF)
|
||||
|
||||
# Component dependency options
|
||||
cmake_dependent_option(USE_PKGCONFIG "Use pkg-config to search for dependent libraries." ON "NOT WIN32" OFF)
|
||||
option(USE_HOUDINI [=[
|
||||
Build the library against a Houdini installation. Turns on automatically if OPENVDB_BUILD_HOUDINI_PLUGIN is enabled.
|
||||
When enabled, you do not need to provide dependency locations for TBB, Blosc, Imath and OpenEXR. Boost must be
|
||||
provided. Imath/OpenEXR can optionally be provided.]=] OFF)
|
||||
When enabled, you do not need to provide dependency locations for TBB, Blosc, IlmBase and OpenEXR. Boost must be
|
||||
provided. IlmBase/OpenEXR can optionally be provided if Houdini Version >= 17.5.]=] OFF)
|
||||
option(USE_MAYA [=[
|
||||
Build the library against a Maya installation. Turns on automatically if OPENVDB_BUILD_MAYA_PLUGIN is enabled.
|
||||
When enabled, you do not need to provide dependency locations for TBB. All other dependencies must be provided.]=] OFF)
|
||||
@@ -134,6 +120,7 @@ option(USE_NANOVDB "Use NanoVDB while building openvdb components." ${OPENVDB_BU
|
||||
|
||||
cmake_dependent_option(OPENVDB_DISABLE_BOOST_IMPLICIT_LINKING
|
||||
"Disable the implicit linking of Boost libraries on Windows" ON "WIN32" OFF)
|
||||
option(USE_CCACHE "Build using Ccache if found on the path" ON)
|
||||
option(USE_STATIC_DEPENDENCIES [=[
|
||||
Only search for and use static libraries. If OFF the shared versions of requried libraries are prioritised, falling
|
||||
back to static libraries. Forcing individual static dependencies can be enabled by setting XXX_USE_STATIC_LIBS
|
||||
@@ -147,6 +134,17 @@ Disable CMakes default system search paths when locating dependencies. When enab
|
||||
its default system search routine if it cannot find a dependency with the provided settings. When disabled, only
|
||||
paths provided through the Xxx_ROOT, supported XXX_INCLUDEDIR/XXX_LIBRARYDIR variables or the SYSTEM_LIBRARY_PATHS
|
||||
list will be searched.]=] OFF)
|
||||
option(OPENVDB_USE_DEPRECATED_ABI_7 "Bypass minimum ABI requirement checks" OFF)
|
||||
option(OPENVDB_USE_DEPRECATED_ABI_8 "Bypass minimum ABI requirement checks" OFF)
|
||||
option(OPENVDB_USE_FUTURE_ABI_10 "Bypass future ABI check" OFF)
|
||||
option(OPENVDB_FUTURE_DEPRECATION "Generate messages for upcoming deprecation" ON)
|
||||
option(OPENVDB_ENABLE_UNINSTALL "Adds a CMake uninstall target." ON)
|
||||
option(USE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." OFF)
|
||||
cmake_dependent_option(USE_PKGCONFIG "Use pkg-config to search for dependent libraries." ON "NOT WIN32" OFF)
|
||||
|
||||
option(USE_EXPLICIT_INSTANTIATION "Use explicit instantiation for all supported classes and methods against a
|
||||
pre-defined list of OpenVDB trees. This makes the core library larger and slower to compile, but speeds up
|
||||
the compilation of all dependent code by bypassing the expensive template instantation." ON)
|
||||
|
||||
set(SYSTEM_LIBRARY_PATHS "" CACHE STRING [=[
|
||||
A global list of library paths to additionally use into when searching for dependencies.]=])
|
||||
@@ -154,7 +152,6 @@ set(MSVC_MP_THREAD_COUNT "" CACHE STRING [=[
|
||||
The number of threads to use when invoking MSVC builds with cmake --build. CMake defaults to 1. Note that
|
||||
cmake --parallel and CMAKE_BUILD_PARALLEL_LEVEL only change the number of PROJECTS that are built in parallel,
|
||||
NOT the number of TU's ]=])
|
||||
option(MSVC_COMPRESS_PDB "Whether to attempt to compress PDB symbol data in MSVC debug builds." OFF)
|
||||
|
||||
set(_CONCURRENT_MALLOC_OPTIONS None Auto Jemalloc Tbbmalloc)
|
||||
if(NOT CONCURRENT_MALLOC)
|
||||
@@ -249,9 +246,11 @@ mark_as_advanced(
|
||||
OPENVDB_BUILD_HOUDINI_ABITESTS
|
||||
OPENVDB_CXX_STRICT
|
||||
OPENVDB_ENABLE_RPATH
|
||||
OPENVDB_USE_DELAYED_LOADING
|
||||
OPENVDB_FUTURE_DEPRECATION
|
||||
OPENVDB_SIMD
|
||||
OPENVDB_USE_DEPRECATED_ABI_7
|
||||
OPENVDB_USE_DEPRECATED_ABI_8
|
||||
OPENVDB_USE_FUTURE_ABI_10
|
||||
SYSTEM_LIBRARY_PATHS
|
||||
USE_CCACHE
|
||||
USE_COLORED_OUTPUT
|
||||
@@ -259,7 +258,6 @@ mark_as_advanced(
|
||||
USE_IMATH_HALF
|
||||
USE_LOG4CPLUS
|
||||
USE_MAYA
|
||||
MSVC_COMPRESS_PDB
|
||||
)
|
||||
|
||||
#########################################################################
|
||||
@@ -268,13 +266,6 @@ mark_as_advanced(
|
||||
|
||||
include(cmake/config/OpenVDBVersions.cmake)
|
||||
|
||||
foreach(DEPRECATED_ABI ${OPENVDB_DEPRECATED_ABI_LIST})
|
||||
option(OPENVDB_USE_DEPRECATED_ABI_${DEPRECATED_ABI} "Bypass minimum ABI requirement checks" OFF)
|
||||
mark_as_advanced(OPENVDB_USE_DEPRECATED_ABI_${DEPRECATED_ABI})
|
||||
endforeach()
|
||||
option(OPENVDB_USE_FUTURE_ABI_${FUTURE_OPENVDB_ABI_VERSION} "Bypass future ABI check" OFF)
|
||||
mark_as_advanced(OPENVDB_USE_FUTURE_ABI_${FUTURE_OPENVDB_ABI_VERSION})
|
||||
|
||||
#########################################################################
|
||||
|
||||
enable_testing()
|
||||
@@ -284,35 +275,13 @@ enable_testing()
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
|
||||
|
||||
# Add cmake modules to installation command
|
||||
|
||||
if(SKBUILD)
|
||||
set(OPENVDB_INSTALL_BINDIR openvdb/${CMAKE_INSTALL_BINDIR})
|
||||
set(OPENVDB_INSTALL_LIBDIR openvdb/${CMAKE_INSTALL_LIBDIR})
|
||||
set(OPENVDB_INSTALL_INCLUDEDIR openvdb/${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
||||
if(OPENVDB_BUILD_NANOVDB)
|
||||
set(NANOVDB_INSTALL_BINDIR nanovdb/${CMAKE_INSTALL_BINDIR})
|
||||
set(NANOVDB_INSTALL_LIBDIR nanovdb/${CMAKE_INSTALL_LIBDIR})
|
||||
set(NANOVDB_INSTALL_INCLUDEDIR nanovdb/${CMAKE_INSTALL_INCLUDEDIR})
|
||||
set(NANOVDB_INSTALL_DOCDIR nanovdb/${CMAKE_INSTALL_DOCDIR})
|
||||
endif()
|
||||
else()
|
||||
set(OPENVDB_INSTALL_BINDIR ${CMAKE_INSTALL_BINDIR})
|
||||
set(OPENVDB_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR})
|
||||
set(OPENVDB_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
||||
if(OPENVDB_BUILD_NANOVDB)
|
||||
set(NANOVDB_INSTALL_BINDIR ${CMAKE_INSTALL_BINDIR})
|
||||
set(NANOVDB_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR})
|
||||
set(NANOVDB_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
set(NANOVDB_INSTALL_DOCDIR ${CMAKE_INSTALL_DOCDIR})
|
||||
endif()
|
||||
endif()
|
||||
# @todo fix our glew cmake module
|
||||
|
||||
if(OPENVDB_INSTALL_CMAKE_MODULES)
|
||||
set(OPENVDB_CMAKE_MODULES
|
||||
cmake/FindBlosc.cmake
|
||||
cmake/FindJemalloc.cmake
|
||||
cmake/FindIlmBase.cmake
|
||||
cmake/FindLog4cplus.cmake
|
||||
cmake/FindOpenEXR.cmake
|
||||
cmake/FindOpenVDB.cmake
|
||||
@@ -322,7 +291,7 @@ if(OPENVDB_INSTALL_CMAKE_MODULES)
|
||||
cmake/OpenVDBMayaSetup.cmake
|
||||
cmake/OpenVDBUtils.cmake
|
||||
)
|
||||
install(FILES ${OPENVDB_CMAKE_MODULES} DESTINATION ${OPENVDB_INSTALL_LIBDIR}/cmake/OpenVDB)
|
||||
install(FILES ${OPENVDB_CMAKE_MODULES} DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/OpenVDB)
|
||||
endif()
|
||||
|
||||
# Configure component dependencies by loading the Houdini/Maya setup
|
||||
@@ -371,7 +340,8 @@ endif()
|
||||
if(USE_CCACHE)
|
||||
find_program(CCACHE_PATH ccache)
|
||||
if(CCACHE_PATH)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_PATH})
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
||||
message(STATUS "Using ccache: ${CCACHE_PATH}")
|
||||
endif()
|
||||
endif()
|
||||
@@ -384,32 +354,39 @@ include(cmake/config/OpenVDBCXX.cmake)
|
||||
|
||||
#########################################################################
|
||||
|
||||
# Configure malloc library. Use Jemalloc if available, tbbmalloc otherwise
|
||||
# Configure malloc library. Use Jemalloc for Linux and non-Maya, otherwise Tbbmalloc.
|
||||
# * On Mac OSX, linking against Jemalloc < 4.3.0 seg-faults with this error:
|
||||
# malloc: *** malloc_zone_unregister() failed for 0xaddress
|
||||
# Houdini 17.5 and older ships with Jemalloc 3.6.0, so we make Tbbmalloc the default
|
||||
# on Mac OSX (https://github.com/jemalloc/jemalloc/issues/420). Later versions of
|
||||
# Jemalloc are thought to work, but haven't been tested.
|
||||
# * On Windows, we follow SideFX's example in using Tbbmalloc due to the challenges
|
||||
# of injecting into the Windows runtime to replace the system allocator.
|
||||
|
||||
if(CONCURRENT_MALLOC STREQUAL "Auto")
|
||||
find_package(Jemalloc QUIET)
|
||||
if(NOT TARGET Jemalloc::jemalloc)
|
||||
message(WARNING "Unable to find Jemalloc, attempting to fall back to TBB malloc.
|
||||
It is recommended to use Jemalloc for optimum performance.")
|
||||
if((OPENVDB_BUILD_BINARIES OR OPENVDB_BUILD_UNITTESTS) AND CONCURRENT_MALLOC STREQUAL "Auto")
|
||||
if(WIN32 OR APPLE OR USE_MAYA)
|
||||
set(CONCURRENT_MALLOC "Tbbmalloc")
|
||||
else()
|
||||
set(CONCURRENT_MALLOC "Jemalloc")
|
||||
find_package(Jemalloc QUIET)
|
||||
if(NOT TARGET Jemalloc::jemalloc)
|
||||
message(WARNING "Unable to find Jemalloc, attempting to fall back to TBB malloc.
|
||||
It is recommended to use Jemalloc for optimum performance.")
|
||||
set(CONCURRENT_MALLOC "Tbbmalloc")
|
||||
else()
|
||||
set(CONCURRENT_MALLOC "Jemalloc")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Configure SIMD. AVX implies SSE 4.2.
|
||||
|
||||
if(OPENVDB_SIMD STREQUAL "AVX")
|
||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-mavx>")
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-msse4.2>")
|
||||
endif()
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-mavx>")
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-msse4.2>")
|
||||
add_compile_definitions("$<$<COMPILE_LANGUAGE:CXX>:OPENVDB_USE_AVX>")
|
||||
add_compile_definitions("$<$<COMPILE_LANGUAGE:CXX>:OPENVDB_USE_SSE42>")
|
||||
elseif(OPENVDB_SIMD STREQUAL "SSE42")
|
||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-msse4.2>")
|
||||
endif()
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-msse4.2>")
|
||||
add_compile_definitions("$<$<COMPILE_LANGUAGE:CXX>:OPENVDB_USE_SSE42>")
|
||||
endif()
|
||||
|
||||
@@ -420,6 +397,7 @@ endif()
|
||||
if(USE_STATIC_DEPENDENCIES)
|
||||
set(BLOSC_USE_STATIC_LIBS ON)
|
||||
set(OPENEXR_USE_STATIC_LIBS ON)
|
||||
set(ILMBASE_USE_STATIC_LIBS ON)
|
||||
set(TBB_USE_STATIC_LIBS ON)
|
||||
set(LOG4CPLUS_USE_STATIC_LIBS ON)
|
||||
set(JEMALLOC_USE_STATIC_LIBS ON)
|
||||
@@ -475,33 +453,6 @@ if(NOT OPENVDB_BUILD_NANOVDB AND
|
||||
find_package(OpenVDB REQUIRED COMPONENTS nanovdb)
|
||||
endif()
|
||||
|
||||
# Locate Python and nanobind if necessary
|
||||
if(OPENVDB_BUILD_PYTHON_MODULE OR (OPENVDB_BUILD_NANOVDB AND NANOVDB_BUILD_PYTHON_MODULE))
|
||||
|
||||
# Call find_package(Python ...)
|
||||
find_package(Python ${MINIMUM_PYTHON_VERSION} REQUIRED COMPONENTS Development Interpreter)
|
||||
find_package(nanobind ${MINIMUM_NANOBIND_VERSION} REQUIRED)
|
||||
|
||||
if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_PYTHON_VERSION)
|
||||
if(Python_VERSION VERSION_LESS ${FUTURE_MINIMUM_PYTHON_VERSION})
|
||||
message(DEPRECATION "Support for Python versions < ${FUTURE_MINIMUM_GLFW_VERSION} "
|
||||
"is deprecated and will be removed.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VDB_PYTHON_INSTALL_DIRECTORY)
|
||||
if(DEFINED Python_SITELIB)
|
||||
get_filename_component(Python_PACKAGES_DIR ${Python_SITELIB} NAME)
|
||||
else()
|
||||
set(Python_PACKAGES_DIR "site-packages")
|
||||
endif()
|
||||
set(VDB_PYTHON_INSTALL_DIRECTORY
|
||||
${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/${Python_PACKAGES_DIR}
|
||||
CACHE STRING "The directory to install the openvdb and nanovdb Python modules."
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# Validate the OpenVDB ABI Version. If OpenVDB_ABI is not set, we're either building
|
||||
# the core library OR the ABI hasn't been deduced from a VDB installation. Use the
|
||||
@@ -532,14 +483,14 @@ if(OpenVDB_ABI LESS MINIMUM_OPENVDB_ABI_VERSION)
|
||||
"no longer supported.")
|
||||
endif()
|
||||
|
||||
if(OpenVDB_ABI IN_LIST OPENVDB_DEPRECATED_ABI_LIST)
|
||||
if(FUTURE_MINIMUM_OPENVDB_ABI_VERSION AND OpenVDB_ABI LESS FUTURE_MINIMUM_OPENVDB_ABI_VERSION)
|
||||
if(NOT OPENVDB_USE_DEPRECATED_ABI_${OpenVDB_ABI})
|
||||
message(FATAL_ERROR "OpenVDB ABI versions earlier than ${OpenVDB_MAJOR_VERSION} "
|
||||
message(FATAL_ERROR "OpenVDB ABI versions earlier than ${FUTURE_MINIMUM_OPENVDB_ABI_VERSION} "
|
||||
"are deprecated. Set CMake option OPENVDB_USE_DEPRECATED_ABI_${OpenVDB_ABI} to ON to "
|
||||
"suppress this error.")
|
||||
endif()
|
||||
|
||||
message(DEPRECATION "OpenVDB ABI versions earlier than ${OpenVDB_MAJOR_VERSION} "
|
||||
message(DEPRECATION "OpenVDB ABI versions earlier than ${FUTURE_MINIMUM_OPENVDB_ABI_VERSION} "
|
||||
"are deprecated and will soon be removed.")
|
||||
# global target definition
|
||||
add_definitions(-DOPENVDB_USE_DEPRECATED_ABI_${OpenVDB_ABI})
|
||||
@@ -576,6 +527,10 @@ if(OPENVDB_BUILD_AX)
|
||||
add_subdirectory(openvdb_ax/openvdb_ax)
|
||||
endif()
|
||||
|
||||
if(OPENVDB_BUILD_AX_UNITTESTS)
|
||||
add_subdirectory(openvdb_ax/openvdb_ax/test)
|
||||
endif()
|
||||
|
||||
if(OPENVDB_BUILD_PYTHON_MODULE)
|
||||
add_subdirectory(openvdb/openvdb/python)
|
||||
endif()
|
||||
@@ -588,11 +543,6 @@ if(OPENVDB_BUILD_UNITTESTS)
|
||||
add_subdirectory(openvdb/openvdb/unittest)
|
||||
endif()
|
||||
|
||||
# Tests the vdb_ax binary so needs to come after openvdb_cmd
|
||||
if(OPENVDB_BUILD_AX_UNITTESTS)
|
||||
add_subdirectory(openvdb_ax/openvdb_ax/test)
|
||||
endif()
|
||||
|
||||
if(OPENVDB_BUILD_HOUDINI_PLUGIN)
|
||||
add_subdirectory(openvdb_houdini/openvdb_houdini)
|
||||
endif()
|
||||
|
||||
@@ -41,6 +41,3 @@ CHANGES @kmuseth @apradhana
|
||||
/openvdb_houdini/openvdb_houdini/PointUtils.* @danrbailey @idclip
|
||||
/openvdb_houdini/openvdb_houdini/*_OpenVDB_Points_* @danrbailey @idclip
|
||||
/openvdb_houdini/openvdb_houdini/GR_PrimVDBPoints.* @danrbailey @idclip
|
||||
|
||||
# fVDB
|
||||
/fvdb/ @NVIDIA-Omniverse/fvdb-dev
|
||||
|
||||
+17
-20
@@ -10,7 +10,7 @@ The contributor role is the starting role for anyone participating in the projec
|
||||
|
||||
### Process for becoming a contributor
|
||||
|
||||
* Review the [coding standards](https://www.openvdb.org/documentation/doxygen/codingStyle.html) to ensure your contribution is in line with the project's coding and styling guidelines.
|
||||
* Review the [coding standards](https://academysoftwarefoundation.github.io/openvdb/codingStyle.html) to ensure your contribution is in line with the project's coding and styling guidelines.
|
||||
* Have a signed CLA on file ( see [below](#contributor-license-agreements) )
|
||||
* Submit your code as a PR with the appropriate [DCO sign-off](#commit-sign-off).
|
||||
* Have your submission approved by the [committer(s)](#committer) and merged into the codebase.
|
||||
@@ -22,7 +22,7 @@ open source software best practice policies of the Linux Foundation.
|
||||
|
||||
#### License
|
||||
|
||||
OpenVDB is licensed under the [Apache License, version 2.0](LICENSE.md)
|
||||
OpenVDB is licensed under the [Mozilla Public License, version 2.0](LICENSE.md)
|
||||
license. Contributions to OpenVDB should abide by that standard
|
||||
license.
|
||||
|
||||
@@ -54,23 +54,21 @@ Every commit must be signed off. That is, every commit log message
|
||||
must include a “`Signed-off-by`” line (generated, for example, with
|
||||
“`git commit --signoff`”), indicating that the committer wrote the
|
||||
code and has the right to release it under the
|
||||
[Apache License, version 2.0](LICENSE.md)
|
||||
[Mozilla Public License, version 2.0](LICENSE.md)
|
||||
license. See the [TAC documentation on contribution sign off](https://github.com/AcademySoftwareFoundation/tac/blob/master/process/contributing.md#contribution-sign-off) for more information on this requirement.
|
||||
|
||||
## Maintainer
|
||||
## Committer
|
||||
|
||||
The maintainer role is the equivalent of the "Committer" role in the charter.
|
||||
The committer role enables the participant to commit code directly to the repository, but also comes with the obligation to be a responsible leader in the community.
|
||||
|
||||
This role enables the participant to commit code directly to the repository, but also comes with the obligation to be a responsible leader in the community.
|
||||
|
||||
### Process for becoming a maintainer
|
||||
### Process for becoming a committer
|
||||
|
||||
* Show your experience with the codebase through contributions and engagement on the community channels.
|
||||
* Request to become a maintainer.
|
||||
* Have the majority of maintainers approve you becoming a maintainer.
|
||||
* Request to become a committer.
|
||||
* Have the majority of committers approve you becoming a committer.
|
||||
* Your name and email is added to the MAINTAINERS.md file for the project.
|
||||
|
||||
### Maintainer responsibilities
|
||||
### Committer responsibilities
|
||||
|
||||
* Monitor email aliases.
|
||||
* Monitor Slack (delayed response is perfectly acceptable).
|
||||
@@ -78,29 +76,28 @@ This role enables the participant to commit code directly to the repository, but
|
||||
* Make sure that ongoing PRs are moving forward at the right pace or close them.
|
||||
* Remain an active contributor to the project in general and the code base in particular.
|
||||
|
||||
### When does a maintainer lose maintainer status?
|
||||
### When does a committer lose committer status?
|
||||
|
||||
If a maintainer is no longer interested or cannot perform the maintainer duties listed above, they
|
||||
If a committer is no longer interested or cannot perform the committer duties listed above, they
|
||||
should volunteer to be moved to emeritus status. In extreme cases this can also occur by a vote of
|
||||
the maintainers per the voting process below.
|
||||
the committers per the voting process below.
|
||||
|
||||
## Technical Steering Committee (TSC) member
|
||||
|
||||
The Technical Steering Committee (TSC) oversees the overall technical direction of OpenVDB, as defined in the [charter](charter.md).
|
||||
|
||||
TSC voting members consist of maintainers that have been nominated by the TSC, with a supermajority of voting members required to have a maintainer elected to be a TSC voting member. TSC voting members term and succession is defined in the [charter](charter.md).
|
||||
TSC voting members consist of committers that have been nominated by the committers, with a supermajority of voting members required to have a committer elected to be a TSC voting member. TSC voting members term and succession is defined in the [charter](charter.md).
|
||||
|
||||
All meetings of the TSC are open to participation by any member of the OpenVDB community. Meeting times are listed in the [ASWF technical community calendar](https://lists.aswf.io/g/tac/calendar).
|
||||
|
||||
## Current TSC members
|
||||
|
||||
* Ken Museth (Chair), Nvidia
|
||||
* Andre Pradhana, Nvidia
|
||||
* Ken Museth, Chair / NVIDIA
|
||||
* Andre Pradhana, DreamWorks
|
||||
* Jeff Lait, SideFX
|
||||
* Nick Avramoussis, WETA FX
|
||||
* Nick Avramoussis, WETA
|
||||
* Dan Bailey, ILM
|
||||
* Richard Jones, ILM
|
||||
* Gregory Hurst, United Therapeutics
|
||||
* Richard Jones, DNEG
|
||||
|
||||
# Release Process
|
||||
|
||||
|
||||
@@ -1,176 +1,373 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1. Definitions.
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
"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.
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
"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.
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
"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).
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
"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.
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
"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."
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
"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.
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
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.
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
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.
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
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:
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
(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
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
(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.
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
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.
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
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.
|
||||
2.1. Grants
|
||||
|
||||
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.
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
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.
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
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.
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
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.
|
||||
2.2. Effective Date
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
||||
|
||||
+2
-4
@@ -12,7 +12,5 @@ The current OpenVDB maintainers are:
|
||||
| Dan Bailey | danbailey@ilm.com
|
||||
| Nick Avramoussis | navramoussis@wetafx.co.nz
|
||||
| Ken Museth | ken.museth@gmail.com
|
||||
| Andre Pradhana | andre.pradhana@gmail.com
|
||||
| Richard Jones | richardj@ilm.com
|
||||
| Gregory Hurst | tbd
|
||||
| Jonathan Swartz | tbd
|
||||
| Andre Pradhana | andre.pradhana@dreamworks.com
|
||||
| Richard Jones | rhj@dneg.com
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
The following copyright holders agree that all of their contributions
|
||||
originally submitted to this project under the Mozilla Public License
|
||||
Version 2.0, are hereby relicensed to the Apache License, Version 2.0,
|
||||
and are submitted pursuant to the Developer Certificate of Origin, version 1.1:
|
||||
|
||||
Ken Museth
|
||||
Mehdi Chinoune
|
||||
DreamWorks Animation
|
||||
Side Effects Software Inc.
|
||||
Blender Foundation
|
||||
NVIDIA Corporation
|
||||
United Therapeutics Corporation
|
||||
Digital Domain 3.0, Inc.
|
||||
Double Negative
|
||||
Ubisoft Entertainment SA
|
||||
Adobe Inc.
|
||||
Mathieu Malaterre
|
||||
Brecht Sanders
|
||||
Ignacio Vizzo
|
||||
Ben FrantzDale
|
||||
Sebastian Gaida
|
||||
Alessio Quaglino
|
||||
Benedikt Mersch
|
||||
David Aguilar
|
||||
Brian Sharpe
|
||||
Kartik Shrivastava
|
||||
Michael Lackner
|
||||
Lucas Baraya
|
||||
Kuba Roth
|
||||
Tom Cnops
|
||||
Walt Disney Pictures (Walt Disney Animation Studios)
|
||||
The Linux Foundation
|
||||
Industrial Light & Magic (ILM)
|
||||
@@ -1,76 +1,50 @@
|
||||

|
||||

|
||||
|
||||
| OpenVDB | AX | Nano | Houdini | License | CII |
|
||||
| :----: | :----: | :----: | :----: | :-----: | :-: |
|
||||
| [](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/build.yml) | [](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/ax.yml) | [](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/nanovdb.yml) | [](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/houdini.yml) | [](LICENSE) | [](https://bestpractices.coreinfrastructure.org/projects/2774) |
|
||||
[](LICENSE)
|
||||
[](https://bestpractices.coreinfrastructure.org/projects/2774)
|
||||
[](https://slack.aswf.io/)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
| OpenVDB | AX | Nano | Houdini |
|
||||
| :----: | :----: | :----: | :----: |
|
||||
| [](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/build.yml) | [](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/ax.yml) | [](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/nanovdb.yml) | [](https://github.com/AcademySoftwareFoundation/openvdb/actions/workflows/houdini.yml) |
|
||||
|
||||
[Website](https://www.openvdb.org) |
|
||||
[Discussion Forum](https://github.com/AcademySoftwareFoundation/openvdb/discussions) |
|
||||
[Documentation](https://www.openvdb.org/documentation/doxygen) |
|
||||
[Releases](https://github.com/AcademySoftwareFoundation/openvdb/releases) |
|
||||
[License](https://www.apache.org/licenses/LICENSE-2.0) |
|
||||
[Slack](https://slack.aswf.io/)
|
||||
[Documentation](https://academysoftwarefoundation.github.io/openvdb)
|
||||
|
||||
OpenVDB is an open source C++ library comprising a novel hierarchical data structure and a large suite of tools for the efficient storage and manipulation of sparse volumetric data discretized on three-dimensional grids. It was developed by DreamWorks Animation for use in volumetric applications typically encountered in feature film production.
|
||||
|
||||
OpenVDB is an open source C++ library comprising a novel hierarchical data
|
||||
structure and a large suite of tools for the efficient storage and manipulation
|
||||
of sparse volumetric data discretized on three-dimensional grids. It was
|
||||
developed by DreamWorks Animation for use in volumetric applications typically
|
||||
encountered in feature film production.
|
||||
|
||||
### Development Repository
|
||||
|
||||
This GitHub repository hosts the trunk of the OpenVDB development. This implies
|
||||
that it is the newest public version with the latest features and bug fixes.
|
||||
However, it also means that it has not undergone a lot of testing and is
|
||||
generally less stable than the [production releases](https://github.com/AcademySoftwareFoundation/openvdb/releases).
|
||||
This GitHub repository hosts the trunk of the OpenVDB development. This implies that it is the newest public version with the latest features and bug fixes. However, it also means that it has not undergone a lot of testing and is generally less stable than the [production releases](https://github.com/AcademySoftwareFoundation/openvdb/releases).
|
||||
|
||||
|
||||
### License
|
||||
|
||||
OpenVDB is released under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0),
|
||||
which is a free, open source software license developed and maintained by the
|
||||
Apache Software Foundation.
|
||||
OpenVDB is released under the [Mozilla Public License Version 2.0](https://www.mozilla.org/MPL/2.0/), which is a free, open source software license developed and maintained by the Mozilla Foundation.
|
||||
|
||||
The trademarks of any contributor to this project may not be used in
|
||||
association with the project without the contributor's express permission.
|
||||
|
||||
NOTE: OpenVDB has completed re-licensing from [Mozilla Public License Version 2.0](https://www.mozilla.org/MPL/2.0/) to [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0). Please see the file RE-LICENSE_NOTE.txt for more details.
|
||||
The trademarks of any contributor to this project may not be used in association with the project without the contributor's express permission.
|
||||
|
||||
### Contributing
|
||||
|
||||
OpenVDB welcomes contributions to the OpenVDB project. Please refer to the
|
||||
[contribution guidelines](CONTRIBUTING.md) for details on how to make a
|
||||
contribution.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
OpenVDB welcomes contributions to the OpenVDB project. Please refer to the [contribution guidelines](CONTRIBUTING.md) for details on how to make a contribution.
|
||||
|
||||
### Developer Quick Start
|
||||
|
||||
The following provides basic installation examples for the core OpenVDB library.
|
||||
Other components, such as the python module, OpenVDB AX, NanoVDB and various
|
||||
executables, may require additional dependencies. See the
|
||||
[build documentation](https://www.openvdb.org/documentation/doxygen/build.html)
|
||||
for help with installations.
|
||||
The following provides basic installation examples for the core OpenVDB library. Other components, such as the python module, OpenVDB AX, NanoVDB and various executables, may require additional dependencies. See the [build documentation](https://academysoftwarefoundation.github.io/openvdb/build.html) for help with installations.
|
||||
|
||||
##### Linux/MacOS
|
||||
#### Linux
|
||||
##### Installing Dependencies (Boost, TBB, Blosc)
|
||||
|
||||
```bash
|
||||
# Linux
|
||||
# @note If your distribution does not have required versions, consider using
|
||||
# apt pinning. See the dependency documentation for more details.
|
||||
apt-get install -y libboost-iostreams-dev
|
||||
apt-get install -y libtbb-dev
|
||||
apt-get install -y libblosc-dev
|
||||
|
||||
# MacOS
|
||||
# @note We are using homebrew in this example to install requried dependencies
|
||||
# https://brew.sh/
|
||||
brew install boost
|
||||
brew install tbb
|
||||
brew install c-blosc
|
||||
```
|
||||
|
||||
##### Building OpenVDB
|
||||
```bash
|
||||
git clone git@github.com:AcademySoftwareFoundation/openvdb.git
|
||||
cd openvdb
|
||||
@@ -79,16 +53,30 @@ cd build
|
||||
cmake ..
|
||||
make -j4 && make install
|
||||
```
|
||||
|
||||
##### Windows
|
||||
#### macOS
|
||||
##### Installing Dependencies (Boost, TBB, Blosc)
|
||||
```bash
|
||||
brew install boost
|
||||
brew install tbb
|
||||
brew install c-blosc
|
||||
```
|
||||
##### Building OpenVDB
|
||||
```bash
|
||||
git clone git@github.com:AcademySoftwareFoundation/openvdb.git
|
||||
cd openvdb
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make -j4 && make install
|
||||
```
|
||||
#### Windows
|
||||
##### Installing Dependencies (Boost, TBB, Blosc)
|
||||
|
||||
Note that the following commands have only been tested for 64bit systems/libraries.
|
||||
It is recommended to set the `VCPKG_DEFAULT_TRIPLET` environment variable to
|
||||
`x64-windows` to use 64-bit libraries by default. You will also require
|
||||
[Visual Studio](https://visualstudio.microsoft.com/downloads/) (for the MSVC C++
|
||||
runtime and compiler toolchains), [CMake](https://cmake.org/download/) and optionally
|
||||
[vcpkg](https://github.com/microsoft/vcpkg) for the installation of OpenVDB's
|
||||
dependencies.
|
||||
[Git](https://git-scm.com/downloads), [vcpkg](https://github.com/microsoft/vcpkg)
|
||||
and [CMake](https://cmake.org/download/) to be installed.
|
||||
|
||||
```bash
|
||||
vcpkg install zlib:x64-windows
|
||||
@@ -97,9 +85,10 @@ vcpkg install tbb:x64-windows
|
||||
vcpkg install boost-iostreams:x64-windows
|
||||
vcpkg install boost-any:x64-windows
|
||||
vcpkg install boost-algorithm:x64-windows
|
||||
vcpkg install boost-uuid:x64-windows
|
||||
vcpkg install boost-interprocess:x64-windows
|
||||
```
|
||||
|
||||
##### Building OpenVDB
|
||||
```bash
|
||||
git clone git@github.com:AcademySoftwareFoundation/openvdb.git
|
||||
cd openvdb
|
||||
@@ -109,19 +98,42 @@ cmake -DCMAKE_TOOLCHAIN_FILE=<PATH_TO_VCPKG>\scripts\buildsystems\vcpkg.cmake -D
|
||||
cmake --build . --parallel 4 --config Release --target install
|
||||
```
|
||||
|
||||
#### Building OpenVDB AX and NanoVDB
|
||||
#### Building OpenVDB AX
|
||||
|
||||
OpenVDB AX depends on the core OpenVDB library. NanoVDB can be built with and
|
||||
without OpenVDB support. Note that NanoVDB has its own build instructions, see
|
||||
the [NanoVDB build documentation](https://www.openvdb.org/documentation/doxygen/NanoVDB_HowToBuild.html)
|
||||
for details.
|
||||
OpenVDB AX depends on the core OpenVDB library. See the [build documentation](https://academysoftwarefoundation.github.io/openvdb/build.html) for all available AX component options:
|
||||
|
||||
The following variables can be passed to the `cmake` configure command. There
|
||||
are more optional VDB components, see the [build documentation](https://www.openvdb.org/documentation/doxygen/build.html)
|
||||
for a complete list.
|
||||
```bash
|
||||
git clone git@github.com:AcademySoftwareFoundation/openvdb.git
|
||||
cd openvdb
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DOPENVDB_BUILD_AX=ON ..
|
||||
make -j4 && make install
|
||||
```
|
||||
|
||||
| Option | Details |
|
||||
| :---- | :----- |
|
||||
| `-D OPENVDB_BUILD_AX=ON` | to enable OpenVDB AX |
|
||||
| `-D OPENVDB_BUILD_NANOVDB=ON` | to enable NanoVDB |
|
||||
| `-D NANOVDB_USE_OPENVDB=ON` | to use OpenVDB in NanoVDB |
|
||||
#### Building NanoVDB
|
||||
|
||||
NanoVDB can be built with and without OpenVDB support. To see full build instructions
|
||||
see the [NanoVDB build documentation](https://academysoftwarefoundation.github.io/openvdb/NanoVDB_HowToBuild.html)
|
||||
|
||||
#### Building Without OpenVDB Support
|
||||
|
||||
```bash
|
||||
git clone git@github.com:AcademySoftwareFoundation/openvdb.git
|
||||
cd openvdb/nanovdb/nanovdb # Build from the subdirectory
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make -j4 && make install
|
||||
```
|
||||
|
||||
#### Building With OpenVDB Support
|
||||
|
||||
```bash
|
||||
git clone git@github.com:AcademySoftwareFoundation/openvdb.git
|
||||
cd openvdb
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DOPENVDB_BUILD_NANOVDB=ON ..
|
||||
make -j4 && make install
|
||||
```
|
||||
|
||||
+7
-36
@@ -1,11 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -e
|
||||
|
||||
CI_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
|
||||
|
||||
# print versions
|
||||
bash --version
|
||||
if [ ! -z "$CXX" ]; then $CXX -v; fi
|
||||
@@ -31,20 +27,9 @@ declare -A PARMS
|
||||
PARMS[--components]=core,bin
|
||||
PARMS[--target]=install
|
||||
PARMS[--build-dir]=build
|
||||
|
||||
if [[ $RUNNER_NAME == *"8c-32g-300h"* ]]; then
|
||||
# ASWF github actions runners have 8 threads
|
||||
PARMS[-j]=8
|
||||
else
|
||||
# Github actions runners have 2 threads
|
||||
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
|
||||
if [[ $CXX == "g++" ]]; then
|
||||
# GCC hits memory limits on runners, build in serial
|
||||
PARMS[-j]=1
|
||||
else
|
||||
PARMS[-j]=2
|
||||
fi
|
||||
fi
|
||||
# github actions runners have 2 threads
|
||||
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
|
||||
PARMS[-j]=2
|
||||
|
||||
# Available options for --components
|
||||
declare -A COMPONENTS
|
||||
@@ -123,15 +108,7 @@ if HAS_PARM -v || HAS_PARM --verbose; then
|
||||
# support older versions of CMake.
|
||||
CMAKE_EXTRA+=("-DCMAKE_VERBOSE_MAKEFILE=ON")
|
||||
fi
|
||||
if HAS_PARM --build-type; then
|
||||
CMAKE_EXTRA+=("-DCMAKE_BUILD_TYPE=${PARMS[--build-type]}")
|
||||
build_type="${PARMS[--build-type]}"
|
||||
debug="Debug"
|
||||
# Ignore case - if the build-type is Debug, we enable asserts
|
||||
if [ "${build_type,,}" = "${debug,,}" ]; then
|
||||
CMAKE_EXTRA+=("-DOPENVDB_ENABLE_ASSERTS=ON")
|
||||
fi
|
||||
fi
|
||||
if HAS_PARM --build-type; then CMAKE_EXTRA+=("-DCMAKE_BUILD_TYPE=${PARMS[--build-type]}"); fi
|
||||
|
||||
# Available components. If a component is not provided it is
|
||||
# explicitly set to OFF.
|
||||
@@ -155,7 +132,7 @@ done
|
||||
|
||||
################################################
|
||||
|
||||
# github actions runners have 8 threads
|
||||
# github actions runners have 2 threads
|
||||
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
|
||||
export CMAKE_BUILD_PARALLEL_LEVEL=${PARMS[-j]}
|
||||
echo "Build using ${CMAKE_BUILD_PARALLEL_LEVEL} threads"
|
||||
@@ -183,17 +160,11 @@ set -x
|
||||
|
||||
# Note:
|
||||
# - print and lod binary options are always on and can be toggles with: OPENVDB_BUILD_BINARIES=ON/OFF
|
||||
# - always enabled the python tests with OPENVDB_BUILD_PYTHON_UNITTESTS if the python module is in use,
|
||||
# regardless of the 'test' component being enabled or not (see the OPENVDB_BUILD_PYTHON_UNITTESTS option).
|
||||
cmake \
|
||||
-DOPENVDB_USE_DEPRECATED_ABI_10=ON \
|
||||
-DOPENVDB_USE_DEPRECATED_ABI_11=ON \
|
||||
-DOPENVDB_USE_DEPRECATED_ABI_7=ON \
|
||||
-DOPENVDB_USE_DEPRECATED_ABI_8=ON \
|
||||
-DOPENVDB_BUILD_VDB_PRINT=ON \
|
||||
-DOPENVDB_BUILD_VDB_LOD=ON \
|
||||
-DOPENVDB_BUILD_VDB_TOOL=ON \
|
||||
-DOPENVDB_BUILD_VDB_TOOL_UNITTESTS=ON \
|
||||
-DOPENVDB_TOOL_USE_NANO=OFF \
|
||||
-DOPENVDB_BUILD_PYTHON_UNITTESTS=ON \
|
||||
-DMSVC_MP_THREAD_COUNT=${PARMS[-j]} \
|
||||
"${CMAKE_EXTRA[@]}" \
|
||||
..
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -ex
|
||||
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
version: 0.2
|
||||
|
||||
env:
|
||||
variables:
|
||||
PYTHONPATH: ""
|
||||
# secrets-manager:
|
||||
# GITHUB_TOKEN: "github-token:token"
|
||||
|
||||
phases:
|
||||
install:
|
||||
runtime-versions:
|
||||
python: 3.10
|
||||
commands:
|
||||
# Install Conda
|
||||
- wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
|
||||
- bash Miniforge3-Linux-x86_64.sh -b -p $HOME/miniforge3
|
||||
- eval "$($HOME/miniforge3/bin/conda shell.bash hook)"
|
||||
- conda init
|
||||
- source ~/.bashrc || true
|
||||
|
||||
# Create build environment
|
||||
- conda env create -f fvdb/env/build_environment.yml -n fvdb_build
|
||||
- echo "Build environment created successfully"
|
||||
|
||||
# Create test environment
|
||||
- conda env create -f fvdb/env/test_environment.yml -n fvdb_test
|
||||
- echo "Test environment created successfully"
|
||||
|
||||
pre_build:
|
||||
commands:
|
||||
- echo "Starting pre_build phase"
|
||||
- git config --global --add safe.directory "$(pwd)"
|
||||
|
||||
# Verify environments exist
|
||||
- conda env list
|
||||
- echo "Pre-build phase completed"
|
||||
|
||||
build:
|
||||
commands:
|
||||
- echo "Starting build phase"
|
||||
|
||||
# Build fvdb wheel using conda run (this ensures proper environment activation)
|
||||
- cd fvdb
|
||||
- export TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0;8.6+PTX"
|
||||
- echo "Building wheel with conda run..."
|
||||
- conda run --no-capture-output -n fvdb_build ./build.sh wheel verbose gtests benchmarks
|
||||
|
||||
# Verify wheel was created
|
||||
- ls -la dist/
|
||||
- echo "Wheel build completed"
|
||||
|
||||
# Move back to root directory
|
||||
- cd ..
|
||||
|
||||
# Install package in test environment using conda run
|
||||
- echo "Installing wheel in test environment..."
|
||||
- conda run --no-capture-output -n fvdb_test pip install ./fvdb/dist/*.whl
|
||||
- echo "Package installation completed"
|
||||
|
||||
post_build:
|
||||
commands:
|
||||
- echo "Starting post_build phase"
|
||||
|
||||
# Run unit tests using conda run
|
||||
- echo "Running unit tests..."
|
||||
- cd fvdb/tests
|
||||
- conda run --no-capture-output -n fvdb_test pytest -v unit
|
||||
|
||||
# Run documentation tests using conda run
|
||||
- echo "Running documentation tests..."
|
||||
- cd ..
|
||||
- conda run --no-capture-output -n fvdb_test pytest --markdown-docs docs
|
||||
|
||||
- echo "All tests completed successfully"
|
||||
|
||||
artifacts:
|
||||
files:
|
||||
- fvdb/dist/*.whl
|
||||
name: fvdb-artifacts
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- '/root/.cache/pip/**/*'
|
||||
- '$HOME/miniforge3/**/*'
|
||||
Executable → Regular
+37
-87
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/usr/local/bin/python
|
||||
#
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
# Python script to download the latest Houdini builds
|
||||
# using the SideFX download API:
|
||||
@@ -19,16 +19,16 @@ import base64
|
||||
import requests
|
||||
import hashlib
|
||||
import os
|
||||
import argparse
|
||||
import copy
|
||||
|
||||
# For progress bar printing
|
||||
try:
|
||||
from tqdm import tqdm
|
||||
has_tqdm = True
|
||||
except:
|
||||
has_tqdm = False
|
||||
pass
|
||||
# this argument is for the major.minor version of Houdini to download (such as 15.0, 15.5, 16.0)
|
||||
version = sys.argv[1]
|
||||
only_production = True if sys.argv[2] == 'ON' else False
|
||||
user_client_id = os.getenv('HOUDINI_CLIENT_ID')
|
||||
user_client_secret_key = os.getenv('HOUDINI_SECRET_KEY')
|
||||
|
||||
if not re.match('[0-9][0-9]\.[0-9]$', version):
|
||||
raise IOError('Invalid Houdini Version "%s", expecting in the form "major.minor" such as "16.0"' % version)
|
||||
|
||||
|
||||
# Code that provides convenient Python wrappers to call into the API:
|
||||
|
||||
@@ -94,7 +94,7 @@ def get_access_token_and_expiry_time(
|
||||
),
|
||||
})
|
||||
if response.status_code != 200:
|
||||
raise AuthorizationError(response.status_code, response.text)
|
||||
raise AuthorizationError(response.status_code, reponse.text)
|
||||
|
||||
response_json = response.json()
|
||||
access_token_expiry_time = time.time() - 2 + response_json["expires_in"]
|
||||
@@ -138,83 +138,33 @@ class APIError(Exception):
|
||||
self.http_code = http_code
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
service = service(
|
||||
access_token_url="https://www.sidefx.com/oauth2/application_token",
|
||||
client_id=user_client_id,
|
||||
client_secret_key=user_client_secret_key,
|
||||
endpoint_url="https://www.sidefx.com/api/",
|
||||
)
|
||||
|
||||
parser = argparse.ArgumentParser(description='Download a Houdini Installation')
|
||||
parser.add_argument('version', type=str, help='Major.Minor version of Houdini to download')
|
||||
parser.add_argument('platform', type=str, help='Platform target')
|
||||
parser.add_argument('--prod', action='store_true', help='Only download production builds')
|
||||
parser.add_argument('--list', action='store_true', help='Just list the available builds and exit.')
|
||||
args = parser.parse_args()
|
||||
releases_list = service.download.get_daily_builds_list(
|
||||
product='houdini', version=version, platform='linux', only_production=only_production)
|
||||
|
||||
version = args.version
|
||||
platform = args.platform
|
||||
only_production = args.prod
|
||||
latest_release = service.download.get_daily_build_download(
|
||||
product='houdini', version=version, platform='linux', build=releases_list[0]['build'])
|
||||
|
||||
user_client_id = os.getenv('HOUDINI_CLIENT_ID')
|
||||
user_client_secret_key = os.getenv('HOUDINI_SECRET_KEY')
|
||||
|
||||
if not re.match('[0-9][0-9]\.[0-9]$', version):
|
||||
raise IOError('Invalid Houdini Version "%s", expecting in the form "major.minor" such as "16.0"' % version)
|
||||
|
||||
service = service(
|
||||
access_token_url="https://www.sidefx.com/oauth2/application_token",
|
||||
client_id=user_client_id,
|
||||
client_secret_key=user_client_secret_key,
|
||||
endpoint_url="https://www.sidefx.com/api/",
|
||||
)
|
||||
|
||||
releases_list = service.download.get_daily_builds_list(
|
||||
product='houdini', version=version, platform=platform, only_production=only_production)
|
||||
|
||||
print('Available builds:')
|
||||
for rel in releases_list:
|
||||
rel = copy.deepcopy(rel)
|
||||
if 'third_party_libraries' in rel:
|
||||
# Don't print these
|
||||
del rel['third_party_libraries']
|
||||
print(rel)
|
||||
|
||||
if args.list:
|
||||
sys.exit(0)
|
||||
|
||||
print('Selecting build: ' + releases_list[0]['build'])
|
||||
|
||||
latest_release = service.download.get_daily_build_download(
|
||||
product='houdini', version=version, platform=platform, build=releases_list[0]['build'])
|
||||
print(latest_release)
|
||||
|
||||
# Can't do this procedurally as latest_release['filename'] can contain
|
||||
# multiple periods and may have multiple trailing extensions...
|
||||
extension = ''
|
||||
if 'linux' in platform: extension = 'tar.gz'
|
||||
elif 'macos' in platform: extension = 'dmg'
|
||||
elif 'win64' in platform: extension = 'exe'
|
||||
assert(extension in latest_release['filename'])
|
||||
|
||||
# Download the file and save it as hou.extension
|
||||
local_filename = 'hou.' + extension
|
||||
print('Writing to "' + local_filename + '"')
|
||||
|
||||
response = requests.get(latest_release['download_url'], stream=True)
|
||||
if response.status_code == 200:
|
||||
# Download the file as hou.tar.gz
|
||||
local_filename = 'hou.tar.gz'
|
||||
response = requests.get(latest_release['download_url'], stream=True)
|
||||
if response.status_code == 200:
|
||||
with open(local_filename, 'wb') as f:
|
||||
response.raw.decode_content = True
|
||||
if has_tqdm:
|
||||
file_size = int(response.headers.get('Content-Length', 0))
|
||||
desc = "(Unknown total file size)" if file_size == 0 else ""
|
||||
with tqdm.wrapattr(response.raw, "read", total=file_size, desc=desc) as r_raw:
|
||||
with open(local_filename, 'wb') as f:
|
||||
shutil.copyfileobj(r_raw, f)
|
||||
else:
|
||||
with open(local_filename, 'wb') as f:
|
||||
shutil.copyfileobj(response.raw, f)
|
||||
else:
|
||||
raise Exception('Error downloading file!')
|
||||
shutil.copyfileobj(response.raw, f)
|
||||
else:
|
||||
raise Exception('Error downloading file!')
|
||||
|
||||
# Verify the file checksum is matching
|
||||
file_hash = hashlib.md5()
|
||||
with open(local_filename, 'rb') as f:
|
||||
for chunk in iter(lambda: f.read(4096), b''):
|
||||
file_hash.update(chunk)
|
||||
if file_hash.hexdigest() != latest_release['hash']:
|
||||
raise Exception('Checksum does not match!')
|
||||
# Verify the file checksum is matching
|
||||
file_hash = hashlib.md5()
|
||||
with open(local_filename, 'rb') as f:
|
||||
for chunk in iter(lambda: f.read(4096), b''):
|
||||
file_hash.update(chunk)
|
||||
if file_hash.hexdigest() != latest_release['hash']:
|
||||
raise Exception('Checksum does not match!')
|
||||
|
||||
+36
-106
@@ -1,124 +1,54 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -ex
|
||||
|
||||
HOUDINI_MAJOR="$1"
|
||||
PLATFORM="$2"
|
||||
OTHER_ARGS="$3"
|
||||
GOLD="$2"
|
||||
|
||||
pip install --user requests
|
||||
python ci/download_houdini.py $HOUDINI_MAJOR $PLATFORM $OTHER_ARGS
|
||||
|
||||
if [[ $PLATFORM =~ "linux" ]]; then
|
||||
# create dir hierarchy
|
||||
mkdir -p hou/bin
|
||||
mkdir -p hou/houdini
|
||||
mkdir -p hou/toolkit
|
||||
mkdir -p hou/dsolib
|
||||
python ci/download_houdini.py $HOUDINI_MAJOR $GOLD
|
||||
|
||||
# unpack hou.tar.gz and cleanup
|
||||
tar -xzf hou.tar.gz
|
||||
rm -rf hou.tar.gz
|
||||
cd houdini*
|
||||
tar -xzf houdini.tar.gz
|
||||
# create dir hierarchy
|
||||
mkdir -p hou/bin
|
||||
mkdir -p hou/houdini
|
||||
mkdir -p hou/toolkit
|
||||
mkdir -p hou/dsolib
|
||||
|
||||
# copy required files into hou dir
|
||||
cp houdini_setup* ../hou/.
|
||||
# unpack hou.tar.gz and cleanup
|
||||
tar -xzf hou.tar.gz
|
||||
rm -rf hou.tar.gz
|
||||
cd houdini*
|
||||
tar -xzf houdini.tar.gz
|
||||
|
||||
# report library names
|
||||
ls -al dsolib/
|
||||
# copy required files into hou dir
|
||||
cp houdini_setup* ../hou/.
|
||||
cp -r toolkit/cmake ../hou/toolkit/.
|
||||
cp -r toolkit/include ../hou/toolkit/.
|
||||
cp -r dsolib/libHoudini* ../hou/dsolib/.
|
||||
cp -r dsolib/libopenvdb_sesi* ../hou/dsolib/.
|
||||
cp -r dsolib/libblosc* ../hou/dsolib/.
|
||||
cp -r dsolib/libhboost* ../hou/dsolib/.
|
||||
cp -r dsolib/libz* ../hou/dsolib/.
|
||||
cp -r dsolib/libbz2* ../hou/dsolib/.
|
||||
cp -r dsolib/libtbb* ../hou/dsolib/.
|
||||
cp -r dsolib/libHalf* ../hou/dsolib/.
|
||||
cp -r dsolib/libjemalloc* ../hou/dsolib/.
|
||||
cp -r dsolib/liblzma* ../hou/dsolib/.
|
||||
cp -r dsolib/libIex* ../hou/dsolib/.
|
||||
cp -r dsolib/libImath* ../hou/dsolib/.
|
||||
cp -r dsolib/libIlmThread* ../hou/dsolib/.
|
||||
cp -r dsolib/libIlmImf* ../hou/dsolib/.
|
||||
|
||||
# copy required libraries
|
||||
cp -r toolkit/cmake ../hou/toolkit/.
|
||||
cp -r toolkit/include ../hou/toolkit/.
|
||||
cp -r dsolib/libHoudini* ../hou/dsolib/.
|
||||
cp -r dsolib/libopenvdb_sesi* ../hou/dsolib/.
|
||||
cp -r dsolib/libblosc* ../hou/dsolib/.
|
||||
cp -r dsolib/libhboost* ../hou/dsolib/.
|
||||
cp -r dsolib/libz* ../hou/dsolib/.
|
||||
cp -r dsolib/libbz2* ../hou/dsolib/.
|
||||
cp -r dsolib/libtbb* ../hou/dsolib/.
|
||||
cp -r dsolib/libjemalloc* ../hou/dsolib/.
|
||||
cp -r dsolib/liblzma* ../hou/dsolib/.
|
||||
cp -r dsolib/libIex* ../hou/dsolib/.
|
||||
cp -r dsolib/libImath* ../hou/dsolib/.
|
||||
cp -r dsolib/libIlmThread* ../hou/dsolib/.
|
||||
cd ..
|
||||
|
||||
elif [[ $PLATFORM =~ "macos" ]]; then
|
||||
# Exract files by mounting the downloaded dmg (we only really want to
|
||||
# expand Houdini.framework)
|
||||
hdiutil attach hou.dmg
|
||||
pkgutil --expand-full /Volumes/Houdini/Houdini.pkg Houdini
|
||||
hdiutil detach /Volumes/Houdini
|
||||
rm hou.dmg
|
||||
|
||||
# Move the required Frameworks and delete the extracted src
|
||||
mkdir -p hou/Frameworks
|
||||
mv Houdini/Framework.pkg/Payload/Houdini.framework hou/Frameworks/Houdini.framework
|
||||
rm -rf Houdini
|
||||
|
||||
# Report library names
|
||||
ls -al hou/Frameworks/Houdini.framework/Libraries
|
||||
|
||||
# Remove unused resources
|
||||
cd hou/Frameworks/Houdini.framework/Resources/
|
||||
rm -rf $(ls | grep -e toolkit -v)
|
||||
cd -
|
||||
|
||||
# Handle libraries. On some versions of MacOS with older versions of ld,
|
||||
# ld will complain (error) if shared libraries contain missing files which
|
||||
# are referenced with LC_LOAD_DYLIB or LC_RPATH entries (even though they
|
||||
# are not explicitly required at link time). We still want to delete these
|
||||
# unused libs as they occupt ~1-2GB. To handle this, we generate a unique
|
||||
# list of libs that our direct dependencies reference and create an empty
|
||||
# shared dylib in their place.
|
||||
cd hou/Frameworks/Houdini.framework/Libraries
|
||||
# Remove any folders here, they aren't needed
|
||||
rm -rf $(ls -p | grep /)
|
||||
# Remove any library that does not match the -e patterns (inverse grep with -v)
|
||||
unused_libraries=$(ls | \
|
||||
grep -e libHoudini \
|
||||
-e libopenvdb_sesi \
|
||||
-e libblosc \
|
||||
-e libhboost \
|
||||
-e libz \
|
||||
-e libbz2 \
|
||||
-e libtbb \
|
||||
-e libjemalloc \
|
||||
-e liblzma \
|
||||
-e libIex \
|
||||
-e libImath \
|
||||
-e libIlmThread \
|
||||
-v)
|
||||
rm -rf ${unused_libraries}
|
||||
|
||||
# Create an empty valid shared lib
|
||||
echo '' | clang -x c -shared -o libempty.dylib -
|
||||
|
||||
# Generate a unique list of libs that our remaining libs reference
|
||||
for i in $(ls); do otool -LX $i >> libnames; done
|
||||
sort -u libnames | grep @rpath | cut -f1 -d' ' | xargs > rpaths
|
||||
|
||||
# Recreate unused libraries that have been deleted as empty shared dylibs
|
||||
# to keep ld happy
|
||||
for libpath in $(cat rpaths); do
|
||||
libpath=${libpath#"@rpath/"}
|
||||
echo "Checking $libpath"
|
||||
if [ ! -f $libpath ]; then
|
||||
echo "Creating empty library at $libpath"
|
||||
mkdir -p $(dirname $libpath)
|
||||
cp libempty.dylib $libpath
|
||||
fi
|
||||
done
|
||||
|
||||
rm libempty.dylib
|
||||
cd -
|
||||
# needed for < H18.0 (due to sesitag)
|
||||
if [ "$HOUDINI_MAJOR" == "17.0" ] || [ "$HOUDINI_MAJOR" == "17.5" ]; then
|
||||
cp -r bin/app_init* ../hou/bin/.
|
||||
cp -r bin/sesitag* ../hou/bin/.
|
||||
cp -r dsolib/lib* ../hou/dsolib/.
|
||||
fi
|
||||
|
||||
# write hou into hou.tar.gz and cleanup
|
||||
cd ..
|
||||
tar -czvf hou.tar.gz hou
|
||||
|
||||
# move hou.tar.gz into hou subdirectory
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#################################################################################
|
||||
# This script extracts all code blocks from AX documentation which are NOT #
|
||||
# marked as cpp/sh/unparsed and attempts to parse or compile them through the #
|
||||
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -ex
|
||||
|
||||
@@ -34,5 +32,5 @@ cmake \
|
||||
"${CMAKE_EXTRA[@]}" \
|
||||
..
|
||||
|
||||
make -j8
|
||||
make -j4
|
||||
make install
|
||||
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
CMAKE_VERSION="$1"
|
||||
CMAKE_PACKAGE=cmake-${CMAKE_VERSION}-Linux-x86_64
|
||||
|
||||
wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_PACKAGE}.tar.gz
|
||||
|
||||
tar -xf ${CMAKE_PACKAGE}.tar.gz
|
||||
cp ${CMAKE_PACKAGE}/bin/* /usr/local/bin/
|
||||
cp -r ${CMAKE_PACKAGE}/share/* /usr/local/share/
|
||||
|
||||
rm -rf ${CMAKE_PACKAGE}
|
||||
rm -rf ${CMAKE_PACKAGE}.tar.gz
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -ex
|
||||
CURL_VERSION="$1"
|
||||
|
||||
wget -O cppunit.tar.gz https://dev-www.libreoffice.org/src/cppunit-${CURL_VERSION}.tar.gz
|
||||
|
||||
tar -xzf cppunit.tar.gz
|
||||
|
||||
cd cppunit-${CURL_VERSION}
|
||||
|
||||
./configure
|
||||
|
||||
make -j8
|
||||
make install
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -ex
|
||||
|
||||
@@ -16,5 +14,5 @@ fi
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../.
|
||||
make -j8
|
||||
make -j4
|
||||
make install
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -ex
|
||||
GLFW_VERSION="$1"
|
||||
|
||||
git clone https://github.com/glfw/glfw.git
|
||||
cd glfw
|
||||
|
||||
if [ "$GLFW_VERSION" != "latest" ]; then
|
||||
git checkout tags/${GLFW_VERSION} -b ${GLFW_VERSION}
|
||||
fi
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake ..
|
||||
|
||||
make -j8
|
||||
make install
|
||||
+9
-9
@@ -1,18 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -ex
|
||||
|
||||
GTEST_VERSION="$1"
|
||||
|
||||
|
||||
git clone https://github.com/google/googletest.git -b v${GTEST_VERSION}
|
||||
git clone https://github.com/google/googletest.git
|
||||
cd googletest
|
||||
|
||||
if [ "$GTEST_VERSION" != "latest" ]; then
|
||||
git checkout release-${GTEST_VERSION} -b v${GTEST_VERSION}
|
||||
fi
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
|
||||
make -j$(nproc)
|
||||
|
||||
sudo make install
|
||||
cmake ../.
|
||||
make -j4
|
||||
make install
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -ex
|
||||
|
||||
LLVM_CRT="$1"
|
||||
|
||||
git clone -b llvmorg-14.0.0 --depth 1 https://github.com/llvm/llvm-project.git llvm
|
||||
git clone -b llvmorg-12.0.0 --depth 1 https://github.com/llvm/llvm-project.git llvm
|
||||
cd llvm
|
||||
|
||||
mkdir .build
|
||||
cd .build
|
||||
|
||||
# @note currently only test static builds with MT
|
||||
cmake -B . -S ../llvm -A x64 -G "Visual Studio 17 2022" -Thost=x64 \
|
||||
cmake -S ../llvm -A x64 -G "Visual Studio 16 2019" -Thost=x64 \
|
||||
-DCMAKE_INSTALL_PREFIX="${HOME}/llvm_install" \
|
||||
-DLLVM_TARGETS_TO_BUILD="host" \
|
||||
-DLLVM_BUILD_TOOLS=OFF \
|
||||
@@ -21,7 +19,8 @@ cmake -B . -S ../llvm -A x64 -G "Visual Studio 17 2022" -Thost=x64 \
|
||||
-DLLVM_INCLUDE_EXAMPLES=OFF \
|
||||
-DLLVM_INCLUDE_TESTS=OFF \
|
||||
-DLLVM_INCLUDE_TOOLS=OFF \
|
||||
-DLLVM_USE_CRT_RELEASE=${LLVM_CRT}
|
||||
-DLLVM_USE_CRT_RELEASE=${LLVM_CRT} \
|
||||
..
|
||||
|
||||
cmake --build . --config Release --target install
|
||||
|
||||
|
||||
+16
-32
@@ -1,53 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -x
|
||||
|
||||
# Remove Python3 symlinks in /usr/local/bin as workaround to brew update issues
|
||||
# https://github.com/actions/setup-python/issues/577
|
||||
rm /usr/local/bin/2to3* || :
|
||||
rm /usr/local/bin/idle3* || :
|
||||
rm /usr/local/bin/pydoc* || :
|
||||
rm /usr/local/bin/python3* || :
|
||||
|
||||
brew update
|
||||
brew install bash gnu-getopt # for CI scripts
|
||||
brew install boost
|
||||
brew install c-blosc
|
||||
brew install cmake
|
||||
brew install ilmbase
|
||||
brew install openexr@2
|
||||
brew install boost
|
||||
brew install boost-python3 # also installs the dependent python version
|
||||
brew install tbb@2020
|
||||
brew install zlib
|
||||
brew install glfw
|
||||
brew install googletest
|
||||
brew install jq # for trivial parsing of brew json
|
||||
brew install openexr
|
||||
brew install nanobind # also installs the dependent python version
|
||||
brew install robin-map # required for nanobind
|
||||
brew install zlib
|
||||
brew install jemalloc
|
||||
|
||||
# Alias python version installed by nanobind to path
|
||||
py_version=$(brew info nanobind --json | \
|
||||
# Alias python version installed by boost-python3 to path
|
||||
py_version=$(brew info boost-python3 --json | \
|
||||
jq -cr '.[].dependencies[] | select(. | startswith("python"))')
|
||||
echo "Using python $py_version"
|
||||
# export for subsequent action steps (note, not exported for this env)
|
||||
echo "Python_ROOT_DIR=/usr/local/opt/$py_version" >> $GITHUB_ENV
|
||||
echo "/usr/local/opt/$py_version/bin" >> $GITHUB_PATH
|
||||
|
||||
# use bash
|
||||
echo "/usr/local/opt/bash/bin" >> $GITHUB_PATH
|
||||
echo "/opt/homebrew/opt/bash/bin" >> $GITHUB_PATH
|
||||
# Export OpenEXR paths which are no longer installed to /usr/local (as v2.x is deprecated)
|
||||
echo "IlmBase_ROOT=/usr/local/opt/ilmbase" >> $GITHUB_ENV
|
||||
echo "OpenEXR_ROOT=/usr/local/opt/openexr@2" >> $GITHUB_ENV
|
||||
echo "/usr/local/opt/openexr@2/bin" >> $GITHUB_PATH
|
||||
|
||||
# Export TBB paths which are no longer installed to /usr/local (as v2020 is deprecated)
|
||||
echo "TBB_ROOT=/usr/local/opt/tbb@2020" >> $GITHUB_ENV
|
||||
echo "/usr/local/opt/tbb@2020/bin" >> $GITHUB_PATH
|
||||
|
||||
# use gnu-getopt
|
||||
echo "/usr/local/opt/gnu-getopt/bin" >> $GITHUB_PATH
|
||||
echo "/opt/homebrew/opt/gnu-getopt/bin" >> $GITHUB_PATH
|
||||
|
||||
LLVM_VERSION=$1
|
||||
if [ ! -z "$LLVM_VERSION" ]; then
|
||||
if [ "$LLVM_VERSION" == "latest" ]; then
|
||||
brew install llvm
|
||||
brew install cppunit
|
||||
else
|
||||
brew install llvm@$LLVM_VERSION
|
||||
brew install cppunit
|
||||
fi
|
||||
fi
|
||||
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Download and install deps from homebrew on macos
|
||||
|
||||
LLVM_VERSION=$1
|
||||
if [ -z $LLVM_VERSION ]; then
|
||||
echo "No LLVM version provided for LLVM installation"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
brew update
|
||||
brew install bash gnu-getopt # for CI scripts
|
||||
brew install cmake
|
||||
brew install boost
|
||||
brew install cppunit
|
||||
brew install c-blosc
|
||||
brew install tbb@2020
|
||||
brew install llvm@$LLVM_VERSION
|
||||
brew install zlib
|
||||
|
||||
# Export TBB paths which are no longer installed to /usr/local (as v2020 is deprecated)
|
||||
echo "TBB_ROOT=/usr/local/opt/tbb@2020" >> $GITHUB_ENV
|
||||
echo "/usr/local/opt/tbb@2020/bin" >> $GITHUB_PATH
|
||||
|
||||
# use gnu-getopt
|
||||
echo "/usr/local/opt/gnu-getopt/bin" >> $GITHUB_PATH
|
||||
@@ -1,30 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -ex
|
||||
|
||||
PYBIND11_VERSION="$1"
|
||||
INSTALL_ROOT="$2"
|
||||
CMAKE_EXTRA=()
|
||||
if [ ! -z "${INSTALL_ROOT}" ]; then
|
||||
CMAKE_EXTRA+=("-DCMAKE_INSTALL_PREFIX=${INSTALL_ROOT}")
|
||||
fi
|
||||
|
||||
git clone --recurse-submodules https://github.com/wjakob/nanobind.git
|
||||
cd nanobind
|
||||
|
||||
if [ "$PYBIND11_VERSION" != "latest" ]; then
|
||||
git checkout tags/v${PYBIND11_VERSION} -b v${PYBIND11_VERSION}
|
||||
fi
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake \
|
||||
-DNB_TEST=OFF \
|
||||
"${CMAKE_EXTRA[@]}" \
|
||||
..
|
||||
|
||||
make -j8
|
||||
sudo make install
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -x
|
||||
|
||||
brew update
|
||||
brew install tbb
|
||||
@@ -1,40 +0,0 @@
|
||||
# Enable verbose and stop on error
|
||||
$ErrorActionPreference = "Stop"
|
||||
$VerbosePreference = "Continue"
|
||||
|
||||
# Required dependencies
|
||||
$vcpkgPackages = @(
|
||||
"zlib",
|
||||
"libpng",
|
||||
"openexr",
|
||||
"tbb",
|
||||
"gtest",
|
||||
"cppunit",
|
||||
"blosc",
|
||||
"glfw3",
|
||||
"glew",
|
||||
"python3",
|
||||
"jemalloc",
|
||||
"boost-iostreams",
|
||||
"boost-interprocess",
|
||||
"boost-algorithm",
|
||||
"nanobind"
|
||||
)
|
||||
|
||||
# Update vcpkg
|
||||
vcpkg update
|
||||
|
||||
# Allow the vcpkg command to fail once so we can retry with the latest
|
||||
try {
|
||||
vcpkg install $vcpkgPackages
|
||||
} catch {
|
||||
Write-Host "vcpkg install failed, retrying with latest ports..."
|
||||
# Retry the installation with updated ports
|
||||
Push-Location $env:VCPKG_INSTALLATION_ROOT
|
||||
git pull
|
||||
Pop-Location
|
||||
vcpkg update
|
||||
vcpkg install $vcpkgPackages
|
||||
}
|
||||
|
||||
Write-Host "vcpkg install completed successfully"
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
vcpkg update
|
||||
vcpkg install zlib libpng openexr tbb gtest blosc glfw3 glew \
|
||||
boost-iostreams boost-any boost-uuid boost-interprocess boost-algorithm
|
||||
@@ -25,14 +25,11 @@ $CUDA_KNOWN_URLS = @{
|
||||
"11.2.0" = "https://developer.download.nvidia.com/compute/cuda/11.2.0/network_installers/cuda_11.2.0_win10_network.exe";
|
||||
"11.2.1" = "https://developer.download.nvidia.com/compute/cuda/11.2.1/network_installers/cuda_11.2.1_win10_network.exe";
|
||||
"11.2.2" = "https://developer.download.nvidia.com/compute/cuda/11.2.2/network_installers/cuda_11.2.2_win10_network.exe";
|
||||
"11.3.0" = "https://developer.download.nvidia.com/compute/cuda/11.3.0/network_installers/cuda_11.3.0_win10_network.exe";
|
||||
"11.6.2" = "https://developer.download.nvidia.com/compute/cuda/11.6.2/network_installers/cuda_11.6.2_windows_network.exe";
|
||||
"12.4.0" = "https://developer.download.nvidia.com/compute/cuda/12.4.0/network_installers/cuda_12.4.0_windows_network.exe"
|
||||
"11.3.0" = "https://developer.download.nvidia.com/compute/cuda/11.3.0/network_installers/cuda_11.3.0_win10_network.exe"
|
||||
}
|
||||
|
||||
# @todo - change this to be based on _MSC_VER intead, or invert it to be CUDA keyed instead?
|
||||
$VISUAL_STUDIO_MIN_CUDA = @{
|
||||
"2022" = "12.4";
|
||||
"2019" = "10.1";
|
||||
"2017" = "10.0"; # Depends on which version of 2017! 9.0 to 10.0 depending on version
|
||||
"2015" = "8.0"; # might support older, unsure.
|
||||
@@ -46,7 +43,6 @@ $CUDA_PACKAGES_IN = @(
|
||||
"curand_dev";
|
||||
"nvrtc_dev";
|
||||
"cudart";
|
||||
"thrust";
|
||||
)
|
||||
|
||||
|
||||
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
set -e
|
||||
|
||||
# Various tests to test the FindOpenVDB CMake modules and
|
||||
@@ -10,7 +8,7 @@ set -e
|
||||
# the expected VDB installation
|
||||
|
||||
cmakelists="
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
project(TestInstall LANGUAGES CXX)
|
||||
find_package(OpenVDB REQUIRED COMPONENTS openvdb)
|
||||
add_executable(test_vdb_print \"../openvdb_cmd/vdb_print/main.cc\")
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -ex
|
||||
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors
|
||||
|
||||
set(CPM_DOWNLOAD_VERSION 0.40.2)
|
||||
set(CPM_HASH_SUM "c8cdc32c03816538ce22781ed72964dc864b2a34a310d3b7104812a5ca2d835d")
|
||||
|
||||
if(CPM_SOURCE_CACHE)
|
||||
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
||||
elseif(DEFINED ENV{CPM_SOURCE_CACHE})
|
||||
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
||||
else()
|
||||
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
||||
endif()
|
||||
|
||||
# Expand relative path. This is important if the provided path contains a tilde (~)
|
||||
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)
|
||||
|
||||
file(DOWNLOAD
|
||||
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
|
||||
${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM}
|
||||
)
|
||||
|
||||
include(${CPM_DOWNLOAD_LOCATION})
|
||||
+24
-70
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
#[=======================================================================[.rst:
|
||||
|
||||
@@ -88,7 +88,7 @@ may be provided to tell this module where to look.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
mark_as_advanced(
|
||||
@@ -188,6 +188,20 @@ list(APPEND _BLOSC_LIBRARYDIR_SEARCH_DIRS
|
||||
${SYSTEM_LIBRARY_PATHS}
|
||||
)
|
||||
|
||||
# Library suffix handling
|
||||
|
||||
set(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
|
||||
if(MSVC)
|
||||
if(BLOSC_USE_STATIC_LIBS)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
|
||||
endif()
|
||||
else()
|
||||
if(BLOSC_USE_STATIC_LIBS)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(Blosc_LIB_COMPONENTS "")
|
||||
# NOTE: Search for debug version first (see vcpkg hack)
|
||||
list(APPEND BLOSC_BUILD_TYPES DEBUG RELEASE)
|
||||
@@ -230,6 +244,11 @@ foreach(BUILD_TYPE ${BLOSC_BUILD_TYPES})
|
||||
set(CMAKE_IGNORE_PATH ${_BLOSC_CMAKE_IGNORE_PATH})
|
||||
endforeach()
|
||||
|
||||
# Reset library suffix
|
||||
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
unset(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
|
||||
|
||||
if(Blosc_LIBRARY_DEBUG AND Blosc_LIBRARY_RELEASE)
|
||||
# if the generator is multi-config or if CMAKE_BUILD_TYPE is set for
|
||||
# single-config generators, set optimized and debug libraries
|
||||
@@ -357,74 +376,9 @@ if(NOT TARGET Blosc::blosc)
|
||||
set_target_properties(Blosc::blosc PROPERTIES
|
||||
INTERFACE_LINK_DIRECTORIES
|
||||
"\$<\$<CONFIG:Release>:${Blosc_RELEASE_LIBRARY_DIRS}>;\$<\$<CONFIG:Debug>:${Blosc_DEBUG_LIBRARY_DIRS}>")
|
||||
|
||||
set(BLOSC_EXTERNAL_LIBRARIES lz4 snappy zlib zstd)
|
||||
|
||||
foreach(BLOSC_EXTERNAL_LIB ${BLOSC_EXTERNAL_LIBRARIES})
|
||||
|
||||
foreach(BUILD_TYPE ${BLOSC_BUILD_TYPES})
|
||||
set(_BLOSC_CMAKE_IGNORE_PATH ${CMAKE_IGNORE_PATH})
|
||||
|
||||
if(VCPKG_TOOLCHAIN)
|
||||
if(BUILD_TYPE STREQUAL RELEASE)
|
||||
list(APPEND CMAKE_IGNORE_PATH ${Blosc_DEBUG_LIBRARY_DIRS})
|
||||
else()
|
||||
list(APPEND CMAKE_IGNORE_PATH ${Blosc_RELEASE_LIBRARY_DIRS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_library(${BLOSC_EXTERNAL_LIB}_LIBRARY_${BUILD_TYPE} ${BLOSC_EXTERNAL_LIB}
|
||||
${_FIND_BLOSC_ADDITIONAL_OPTIONS}
|
||||
PATHS ${_BLOSC_LIBRARYDIR_SEARCH_DIRS}
|
||||
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib)
|
||||
|
||||
if(NOT ${BLOSC_EXTERNAL_LIB}_LIBRARY_${BUILD_TYPE})
|
||||
if(BUILD_TYPE STREQUAL DEBUG)
|
||||
find_library(${BLOSC_EXTERNAL_LIB}_LIBRARY_${BUILD_TYPE} "${BLOSC_EXTERNAL_LIB}d"
|
||||
${_FIND_BLOSC_ADDITIONAL_OPTIONS}
|
||||
PATHS ${_BLOSC_LIBRARYDIR_SEARCH_DIRS}
|
||||
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_IGNORE_PATH ${_BLOSC_CMAKE_IGNORE_PATH})
|
||||
endforeach()
|
||||
|
||||
if(${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG AND ${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE)
|
||||
# if the generator is multi-config or if CMAKE_BUILD_TYPE is set for
|
||||
# single-config generators, set optimized and debug libraries
|
||||
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
if(_isMultiConfig OR CMAKE_BUILD_TYPE)
|
||||
set(${BLOSC_EXTERNAL_LIB}_LIBRARY optimized ${${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE} debug ${${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG})
|
||||
else()
|
||||
# For single-config generators where CMAKE_BUILD_TYPE has no value,
|
||||
# just use the release libraries
|
||||
set(${BLOSC_EXTERNAL_LIB}_LIBRARY ${${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE})
|
||||
endif()
|
||||
# FIXME: This probably should be set for both cases
|
||||
set(${BLOSC_EXTERNAL_LIB}_LIBRARIES optimized ${${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE} debug ${${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG})
|
||||
endif()
|
||||
|
||||
# if only the release version was found, set the debug variable also to the release version
|
||||
if(${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE AND NOT ${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG)
|
||||
set(${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG ${${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE})
|
||||
set(${BLOSC_EXTERNAL_LIB}_LIBRARY ${${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE})
|
||||
set(${BLOSC_EXTERNAL_LIB}_LIBRARIES ${${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE})
|
||||
endif()
|
||||
|
||||
# if only the debug version was found, set the release variable also to the debug version
|
||||
if(${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG AND NOT ${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE)
|
||||
set(${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE ${${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG})
|
||||
set(${BLOSC_EXTERNAL_LIB}_LIBRARY ${${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG})
|
||||
set(${BLOSC_EXTERNAL_LIB}_LIBRARIES ${${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG})
|
||||
endif()
|
||||
|
||||
target_link_libraries(Blosc::blosc INTERFACE
|
||||
$<$<CONFIG:Release>:${${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE}>
|
||||
$<$<CONFIG:Debug>:${${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG}>)
|
||||
|
||||
endforeach()
|
||||
target_link_libraries(Blosc::blosc INTERFACE
|
||||
$<$<CONFIG:Release>:lz4;snappy;zlib;zstd>
|
||||
$<$<CONFIG:Debug>:lz4d;snappyd;zlibd;zstd>)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
#[=======================================================================[.rst:
|
||||
|
||||
@@ -83,7 +83,7 @@ may be provided to tell this module where to look.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,447 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
#[=======================================================================[.rst:
|
||||
|
||||
FindIlmBase
|
||||
-----------
|
||||
|
||||
Find IlmBase include dirs and libraries
|
||||
|
||||
Use this module by invoking find_package with the form::
|
||||
|
||||
find_package(IlmBase
|
||||
[version] [EXACT] # Minimum or EXACT version
|
||||
[REQUIRED] # Fail with error if IlmBase is not found
|
||||
[COMPONENTS <libs>...] # IlmBase libraries by their canonical name
|
||||
# e.g. "Half" for "libHalf"
|
||||
)
|
||||
|
||||
IMPORTED Targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
``IlmBase::Half``
|
||||
The Half library target.
|
||||
``IlmBase::Iex``
|
||||
The Iex library target.
|
||||
``IlmBase::IexMath``
|
||||
The IexMath library target.
|
||||
``IlmBase::IlmThread``
|
||||
The IlmThread library target.
|
||||
``IlmBase::Imath``
|
||||
The Imath library target.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This will define the following variables:
|
||||
|
||||
``IlmBase_FOUND``
|
||||
True if the system has the IlmBase library.
|
||||
``IlmBase_VERSION``
|
||||
The version of the IlmBase library which was found.
|
||||
``IlmBase_INCLUDE_DIRS``
|
||||
Include directories needed to use IlmBase.
|
||||
``IlmBase_RELEASE_LIBRARIES``
|
||||
Libraries needed to link to the release version of IlmBase.
|
||||
``IlmBase_RELEASE_LIBRARY_DIRS``
|
||||
IlmBase release library directories.
|
||||
``IlmBase_DEBUG_LIBRARIES``
|
||||
Libraries needed to link to the debug version of IlmBase.
|
||||
``IlmBase_DEBUG_LIBRARY_DIRS``
|
||||
IlmBase debug library directories.
|
||||
``IlmBase_{COMPONENT}_FOUND``
|
||||
True if the system has the named IlmBase component.
|
||||
|
||||
Deprecated - use [RELEASE|DEBUG] variants:
|
||||
|
||||
``IlmBase_LIBRARIES``
|
||||
Libraries needed to link to IlmBase.
|
||||
``IlmBase_LIBRARY_DIRS``
|
||||
IlmBase library directories.
|
||||
|
||||
Cache Variables
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The following cache variables may also be set:
|
||||
|
||||
``IlmBase_INCLUDE_DIR``
|
||||
The directory containing ``IlmBase/config-auto.h``.
|
||||
``IlmBase_{COMPONENT}_LIBRARY``
|
||||
Individual component libraries for IlmBase. may include target_link_libraries() debug/optimized keywords.
|
||||
``IlmBase_{COMPONENT}_LIBRARY_RELEASE``
|
||||
Individual component libraries for IlmBase release
|
||||
``IlmBase_{COMPONENT}_LIBRARY_DEBUG``
|
||||
Individual component libraries for IlmBase debug
|
||||
|
||||
Hints
|
||||
^^^^^
|
||||
|
||||
Instead of explicitly setting the cache variables, the following variables
|
||||
may be provided to tell this module where to look.
|
||||
|
||||
``IlmBase_ROOT``
|
||||
Preferred installation prefix.
|
||||
``ILMBASE_INCLUDEDIR``
|
||||
Preferred include directory e.g. <prefix>/include
|
||||
``ILMBASE_LIBRARYDIR``
|
||||
Preferred library directory e.g. <prefix>/lib
|
||||
``ILMBASE_DEBUG_SUFFIX``
|
||||
Suffix of the debug version of ilmbase libs. Defaults to "_d".
|
||||
``SYSTEM_LIBRARY_PATHS``
|
||||
Global list of library paths intended to be searched by and find_xxx call
|
||||
``ILMBASE_USE_STATIC_LIBS``
|
||||
Only search for static ilmbase libraries
|
||||
``DISABLE_CMAKE_SEARCH_PATHS``
|
||||
Disable CMakes default search paths for find_xxx calls in this module
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
||||
mark_as_advanced(
|
||||
IlmBase_INCLUDE_DIR
|
||||
IlmBase_LIBRARY
|
||||
)
|
||||
|
||||
set(_FIND_ILMBASE_ADDITIONAL_OPTIONS "")
|
||||
if(DISABLE_CMAKE_SEARCH_PATHS)
|
||||
set(_FIND_ILMBASE_ADDITIONAL_OPTIONS NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
set(_ILMBASE_COMPONENT_LIST
|
||||
Half
|
||||
Iex
|
||||
IexMath
|
||||
IlmThread
|
||||
Imath
|
||||
)
|
||||
|
||||
if(IlmBase_FIND_COMPONENTS)
|
||||
set(ILMBASE_COMPONENTS_PROVIDED TRUE)
|
||||
set(_IGNORED_COMPONENTS "")
|
||||
foreach(COMPONENT ${IlmBase_FIND_COMPONENTS})
|
||||
if(NOT ${COMPONENT} IN_LIST _ILMBASE_COMPONENT_LIST)
|
||||
list(APPEND _IGNORED_COMPONENTS ${COMPONENT})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(_IGNORED_COMPONENTS)
|
||||
message(STATUS "Ignoring unknown components of IlmBase:")
|
||||
foreach(COMPONENT ${_IGNORED_COMPONENTS})
|
||||
message(STATUS " ${COMPONENT}")
|
||||
endforeach()
|
||||
list(REMOVE_ITEM IlmBase_FIND_COMPONENTS ${_IGNORED_COMPONENTS})
|
||||
endif()
|
||||
else()
|
||||
set(ILMBASE_COMPONENTS_PROVIDED FALSE)
|
||||
set(IlmBase_FIND_COMPONENTS ${_ILMBASE_COMPONENT_LIST})
|
||||
endif()
|
||||
|
||||
# Set _ILMBASE_ROOT based on a user provided root var. Xxx_ROOT and ENV{Xxx_ROOT}
|
||||
# are prioritised over the legacy capitalized XXX_ROOT variables for matching
|
||||
# CMake 3.12 behaviour
|
||||
# @todo deprecate -D and ENV ILMBASE_ROOT from CMake 3.12
|
||||
if(IlmBase_ROOT)
|
||||
set(_ILMBASE_ROOT ${IlmBase_ROOT})
|
||||
elseif(DEFINED ENV{IlmBase_ROOT})
|
||||
set(_ILMBASE_ROOT $ENV{IlmBase_ROOT})
|
||||
elseif(ILMBASE_ROOT)
|
||||
set(_ILMBASE_ROOT ${ILMBASE_ROOT})
|
||||
elseif(DEFINED ENV{ILMBASE_ROOT})
|
||||
set(_ILMBASE_ROOT $ENV{ILMBASE_ROOT})
|
||||
endif()
|
||||
|
||||
# Additionally try and use pkconfig to find IlmBase
|
||||
if(USE_PKGCONFIG)
|
||||
if(NOT DEFINED PKG_CONFIG_FOUND)
|
||||
find_package(PkgConfig)
|
||||
endif()
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_IlmBase QUIET ilmbase)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Search for IlmBase include DIR
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
set(_ILMBASE_INCLUDE_SEARCH_DIRS "")
|
||||
list(APPEND _ILMBASE_INCLUDE_SEARCH_DIRS
|
||||
${ILMBASE_INCLUDEDIR}
|
||||
${_ILMBASE_ROOT}
|
||||
${PC_IlmBase_INCLUDEDIR}
|
||||
${SYSTEM_LIBRARY_PATHS}
|
||||
)
|
||||
|
||||
# Look for a standard IlmBase header file.
|
||||
find_path(IlmBase_INCLUDE_DIR IlmBaseConfig.h
|
||||
${_FIND_ILMBASE_ADDITIONAL_OPTIONS}
|
||||
PATHS ${_ILMBASE_INCLUDE_SEARCH_DIRS}
|
||||
PATH_SUFFIXES ${CMAKE_INSTALL_INCLUDEDIR}/OpenEXR include/OpenEXR OpenEXR
|
||||
)
|
||||
|
||||
if(EXISTS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h")
|
||||
# Get the ILMBASE version information from the config header
|
||||
file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h"
|
||||
_ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR "
|
||||
)
|
||||
string(REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" ""
|
||||
_ilmbase_version_major_string "${_ilmbase_version_major_string}"
|
||||
)
|
||||
string(STRIP "${_ilmbase_version_major_string}" IlmBase_VERSION_MAJOR)
|
||||
|
||||
file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h"
|
||||
_ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR "
|
||||
)
|
||||
string(REGEX REPLACE "#define ILMBASE_VERSION_MINOR" ""
|
||||
_ilmbase_version_minor_string "${_ilmbase_version_minor_string}"
|
||||
)
|
||||
string(STRIP "${_ilmbase_version_minor_string}" IlmBase_VERSION_MINOR)
|
||||
|
||||
unset(_ilmbase_version_major_string)
|
||||
unset(_ilmbase_version_minor_string)
|
||||
|
||||
set(IlmBase_VERSION ${IlmBase_VERSION_MAJOR}.${IlmBase_VERSION_MINOR})
|
||||
endif()
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Search for ILMBASE lib DIR
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
if(NOT DEFINED ILMBASE_DEBUG_SUFFIX)
|
||||
set(ILMBASE_DEBUG_SUFFIX _d)
|
||||
endif()
|
||||
|
||||
set(_ILMBASE_LIBRARYDIR_SEARCH_DIRS "")
|
||||
|
||||
# Append to _ILMBASE_LIBRARYDIR_SEARCH_DIRS in priority order
|
||||
|
||||
list(APPEND _ILMBASE_LIBRARYDIR_SEARCH_DIRS
|
||||
${ILMBASE_LIBRARYDIR}
|
||||
${_ILMBASE_ROOT}
|
||||
${PC_IlmBase_LIBDIR}
|
||||
${SYSTEM_LIBRARY_PATHS}
|
||||
)
|
||||
|
||||
set(IlmBase_LIB_COMPONENTS "")
|
||||
list(APPEND ILM_BUILD_TYPES RELEASE DEBUG)
|
||||
|
||||
foreach(COMPONENT ${IlmBase_FIND_COMPONENTS})
|
||||
foreach(BUILD_TYPE ${ILM_BUILD_TYPES})
|
||||
|
||||
set(_TMP_SUFFIX "")
|
||||
if(BUILD_TYPE STREQUAL DEBUG)
|
||||
set(_TMP_SUFFIX ${ILMBASE_DEBUG_SUFFIX})
|
||||
endif()
|
||||
|
||||
set(_IlmBase_Version_Suffix "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}")
|
||||
set(_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
|
||||
if(WIN32)
|
||||
if(ILMBASE_USE_STATIC_LIBS)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES "${_TMP_SUFFIX}.lib")
|
||||
endif()
|
||||
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "${_IlmBase_Version_Suffix}${_TMP_SUFFIX}.lib")
|
||||
else()
|
||||
if(ILMBASE_USE_STATIC_LIBS)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES "${_TMP_SUFFIX}.a")
|
||||
else()
|
||||
if(APPLE)
|
||||
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "${_IlmBase_Version_Suffix}${_TMP_SUFFIX}.dylib")
|
||||
else()
|
||||
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "${_IlmBase_Version_Suffix}${_TMP_SUFFIX}.so")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "${_IlmBase_Version_Suffix}${_TMP_SUFFIX}.a")
|
||||
endif()
|
||||
|
||||
# Find the lib
|
||||
find_library(IlmBase_${COMPONENT}_LIBRARY_${BUILD_TYPE} ${COMPONENT}
|
||||
${_FIND_ILMBASE_ADDITIONAL_OPTIONS}
|
||||
PATHS ${_ILMBASE_LIBRARYDIR_SEARCH_DIRS}
|
||||
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib
|
||||
)
|
||||
|
||||
if(EXISTS ${IlmBase_${COMPONENT}_LIBRARY_${BUILD_TYPE}})
|
||||
list(APPEND IlmBase_LIB_COMPONENTS ${IlmBase_${COMPONENT}_LIBRARY_${BUILD_TYPE}})
|
||||
list(APPEND IlmBase_LIB_COMPONENTS_${BUILD_TYPE} ${IlmBase_${COMPONENT}_LIBRARY_${BUILD_TYPE}})
|
||||
endif()
|
||||
|
||||
# Reset library suffix
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
unset(_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
|
||||
unset(_IlmBase_Version_Suffix)
|
||||
unset(_TMP_SUFFIX)
|
||||
endforeach()
|
||||
|
||||
if(IlmBase_${COMPONENT}_LIBRARY_DEBUG AND IlmBase_${COMPONENT}_LIBRARY_RELEASE)
|
||||
# if the generator is multi-config or if CMAKE_BUILD_TYPE is set for
|
||||
# single-config generators, set optimized and debug libraries
|
||||
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
if(_isMultiConfig OR CMAKE_BUILD_TYPE)
|
||||
set(IlmBase_${COMPONENT}_LIBRARY optimized ${IlmBase_${COMPONENT}_LIBRARY_RELEASE} debug ${IlmBase_${COMPONENT}_LIBRARY_DEBUG})
|
||||
else()
|
||||
# For single-config generators where CMAKE_BUILD_TYPE has no value,
|
||||
# just use the release libraries
|
||||
set(IlmBase_${COMPONENT}_LIBRARY ${IlmBase_${COMPONENT}_LIBRARY_RELEASE})
|
||||
endif()
|
||||
# FIXME: This probably should be set for both cases
|
||||
set(IlmBase_${COMPONENT}_LIBRARIES optimized ${IlmBase_${COMPONENT}_LIBRARY_RELEASE} debug ${IlmBase_${COMPONENT}_LIBRARY_DEBUG})
|
||||
endif()
|
||||
|
||||
# if only the release version was found, set the debug variable also to the release version
|
||||
if(IlmBase_${COMPONENT}_LIBRARY_RELEASE AND NOT IlmBase_${COMPONENT}_LIBRARY_DEBUG)
|
||||
set(IlmBase_${COMPONENT}_LIBRARY_DEBUG ${IlmBase_${COMPONENT}_LIBRARY_RELEASE})
|
||||
set(IlmBase_${COMPONENT}_LIBRARY ${IlmBase_${COMPONENT}_LIBRARY_RELEASE})
|
||||
set(IlmBase_${COMPONENT}_LIBRARIES ${IlmBase_${COMPONENT}_LIBRARY_RELEASE})
|
||||
endif()
|
||||
|
||||
# if only the debug version was found, set the release variable also to the debug version
|
||||
if(IlmBase_${COMPONENT}_LIBRARY_DEBUG AND NOT IlmBase_${COMPONENT}_LIBRARY_RELEASE)
|
||||
set(IlmBase_${COMPONENT}_LIBRARY_RELEASE ${IlmBase_${COMPONENT}_LIBRARY_DEBUG})
|
||||
set(IlmBase_${COMPONENT}_LIBRARY ${IlmBase_${COMPONENT}_LIBRARY_DEBUG})
|
||||
set(IlmBase_${COMPONENT}_LIBRARIES ${IlmBase_${COMPONENT}_LIBRARY_DEBUG})
|
||||
endif()
|
||||
|
||||
# If the debug & release library ends up being the same, omit the keywords
|
||||
if("${IlmBase_${COMPONENT}_LIBRARY_RELEASE}" STREQUAL "${IlmBase_${COMPONENT}_LIBRARY_DEBUG}")
|
||||
set(IlmBase_${COMPONENT}_LIBRARY ${IlmBase_${COMPONENT}_LIBRARY_RELEASE} )
|
||||
set(IlmBase_${COMPONENT}_LIBRARIES ${IlmBase_${COMPONENT}_LIBRARY_RELEASE} )
|
||||
endif()
|
||||
|
||||
if(IlmBase_${COMPONENT}_LIBRARY)
|
||||
set(IlmBase_${COMPONENT}_FOUND TRUE)
|
||||
else()
|
||||
set(IlmBase_${COMPONENT}_FOUND FALSE)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Cache and set ILMBASE_FOUND
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(IlmBase
|
||||
FOUND_VAR IlmBase_FOUND
|
||||
REQUIRED_VARS
|
||||
IlmBase_INCLUDE_DIR
|
||||
IlmBase_LIB_COMPONENTS
|
||||
VERSION_VAR IlmBase_VERSION
|
||||
HANDLE_COMPONENTS
|
||||
)
|
||||
|
||||
if(NOT IlmBase_FOUND)
|
||||
if(IlmBase_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Unable to find IlmBase")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Partition release/debug lib vars
|
||||
|
||||
set(IlmBase_RELEASE_LIBRARIES "")
|
||||
set(IlmBase_RELEASE_LIBRARY_DIRS "")
|
||||
set(IlmBase_DEBUG_LIBRARIES "")
|
||||
set(IlmBase_DEBUG_LIBRARY_DIRS "")
|
||||
foreach(LIB ${IlmBase_LIB_COMPONENTS_RELEASE})
|
||||
get_filename_component(_ILM_LIBDIR ${LIB} DIRECTORY)
|
||||
list(APPEND IlmBase_RELEASE_LIBRARIES ${LIB})
|
||||
list(APPEND IlmBase_RELEASE_LIBRARY_DIRS ${_ILM_LIBDIR})
|
||||
endforeach()
|
||||
|
||||
foreach(LIB ${IlmBase_LIB_COMPONENTS_DEBUG})
|
||||
get_filename_component(_ILM_LIBDIR ${LIB} DIRECTORY)
|
||||
list(APPEND IlmBase_DEBUG_LIBRARIES ${LIB})
|
||||
list(APPEND IlmBase_DEBUG_LIBRARY_DIRS ${_ILM_LIBDIR})
|
||||
endforeach()
|
||||
|
||||
list(REMOVE_DUPLICATES IlmBase_RELEASE_LIBRARY_DIRS)
|
||||
list(REMOVE_DUPLICATES IlmBase_DEBUG_LIBRARY_DIRS)
|
||||
|
||||
set(IlmBase_LIBRARIES ${IlmBase_RELEASE_LIBRARIES})
|
||||
set(IlmBase_LIBRARY_DIRS ${IlmBase_RELEASE_LIBRARY_DIRS})
|
||||
|
||||
# We have to add both include and include/OpenEXR to the include
|
||||
# path in case OpenEXR and IlmBase are installed separately.
|
||||
#
|
||||
# Make sure we get the absolute path to avoid issues where
|
||||
# /usr/include/OpenEXR/../ is picked up and passed to gcc from cmake
|
||||
# which won't correctly compute /usr/include as an implicit system
|
||||
# dir if the path is relative:
|
||||
#
|
||||
# https://github.com/AcademySoftwareFoundation/openvdb/issues/632
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129
|
||||
|
||||
set(_IlmBase_Parent_Dir "")
|
||||
get_filename_component(_IlmBase_Parent_Dir
|
||||
${IlmBase_INCLUDE_DIR}/../ ABSOLUTE)
|
||||
|
||||
set(IlmBase_INCLUDE_DIRS)
|
||||
list(APPEND IlmBase_INCLUDE_DIRS
|
||||
${_IlmBase_Parent_Dir}
|
||||
${IlmBase_INCLUDE_DIR}
|
||||
)
|
||||
unset(_IlmBase_Parent_Dir)
|
||||
|
||||
# Configure imported targets
|
||||
|
||||
foreach(COMPONENT ${IlmBase_FIND_COMPONENTS})
|
||||
# Configure lib type. If XXX_USE_STATIC_LIBS, we always assume a static
|
||||
# lib is in use. If win32, we can't mark the import .libs as shared, so
|
||||
# these are always marked as UNKNOWN. Otherwise, infer from extension.
|
||||
set(ILMBASE_${COMPONENT}_LIB_TYPE UNKNOWN)
|
||||
if(ILMBASE_USE_STATIC_LIBS)
|
||||
set(ILMBASE_${COMPONENT}_LIB_TYPE STATIC)
|
||||
elseif(UNIX)
|
||||
get_filename_component(_ILMBASE_${COMPONENT}_EXT ${IlmBase_${COMPONENT}_LIBRARY_RELEASE} EXT)
|
||||
if(${_ILMBASE_${COMPONENT}_EXT} STREQUAL ".a")
|
||||
set(ILMBASE_${COMPONENT}_LIB_TYPE STATIC)
|
||||
elseif(${_ILMBASE_${COMPONENT}_EXT} STREQUAL ".so" OR
|
||||
${_ILMBASE_${COMPONENT}_EXT} STREQUAL ".dylib")
|
||||
set(ILMBASE_${COMPONENT}_LIB_TYPE SHARED)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(IlmBase_${COMPONENT}_DEFINITIONS)
|
||||
|
||||
# Add the OPENEXR_DLL define if the library is not static on WIN32
|
||||
if(WIN32)
|
||||
if(NOT ILMBASE_${COMPONENT}_LIB_TYPE STREQUAL STATIC)
|
||||
list(APPEND IlmBase_${COMPONENT}_DEFINITIONS OPENEXR_DLL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT TARGET IlmBase::${COMPONENT})
|
||||
add_library(IlmBase::${COMPONENT} ${ILMBASE_${COMPONENT}_LIB_TYPE} IMPORTED)
|
||||
set_target_properties(IlmBase::${COMPONENT} PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_IlmBase_CFLAGS_OTHER}"
|
||||
INTERFACE_COMPILE_DEFINITIONS "${IlmBase_${COMPONENT}_DEFINITIONS}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${IlmBase_INCLUDE_DIRS}")
|
||||
|
||||
# Standard location
|
||||
set_target_properties(IlmBase::${COMPONENT} PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${IlmBase_${COMPONENT}_LIBRARY}")
|
||||
|
||||
# Release location
|
||||
if(EXISTS "${IlmBase_${COMPONENT}_LIBRARY_RELEASE}")
|
||||
set_property(TARGET IlmBase::${COMPONENT} APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(IlmBase::${COMPONENT} PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
|
||||
IMPORTED_LOCATION_RELEASE "${IlmBase_${COMPONENT}_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
|
||||
# Debug location
|
||||
if(EXISTS "${IlmBase_${COMPONENT}_LIBRARY_DEBUG}")
|
||||
set_property(TARGET IlmBase::${COMPONENT} APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG)
|
||||
set_target_properties(IlmBase::${COMPONENT} PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
|
||||
IMPORTED_LOCATION_DEBUG "${IlmBase_${COMPONENT}_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
#[=======================================================================[.rst:
|
||||
|
||||
@@ -64,7 +64,7 @@ may be provided to tell this module where to look.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
#[=======================================================================[.rst:
|
||||
|
||||
@@ -87,7 +87,7 @@ may be provided to tell this module where to look.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
include (FindPackageHandleStandardArgs)
|
||||
|
||||
if(NCCL_ROOT)
|
||||
set(_NCCL_ROOT ${NCCL_ROOT})
|
||||
elseif(DEFINED ENV{NCCL_ROOT})
|
||||
set(_NCCL_ROOT $ENV{NCCL_ROOT})
|
||||
endif()
|
||||
|
||||
set(_NCCL_INCLUDE_SEARCH_DIRS "")
|
||||
list(APPEND _NCCL_INCLUDE_SEARCH_DIRS
|
||||
${_NCCL_ROOT}/include
|
||||
)
|
||||
find_path(NCCL_INCLUDE_DIR
|
||||
NAMES nccl.h
|
||||
PATHS ${_NCCL_INCLUDE_SEARCH_DIRS}
|
||||
)
|
||||
|
||||
set(_NCCL_LIBRARY_SEARCH_DIRS "")
|
||||
list(APPEND _NCCL_LIBRARY_SEARCH_DIRS
|
||||
${_NCCL_ROOT}/bin
|
||||
)
|
||||
find_library(NCCL_LIBRARY
|
||||
NAMES nccl
|
||||
PATHS ${_NCCL_LIBRARY_SEARCH_DIRS}
|
||||
)
|
||||
|
||||
find_package_handle_standard_args(NCCL REQUIRED_VARS NCCL_INCLUDE_DIR NCCL_LIBRARY)
|
||||
|
||||
if (NCCL_FOUND)
|
||||
mark_as_advanced(NCCL_INCLUDE_DIR)
|
||||
mark_as_advanced(NCCL_LIBRARY)
|
||||
endif()
|
||||
|
||||
if (NCCL_FOUND AND NOT TARGET NCCL::NCCL)
|
||||
add_library(NCCL::NCCL SHARED IMPORTED)
|
||||
if(MSVC)
|
||||
string(REPLACE ".lib" ".dll" NCCL_DLL ${NCCL_LIBRARY})
|
||||
set_property(TARGET NCCL::NCCL PROPERTY IMPORTED_LOCATION ${NCCL_DLL})
|
||||
set_property(TARGET NCCL::NCCL PROPERTY IMPORTED_IMPLIB ${NCCL_LIBRARY})
|
||||
else()
|
||||
set_property(TARGET NCCL::NCCL PROPERTY IMPORTED_LOCATION ${NCCL_LIBRARY})
|
||||
endif()
|
||||
target_include_directories(NCCL::NCCL INTERFACE ${NCCL_INCLUDE_DIR})
|
||||
endif()
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
#[=======================================================================[.rst:
|
||||
|
||||
@@ -93,7 +93,7 @@ may be provided to tell this module where to look.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
||||
|
||||
+61
-32
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
#[=======================================================================[.rst:
|
||||
|
||||
@@ -64,8 +64,6 @@ This will define the following variables:
|
||||
True if the OpenVDB Library has been built with log4cplus support
|
||||
``OpenVDB_USES_IMATH_HALF``
|
||||
True if the OpenVDB Library has been built with Imath half support
|
||||
``OpenVDB_USES_DELAYED_LOADING``
|
||||
True if the OpenVDB Library has been built with delayed-loading
|
||||
``OpenVDB_ABI``
|
||||
Set if this module was able to determine the ABI number the located
|
||||
OpenVDB Library was built against. Unset otherwise.
|
||||
@@ -109,7 +107,7 @@ may be provided to tell this module where to look.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
||||
@@ -334,8 +332,10 @@ set(_OPENVDB_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
|
||||
set(OPENVDB_PYTHON_PATH_SUFFIXES
|
||||
lib64/python
|
||||
lib64/python2.7
|
||||
lib64/python3
|
||||
lib/python
|
||||
lib/python2.7
|
||||
lib/python3
|
||||
)
|
||||
|
||||
@@ -392,9 +392,6 @@ foreach(COMPONENT ${OpenVDB_FIND_COMPONENTS})
|
||||
elseif(${COMPONENT} STREQUAL "openvdb_je")
|
||||
# alias to the result of openvdb which should be handled first
|
||||
set(OpenVDB_${COMPONENT}_LIBRARY ${OpenVDB_openvdb_LIBRARY})
|
||||
elseif(${COMPONENT} STREQUAL "nanovdb")
|
||||
# alias to the result of openvdb which should be handled first
|
||||
set(OpenVDB_${COMPONENT}_LIBRARY ${OpenVDB_openvdb_LIBRARY})
|
||||
else()
|
||||
find_library(OpenVDB_${COMPONENT}_LIBRARY ${LIB_NAME}
|
||||
${_FIND_OPENVDB_ADDITIONAL_OPTIONS}
|
||||
@@ -490,10 +487,46 @@ endif()
|
||||
|
||||
find_package(TBB REQUIRED COMPONENTS tbb)
|
||||
|
||||
if(NOT OPENVDB_USE_STATIC_LIBS AND NOT Boost_USE_STATIC_LIBS)
|
||||
# @note Both of these must be set for Boost 1.70 (VFX2020) to link against
|
||||
# boost shared libraries (more specifically libraries built with -fPIC).
|
||||
# http://boost.2283326.n4.nabble.com/CMake-config-scripts-broken-in-1-70-td4708957.html
|
||||
# https://github.com/boostorg/boost_install/commit/160c7cb2b2c720e74463865ef0454d4c4cd9ae7c
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
set(Boost_USE_STATIC_LIBS OFF)
|
||||
endif()
|
||||
|
||||
find_package(Boost REQUIRED COMPONENTS iostreams)
|
||||
|
||||
# Add deps for pyopenvdb
|
||||
# @todo track for numpy
|
||||
|
||||
if(pyopenvdb IN_LIST OpenVDB_FIND_COMPONENTS)
|
||||
find_package(Python REQUIRED)
|
||||
|
||||
# Boost python handling - try and find both python and pythonXx (version suffixed).
|
||||
# Prioritize the version suffixed library, failing if neither exist.
|
||||
|
||||
find_package(Boost ${MINIMUM_BOOST_VERSION}
|
||||
QUIET COMPONENTS python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}
|
||||
)
|
||||
|
||||
if(TARGET Boost::python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
|
||||
set(BOOST_PYTHON_LIB "python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
|
||||
message(STATUS "Found boost_python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
|
||||
else()
|
||||
find_package(Boost ${MINIMUM_BOOST_VERSION} QUIET COMPONENTS python)
|
||||
if(TARGET Boost::python)
|
||||
set(BOOST_PYTHON_LIB "python")
|
||||
message(STATUS "Found non-suffixed boost_python, assuming to be python version "
|
||||
"\"${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}\" compatible"
|
||||
)
|
||||
else()
|
||||
message(FATAL_ERROR "Unable to find boost_python or "
|
||||
"boost_python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}."
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Add deps for openvdb_ax
|
||||
@@ -522,7 +555,6 @@ set(OpenVDB_USES_BLOSC ${USE_BLOSC})
|
||||
set(OpenVDB_USES_ZLIB ${USE_ZLIB})
|
||||
set(OpenVDB_USES_LOG4CPLUS ${USE_LOG4CPLUS})
|
||||
set(OpenVDB_USES_IMATH_HALF ${USE_IMATH_HALF})
|
||||
set(OpenVDB_USES_DELAYED_LOADING ${OPENVDB_USE_DELAYED_LOADING})
|
||||
set(OpenVDB_DEFINITIONS)
|
||||
|
||||
if(WIN32)
|
||||
@@ -555,7 +587,6 @@ if(_OPENVDB_HAS_NEW_VERSION_HEADER)
|
||||
OPENVDB_GET_VERSION_DEFINE(${_OPENVDB_VERSION_HEADER} "OPENVDB_USE_IMATH_HALF" OpenVDB_USES_IMATH_HALF)
|
||||
OPENVDB_GET_VERSION_DEFINE(${_OPENVDB_VERSION_HEADER} "OPENVDB_USE_BLOSC" OpenVDB_USES_BLOSC)
|
||||
OPENVDB_GET_VERSION_DEFINE(${_OPENVDB_VERSION_HEADER} "OPENVDB_USE_ZLIB" OpenVDB_USES_ZLIB)
|
||||
OPENVDB_GET_VERSION_DEFINE(${_OPENVDB_VERSION_HEADER} "OPENVDB_USE_DELAYED_LOADING" OpenVDB_USES_DELAYED_LOADING)
|
||||
elseif(NOT OPENVDB_USE_STATIC_LIBS)
|
||||
# Use GetPrerequisites to see which libraries this OpenVDB lib has linked to
|
||||
# which we can query for optional deps. This basically runs ldd/otoll/objdump
|
||||
@@ -602,11 +633,6 @@ elseif(NOT OPENVDB_USE_STATIC_LIBS)
|
||||
if(NOT ${_HAS_DEP} EQUAL -1)
|
||||
set(OpenVDB_USES_IMATH_HALF ON)
|
||||
endif()
|
||||
|
||||
string(FIND ${PREREQUISITE} "boost_iostreams" _HAS_DEP)
|
||||
if(NOT ${_HAS_DEP} EQUAL -1)
|
||||
set(OpenVDB_USES_DELAYED_LOADING ON)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
unset(_OPENVDB_PREREQUISITE_LIST)
|
||||
@@ -625,11 +651,19 @@ if(OpenVDB_USES_LOG4CPLUS)
|
||||
endif()
|
||||
|
||||
if(OpenVDB_USES_IMATH_HALF)
|
||||
find_package(Imath REQUIRED CONFIG)
|
||||
endif()
|
||||
find_package(Imath CONFIG)
|
||||
if (NOT TARGET Imath::Imath)
|
||||
find_package(IlmBase REQUIRED COMPONENTS Half)
|
||||
endif()
|
||||
|
||||
if(OpenVDB_USES_DELAYED_LOADING)
|
||||
find_package(Boost REQUIRED COMPONENTS iostreams)
|
||||
if(WIN32)
|
||||
# @note OPENVDB_OPENEXR_STATICLIB is old functionality and should be removed
|
||||
if(OPENEXR_USE_STATIC_LIBS OR
|
||||
("${ILMBASE_LIB_TYPE}" STREQUAL "STATIC_LIBRARY") OR
|
||||
("${IMATH_LIB_TYPE}" STREQUAL "STATIC_LIBRARY"))
|
||||
list(APPEND OpenVDB_DEFINITIONS OPENVDB_OPENEXR_STATICLIB)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
@@ -637,19 +671,14 @@ if(UNIX)
|
||||
endif()
|
||||
|
||||
# Set deps. Note that the order here is important. If we're building against
|
||||
# Houdini we must include Imath deps first to ensure the users chosen
|
||||
# Houdini 17.5 we must include IlmBase deps first to ensure the users chosen
|
||||
# namespaced headers are correctly prioritized. Otherwise other include paths
|
||||
# from shared installs (including houdini) may pull in the wrong headers
|
||||
|
||||
set(_OPENVDB_VISIBLE_DEPENDENCIES "")
|
||||
|
||||
if(OpenVDB_USES_DELAYED_LOADING)
|
||||
list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES Boost::iostreams)
|
||||
list(APPEND OpenVDB_DEFINITIONS OPENVDB_USE_DELAYED_LOADING)
|
||||
endif()
|
||||
set(_OPENVDB_VISIBLE_DEPENDENCIES Boost::iostreams)
|
||||
|
||||
if(OpenVDB_USES_IMATH_HALF)
|
||||
list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES Imath::Imath)
|
||||
list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES $<TARGET_NAME_IF_EXISTS:IlmBase::Half> $<TARGET_NAME_IF_EXISTS:Imath::Imath>)
|
||||
endif()
|
||||
|
||||
if(OpenVDB_USES_LOG4CPLUS)
|
||||
@@ -720,7 +749,7 @@ if(NOT TARGET OpenVDB::openvdb)
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OpenVDB_INCLUDE_DIR}"
|
||||
IMPORTED_LINK_DEPENDENT_LIBRARIES "${_OPENVDB_HIDDEN_DEPENDENCIES}" # non visible deps
|
||||
INTERFACE_LINK_LIBRARIES "${_OPENVDB_VISIBLE_DEPENDENCIES}" # visible deps (headers)
|
||||
INTERFACE_COMPILE_FEATURES cxx_std_17
|
||||
INTERFACE_COMPILE_FEATURES cxx_std_14
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -742,8 +771,8 @@ if(OpenVDB_pyopenvdb_LIBRARY)
|
||||
set_target_properties(OpenVDB::pyopenvdb PROPERTIES
|
||||
IMPORTED_LOCATION "${OpenVDB_pyopenvdb_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OpenVDB_pyopenvdb_INCLUDE_DIR};${PYTHON_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES "OpenVDB::openvdb;${PYTHON_LIBRARIES}"
|
||||
INTERFACE_COMPILE_FEATURES cxx_std_17
|
||||
INTERFACE_LINK_LIBRARIES "OpenVDB::openvdb;Boost::${BOOST_PYTHON_LIB};${PYTHON_LIBRARIES}"
|
||||
INTERFACE_COMPILE_FEATURES cxx_std_14
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -757,7 +786,7 @@ if(OpenVDB_openvdb_houdini_LIBRARY)
|
||||
IMPORTED_LOCATION "${OpenVDB_openvdb_houdini_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OpenVDB_openvdb_houdini_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES "OpenVDB::openvdb;Houdini"
|
||||
INTERFACE_COMPILE_FEATURES cxx_std_17
|
||||
INTERFACE_COMPILE_FEATURES cxx_std_14
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -787,7 +816,7 @@ if(OpenVDB_openvdb_ax_LIBRARY)
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OpenVDB_openvdb_ax_INCLUDE_DIR}"
|
||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${LLVM_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "OpenVDB::openvdb;${LLVM_LIBS}"
|
||||
INTERFACE_COMPILE_FEATURES cxx_std_17
|
||||
INTERFACE_COMPILE_FEATURES cxx_std_14
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -801,7 +830,7 @@ if(OpenVDB_nanovdb_LIBRARY)
|
||||
IMPORTED_LOCATION "${OpenVDB_nanovdb_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OpenVDB_nanovdb_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES "OpenVDB::openvdb;"
|
||||
INTERFACE_COMPILE_FEATURES cxx_std_17
|
||||
INTERFACE_COMPILE_FEATURES cxx_std_14
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
+31
-68
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
#[=======================================================================[.rst:
|
||||
|
||||
@@ -34,7 +34,7 @@ This will define the following variables:
|
||||
|
||||
``Tbb_FOUND``
|
||||
True if the system has the Tbb library.
|
||||
``Tbb_VERSION`` ``TBB_VERSION``
|
||||
``Tbb_VERSION``
|
||||
The version of the Tbb library which was found.
|
||||
``Tbb_INCLUDE_DIRS``
|
||||
Include directories needed to use Tbb.
|
||||
@@ -93,7 +93,7 @@ may be provided to tell this module where to look.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
||||
@@ -162,72 +162,51 @@ list(APPEND _TBB_INCLUDE_SEARCH_DIRS
|
||||
${SYSTEM_LIBRARY_PATHS}
|
||||
)
|
||||
|
||||
if(NOT Tbb_INCLUDE_DIR)
|
||||
# Look for a legacy tbb header file.
|
||||
find_path(Tbb_LEGACY_INCLUDE_DIR tbb/tbb_stddef.h
|
||||
${_FIND_TBB_ADDITIONAL_OPTIONS}
|
||||
PATHS ${_TBB_INCLUDE_SEARCH_DIRS}
|
||||
PATH_SUFFIXES ${CMAKE_INSTALL_INCLUDEDIR} include
|
||||
)
|
||||
else()
|
||||
set(Tbb_LEGACY_INCLUDE_DIR ${Tbb_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
# Look for a new tbb header installation
|
||||
# From TBB 2021, tbb_stddef is removed and the directory include/tbb is
|
||||
# simply an alias for include/oneapi/tbb. Try and find the version header
|
||||
# in oneapi/tbb
|
||||
find_path(Tbb_INCLUDE_DIR oneapi/tbb/version.h
|
||||
# Look for a standard tbb header file.
|
||||
find_path(Tbb_INCLUDE_DIR tbb/tbb_stddef.h
|
||||
${_FIND_TBB_ADDITIONAL_OPTIONS}
|
||||
PATHS ${_TBB_INCLUDE_SEARCH_DIRS}
|
||||
PATH_SUFFIXES ${CMAKE_INSTALL_INCLUDEDIR} include
|
||||
)
|
||||
|
||||
set(_tbb_legacy_version_file "${Tbb_LEGACY_INCLUDE_DIR}/tbb/tbb_stddef.h")
|
||||
set(_tbb_version_file "${Tbb_INCLUDE_DIR}/oneapi/tbb/version.h")
|
||||
set(_tbb_version_file "${Tbb_INCLUDE_DIR}/tbb/tbb_stddef.h")
|
||||
|
||||
if(EXISTS ${_tbb_legacy_version_file})
|
||||
if(EXISTS ${_tbb_version_file})
|
||||
message(WARNING "
|
||||
FindTBB located both an old and new tbb installation.
|
||||
old: ${_tbb_legacy_version_file}
|
||||
new: ${_tbb_version_file}
|
||||
The NEWER versioned installation will be used. You can set TBB_INCLUDEDIR
|
||||
to control FindTBB.cmake search, or explicitly set Tbb_INCLUDE_DIR to the
|
||||
desired location.
|
||||
")
|
||||
else()
|
||||
set(_tbb_version_file "${_tbb_legacy_version_file}")
|
||||
set(Tbb_INCLUDE_DIR ${Tbb_LEGACY_INCLUDE_DIR} CACHE STRING "" FORCE)
|
||||
endif()
|
||||
if(NOT EXISTS ${_tbb_version_file})
|
||||
# From TBB 2021, tbb_stddef is removed and the directory include/tbb is
|
||||
# simply an alias for include/oneapi/tbb. Try and find the version header
|
||||
# in oneapi/tbb
|
||||
find_path(Tbb_INCLUDE_DIR oneapi/tbb/version.h
|
||||
${_FIND_TBB_ADDITIONAL_OPTIONS}
|
||||
PATHS ${_TBB_INCLUDE_SEARCH_DIRS}
|
||||
PATH_SUFFIXES ${CMAKE_INSTALL_INCLUDEDIR} include
|
||||
)
|
||||
set(_tbb_version_file "${Tbb_INCLUDE_DIR}/oneapi/tbb/version.h")
|
||||
endif()
|
||||
|
||||
|
||||
if(EXISTS ${_tbb_version_file})
|
||||
file(STRINGS ${_tbb_version_file} _tbb_version_major_string REGEX "#define TBB_VERSION_MAJOR " )
|
||||
string(REGEX REPLACE "#define TBB_VERSION_MAJOR" "" _tbb_version_major_string "${_tbb_version_major_string}")
|
||||
file(STRINGS ${_tbb_version_file}
|
||||
_tbb_version_major_string REGEX "#define TBB_VERSION_MAJOR "
|
||||
)
|
||||
string(REGEX REPLACE "#define TBB_VERSION_MAJOR" ""
|
||||
_tbb_version_major_string "${_tbb_version_major_string}"
|
||||
)
|
||||
string(STRIP "${_tbb_version_major_string}" Tbb_VERSION_MAJOR)
|
||||
|
||||
file(STRINGS ${_tbb_version_file} _tbb_version_minor_string REGEX "#define TBB_VERSION_MINOR ")
|
||||
string(REGEX REPLACE "#define TBB_VERSION_MINOR" "" _tbb_version_minor_string "${_tbb_version_minor_string}")
|
||||
file(STRINGS ${_tbb_version_file}
|
||||
_tbb_version_minor_string REGEX "#define TBB_VERSION_MINOR "
|
||||
)
|
||||
string(REGEX REPLACE "#define TBB_VERSION_MINOR" ""
|
||||
_tbb_version_minor_string "${_tbb_version_minor_string}"
|
||||
)
|
||||
string(STRIP "${_tbb_version_minor_string}" Tbb_VERSION_MINOR)
|
||||
|
||||
file(STRINGS ${_tbb_version_file} _tbb_binary_version_string REGEX "#define __TBB_BINARY_VERSION ")
|
||||
string(REGEX REPLACE "#define __TBB_BINARY_VERSION" "" _tbb_binary_version_string "${_tbb_binary_version_string}")
|
||||
string(STRIP "${_tbb_binary_version_string}" Tbb_BINARY_VERSION)
|
||||
|
||||
unset(_tbb_version_major_string)
|
||||
unset(_tbb_version_minor_string)
|
||||
unset(_tbb_binary_version_string)
|
||||
|
||||
# Set both for compatibility reasons, TBB's CONFIG files only set the latter
|
||||
set(Tbb_VERSION ${Tbb_VERSION_MAJOR}.${Tbb_VERSION_MINOR})
|
||||
set(TBB_VERSION ${Tbb_VERSION})
|
||||
endif()
|
||||
|
||||
unset(_tbb_version_file)
|
||||
unset(_tbb_legacy_version_file)
|
||||
unset(Tbb_LEGACY_INCLUDE_DIR)
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Search for TBB lib DIR
|
||||
@@ -276,22 +255,8 @@ foreach(COMPONENT ${TBB_FIND_COMPONENTS})
|
||||
find_library(Tbb_${COMPONENT}_LIBRARY_${BUILD_TYPE} ${_TBB_LIB_NAME}
|
||||
${_FIND_TBB_ADDITIONAL_OPTIONS}
|
||||
PATHS ${_TBB_LIBRARYDIR_SEARCH_DIRS}
|
||||
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib)
|
||||
|
||||
# If we didn't find the library, prepend Tbb_BINARY_VERSION to each possible
|
||||
# component name and try again. As of TBB 2021, TBB decides to version some
|
||||
# of its libraries on some of its platforms...
|
||||
if(NOT Tbb_${COMPONENT}_LIBRARY_${BUILD_TYPE} AND Tbb_BINARY_VERSION)
|
||||
set(_TBB_LIB_NAME "${COMPONENT}${Tbb_BINARY_VERSION}")
|
||||
if(BUILD_TYPE STREQUAL DEBUG)
|
||||
set(_TBB_LIB_NAME "${_TBB_LIB_NAME}${TBB_DEBUG_SUFFIX}")
|
||||
endif()
|
||||
|
||||
find_library(Tbb_${COMPONENT}_LIBRARY_${BUILD_TYPE} ${_TBB_LIB_NAME}
|
||||
${_FIND_TBB_ADDITIONAL_OPTIONS}
|
||||
PATHS ${_TBB_LIBRARYDIR_SEARCH_DIRS}
|
||||
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib)
|
||||
endif()
|
||||
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib
|
||||
)
|
||||
|
||||
# On Unix, TBB sometimes uses linker scripts instead of symlinks, so parse the linker script
|
||||
# and correct the library name if so
|
||||
@@ -461,9 +426,7 @@ foreach(COMPONENT ${TBB_FIND_COMPONENTS})
|
||||
IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(TBB::${COMPONENT} PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
|
||||
IMPORTED_LOCATION_RELEASE "${Tbb_${COMPONENT}_LIBRARY_RELEASE}"
|
||||
MAP_IMPORTED_CONFIG_MINSIZEREL Release
|
||||
MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release)
|
||||
IMPORTED_LOCATION_RELEASE "${Tbb_${COMPONENT}_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
|
||||
# Debug location
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
#[=======================================================================[.rst:
|
||||
|
||||
@@ -47,7 +47,7 @@ The following variables may be provided to tell this module where to look.
|
||||
# Find the glfw3 installation and use glfw's CMake to initialize
|
||||
# the glfw lib
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
set(_FIND_GLFW3_ADDITIONAL_OPTIONS "")
|
||||
if(DISABLE_CMAKE_SEARCH_PATHS)
|
||||
@@ -109,11 +109,16 @@ endif()
|
||||
set(glfw3_FIND_VERSION ${MINIMUM_GLFW_VERSION})
|
||||
find_package(glfw3 ${MINIMUM_GLFW_VERSION} REQUIRED)
|
||||
|
||||
if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_GLFW_VERSION)
|
||||
if(glfw3_VERSION VERSION_LESS ${FUTURE_MINIMUM_GLFW_VERSION})
|
||||
message(DEPRECATION "Support for GLFW versions < ${FUTURE_MINIMUM_GLFW_VERSION} "
|
||||
"is deprecated and will be removed.")
|
||||
endif()
|
||||
# We only use find_package_handle_standard_args to verify and print
|
||||
# appropriate messages. This now explicitly errors in 3.19...
|
||||
# @todo Improve this entire GLFW3 search
|
||||
# https://gitlab.kitware.com/cmake/cmake/-/issues/21505
|
||||
if(${CMAKE_VERSION} VERSION_LESS 3.19)
|
||||
find_package(PackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(glfw3
|
||||
REQUIRED_VARS glfw3_DIR glfw3_FOUND
|
||||
VERSION_VAR glfw3_VERSION
|
||||
)
|
||||
endif()
|
||||
|
||||
unset(glfw3_FIND_VERSION)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
#[=======================================================================[.rst:
|
||||
|
||||
@@ -49,6 +49,8 @@ overwrite user provided values.
|
||||
``ZLIB_LIBRARY``
|
||||
``OPENEXR_INCLUDEDIR``
|
||||
``OPENEXR_LIBRARYDIR``
|
||||
``ILMBASE_INCLUDEDIR``
|
||||
``ILMBASE_LIBRARYDIR``
|
||||
``TBB_INCLUDEDIR``
|
||||
``TBB_LIBRARYDIR``
|
||||
``BLOSC_INCLUDEDIR``
|
||||
@@ -73,7 +75,7 @@ may be provided to tell this module where to look.
|
||||
# Find the Houdini installation and use Houdini's CMake to initialize
|
||||
# the Houdini lib
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
# Include utility functions for version information
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/OpenVDBUtils.cmake)
|
||||
@@ -288,11 +290,7 @@ endif()
|
||||
|
||||
# Jemalloc
|
||||
|
||||
# * On Mac OSX, linking against Jemalloc < 4.3.0 seg-faults with this error:
|
||||
# malloc: *** malloc_zone_unregister() failed for 0xaddress
|
||||
# As of Houdini 20, it still ships with Jemalloc 3.6.0, so don't expose it
|
||||
# on Mac OSX (https://github.com/jemalloc/jemalloc/issues/420).
|
||||
if(NOT APPLE AND NOT JEMALLOC_LIBRARYDIR)
|
||||
if(NOT JEMALLOC_LIBRARYDIR)
|
||||
set(JEMALLOC_LIBRARYDIR ${HOUDINI_LIB_DIR})
|
||||
endif()
|
||||
|
||||
@@ -305,10 +303,21 @@ if(NOT OPENEXR_LIBRARYDIR)
|
||||
set(OPENEXR_LIBRARYDIR ${HOUDINI_LIB_DIR})
|
||||
endif()
|
||||
|
||||
# IlmBase
|
||||
|
||||
if(NOT ILMBASE_INCLUDEDIR)
|
||||
set(ILMBASE_INCLUDEDIR ${HOUDINI_INCLUDE_DIR})
|
||||
endif()
|
||||
if(NOT ILMBASE_LIBRARYDIR)
|
||||
set(ILMBASE_LIBRARYDIR ${HOUDINI_LIB_DIR})
|
||||
endif()
|
||||
|
||||
# Boost - currently must be provided as VDB is not fully configured to
|
||||
# use Houdini's namespaced hboost
|
||||
|
||||
# Versions of Houdini >= 17.5 have some namespaced libraries (IlmBase/OpenEXR).
|
||||
# Add the required suffix as part of the cmake lib suffix searches
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "_sidefx.dylib")
|
||||
elseif(UNIX)
|
||||
@@ -324,82 +333,87 @@ endif()
|
||||
# Explicitly configure the OpenVDB ABI version depending on the Houdini
|
||||
# version.
|
||||
|
||||
find_file(_houdini_openvdb_version_file "openvdb/version.h"
|
||||
PATHS ${HOUDINI_INCLUDE_DIR}
|
||||
NO_DEFAULT_PATH)
|
||||
if(_houdini_openvdb_version_file)
|
||||
OPENVDB_VERSION_FROM_HEADER("${_houdini_openvdb_version_file}"
|
||||
ABI OPENVDB_HOUDINI_ABI)
|
||||
endif()
|
||||
unset(_houdini_openvdb_version_file)
|
||||
if(NOT OPENVDB_HOUDINI_ABI)
|
||||
message(WARNING "Unknown version of Houdini, assuming OpenVDB ABI=${OpenVDB_MAJOR_VERSION}, "
|
||||
"but if this not correct, the CMake flag -DOPENVDB_HOUDINI_ABI=<N> can override this value.")
|
||||
set(OPENVDB_HOUDINI_ABI ${OpenVDB_MAJOR_VERSION})
|
||||
endif()
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Configure libstc++ CXX11 ABI
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# Assume we're using libstdc++
|
||||
message(STATUS "Configuring CXX11 ABI for Houdini compatibility...")
|
||||
|
||||
execute_process(COMMAND echo "#include <string>"
|
||||
COMMAND ${CMAKE_CXX_COMPILER} "-x" "c++" "-E" "-dM" "-"
|
||||
COMMAND grep "-F" "_GLIBCXX_USE_CXX11_ABI"
|
||||
TIMEOUT 10
|
||||
RESULT_VARIABLE QUERIED_GCC_CXX11_ABI_SUCCESS
|
||||
OUTPUT_VARIABLE _GCC_CXX11_ABI)
|
||||
|
||||
set(GLIBCXX_USE_CXX11_ABI "UNKNOWN")
|
||||
|
||||
if(NOT QUERIED_GCC_CXX11_ABI_SUCCESS)
|
||||
string(FIND ${_GCC_CXX11_ABI} "_GLIBCXX_USE_CXX11_ABI 0" GCC_OLD_CXX11_ABI)
|
||||
string(FIND ${_GCC_CXX11_ABI} "_GLIBCXX_USE_CXX11_ABI 1" GCC_NEW_CXX11_ABI)
|
||||
if(NOT (${GCC_OLD_CXX11_ABI} EQUAL -1))
|
||||
set(GLIBCXX_USE_CXX11_ABI 0)
|
||||
endif()
|
||||
if(NOT (${GCC_NEW_CXX11_ABI} EQUAL -1))
|
||||
set(GLIBCXX_USE_CXX11_ABI 1)
|
||||
endif()
|
||||
if(Houdini_VERSION_MAJOR_MINOR VERSION_EQUAL 18.5)
|
||||
set(OPENVDB_HOUDINI_ABI 7)
|
||||
else()
|
||||
find_file(_houdini_openvdb_version_file "openvdb/version.h"
|
||||
PATHS ${HOUDINI_INCLUDE_DIR}
|
||||
NO_DEFAULT_PATH)
|
||||
if(_houdini_openvdb_version_file)
|
||||
OPENVDB_VERSION_FROM_HEADER("${_houdini_openvdb_version_file}"
|
||||
ABI OPENVDB_HOUDINI_ABI)
|
||||
endif()
|
||||
unset(_houdini_openvdb_version_file)
|
||||
if(NOT OPENVDB_HOUDINI_ABI)
|
||||
message(WARNING "Unknown version of Houdini, assuming OpenVDB ABI=${OpenVDB_MAJOR_VERSION}, "
|
||||
"but if this not correct, the CMake flag -DOPENVDB_HOUDINI_ABI=<N> can override this value.")
|
||||
set(OPENVDB_HOUDINI_ABI ${OpenVDB_MAJOR_VERSION})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Try and query the Houdini CXX11 ABI. Allow it to be provided by users to
|
||||
# override this logic should Houdini's CMake ever change
|
||||
# ------------------------------------------------------------------------
|
||||
# Configure GCC CXX11 ABI
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
if(NOT DEFINED HOUDINI_CXX11_ABI)
|
||||
get_target_property(houdini_interface_compile_options
|
||||
Houdini INTERFACE_COMPILE_OPTIONS)
|
||||
set(HOUDINI_CXX11_ABI "UNKNOWN")
|
||||
if("-D_GLIBCXX_USE_CXX11_ABI=0" IN_LIST houdini_interface_compile_options)
|
||||
set(HOUDINI_CXX11_ABI 0)
|
||||
elseif("-D_GLIBCXX_USE_CXX11_ABI=1" IN_LIST houdini_interface_compile_options)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
if((CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 5.1) OR
|
||||
(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.1))
|
||||
message(STATUS "GCC >= 5.1 detected. Configuring GCC CXX11 ABI for Houdini compatibility...")
|
||||
|
||||
execute_process(COMMAND echo "#include <string>"
|
||||
COMMAND ${CMAKE_CXX_COMPILER} "-x" "c++" "-E" "-dM" "-"
|
||||
COMMAND grep "-F" "_GLIBCXX_USE_CXX11_ABI"
|
||||
TIMEOUT 10
|
||||
RESULT_VARIABLE QUERIED_GCC_CXX11_ABI_SUCCESS
|
||||
OUTPUT_VARIABLE _GCC_CXX11_ABI)
|
||||
|
||||
set(GLIBCXX_USE_CXX11_ABI "UNKNOWN")
|
||||
|
||||
if(NOT QUERIED_GCC_CXX11_ABI_SUCCESS)
|
||||
string(FIND ${_GCC_CXX11_ABI} "_GLIBCXX_USE_CXX11_ABI 0" GCC_OLD_CXX11_ABI)
|
||||
string(FIND ${_GCC_CXX11_ABI} "_GLIBCXX_USE_CXX11_ABI 1" GCC_NEW_CXX11_ABI)
|
||||
if(NOT (${GCC_OLD_CXX11_ABI} EQUAL -1))
|
||||
set(GLIBCXX_USE_CXX11_ABI 0)
|
||||
endif()
|
||||
if(NOT (${GCC_NEW_CXX11_ABI} EQUAL -1))
|
||||
set(GLIBCXX_USE_CXX11_ABI 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Try and query the Houdini CXX11 ABI. Allow it to be provided by users to
|
||||
# override this logic should Houdini's CMake ever change
|
||||
|
||||
if(NOT DEFINED HOUDINI_CXX11_ABI)
|
||||
get_target_property(houdini_interface_compile_options
|
||||
Houdini INTERFACE_COMPILE_OPTIONS)
|
||||
set(HOUDINI_CXX11_ABI "UNKNOWN")
|
||||
if("-D_GLIBCXX_USE_CXX11_ABI=0" IN_LIST houdini_interface_compile_options)
|
||||
set(HOUDINI_CXX11_ABI 0)
|
||||
elseif("-D_GLIBCXX_USE_CXX11_ABI=1" IN_LIST houdini_interface_compile_options)
|
||||
set(HOUDINI_CXX11_ABI 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS " GCC CXX11 ABI : ${GLIBCXX_USE_CXX11_ABI}")
|
||||
message(STATUS " Houdini CXX11 ABI : ${HOUDINI_CXX11_ABI}")
|
||||
|
||||
if(${HOUDINI_CXX11_ABI} STREQUAL "UNKNOWN")
|
||||
message(WARNING "Unable to determine Houdini CXX11 ABI. Assuming newer ABI "
|
||||
"has been used.")
|
||||
set(HOUDINI_CXX11_ABI 1)
|
||||
endif()
|
||||
|
||||
if(${GLIBCXX_USE_CXX11_ABI} EQUAL ${HOUDINI_CXX11_ABI})
|
||||
message(STATUS " Current CXX11 ABI matches Houdini configuration "
|
||||
"(_GLIBCXX_USE_CXX11_ABI=${HOUDINI_CXX11_ABI}).")
|
||||
else()
|
||||
message(WARNING "A potential mismatch was detected between the CXX11 ABI "
|
||||
"of GCC and Houdini. The following ABI configuration will be used: "
|
||||
"-D_GLIBCXX_USE_CXX11_ABI=${HOUDINI_CXX11_ABI}. See: "
|
||||
"https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html and "
|
||||
"https://vfxplatform.com/#footnote-gcc6 for more information.")
|
||||
endif()
|
||||
|
||||
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=${HOUDINI_CXX11_ABI})
|
||||
endif()
|
||||
|
||||
message(STATUS " GNU CXX11 ABI : ${GLIBCXX_USE_CXX11_ABI}")
|
||||
message(STATUS " Houdini CXX11 ABI : ${HOUDINI_CXX11_ABI}")
|
||||
|
||||
if(${HOUDINI_CXX11_ABI} STREQUAL "UNKNOWN")
|
||||
message(WARNING "Unable to determine Houdini CXX11 ABI. Assuming newer ABI "
|
||||
"has been used.")
|
||||
set(HOUDINI_CXX11_ABI 1)
|
||||
endif()
|
||||
|
||||
if(${GLIBCXX_USE_CXX11_ABI} EQUAL ${HOUDINI_CXX11_ABI})
|
||||
message(STATUS " Current CXX11 ABI matches Houdini configuration "
|
||||
"(_GLIBCXX_USE_CXX11_ABI=${HOUDINI_CXX11_ABI}).")
|
||||
else()
|
||||
message(WARNING "A potential mismatch was detected between the CXX11 ABI "
|
||||
"of libstdc++ and Houdini. The following ABI configuration will be used: "
|
||||
"-D_GLIBCXX_USE_CXX11_ABI=${HOUDINI_CXX11_ABI}. See: "
|
||||
"https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html and "
|
||||
"https://vfxplatform.com/#footnote-gcc6 for more information.")
|
||||
endif()
|
||||
|
||||
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=${HOUDINI_CXX11_ABI})
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
#[=======================================================================[.rst:
|
||||
|
||||
@@ -51,7 +51,7 @@ variables may be provided to tell this module where to look.
|
||||
# Find the Maya installation and use Maya's CMake to initialize
|
||||
# the Maya lib
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
|
||||
set(_FIND_MAYA_ADDITIONAL_OPTIONS "")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
#[=======================================================================[.rst:
|
||||
|
||||
@@ -57,7 +57,7 @@ The following functions are provided:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
|
||||
function(OPENVDB_GET_VERSION_DEFINE HEADER KEY VALUE)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
#[=======================================================================[.rst:
|
||||
|
||||
@@ -16,7 +16,7 @@ existing from a previous run of cmake.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
set(MANIFEST "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
#[=======================================================================[
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -129,10 +129,6 @@ endif()
|
||||
|
||||
# Increase the number of sections that an object file can contain
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/bigobj>")
|
||||
# Enable MSVC options that make it behave like other compilers
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/permissive->")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/Zc:throwingNew>")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/Zc:inline>")
|
||||
# Excludes APIs such as Cryptography, DDE, RPC, Shell, and Windows Sockets
|
||||
add_compile_definitions("$<$<CXX_COMPILER_ID:MSVC>:WIN32_LEAN_AND_MEAN>")
|
||||
# Disable non-secure CRT library function warnings
|
||||
@@ -143,32 +139,9 @@ add_compile_definitions("$<$<CXX_COMPILER_ID:MSVC>:_CRT_SECURE_NO_WARNINGS>")
|
||||
# https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/
|
||||
# compiler-warning-level-3-c4996?view=vs-2019#posix-function-names
|
||||
add_compile_definitions("$<$<CXX_COMPILER_ID:MSVC>:_CRT_NONSTDC_NO_WARNINGS>")
|
||||
|
||||
# If a user has explicitly requested a parallel build, configure this during CMake
|
||||
if(MSVC_MP_THREAD_COUNT AND MSVC_MP_THREAD_COUNT GREATER 1)
|
||||
# If a user has explicitly requested a parallel build, configure this during CMake
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/MP${MSVC_MP_THREAD_COUNT}>")
|
||||
|
||||
# If building with multiple threads with MSVC, delay generation of PDB files
|
||||
# until the end of compilation to speed up their generation (invoke mspdbsrv once).
|
||||
# This assumes /Zi is being used to generate PDBs (CMakes default)
|
||||
add_compile_options("$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANG_AND_ID:CXX,MSVC>>:/Zf>")
|
||||
endif()
|
||||
|
||||
if(MSVC_COMPRESS_PDB)
|
||||
# /Zi enables PDBs - CMake seems to default to creating PDBs as the defacto way
|
||||
# of handling debug symbols. As these PDBs can be very large, we attempt to compress
|
||||
# them here with various settings. This disable incremental linking and can make
|
||||
# stack traces more confusing.
|
||||
# https://devblogs.microsoft.com/cppblog/shrink-my-program-database-pdb-file/
|
||||
|
||||
# First, generate comdats to allow the linker to remove unused data
|
||||
add_compile_options("$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANG_AND_ID:CXX,MSVC>>:/Gy>")
|
||||
# Remove unreferenced packaged functions and data from comdats
|
||||
add_link_options("$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANG_AND_ID:CXX,MSVC>>:/OPT:REF>")
|
||||
# Fold duplicate comdat data (1 iteration)
|
||||
add_link_options("$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANG_AND_ID:CXX,MSVC>>:/OPT:ICF>")
|
||||
# Generally compress the generated pdbs as they are being created
|
||||
add_link_options("$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANG_AND_ID:CXX,MSVC>>:/PDBCOMPRESS>")
|
||||
endif()
|
||||
|
||||
if(OPENVDB_CXX_STRICT)
|
||||
@@ -178,29 +151,17 @@ if(OPENVDB_CXX_STRICT)
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wall>")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wextra>")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wconversion>")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wnon-virtual-dtor>")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wover-aligned>")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wimplicit-fallthrough>")
|
||||
add_compile_options("$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,9.3.0>>:-Wimplicit-fallthrough>")
|
||||
# Only check global constructors for libraries (we should really check for
|
||||
# executables too but gtest relies on these types of constructors for its
|
||||
# framework). nanobind also incorporates these constructors so skip it as well.
|
||||
add_compile_options("$<$<AND:$<NOT:$<OR:$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanobind-static>>>,$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>>:-Wglobal-constructors>")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wno-sign-conversion>")
|
||||
# GNU
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Werror>")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wall>")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wextra>")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-pedantic>")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wcast-align>")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wcast-qual>")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wconversion>")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wdisabled-optimization>")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Woverloaded-virtual>")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wnon-virtual-dtor>")
|
||||
# Disable select warnings for the nanobind static library
|
||||
add_compile_options("$<$<AND:$<NOT:$<OR:$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanobind-static>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,openvdb_python>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanovdb_python>>>,$<COMPILE_LANG_AND_ID:CXX,GNU>>:-pedantic>")
|
||||
add_compile_options("$<$<AND:$<NOT:$<OR:$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanobind-static>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,openvdb_python>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanovdb_python>>>,$<COMPILE_LANG_AND_ID:CXX,GNU>>:-Wcast-qual>")
|
||||
add_compile_options("$<$<AND:$<NOT:$<OR:$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanobind-static>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,openvdb_python>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanovdb_python>>>,$<COMPILE_LANG_AND_ID:CXX,GNU>>:-Wconversion>")
|
||||
add_compile_options("$<$<AND:$<OR:$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanobind-static>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,openvdb_python>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanovdb_python>>,$<COMPILE_LANG_AND_ID:CXX,GNU>>:-Wno-unused-variable>")
|
||||
add_compile_options("$<$<AND:$<OR:$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanobind-static>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,openvdb_python>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanovdb_python>>,$<COMPILE_LANG_AND_ID:CXX,GNU>>:-Wno-unused-but-set-parameter>")
|
||||
else()
|
||||
# NO OPENVDB_CXX_STRICT, suppress some warnings
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
@@ -248,7 +209,7 @@ if(CMAKE_BUILD_TYPE EQUAL coverage)
|
||||
endif()
|
||||
|
||||
# Note that the thread, address and memory sanitizers are incompatible with each other
|
||||
set(EXTRA_BUILD_TYPES coverage tsan asan lsan msan ubsan abicheck)
|
||||
set(EXTRA_BUILD_TYPES coverage tsan asan lsan msan ubsan)
|
||||
|
||||
# Set all build flags to empty (unless they have been provided)
|
||||
|
||||
@@ -265,18 +226,7 @@ endforeach()
|
||||
# clang and GCC. Sanitizers are currently only configured for clang and GCC.
|
||||
|
||||
# Coverage
|
||||
# --coverage uses -fprofile-arcs -ftest-coverage (compiling) and -lgcov (linking)
|
||||
# @note consider -fprofile-abs-path from gcc 10
|
||||
# @todo consider using clang with source analysis: -fprofile-instr-generate -fcoverage-mapping.
|
||||
# https://clang.llvm.org/docs/SourceBasedCodeCoverage.html
|
||||
# note that clang also works with gcov (--coverage)
|
||||
# @note Ideally we'd use no optimisations (-O0) with --coverage, but a complete
|
||||
# run of all unit tests takes upwards of a day without them. Thread usage also
|
||||
# impacts total runtime. -Og implies -O1 but without optimisations "that would
|
||||
# otherwise interfere with debugging". This still massively effects branch
|
||||
# coverage tracking compared to -O0 so we should look to improve the speed of
|
||||
# some of the unit tests and also experiment with clang.
|
||||
add_compile_options("$<$<AND:$<CONFIG:COVERAGE>,$<COMPILE_LANG_AND_ID:CXX,GNU,Clang,AppleClang>>:--coverage;-Og>")
|
||||
add_compile_options("$<$<AND:$<CONFIG:COVERAGE>,$<COMPILE_LANG_AND_ID:CXX,GNU,Clang,AppleClang>>:--coverage>")
|
||||
add_link_options("$<$<AND:$<CONFIG:COVERAGE>,$<COMPILE_LANG_AND_ID:CXX,GNU,Clang,AppleClang>>:--coverage>")
|
||||
|
||||
# ThreadSanitizer
|
||||
@@ -307,57 +257,10 @@ add_link_options("$<$<AND:$<CONFIG:MSAN>,$<COMPILE_LANG_AND_ID:CXX,Clang,AppleCl
|
||||
add_compile_options("$<$<AND:$<CONFIG:UBSAN>,$<COMPILE_LANG_AND_ID:CXX,GNU,Clang,AppleClang>>:-fsanitize=undefined>")
|
||||
add_link_options("$<$<AND:$<CONFIG:UBSAN>,$<COMPILE_LANG_AND_ID:CXX,GNU,Clang,AppleClang>>:-fsanitize=undefined>")
|
||||
|
||||
# ABI Check. This build type is expected to work with the abi-dumper/abi-compliance-checker
|
||||
# binaries which expect specific debug information. In particular, for GCC versions >= 11
|
||||
# we have to explicitly select dwarf versions < 5 as the abi-dumper doesn't support dwarf5
|
||||
# and will always incorrectly report successful ABI checks
|
||||
# https://github.com/lvc/abi-dumper/issues/33
|
||||
add_compile_options("$<$<CONFIG:ABICHECK>:-gdwarf-4;-g3;-ggdb;-Og>")
|
||||
|
||||
# CMAKE_BUILD_TYPE is ignored for multi config generators i.e. MSVS
|
||||
|
||||
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
if(NOT _isMultiConfig)
|
||||
message(STATUS "CMake Build Type: ${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
if(OPENVDB_ENABLE_ASSERTS)
|
||||
message(STATUS "OpenVDB asserts are ENABLED")
|
||||
endif()
|
||||
|
||||
# Intialize extra build type targets where possible
|
||||
|
||||
if(NOT TARGET gcov_html)
|
||||
find_program(GCOVR_PATH gcovr)
|
||||
if(NOT GCOVR_PATH AND CMAKE_BUILD_TYPE STREQUAL "coverage")
|
||||
message(WARNING "Unable to initialize gcovr target. coverage build types will still generate gcno files.")
|
||||
elseif(GCOVR_PATH)
|
||||
# init gcov commands
|
||||
set(GCOVR_HTML_FOLDER_CMD ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/gcov_html)
|
||||
set(GCOVR_HTML_CMD
|
||||
${GCOVR_PATH} --html --html-details -r ${PROJECT_SOURCE_DIR} --object-directory=${PROJECT_BINARY_DIR}
|
||||
-o gcov_html/index.html
|
||||
)
|
||||
|
||||
# Add a custom target which converts .gcda files to a html report using gcovr.
|
||||
# Note that this target does NOT run ctest or any binaries - that is left to
|
||||
# the implementor of the gcov workflow. Typically, the order of operations
|
||||
# would be:
|
||||
# - run CMake with unit tests on
|
||||
# - ctest
|
||||
# - make gcov_html
|
||||
add_custom_target(gcov_html
|
||||
COMMAND ${GCOVR_HTML_FOLDER_CMD}
|
||||
COMMAND ${GCOVR_HTML_CMD}
|
||||
BYPRODUCTS ${PROJECT_BINARY_DIR}/gcov_html/index.html # report directory
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
VERBATIM
|
||||
COMMENT "Running gcovr to produce HTML code coverage report."
|
||||
)
|
||||
|
||||
# Show info where to find the report
|
||||
add_custom_command(TARGET gcov_html POST_BUILD
|
||||
COMMAND ;
|
||||
COMMENT "Open ./gcov_html/index.html in your browser to view the coverage report."
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
#[=======================================================================[
|
||||
|
||||
@@ -8,81 +8,62 @@
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
###############################################################################
|
||||
|
||||
# Configure minimum version requirements - some are treated specially and fall
|
||||
# outside of the DISABLE_DEPENDENCY_VERSION_CHECKS catch
|
||||
set(MINIMUM_CXX_STANDARD 17)
|
||||
set(MINIMUM_CXX_STANDARD 14)
|
||||
|
||||
# @note ABI always enforced so the correct deprecation messages are available.
|
||||
# OPENVDB_USE_DEPRECATED_ABI_<VERSION> should be used to circumvent this
|
||||
math(EXPR MINIMUM_OPENVDB_ABI_VERSION "${OpenVDB_MAJOR_VERSION}-2")
|
||||
math(EXPR FUTURE_OPENVDB_ABI_VERSION "${OpenVDB_MAJOR_VERSION}+1")
|
||||
|
||||
# List of deprecated but supported OpenVDB ABIs for this version of OpenVDB
|
||||
math(EXPR _PREV_ABI "${OpenVDB_MAJOR_VERSION}-1")
|
||||
set(OPENVDB_DEPRECATED_ABI_LIST ${MINIMUM_OPENVDB_ABI_VERSION} ${_PREV_ABI})
|
||||
unset(_PREV_ABI)
|
||||
set(MINIMUM_OPENVDB_ABI_VERSION 7)
|
||||
set(FUTURE_MINIMUM_OPENVDB_ABI_VERSION 9)
|
||||
set(FUTURE_OPENVDB_ABI_VERSION 10)
|
||||
|
||||
if(NOT DISABLE_DEPENDENCY_VERSION_CHECKS)
|
||||
# @note Currently tracking CY2022 of the VFX platform where available
|
||||
# @note Currently tracking CY2020 of the VFX platform where available
|
||||
set(MINIMUM_GCC_VERSION 6.3.1)
|
||||
set(MINIMUM_CLANG_VERSION 3.8)
|
||||
set(MINIMUM_ICC_VERSION 17)
|
||||
set(MINIMUM_MSVC_VERSION 19.10)
|
||||
|
||||
# @Note Compiler versions are not really a hard and fast rule, you just need
|
||||
# a compiler with complete support for our MINIMUM_CXX_STANDARD (currently 17).
|
||||
# What's usually important is that the version of libstdc++ and glibc in use
|
||||
# matches. Compilers other than GCC should provide options to ensure this
|
||||
# targetting e.g. --gcc-toolchain and -fgnuc-version with Clang.
|
||||
set(MINIMUM_GCC_VERSION 11.2.1)
|
||||
set(MINIMUM_CLANG_VERSION 5.0)
|
||||
set(MINIMUM_ICC_VERSION 19)
|
||||
set(MINIMUM_MSVC_VERSION 19.30) # 1928 (Visual Studio 2019 Version 16.8 + 16.9)
|
||||
|
||||
set(MINIMUM_BOOST_VERSION 1.80)
|
||||
# Nanobind does not store the version in the CMake config file in 2.0.0.
|
||||
# This issue was fixed in 2.1.0 so next time we bump the minimum version,
|
||||
# we can define this.
|
||||
#set(MINIMUM_NANOBIND_VERSION 2.0.0)
|
||||
set(MINIMUM_IMATH_VERSION 3.1)
|
||||
set(MINIMUM_OPENEXR_VERSION 3.1)
|
||||
set(MINIMUM_BOOST_VERSION 1.70)
|
||||
set(MINIMUM_ILMBASE_VERSION 2.4)
|
||||
set(MINIMUM_OPENEXR_VERSION 2.4)
|
||||
set(MINIMUM_ZLIB_VERSION 1.2.7)
|
||||
set(MINIMUM_TBB_VERSION 2020.3)
|
||||
set(MINIMUM_LLVM_VERSION 13.0.0)
|
||||
set(MINIMUM_BLOSC_VERSION 1.17.0)
|
||||
set(MINIMUM_GLFW_VERSION 3.1)
|
||||
set(MINIMUM_TBB_VERSION 2019.0)
|
||||
set(MINIMUM_LLVM_VERSION 7.0.0)
|
||||
set(MINIMUM_BLOSC_VERSION 1.5.0)
|
||||
|
||||
set(MINIMUM_PYTHON_VERSION 3.10)
|
||||
set(MINIMUM_NUMPY_VERSION 1.23.0)
|
||||
set(MINIMUM_PYTHON_VERSION 2.7) # @warning should be 3.7.x, but H18.5+ can still be used with 2.7.x
|
||||
set(MINIMUM_NUMPY_VERSION 1.17.0)
|
||||
|
||||
set(MINIMUM_GOOGLETEST_VERSION 1.10)
|
||||
set(MINIMUM_GLFW_VERSION 3.1)
|
||||
set(MINIMUM_LOG4CPLUS_VERSION 1.1.2)
|
||||
set(MINIMUM_HOUDINI_VERSION 19.5)
|
||||
set(MINIMUM_HOUDINI_VERSION 18.5)
|
||||
|
||||
# These always promote warnings rather than errors
|
||||
set(MINIMUM_MAYA_VERSION 2017)
|
||||
set(MINIMUM_DOXYGEN_VERSION 1.8.8)
|
||||
endif()
|
||||
|
||||
# VFX 23 deprecations to transition to MINIMUM_* variables in OpenVDB 12.0.0
|
||||
# @note At the time of writing, any variables that are commented out don't
|
||||
# have target transitional versions.
|
||||
# VFX 21 deprecations to transition to MINIMUM_* variables in OpenVDB 10.0.0
|
||||
|
||||
# set(FUTURE_MINIMUM_GCC_VERSION 11.2.1)
|
||||
# set(FUTURE_MINIMUM_MSVC_VERSION 19.30)
|
||||
# set(FUTURE_MINIMUM_ICC_VERSION 19)
|
||||
set(FUTURE_MINIMUM_GCC_VERSION 9.3.1)
|
||||
set(FUTURE_MINIMUM_ICC_VERSION 19)
|
||||
# set(FUTURE_MINIMUM_MSVC_VERSION 19.10)
|
||||
|
||||
# set(FUTURE_MINIMUM_CXX_STANDARD 20)
|
||||
set(FUTURE_MINIMUM_CMAKE_VERSION 3.24)
|
||||
set(FUTURE_MINIMUM_OPENEXR_VERSION 3.2)
|
||||
set(FUTURE_MINIMUM_BOOST_VERSION 1.82)
|
||||
set(FUTURE_MINIMUM_GLFW_VERSION 3.3)
|
||||
set(FUTURE_MINIMUM_LOG4CPLUS_VERSION 2.0)
|
||||
# set(FUTURE_MINIMUM_NANOBIND_VERSION 2.1.0)
|
||||
|
||||
# set(FUTURE_MINIMUM_BLOSC_VERSION 1.17.0)
|
||||
# set(FUTURE_MINIMUM_TBB_VERSION 2020.3)
|
||||
set(FUTURE_MINIMUM_PYTHON_VERSION 3.11)
|
||||
set(FUTURE_MINIMUM_NUMPY_VERSION 1.26.0)
|
||||
# set(FUTURE_MINIMUM_HOUDINI_VERSION 20.0)
|
||||
set(FUTURE_MINIMUM_LLVM_VERSION 15.0.0)
|
||||
set(FUTURE_MINIMUM_CXX_STANDARD 17)
|
||||
set(FUTURE_MINIMUM_CMAKE_VERSION 3.18)
|
||||
#set(FUTURE_MINIMUM_ILMBASE_VERSION 2.4) # Minimum is already 2.4
|
||||
#set(FUTURE_MINIMUM_OPENEXR_VERSION 2.4) # Minimum is already 2.4
|
||||
set(FUTURE_MINIMUM_BOOST_VERSION 1.73)
|
||||
set(FUTURE_MINIMUM_BLOSC_VERSION 1.17.0)
|
||||
set(FUTURE_MINIMUM_TBB_VERSION 2020.2)
|
||||
set(FUTURE_MINIMUM_PYTHON_VERSION 3.7)
|
||||
set(FUTURE_MINIMUM_NUMPY_VERSION 1.19.0)
|
||||
set(FUTURE_MINIMUM_HOUDINI_VERSION 19.0)
|
||||
set(FUTURE_MINIMUM_LLVM_VERSION 10.0.0)
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#################################################################################
|
||||
## This file is loaded by the Leak/Address Sanitizer build for the unit tests. ##
|
||||
## It can be used to ignore various errors reported by the sanitizer. This is ##
|
||||
## especially useful with upstream issues (e.g. boost/tbb). For help defining ##
|
||||
## suppression rules, see: ##
|
||||
## https://clang.llvm.org/docs/AddressSanitizer.html ##
|
||||
## The build is configured with CMAKE_BUILD_TYPE=asan or lsan ##
|
||||
#################################################################################
|
||||
|
||||
##### Upstream #####
|
||||
|
||||
# Leaks from TBB init which occur due to tbb teardown issues
|
||||
# https://github.com/oneapi-src/oneTBB/issues/206
|
||||
# Should be fixed in oneTBB. Ignore them for now
|
||||
leak:tbb::internal::task_stream<3>::initialize*
|
||||
@@ -16,6 +16,9 @@ vptr:tbb/task.h
|
||||
|
||||
##### OpenVDB #####
|
||||
|
||||
# The sOn/sOff static bool data held on the LeaffBuff<bool> objects can be
|
||||
# initialised to arbitrary true/false values. See the note in LeafBuffer.h
|
||||
enum:openvdb/tools/Activate.h
|
||||
# Some 2s complement tests, ignore the negative shifts
|
||||
# @todo Should address these
|
||||
shift-base:TestMultiResGrid.cc
|
||||
|
||||
+6
-4
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
#
|
||||
#[=======================================================================[
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
project(OpenVDBDocs LANGUAGES NONE)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
@@ -41,10 +41,8 @@ set(DOXY_FILES
|
||||
openvdb/openvdb/io
|
||||
openvdb/openvdb/math
|
||||
openvdb/openvdb/points
|
||||
openvdb/openvdb/points/impl
|
||||
openvdb/openvdb/python/pyopenvdb.h
|
||||
openvdb/openvdb/tools
|
||||
openvdb/openvdb/tools/impl
|
||||
openvdb/openvdb/tree
|
||||
openvdb/openvdb/util
|
||||
doc/build.txt
|
||||
@@ -217,6 +215,7 @@ if(OPENVDB_DOXYGEN_AX)
|
||||
doc/ax/doc.txt
|
||||
openvdb_ax/openvdb_ax
|
||||
openvdb_ax/openvdb_ax/ast
|
||||
openvdb_ax/openvdb_ax/cmd
|
||||
openvdb_ax/openvdb_ax/codegen
|
||||
openvdb_ax/openvdb_ax/compiler
|
||||
openvdb_ax/openvdb_ax/grammar
|
||||
@@ -236,6 +235,9 @@ if(OPENVDB_DOXYGEN_NANOVDB)
|
||||
doc/nanovdb/HelloWorld.md
|
||||
nanovdb/nanovdb
|
||||
nanovdb/nanovdb/util
|
||||
nanovdb/nanovdb/cmd/convert
|
||||
nanovdb/nanovdb/cmd/print
|
||||
nanovdb/nanovdb/cmd/validate
|
||||
nanovdb/nanovdb/examples/benchmark
|
||||
nanovdb/nanovdb/examples/ex_bump_pool_buffer
|
||||
nanovdb/nanovdb/examples/ex_collide_level_set
|
||||
|
||||
+5
-9
@@ -1165,11 +1165,10 @@ operations (if an operation is not listed, it is not supported):
|
||||
<tr style="text-align:center">
|
||||
<th>Left Operand Type</th><th>Binary Op(s)</th><th>Right Operand Type</th><th>Description</th>
|
||||
</tr>
|
||||
<tr style="text-align:center"><td rowspan="3">@ref axscalars "scalar"</td><td rowspan="1">`== != < > <= >=`</td><td>@ref axscalars "scalar"</td>
|
||||
<tr style="text-align:center"><td rowspan="3">@ref axscalars "scalar"</td><td rowspan="3">`== != < > <= >=`</td><td>@ref axscalars "scalar"</td>
|
||||
<td style="text-align:left">Returns the result of the scalar comparison.</td>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td rowspan="2">`== !=`</td>
|
||||
<td>@ref axvecmats "vector"</td>
|
||||
<td style="text-align:left" rowspan="2">
|
||||
Performs per component comparisons (after
|
||||
@@ -1196,12 +1195,11 @@ for (int i = 1; i < 3; ++i) c &= a[i] == b;
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td style="border-top-width: thick" rowspan="2">@ref axvecmats "vector"</td>
|
||||
<td style="border-top-width: thick; text-align:center" rowspan="1">`== != < > <= >=`</td>
|
||||
<td style="border-top-width: thick; text-align:center" rowspan="2">`== != < > <= >=`</td>
|
||||
<td style="border-top-width: thick">@ref axscalars "scalar"</td>
|
||||
<td style="border-top-width: thick;text-align:left">Same as `scalar op vector`</td>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td rowspan="1">`== !=`</td>
|
||||
<td>@ref axvecmats "vector"</td>
|
||||
<td style="text-align:left">
|
||||
Performs binary comparison operations (after
|
||||
@@ -1222,13 +1220,11 @@ for (int i = 1; i < 3; ++i) c &= a[i] == b[i];
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td style="border-top-width: thick" rowspan="2">@ref axvecmats "matrix"</td>
|
||||
<td style="border-top-width: thick; text-align:center" rowspan="1">`== != < > <= >=`</td>
|
||||
<td style="border-top-width: thick; text-align:center" rowspan="2">`== != < > <= >=`</td>
|
||||
<td style="border-top-width: thick">@ref axscalars "scalar"</td>
|
||||
<td style="border-top-width: thick;text-align:left">Same as `scalar op matrix`</td>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td rowspan="1">`== !=`</td>
|
||||
<td>@ref axvecmats "matrix"</td>
|
||||
<tr style="text-align:center"><td>@ref axvecmats "matrix"</td>
|
||||
<td style="text-align:left">
|
||||
Performs binary comparison operations (after
|
||||
@ref axtypeprecedence "implicit conversion") on each pair corresponding
|
||||
@@ -1797,7 +1793,7 @@ returned, otherwise @b `c` is evaluated and returned. In this case, @b `a` and @
|
||||
@anchor axvecmatinit
|
||||
@par Vector/Matrix Initializer
|
||||
@ref axvecmats "Vectors and matrices" can be represented as local variables (e.g.
|
||||
@b `vec3f`), external attributes or parameters (e.g. @b `vec3f\@attrib`) or as
|
||||
@b `vec3f`), external attributes or parameters (e.g. @b `vec3f@attrib`) or as
|
||||
temporary values using the vector/matrix initializer syntax. This operator has
|
||||
the form:
|
||||
@par
|
||||
|
||||
@@ -32,7 +32,7 @@ These examples demonstrate how to use AX on OpenVDB points grids.
|
||||
Below is a small example which demonstrates working with a few point attributes.
|
||||
The @ symbol is the identifier for an AX attribute. The type of each attribute
|
||||
is specified before the @ symbol and the name is specified afterwards. For
|
||||
example: @b `int\@count` would imply an @b integer attribute called @b count.
|
||||
example: @b `int@count` would imply an @b integer attribute called @b count.
|
||||
@par
|
||||
In this example there are three point attributes: a @b float attribute @b speed,
|
||||
a @b vec3f float attribute @b velocity and a @b vec3f float attribute @b colour.
|
||||
@@ -114,7 +114,7 @@ v@P += v@v * dt;
|
||||
@endcode
|
||||
@par
|
||||
The final AX command, `v@P += v@v * dt;` writes to the position attribute of
|
||||
the points @b `v\@P`. Whenever position is written to in this way, the AX
|
||||
the points @b `v@P`. Whenever position is written to in this way, the AX
|
||||
`PointExecutable` will move (re-bucket) points in PointDataGrids.
|
||||
|
||||
@subsection axexamplepointcurlnoise Curl Noise
|
||||
@@ -234,7 +234,7 @@ vec3f@vel += dt * massInverse * vec3f@force;
|
||||
@par
|
||||
Here we demonstrate how AX can be used to blend two volumes together. Note that
|
||||
only the volumes which are written to are executed over. In the below code,
|
||||
only @b `\@surface_a` is written to. This means that the final blended result,
|
||||
only @b `@surface_a` is written to. This means that the final blended result,
|
||||
stored in `surface_a`, will only be updated in `surface_a`'s topology. Should
|
||||
we want a combined blend of @b non @b overlapping areas of both surface a and b,
|
||||
we would need to activate a's topology with respect to b first.
|
||||
|
||||
+19
-17
@@ -87,7 +87,7 @@ given FindModule e.g. `FindBlosc.cmake`:
|
||||
- @b Xxx_ROOT - Preferred installation prefix. The given dependency is
|
||||
expected to follow a folder structure `Xxx_ROOT/include` and `Xxx_ROOT/lib`
|
||||
exist. Note that unlike the above, this is the case matching name of the
|
||||
find package .i.e. Blosc_ROOT, TBB_ROOT etc.
|
||||
find package .i.e. Blosc_ROOT, IlmBase_ROOT, TBB_ROOT etc.
|
||||
- @b XXX_INCLUDEDIR / @b XXX_LIBRARYDIR - Preferred include and library
|
||||
directories
|
||||
- @b SYSTEM_LIBRARY_PATHS - A list of paths appended to all include and lib
|
||||
@@ -238,8 +238,12 @@ it's a good idea to read the above section on
|
||||
|
||||
DCC | Supported Version | OpenVDB ABI |
|
||||
-------- | ----------------- | ----------- |
|
||||
Houdini | 20.0 | 10 |
|
||||
Houdini | 20.5 | 11 |
|
||||
Houdini | 18.0 | 6 |
|
||||
Houdini | 18.5 | 7 |
|
||||
Houdini | 19.0 | 8 |
|
||||
Maya | 2017 | Any |
|
||||
Maya | 2018 | Any |
|
||||
Maya | 2019 | Any |
|
||||
|
||||
@subsection buildBuildHou Building Against Houdini
|
||||
|
||||
@@ -254,18 +258,17 @@ OpenVDB components you wish to build.
|
||||
Package | Description | OpenVDB Components |
|
||||
-------------- | --------------------------------------------------------------- | ------------------ |
|
||||
CMake | Cross-platform family of tools designed to help build software | All |
|
||||
C++17 Compiler | Matching Houdini compiler and version | All |
|
||||
Boost | Components: iostreams | All |
|
||||
C++14 Compiler | Matching Houdini compiler and version | All |
|
||||
Boost | Components: iostreams, python, thread | All |
|
||||
GoogleTest | A unit testing framework module for C++ | Unit Tests |
|
||||
CppUnit | A unit testing framework module for C++ | Unit Tests (AX) |
|
||||
GLFW | Simple API for OpenGL development | OpenVDB View |
|
||||
Doxygen | Documentation generation from C++ | Documentation |
|
||||
Log4cplus | An optional dependency for improved OpenVDB Logging | Optional (All) |
|
||||
nanobind | C++/python bindings | Optional (Python) |
|
||||
NumPy | Scientific computing with Python | Optional (Python) |
|
||||
LLVM | Target-independent code generation | OpenVDB AX |
|
||||
|
||||
At a minimum a matching C++17 compiler and CMake will be required. See
|
||||
At a minimum, boost, a matching C++14 compiler and CMake will be required. See
|
||||
the full [dependency list](@ref dependencies) for help with downloading and
|
||||
installing the above software. Note that as Blosc and ZLib are provided as part
|
||||
of the Houdini installation `USE_BLOSC` and `USE_ZLIB` should be left `ON`.
|
||||
@@ -344,8 +347,8 @@ Supported versions of maya only ship with TBB.
|
||||
Package | Description | OpenVDB Components |
|
||||
-------------- | --------------------------------------------------------------- | -------------------------------- |
|
||||
CMake | Cross-platform family of tools designed to help build software | All |
|
||||
C++17 Compiler | Matching Houdini compiler and version | All |
|
||||
Boost | Components: iostreams | All |
|
||||
C++14 Compiler | Matching Houdini compiler and version | All |
|
||||
Boost | Components: iostreams, python, thread | All |
|
||||
ZLIB | Compression library for disk serialization compression | All |
|
||||
Blosc | Recommended dependency for improved disk compression | All* |
|
||||
GoogleTest | A unit testing framework module for C++ | Unit Tests |
|
||||
@@ -353,16 +356,15 @@ CppUnit | A unit testing framework module for C++
|
||||
GLFW | Simple API for OpenGL development | OpenVDB View |
|
||||
Doxygen | Documentation generation from C++ | Documentation |
|
||||
OpenEXR | EXR serialization support | OpenVDB Render |
|
||||
Imath | Used half precision floating points and EXR serialization support | Optional (All) |
|
||||
IlmBase | Used half precision floating points and EXR serialization support | Optional (All) |
|
||||
Log4cplus | An optional dependency for improved OpenVDB Logging | Optional (All) |
|
||||
nanobind | C++/python bindings | Optional (Python) |
|
||||
NumPy | Scientific computing with Python | Optional (Python) |
|
||||
LLVM | Target-independent code generation | OpenVDB AX |
|
||||
|
||||
|
||||
* See [blosc support](@ref buildBloscSupport)
|
||||
|
||||
At a minimum, boost, a matching C++17 compiler, ZLIB, blosc and CMake will be
|
||||
At a minimum, boost, a matching C++14 compiler, ZLIB, blosc and CMake will be
|
||||
required. See the full [dependency list](@ref dependencies) for help with
|
||||
downloading and installing the above software.
|
||||
|
||||
@@ -392,12 +394,14 @@ Optional:
|
||||
install the Maya plugin to. Defaults to the value of `${CMAKE_INSTALL_PREFIX}/maya${Maya_VERSION}`
|
||||
- @b BOOST_ROOT =`/path/to/boost/install` # Path to boost. May not be required,
|
||||
CMake may find it automatically
|
||||
- @b IlmBase_ROOT =`/path/to/ilmbase/install` # Path to ilmbase.
|
||||
|
||||
For example on MacOS and where the build folder has been created inside the
|
||||
OpenVDB source root:
|
||||
|
||||
@code
|
||||
cmake -D BOOST_ROOT=/path/to/boost/install \
|
||||
-D IlmBase_ROOT=/path/to/ilmbase/install \
|
||||
-D Maya_ROOT=/Applications/Autodesk/maya2019/ \
|
||||
-D USE_MAYA=ON \
|
||||
../
|
||||
@@ -512,7 +516,7 @@ You can add the below CMake snippet to your main `CMakeLists.txt` to bring in
|
||||
OpenVDB as a dependency:
|
||||
|
||||
@code{.cmake}
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
list(APPEND CMAKE_MODULE_PATH "/location/of/openvdb/install/lib/cmake/OpenVDB")
|
||||
find_package(OpenVDB REQUIRED)
|
||||
target_link_libraries(myapp OpenVDB::openvdb)
|
||||
@@ -605,10 +609,8 @@ OpenVDB uses [imported targets](https://cmake.org/cmake/help/latest/command/add_
|
||||
for all its dependencies. For imported Boost compatibility, the following
|
||||
versions of CMake are required:
|
||||
|
||||
- Boost 1.80 requires CMake 3.24.2 or newer.
|
||||
- Boost 1.81 requires CMake 3.25.2 or newer.
|
||||
- Boost 1.82 requires CMake 3.27.0 or newer.
|
||||
- Boost 1.83 requires CMake 3.27.4 or newer.
|
||||
- Boost 1.68, 1.69 require CMake 3.13 or newer.
|
||||
- Boost 1.70 requires CMake 3.14 or newer.
|
||||
|
||||
Use the above list to identify the version of CMake you require for your version
|
||||
of Boost. Note that this may be implemented into the OpenVDB CMake in the future.
|
||||
|
||||
+44
-733
@@ -2,741 +2,43 @@
|
||||
|
||||
@page changes Release Notes
|
||||
|
||||
@htmlonly <a name="v12_0_2_changes"></a>@endhtmlonly
|
||||
@htmlonly <a name="v9_0_1_changes"></a>@endhtmlonly
|
||||
@par
|
||||
<B>Version 12.0.2</B> - <I>In development</I>
|
||||
|
||||
|
||||
@htmlonly <a name="v12_0_1_changes"></a>@endhtmlonly
|
||||
@par
|
||||
<B>Version 12.0.1</B> - <I>April 3, 2025</I>
|
||||
|
||||
@par
|
||||
OpenVDB:
|
||||
- New features:
|
||||
- Added read and write support for OFF (Object File Format) files to vdb_tool
|
||||
|
||||
- Build:
|
||||
- Fixed a build issue with vdb_render on Windows with newer versions of glew not including glu.h by default
|
||||
- Fixed issues with newer versions of clang refusing to accept older ::template syntax
|
||||
|
||||
@par
|
||||
NanoVDB:
|
||||
- New features:
|
||||
- Added support for multiple GPUs to DeviceBuffer
|
||||
- Added a UnifiedBuffer class that wraps CUDA unified memory
|
||||
- Added example for multiGPU sparse convolution
|
||||
- Added CUDA utility functions for device queries
|
||||
- Added functions to independently stop and compute the elapsed time for timer classes
|
||||
|
||||
- Improvements:
|
||||
- Replaced CUB's CachingDeviceAllocator with the default asynchronous stream ordered allocator in PointsToGrid for improved performance
|
||||
|
||||
- Bug fix:
|
||||
- Map is now properly transposed when converting NanoVDB to OpenVDB.
|
||||
- Fixed ostream specializations being hidden within the nanovdb namespace
|
||||
- Fixed a call to a non-existent method in GridBuild.h
|
||||
|
||||
|
||||
@htmlonly <a name="v1_changes"></a>@endhtmlonly
|
||||
@par
|
||||
<B>Version 12.0.0</B> - <I>October 31, 2024</I>
|
||||
|
||||
@par
|
||||
<BLOCKQUOTE>
|
||||
OpenVDB is now licensed under the Apache 2.0 license, instead of the MPL 2.0 license.
|
||||
</BLOCKQUOTE>
|
||||
|
||||
@par
|
||||
<BLOCKQUOTE>
|
||||
This version introduces ABI changes relative to older major releases, so to
|
||||
preserve ABI compatibility it might be necessary to define the macro
|
||||
<TT>OPENVDB_ABI_VERSION_NUMBER=</TT><I>N</I>, where, for example,
|
||||
<I>N</I> is 10 for Houdini 20.0 and 11 for Houdini 20.5.
|
||||
</BLOCKQUOTE>
|
||||
|
||||
@par
|
||||
<BLOCKQUOTE>
|
||||
GCC 9 is no longer supported.
|
||||
</BLOCKQUOTE>
|
||||
|
||||
@par
|
||||
OpenVDB:
|
||||
- New features:
|
||||
- Added tools::LevelSetFilter::fillet() method to round off concave edges
|
||||
to create smoother transition between surfaces.
|
||||
|
||||
- Improvements:
|
||||
- Added openvdb::assertAbort to replace cassert and a
|
||||
@c OPENVDB_ENABLE_ASSERTS cmake argument/compile define to toggle
|
||||
assertions in OpenVDB code, independantly of NDEBUG. Asserts are
|
||||
no longer enabled by default in when NDEBUG is absent (e.g.
|
||||
Debug builds).
|
||||
- Removed last traces of Boost when @c OPENVDB_USE_DELAYED_LOADING is OFF
|
||||
<I>[Reported by Brian McKinnon]</I>
|
||||
- RootNode code cleanup to eliminate redundant key conversion and
|
||||
to create map values in-place.
|
||||
- Add RootNode::deleteChildOrTile() to delete a child or tile of
|
||||
the root node.
|
||||
- ValueAccessors are now defined and created in the Tree class
|
||||
instead of in the Grid class so that custom Tree implementations
|
||||
may define and create their own ValueAccessors if desired.
|
||||
- Added support for PDAL to vdb_tool [Contributed by Tom Matterson]
|
||||
- LeafManager and NodeManager now use Index64 for leaf counts internally.
|
||||
- Added RootNode::probeChild() const.
|
||||
- Added RootNode::probeChild() and RootNode::probeConstChild().
|
||||
- Added RootNode::probe() and RootNode::probeConst() to query key presence,
|
||||
child node, value and active state.
|
||||
- Added InternalNode::probeChild() const.
|
||||
- Added InternalNode::probeChild() and probeChildConst() with coord access
|
||||
and optionally value and active state.
|
||||
- Added InternalNode::probeChild() and probeChildConst() with index access
|
||||
and optionally value and active state.
|
||||
- Added InternalNode::isValueOff(), LeafNode::isValueOff(),
|
||||
LeafNodeBool::isValueOff(), LeafNodeMask::isValueOff().
|
||||
- Added LeafNodeMask::probeValue(Index,val), LeafNodeBool::probeValue(Index,val).
|
||||
- Added RootNode::getValueUnsafe(), RootNode::getChildUnsafe(),
|
||||
RootNode::getConstChildUnsafe().
|
||||
- Added InternalNode::getValueUnsafe(), InternalNode::getChildUnsafe(),
|
||||
InternalNode::getConstChildUnsafe().
|
||||
- Added InternalNode::setActiveStateUnsafe(), InternalNode::setValueOnlyUnsafe(),
|
||||
InternalNode::setValueOnUnsafe(), InternalNode::setValueOffUnsafe().
|
||||
- Added InternalNode::setChildUnsafe(), InternalNode::resetChildUnsafe(),
|
||||
InternalNode::stealChildUnsafe(), InternalNode::deleteChildUnsafe().
|
||||
- For LeafNode, LeafNodeBool and LeafNodeMask - added
|
||||
LeafNode::getValueUnsafe(), LeafNode::setActiveStateunsafe(),
|
||||
LeafNode::setValueOnlyUnsafe(), LeafNode::setValueOnUnsafe(),
|
||||
LeafNode::setValueOffUnsafe().
|
||||
|
||||
- ABI changes:
|
||||
- Tree::leafCount(), Tree::unallocatedLeafCount(),
|
||||
Tree::nonLeafCount() and Tree::nodeCount() now use Index64 in their
|
||||
return types instead of Index32.
|
||||
|
||||
- API Changes:
|
||||
- RootNode::tileCount(), RootNode::activeTileCount() and
|
||||
RootNode::inactiveTileCount() are now public.
|
||||
- RootNode::hasKey() and RootNode::coordToKey() are now public.
|
||||
- RootNode::leafCount(), RootNode::nonLeafCount() and RootNode::nodeCount()
|
||||
now use Index64 instead of Index32. The Index32 variant is deprecated.
|
||||
- InternalNode::leafCount(), InternalNode::nonLeafCount() and
|
||||
InternalNode::nodeCount() now use Index64 instead of Index32. The Index32
|
||||
variant is deprecated.
|
||||
- LeafNode::leafCount() and LeafNode::nonLeafCount() now use Index64 instead
|
||||
of Index32. The Index32 variant is deprecated.
|
||||
|
||||
- Bug Fixes:
|
||||
- Fix potential crash reading corrupt .vdb files with invalid
|
||||
blosc or zip chunks.
|
||||
<I>[Reported by Matthias Ueberheide]</I>
|
||||
|
||||
- Fix a bug in RootNode::setOrigin() where the origin was updated
|
||||
before the error was thrown potentially leaving the root in an
|
||||
invalid state.
|
||||
- Fixed a thread sanitizer issue which could cause undefined
|
||||
behaviour in VolumeToSpheres::fillWithSpheres
|
||||
<I>[Reported by Jérémie Dumas]</I>
|
||||
- Fixed an occurance of undefined behaviour in tools::activate
|
||||
(though this would typically not have manifested with any
|
||||
unintended behaviour)
|
||||
|
||||
@par
|
||||
NanoVDB:
|
||||
- Bug fix:
|
||||
- nanovdb::readGrids works with raw grid buffer.
|
||||
|
||||
- Improvements:
|
||||
- Restructure files location and namespace to be more align with
|
||||
OpenVDB. The namespaces touched by the restructuring are: io,
|
||||
cuda, util, tools, and math.
|
||||
- Add two scripts updateFiles.sh and updateFiles.py to update the
|
||||
files using NanoVDB. The script updateFiles.py works on both
|
||||
Windows and Linux. For a more complete list of changes, see API
|
||||
Changes (details).
|
||||
|
||||
- cuda::PointsToGrid supports target density.
|
||||
- Add support for NanoVDB Grid of type UInt8.
|
||||
- Add ability to use externally managed CUDA buffer.
|
||||
- Add create methods for CudaDeviceBuffer and exceptions.
|
||||
- Improve GridValidator logic, e.g. include check for grid count.
|
||||
- Add operator > and >= for class Coord according to lexicographical order.
|
||||
- Add toCodec to convert string to Codec enumeration type.
|
||||
- Add nanovdb::strlen<GridType>().
|
||||
- Add strncpy util.
|
||||
- Add @c NANOVDB_DISABLE_SYNC_CUDA_MALLOC that maps cudaMallocAsync
|
||||
and cudaFreeAsync to cudaMalloc and cudaFree respectively.
|
||||
- Add guard to @c UINT64_C.
|
||||
- Remove use of cudaMallocAsync in PointsToGrid.cuh.
|
||||
- Align PNanoVDB blind metadata to NanoVDB.
|
||||
|
||||
- API Changes:
|
||||
- Change mapToGridType to toGridType.
|
||||
- Change mapToMagic to toMagic.
|
||||
- Change <TT>CpuTimer.h</TT> to <TT>Timer.h</TT>.
|
||||
|
||||
- API Changes (details):
|
||||
- These APIs are now under the math namespace: Ray, DDA, HDDA,
|
||||
Vec3, Vec4, BBox, ZeroCrossing, TreeMarcher, PointTreeMarcher,
|
||||
BoxStencil, CurvatureStencil, GradStencil, WenoStencil, AlignUp,
|
||||
Min, Max, Abs, Clamp, Sqrt, Sign, Maximum, Delta, RoundDown, pi,
|
||||
isApproxZero, Round, createSampler, SampleFromVoxels.
|
||||
|
||||
- These APIs are now under the tools namespace: createNanoGrid,
|
||||
StatsMode, createLevelSetSphere, createFogVolumeSphere,
|
||||
createFogVolumeSphere, createFogVolumeSphere,
|
||||
createFogVolumeTorus, createLevelSetBox, CreateNanoGrid,
|
||||
updateGridStats, evalChecksum, validateChecksum, checkGrid,
|
||||
Extrema.
|
||||
- These APIs are now under the util namespace: is_floating_point,
|
||||
findLowestOn, findHighestOn, Range, streq, strcpy, strcat,
|
||||
empty, Split, invoke, forEach, reduce, prefixSum, is_same,
|
||||
is_specialization, PtrAdd, PtrDiff.
|
||||
|
||||
- Move nanovdb::build to nanovdb::tools::build.
|
||||
- Rename nanovdb::BBoxR to nanovdb::Vec3dBBox.
|
||||
- Rename nanovdb::BBox<nanovdb::Vec3d> to nanovdb::Vec3dBbox.
|
||||
- Move nanovdb::cudaCreateNodeManager to nanovdb::cuda::createNodeManager.
|
||||
- Move and rename nanovdb::cudaVoxelsToGrid to nanovdb::cuda::voxelsToGrid.
|
||||
- Move and rename nanovdb::cudaPointsToGrid to nanovdb::cuda::pointsToGrid.
|
||||
- Move nanovdb::DitherLUT to nanovdb::math::DitherLUT.
|
||||
- Move and rename nanovdb::PackedRGBA8 to nanovdb::math::Rgba8.
|
||||
- Move nanovdb::Rgba8 to nanovdb::math::Rgba8.
|
||||
- Move and rename nanovdb::CpuTimer to nanovdb::util::Timer.
|
||||
- Move nanovdb::GpuTimer to nanovdb::util::cuda::Timer.
|
||||
- Move and rename nanovdb::CountOn to nanovdb::util::countOn.
|
||||
|
||||
- Move <TT>util/GridHandle.h</TT> to <TT>GridHandle.h</TT>.
|
||||
- Move <TT>util/BuildGrid.h</TT> to <TT>tools/GridBuilder.h</TT>.
|
||||
- Move <TT>util/GridBuilder.h</TT> to <TT>tools/GridBuilder.h</TT>.
|
||||
- Move <TT>util/IO.h</TT> to <TT>io/IO.h</TT>.
|
||||
- Move <TT>util/CSampleFromVoxels.h</TT> to <TT>math/CSampleFromVoxels.h</TT>.
|
||||
- Move <TT>util/DitherLUT.h</TT> to <TT>math/DitherLUT.h</TT>.
|
||||
- Move <TT>util/HDDA.h</TT> to <TT>math/HDDA.h</TT>.
|
||||
- Move <TT>util/Ray.h</TT> to <TT>math/Ray.h</TT>.
|
||||
- Move <TT>util/SampleFromVoxels.h</TT> to <TT>math/SampleFromVoxels.h</TT>.
|
||||
- Move <TT>util/Stencils.h</TT> to <TT>nanovdb/math/Stencils.h</TT>.
|
||||
- Move <TT>util/CreateNanoGrid.h</TT> to <TT>tools/CreateNanoGrid.h</TT>.
|
||||
- Move and rename <TT>util/Primitives.h</TT> to <TT>tools/CreatePrimitives.h</TT>.
|
||||
- Move <TT>util/GridChecksum.h</TT> to <TT>tools/GridChecksum.h</TT>.
|
||||
- Move <TT>util/GridStats.h</TT> to <TT>tools/GridStats.h</TT>.
|
||||
- Move <TT>util/GridChecksum.h</TT> to <TT>tools/GridChecksum.h</TT>.
|
||||
- Move <TT>util/GridValidator.h</TT> to <TT>tools/GridValidator.h</TT>.
|
||||
- Move <TT>util/NanoToOpenVDB.h</TT> to <TT>tools/NanoToOpenVDB.h</TT>.
|
||||
- Move <TT>util/cuda/CudaGridChecksum.cuh</TT> to <TT>tools/cuda/CudaGridChecksum.cuh</TT>.
|
||||
- Move <TT>util/cuda/CudaGridStats.cuh</TT> to <TT>tools/cuda/CudaGridStats.cuh</TT>.
|
||||
- Move <TT>util/cuda/CudaGridValidator.cuh</TT> to <TT>tools/cuda/CudaGridValidator.cuh</TT>.
|
||||
- Move <TT>util/cuda/CudaIndexToGrid.cuh</TT> to <TT>tools/cuda/CudaIndexToGrid.cuh</TT>.
|
||||
- Move and rename <TT>util/cuda/CudaPointsToGrid.cuh</TT> to <TT>tools/cuda/PointsToGrid.cuh</TT>.
|
||||
- Move <TT>util/cuda/CudaSignedFloodFill.cuh</TT> to <TT>tools/cuda/CudaSignedFloodFill.cuh</TT>.
|
||||
- Move and rename <TT>util/cuda/CudaDeviceBuffer.h</TT> to <TT>cuda/DeviceBuffer.h</TT>.
|
||||
- Move and rename <TT>util/cuda/CudaGridHandle.cuh</TT> to <TT>cuda/GridHandle.cuh</TT>.
|
||||
- Move and rename <TT>util/cuda/CudaUtils.h</TT> to <TT>util/cuda/Util.h</TT>.
|
||||
- Move and consolidate <TT>util/cuda/GpuTimer.h</TT> to <TT>util/cuda/Timer.h</TT>.
|
||||
|
||||
@par
|
||||
Python:
|
||||
- OpenVDB Python bindings are now implemented using nanobind
|
||||
instead of pybind11
|
||||
- The OpenVDB Python module has been changed from pyopenvdb to openvdb
|
||||
- Added Python bindings for NanoVDB
|
||||
|
||||
@par
|
||||
Houdini:
|
||||
- When @c OPENVDB_ENABLE_RPATH is @c ON, the location of
|
||||
libopenvdb_houdini is now added to the rpath of all Houdini
|
||||
dsos.
|
||||
|
||||
@par
|
||||
Build:
|
||||
- Fixed an issue with OpenVDB AX's CMake on Windows where the
|
||||
static and shared library targets would have the same name
|
||||
<I>[Reported by Nicholas Yue]</I>
|
||||
- @c USE_EXPLICIT_INSTANTIATION is now disabled on Windows by default
|
||||
due to OOM linker issues.
|
||||
- Jemalloc is now the preferred allocator of choice on all
|
||||
platforms when @c CONCURRENT_MALLOC is set to Auto.
|
||||
- Fixed an issue with the Blosc CMake FindPackage for the OpenVDB
|
||||
Windows static library.
|
||||
|
||||
|
||||
@htmlonly <a name="v11_0_0_changes"></a>@endhtmlonly
|
||||
@par
|
||||
<B>Version 11.0.0</B> - <I>November 1, 2023</I>
|
||||
|
||||
@par
|
||||
<BLOCKQUOTE>
|
||||
This version introduces ABI changes relative to older major releases, so to
|
||||
preserve ABI compatibility it might be necessary to define the macro
|
||||
<TT>OPENVDB_ABI_VERSION_NUMBER=</TT><I>N</I>.
|
||||
</BLOCKQUOTE>
|
||||
|
||||
@par
|
||||
<BLOCKQUOTE>
|
||||
OpenEXR 2 and Python 2 are no longer supported.
|
||||
</BLOCKQUOTE>
|
||||
|
||||
@par
|
||||
OpenVDB:
|
||||
- Improvements:
|
||||
- Removed use of @c boost::any in favor of @c std::any.
|
||||
<I>[Contributed by Brian McKinnon]</I>
|
||||
|
||||
- Bug Fixes:
|
||||
- Fix potential crash reading corrupt .vdb files with invalid blosc or zip
|
||||
chunks.
|
||||
<I>[Contributed by Matthias Ueberheide]</I>
|
||||
|
||||
@par
|
||||
NanoVDB:
|
||||
- Highlights:
|
||||
- Several new tools to generate and modify NanoVDB grids on the GPU.
|
||||
- New file format that supports streaming of raw grid buffers.
|
||||
|
||||
- New Features:
|
||||
- New memory efficient @c GridClass::IndexGrid that separates values from tree
|
||||
- 4 new GridTypes (@c Index, @c OnIndex, @c IndexMask, @c OnIndexMask) used by
|
||||
IndexGrid
|
||||
- Added @c createNanoGrid that replaces older conversion methods in
|
||||
<TT>GridBuilder.h</TT>, <TT>IndexGridBuilder.h</TT> and
|
||||
<TT>OpenToNanoVDB.h</TT>
|
||||
- Added @c cudaPointsToGrid that constructs a point device grid from a list of
|
||||
points.
|
||||
- Added @c cudaVoxelsToGrid that constructs a voxel device grid from a list of
|
||||
voxels.
|
||||
- Added <TT>cuda/CudaUtils.h</TT> with several cuda utility functions.
|
||||
- Added @c GpuTimer for timing of kernels in a specific cuda stream.
|
||||
- Added @c cudaIndexToGrid that converts IndexGrids into regular Grids.
|
||||
- Added @c cudaSignedFloodFill that performs signed-flood filling on the GPU.
|
||||
- Added @c cudaAddBlindData that adds blind data to an existing grid on the
|
||||
GPU.
|
||||
- Added @c cudaGridChecksum that computes checksums of device grids.
|
||||
- Added @c cudaGridHandle that handles grids on the GPU.
|
||||
- Added @c cudaNodeManager that constructs a NodeManager on the GPU.
|
||||
- Added build type @c Points and @c GridType::PointIndex for point grids.
|
||||
- Added @c GridType::Vec3u16 and @c GridType::Vec3u8 for compressed
|
||||
coordinates.
|
||||
- Added <TT>PrefixSum.h</TT> for concurrent computation of prefix sum on the
|
||||
CPU.
|
||||
|
||||
- API Changes:
|
||||
- Version 32.6.0 (ABI is unchanged).
|
||||
- Transition from C++11 to C++17
|
||||
- Vec3R is deprecated, please use Vec3d instead.
|
||||
- nanoToOpenVDB now takes the index of a NanoVDB in a GridHandle.
|
||||
- GridData, InternalData and LeafData are now public.
|
||||
- GridMetaData can be copied.
|
||||
- Improvements to <TT>GridBuilder.h</TT> that allows construction of grids on
|
||||
CPU.
|
||||
- GridHandle's move c-tor now requires the GridBuffer to contain a valid grid.
|
||||
- Moved <TT>CudaDeviceBuffer.h</TT> to <TT>cuda/CudaDeviceBuffer.h</TT>.
|
||||
- New API for acceleration of custom random-access with ValueAccessors.
|
||||
- Added BitFlags class for convenient bit-mask operations.
|
||||
- Added Vec2/3 min/maxComponentAtomic GPU methods.
|
||||
- Added @c BBox::expandAtomic and @c BBox::intersectAtomic.
|
||||
- Added @c Coord::expandAtomic.
|
||||
- Added Map constructors.
|
||||
- Added @c Mask::DenseIterator, @c Mask::setOnAtomic, and
|
||||
@c Mask::setOffAtomic.
|
||||
- @c InternalNode::ChildIterator is now const-correct.
|
||||
- Added several new NanoVDB Build Traits.
|
||||
- Syncing <TT>PNanoVDB.h</TT> with <TT>NanoVDB.h</TT>.
|
||||
|
||||
@par
|
||||
Build:
|
||||
- Support for <TT>OpenEXR 2.X</TT> has been removed.
|
||||
- Better support for building with external package configurations with
|
||||
<TT>CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON</TT>.
|
||||
|
||||
@par
|
||||
Python:
|
||||
- Removed Python 2 support.
|
||||
<I>[Contributed by Matthew Cong]</I>
|
||||
- Removed explicit bindings for Math types.
|
||||
<I>[Contributed by Matthew Cong]</I>
|
||||
- Improved type casting for TypedMetadata.
|
||||
<I>[Contributed by Matthew Cong]</I>
|
||||
|
||||
|
||||
|
||||
@htmlonly <a name="v10_1_0_changes"></a>@endhtmlonly
|
||||
@par
|
||||
<B>Version 10.1.0</B> - <I>October 11, 2023</I>
|
||||
|
||||
@par
|
||||
Highlights:
|
||||
- OpenVDB Python bindings are now implemented using pybind11 instead of Boost.Python.
|
||||
[Contributed by Matthew Cong]
|
||||
|
||||
@par
|
||||
OpenVDB:
|
||||
- New features:
|
||||
- Added points::replicate() for the replication of PointDataGrid points
|
||||
and attributes.
|
||||
|
||||
- Improvements:
|
||||
- Upgraded OpenVDBs internal half representation to IMath 3.1.6. Brings
|
||||
conversion support using F16C instructions (if enabled using -mf16c) and
|
||||
the removal of the exponent lookup table in favor of bit shifting.
|
||||
- OpenVDBs copy of Half.h is no longer built with an internal lookup table,
|
||||
but explicitly selects the non-LUT version and disables the creation of
|
||||
the LUT. This is required to avoid symbol conflicts with different
|
||||
namespaced OpenVDB builds.
|
||||
- Removed boost::uuid from Archive, instead std::random_device is used
|
||||
directly to generate UUID-like objects.
|
||||
- Moved all cases of file static/global variables which relied on non-trivial
|
||||
construction into function scopes as static locals. These would previously
|
||||
initialize themselves on start-up in a non-deterministic, compiler-dictated
|
||||
order(static-initialization-order-fiasco). This order is now defined by the
|
||||
program's execution.
|
||||
- Fixed the constants used in openvdb::math::Coord::hash() and
|
||||
nanovdb::Coord::hash() to correctly be prime numbers (note that this
|
||||
changes the result of these methods).
|
||||
[Contributed by Benedikt Mersch]
|
||||
- Updated tools::meshToVolume to take two new optional arguments to provide
|
||||
an interior test oracle and an interior testing method. These allow the
|
||||
default outside-flood-fill to be replaced if the actual sidedness can be
|
||||
known.
|
||||
[Contributed by Tomas Skrivan]
|
||||
- LevelSetRebuild now includes example code that demonstrates the intended
|
||||
use of the new meshToVolume interior testing parameters for the
|
||||
resampling of level sets, where the original grid is used as the true
|
||||
sign value. However, due to differences between polygonalization and
|
||||
trilinear interpolation, this behaviour is disabled and exists as a
|
||||
reference.
|
||||
- Introduced openvdb::TupleList to wrap std::tuple and provide interface
|
||||
interop methods with openvdb::TypeList.
|
||||
- Added OPENVDB_FORCE_INLINE, OPENVDB_LIKELY and OPENVDB_UNLIKELY macros.
|
||||
- Introduced openvdb::make_index_sequence to solve clang compilations
|
||||
issues with compiler built-in index_sequence implementations.
|
||||
|
||||
- API changes:
|
||||
- Significant infrastructural change to the ValueAccessor header and
|
||||
implementation. All ValueAccessor specializations have been consolidated
|
||||
into a single class which supports all possible ValueAccessor configurations
|
||||
using index_sequences. Backward compatible declarations have been provided.
|
||||
The new ValueAccessor implementation is marked as final.
|
||||
- PagedArray iterators no longer derive from std::iterator
|
||||
(but remains standard compliant).
|
||||
|
||||
- Bug Fixes:
|
||||
- Internal counters in tree::RangeIterator were limited to 32bit precision.
|
||||
They are now extended to size_t.
|
||||
[Reported by SpaceX]
|
||||
- Fixed a bug when compiling with -fvisibility=hidden and GCC 11 which
|
||||
would cause a crash in openvdb::initialize().
|
||||
- Fixed a bug with LeafManager which wouldn't correctly
|
||||
initialize its LeafNode array for single level Tree configurations
|
||||
i.e. RootNode<LeafNode> (bug introduced in 7.2.0).
|
||||
[Reported by @lanwatch]
|
||||
- Fixed a bug with LeafNodeBool Topology constructor with designated
|
||||
on/off values which wouldn't apply them correctly.
|
||||
[Reported by @hozhaoea]
|
||||
|
||||
@par
|
||||
OpenVDB AX:
|
||||
- Improvements:
|
||||
- Added support for LLVM 15.
|
||||
|
||||
- Bug Fixes:
|
||||
- Fixed a bug in AX on older X86 hardware which could cause a crash when
|
||||
accessing point attributes with half compression (bug introduced in 9.1.0).
|
||||
- Fixed an incorrect option in the `vdb_ax` command line tool where the default
|
||||
optimization level was set to NONE instead of O3 (issue introduced in 10.0.0).
|
||||
|
||||
@par
|
||||
OpenVDB Houdini:
|
||||
- Improvements:
|
||||
- Added Preserve Holes option to VDB From Polygons that uses the
|
||||
fast winding oracle to not collapse holes in polygonal geometry.
|
||||
|
||||
- Bug Fixes:
|
||||
- Fix a bug in the projection mode of the Advect Points SOP that was causing
|
||||
a segfault.
|
||||
|
||||
@par
|
||||
Build:
|
||||
- Fixed a build issue where Boost was not being pulled in when
|
||||
OPENVDB_USE_DELAYED_LOADING was set to OFF.
|
||||
- Fixed a build issue with AX on 32-bit platforms.
|
||||
[Reported by Mathieu Malaterre]
|
||||
- Fixed a compilation issue with the min() and max() methods on Stencils
|
||||
in openvdb/math/Stencils.h.
|
||||
[Reported by Samuel Mauch]
|
||||
- Fixed a compilation error that would be encountered when attempting to
|
||||
enable the SSE4.2 or AVX SIMD options on non-x86 based platforms.
|
||||
- Improved support for compiling with C++20.
|
||||
[Contributed by Denys Maletskyy and Jérémie Dumas]
|
||||
- OpenVDB's CMake no longer modifies the BUILD_SHARED_LIBS variable.
|
||||
[Reported by Maksim Shabunin]
|
||||
- Fix int-in-bool-context GCC9+ warnings by switching to use constexpr if.
|
||||
|
||||
@par
|
||||
@htmlonly <a name="v10_0_1_changes"></a>@endhtmlonly
|
||||
@par
|
||||
<B>Version 10.0.1</B> - <I>November 30, 2022</I>
|
||||
|
||||
@par
|
||||
Bug Fixes:
|
||||
- Fixed uninitialized point flags in tools::VolumeToMesh which could result in
|
||||
non-deterministic results (bug introduced in 10.0.0).
|
||||
|
||||
@par
|
||||
Build:
|
||||
- Fixed CXX standard requirement for VDB components in FindOpenVDB.cmake
|
||||
|
||||
@htmlonly <a name="v10_0_0_changes"></a>@endhtmlonly
|
||||
@par
|
||||
<B>Version 10.0.0</B> - <I>October 27, 2022</I>
|
||||
|
||||
@par
|
||||
<BLOCKQUOTE>
|
||||
This version introduces ABI changes relative to older major releases, so to
|
||||
preserve ABI compatibility it might be necessary to define the macro
|
||||
<TT>OPENVDB_ABI_VERSION_NUMBER=</TT><I>N</I>.
|
||||
</BLOCKQUOTE>
|
||||
|
||||
@par
|
||||
Highlights:
|
||||
- Introducing OpenVDBLink, which provides a Mathematica interface to
|
||||
OpenVDB. This link ports over access to various grid containers including
|
||||
level sets, fog volumes, vector grids, integer grids, Boolean grids,
|
||||
and mask grids. Construction, modification, combinations, visualisations,
|
||||
queries, import, export, etc. can be achieved over grids too. Any
|
||||
Mathematica 3D region that's ConstantRegionQ and BoundedRegionQ can
|
||||
be represented as a level set grid, providing a more seamless integration
|
||||
with OpenVDB.
|
||||
- Introducing a new command-line tool,
|
||||
dubbed <A HREF="https://github.com/AcademySoftwareFoundation/openvdb/tree/master/openvdb_cmd/vdb_tool">vdb_tool</A>,
|
||||
that can combine any number of the high-level tools available
|
||||
in <A HREF="https://github.com/AcademySoftwareFoundation/openvdb/tree/master/openvdb/openvdb/tools">openvdb/tools</A>.
|
||||
For instance, it can convert a sequence of polygon meshes and particles to
|
||||
level sets, perform a large number of operations on these level set
|
||||
surfaces and export them as adaptive polygon meshes.
|
||||
|
||||
@par
|
||||
OpenVDB:
|
||||
- Improvements:
|
||||
- Significantly improved the performance of all ValueAccessor methods which
|
||||
access LeafNode value buffer data. This improvement applies to any type
|
||||
which is delay load compatible (all default types except for bool and mask
|
||||
grids) and improves the performance of many OpenVDB tools.
|
||||
- Improved the performance of volumeToMesh by 10-15%.
|
||||
|
||||
- ABI changes:
|
||||
- ABI change to openvdb::RootNode, which now has a new member that defines
|
||||
the origin of the node. For now this origin is set to a default value of
|
||||
(0,0,0), but in the near future we will allow for offsets to improve
|
||||
access performance and reduce the memory footprints.
|
||||
- Removed deprecated virtual methods from AttributeArray.
|
||||
|
||||
- API changes:
|
||||
- Removed PagedArray::push_back().
|
||||
- Removed Tree visitor methods from Tree, RootNode, InternalNode and
|
||||
LeafNode classes - visit(), visit2(), visitActiveBBox().
|
||||
- Removed LeafManager::getNodes().
|
||||
- Removed tools::dilateVoxels() and tools::erodeVoxels() in favor of
|
||||
tools::dilateActiveValues() and tools::erodeActiveValues().
|
||||
- Removed tools::FindActiveValues::any() and
|
||||
tools::FindActiveValues::none().
|
||||
- StringGrid and StringTrees have been removed.
|
||||
|
||||
- Bug Fixes:
|
||||
- Fixed an issue with tools::topologyToLevelSet which would previously
|
||||
ignore active tiles in the input topology.
|
||||
[Reported by Tobias Rittig]
|
||||
- Fixed a bug with ValueAccessor::addLeaf and ValueAccessor::addTile which
|
||||
wouldn't add the provided leaf nodes to the underlying tree. This bug did
|
||||
NOT affect the specialized accessors which are used by the default tree
|
||||
configuration.
|
||||
[Contributed by Andrey Zakirov]
|
||||
- Fixed a bug where ValueAccessor::probeNode<NodeT> and
|
||||
ValueAccessor:probeConstNode<NodeT> would return a nullptr if the NodeT
|
||||
type was not explicitly being cached by the accessor but the node existed
|
||||
in the tree.
|
||||
- Fixed a bug on Windows where math::Abs could truncate 64bit integer values.
|
||||
[Contributed by Edward Lam]
|
||||
- Fixed an occurrence of undefined behaviour with math::floatToInt32 and
|
||||
math::doubleToInt64.
|
||||
[Reported by Vojtěch Bubník]
|
||||
- Fixed bugs in the sum merge that produced incorrect merged grids when
|
||||
deep-copying the input nodes or when non-zero background grids were being
|
||||
used.
|
||||
- Fixed a bug in FastSweeping where voxels/tiles are left with min/max float
|
||||
values.
|
||||
- Fixed a bug in math/Tuple.h that prevented compilation with VS2017.
|
||||
|
||||
@par
|
||||
OpenVDB AX:
|
||||
- Improvements:
|
||||
- Major updates to the command line interface of the vdb_ax binary, exposing
|
||||
more controls such as tile streaming, value iterator types and attribute
|
||||
bindings.
|
||||
|
||||
@par
|
||||
OpenVDB Houdini:
|
||||
- New Features:
|
||||
- Add convex hull activation for VDB Activate SOP (requires 19.5).
|
||||
|
||||
- Improvements:
|
||||
- Improved SDF activation to use dynamic node manager.
|
||||
|
||||
- Bug Fixes:
|
||||
- Fixed a bug in VDB Visualize SOP where color values that exceed
|
||||
the range wrap around instead of being clamped.
|
||||
|
||||
@par
|
||||
NanoVDB:
|
||||
- New Features:
|
||||
- Added nanovdb::IndexGrid that allows for arbitrary voxel values and even
|
||||
multiple channels to be associated with NanoVDB grids. They are more
|
||||
flexible and memory efficient than regular grids at a small cost of
|
||||
random-access performance. IndexGrids are constructed with the new
|
||||
nanovdb::IndexGridBuilder and accessed with the new
|
||||
nanovdb::ChannelAccessor.
|
||||
- Added iterators to all tree node classes for visiting inactive, active, or
|
||||
all values and child nodes.
|
||||
- NanoVDB.h now includes standalone implementations of reading and writing
|
||||
uncompressed nanovdb grids buffers.
|
||||
- Added Stats::getExtrema, which computes the min/max values of all voxels
|
||||
in a NanoVDB grid that intersects with a user-defined bounding-box.
|
||||
- Added nanovdb::Mask::countOn(int) which is essential to the new
|
||||
nanovdb::IndexGrid.
|
||||
- Added RootNode::probeChild and InternalNode::probeChild.
|
||||
|
||||
- Improvements:
|
||||
- Added a new much improved nanovdb::NodeManager, that is both faster and
|
||||
more memory efficient, and that works on both the CPU and GPU. Note, it
|
||||
uses a handle for allocation (just like nanovdb::Grid) and replaces the
|
||||
old nanovdb::LeafManager which is now deprecated.
|
||||
- NanoToOpenVDB is extended to work with grids templated on Fp4, Fp8, Fp16,
|
||||
FpN, bool and ValueMask.
|
||||
- Renamed RootNode::findTile to RootNode::probeTile and made it public.
|
||||
- Made Mask::getWord return both a const and non-const reference.
|
||||
- Improved unit-tests to use explicit 32B alignment (see alignment bug-fix
|
||||
below).
|
||||
- PNanoVDB.h (a C99 port of NanoVDB.h) has been updated.
|
||||
|
||||
- Bug Fixes:
|
||||
- Fixed a bug in nanovdb::HostBuffer that could produce crashes due to
|
||||
misaligned CPU memory allocations.
|
||||
- Fixed bug related to uninitialized memory in nanovdb::Grid which could
|
||||
confuse CRC32 checksum validation.
|
||||
- Fixed bugs related to the use of intrinsic functions for fast bit-counting
|
||||
in nanovdb.
|
||||
- Fixed a potential security vulnerability in NanoVDB.h related to buffer
|
||||
overflow exploits.
|
||||
|
||||
@par
|
||||
Build:
|
||||
- Added OPENVDB_USE_DELAYED_LOAD flag that enables delayed loading and
|
||||
defaults to on.
|
||||
- Add a placeholder to inject the specific revision and URL used
|
||||
to build OpenVDB, useful for 3rd party build scripts to publish
|
||||
their exact versions.
|
||||
- Fixed an issue where OPENVDB_AX_DLL was not being defined on shared
|
||||
library builds of AX, resulting in symbols not being exported.
|
||||
[Reported by Ray Molenkamp]
|
||||
- Fixed an issue where setting Tbb_INCLUDE_DIR could cause CMake failures.
|
||||
- Updated FindTBB.cmake to support newer library ABI suffixing in
|
||||
TBB 2021.5.
|
||||
- Updated FindBlosc.cmake to better handle cases where blosc is built with
|
||||
external sources.
|
||||
- Resolved LLVM deprecation warnings in AX and added support for LLVM 14.
|
||||
- On Windows (MSVC), OpenVDB is now built with extra compiler options to
|
||||
ensure stricter C++ conformance: /permissive- /Zc:throwingNew /Zc:inline.
|
||||
- On Windows (MSVC), the _USE_MATH_DEFINES macro is no longer defined when
|
||||
including <openvdb/Platform.h> (or any dependent headers). If you were
|
||||
relying on this in your own project for M_PI, M_PI_2, etc. you can add
|
||||
-D_USE_MATH_DEFINES to your own project compiler options. See
|
||||
<A HREF="https://docs.microsoft.com/en-us/cpp/c-runtime-library/math-constants">this page</A>
|
||||
for more info.
|
||||
|
||||
@htmlonly <a name="v9_1_0_changes"></a>@endhtmlonly
|
||||
@par
|
||||
<B>Version 9.1.0</B> - <I>June 9, 2022</I>
|
||||
<B>Version 9.0.1</B> - <I>In Development</I>
|
||||
|
||||
@par
|
||||
Bug Fixes:
|
||||
- Minor fix to move assignment operator in nanovdb/util/HostBuffer.h.
|
||||
This could potentially be a problem on Windows debug builds (unconfirmed).
|
||||
- Minor fix to range in openvdb/tools/LevelSetSphere.h. This could result
|
||||
in data races for multi-threaded execution (unconfirmed)
|
||||
[Reported by Tommy Hinks]
|
||||
- Fixed a bug with Tree::combineExtended which wouldn't propagate the resulting
|
||||
active state when a destination tile overlapped a source child node.
|
||||
[Reported by \@frapit]
|
||||
in data races for multi-threaded execution (unconfirmed) [Reported by Tommy Hinks]
|
||||
- Fixed a bug with Tree::combineExtended which wouldn't propagate the resulting active state when a destination tile overlapped a source child node. [Reported by @frapit]
|
||||
- Fix unit tests failures with Blosc versions >= 1.19.0.
|
||||
- Fixed a regression in ax::run which wouldn't propagate exceptions
|
||||
- Fixed a bug where ax::ast::parse could return a partially constructed but
|
||||
invalid AST on failure
|
||||
- Fixed AX logger exit handling in ax::Compiler::compile and ax::ast::parse
|
||||
- Fixed an issue which could result in significant compilation times when
|
||||
instantiating TypeList<>::Unique<>
|
||||
|
||||
@par
|
||||
New features:
|
||||
- Added support for AMD's HIP API in NanoVDB [Contributed by Blender Foundation]
|
||||
- Added bindings mechanism to AX to allow differing data and AX attribute names
|
||||
(@) in Point and Volume executables.
|
||||
- Added bindings mechanism to AX to allow differing data and AX attribute names (@) in Point and Volume executables.
|
||||
- Added support for OpenVDB AX on Windows.
|
||||
- Added tools::memUsageIfLoaded() which returns the memory consumption of a
|
||||
deserialized VDB tree, useful if delay-loading is enabled.
|
||||
- Added points::rasterizeSpheres() and points::rasterizeSmoothSpheres()
|
||||
variants, new kernels and improved performance for OpenVDB points to surface
|
||||
rasterization.
|
||||
- Added points::rasterizeTrilinear() for OpenVDB points, fast staggered or
|
||||
colocated trilinear rasterization for scalar and vector attributes.
|
||||
- Exposed TypeList declarations in openvdb.h which denote the default set of
|
||||
types supported by OpenVDB.
|
||||
- Added points::FrustumRasterizer for efficient rasterization of OpenVDB points
|
||||
to frustum volumes with optional motion blur.
|
||||
|
||||
@par
|
||||
Improvements:
|
||||
- Added a --thread [n] argument to the vdb_ax binary.
|
||||
- Added a --copy-file-metadata option to vdb_ax. This behaviour is now off by
|
||||
default.
|
||||
- Added support for multiple input files with the vdb_ax binary using -i.
|
||||
Positional arguments as input files are deprecated.
|
||||
- Added tools::minMax() which supports multithreaded evaluation of active
|
||||
minimum and maximum values. Grid::evalMinMax() has been deprecated.
|
||||
[Contributed by Greg Hurst]
|
||||
- Significant performance improvements to AX point kernels, primarily due to
|
||||
providing AX access to attribute buffers for superior code generation.
|
||||
- vdb_print now prints both the in-core memory and total memory usage for VDB
|
||||
grids.
|
||||
- Improved build support for MinGW [Contributed by Mehdi Chinoune]
|
||||
- Added a new foreach method to TypeList for iterating over types without
|
||||
constructing them.
|
||||
- Added TypeList::Transform declaration for transforming TypeLists into new
|
||||
types.
|
||||
- Moved Grid::apply implementation to TypeList::apply to allow for other
|
||||
polymorphic types to invoke it.
|
||||
- Minor updates to NanoVDB to remove compiler warnings.
|
||||
- Added a --copy-file-metadata option to vdb_ax. This behaviour is now off by default.
|
||||
- Added support for multiple input files with the vdb_ax binary using -i. Positional arguments as input files are deprecated.
|
||||
- Added tools::minMax() which supports multithreaded evaluation of active minimum and maximum values. Grid::evalMinMax() has been deprecated. [Contributed by Greg Hurst]
|
||||
|
||||
@par
|
||||
Build:
|
||||
- Regenerated AX grammar with Flex 2.6.4 and Bison 3.8.2.
|
||||
- Improved locating NumPy in CMake when multiple python versions are installed.
|
||||
- Fixed an issue which could report Python as missing when using CMake 3.18 and
|
||||
later on some systems. [Reported by Sam James]
|
||||
- Changed the way boost_python and boost_numpy are located. Both components must
|
||||
match the major/minor version of python in use. This can be circumvented by
|
||||
providing Boost_PYTHON_VERSION or Boost_PYTHON_VERSION_MAJOR.
|
||||
- Relocated OpenVDB binaries to a new openvdb_cmd root directory.
|
||||
- FindTBB.cmake now prioritises newer TBB installations.
|
||||
- Added option to compress PDB data in MSVC debug builds.
|
||||
- Fixed an issue which could report Python as missing when using CMake 3.18 and later on some systems. [Reported by Sam James]
|
||||
|
||||
@par
|
||||
Houdini:
|
||||
- Added Attribute Bindings to AX SOP to allow differently named AX attributes
|
||||
(@) and target point attributes/volumes.
|
||||
- Added Attribute Bindings to AX SOP to allow differently named AX attributes (@) and target point attributes/volumes.
|
||||
- Fix race condition in OpenVDB Merge SOP that could cause crashes
|
||||
or merged VDBs to not be deleted.
|
||||
- VDB Activate SOP no longer stops at the first non-VDB primitive, but instead
|
||||
just skips such primitives.
|
||||
- Added VDB Rasterize Frustum SOP for efficient rasterization of OpenVDB points
|
||||
into frustum volumes with optional motion blur.
|
||||
|
||||
@htmlonly <a name="v9_0_0_changes"></a>@endhtmlonly
|
||||
@par
|
||||
@@ -754,7 +56,7 @@ preserve ABI compatibility it might be necessary to define the macro
|
||||
<BLOCKQUOTE>
|
||||
Official release of NanoVDB, which for the first time offers GPU support for
|
||||
static sparse volumes in OpenVDB. See the
|
||||
<A HREF="https://www.openvdb.org/documentation/doxygen/NanoVDB_MainPage.html">documentation</A>
|
||||
<A HREF="https://academysoftwarefoundation.github.io/openvdb/NanoVDB_MainPage.html">documentation</A>
|
||||
for details.
|
||||
</BLOCKQUOTE>
|
||||
|
||||
@@ -1056,7 +358,8 @@ API changes:
|
||||
@vdblink::tools::activate() tools::activate@endlink and
|
||||
@vdblink::tools::deactivate() tools::deactivate@endlink to a new header,
|
||||
Activate.h.
|
||||
- Deprecated tools::dilateVoxels() and tools::erodeVoxels() in favour of
|
||||
- Deprecated @vdblink::tools::dilateVoxels() tools::dilateVoxels@endlink
|
||||
and @vdblink::tools::erodeVoxels() tools::erodeVoxels@endlink in favour of
|
||||
new morphology methods.
|
||||
- The @vdblink::tools::Film tools::Film@endlink class no longer has a
|
||||
saveExr method in any build configuration. Sample code for saving exrs
|
||||
@@ -1185,7 +488,7 @@ a domain specific JIT (just-in-time) compiled expression language,
|
||||
providing users with a new way of interacting with OpenVDB data. AX is
|
||||
tailored towards writing highly parallelizable and customizable OpenVDB
|
||||
volume and point kernel operations. See the
|
||||
<A HREF="https://www.openvdb.org/documentation/openvdbax.html">documentation</A>
|
||||
<A HREF="https://academysoftwarefoundation.github.io/openvdb/openvdbax.html">documentation</A>
|
||||
for more.
|
||||
</BLOCKQUOTE>
|
||||
|
||||
@@ -1352,8 +655,10 @@ Houdini:
|
||||
Bug Fixes:
|
||||
- Fixed a bug which could cause recursive compile time instantiations of
|
||||
TypeList objects, manifesting in longer compile times.
|
||||
- Deprecated util::PagedArray::push_back due to a race condition. Instead use
|
||||
util::PagedArray::ValueBuffer::push_back which is faster and thread-safe.
|
||||
- Deprecated @vdblink::util::PagedArray::push_back util::PagedArray::push_back@endlink
|
||||
due to a race condition. Instead use
|
||||
@vdblink::util::PagedArray::ValueBuffer::push_back util::PagedArray::ValueBuffer::push_back@endlink
|
||||
which is faster and thread-safe.
|
||||
- Fixed various cases of undefined behavior in some LevelSetUtil methods
|
||||
[Reported by fkemmler]
|
||||
|
||||
@@ -1463,7 +768,7 @@ Improvements:
|
||||
- Removed Boost::thread as a dependency of vdb_view in favour of std::thread.
|
||||
- Removed usage of boost/integer.hpp and boost/math/constants/constants.hpp,
|
||||
the latter in favour of new openvdb math constants for pi
|
||||
- Removed usage of boost/mpl/\*.hpp methods in favour of new template
|
||||
- Removed usage of boost/mpl/*.hpp methods in favour of new template
|
||||
meta-programming methods on the @vdblink::TypeList TypeList@endlink struct.
|
||||
This now supports get, front, back, contains, index, unique, popback, popfront
|
||||
and range removal of types.
|
||||
@@ -1675,7 +980,8 @@ API changes:
|
||||
- @vdblink{tools::VolumeToMesh::pointList(),VolumeToMesh::pointList} and
|
||||
@vdblink{tools::VolumeToMesh::polygonPoolList(),VolumeToMesh::polygonPoolList}
|
||||
now return a std::unique_ptr instead of a boost::scoped_array.
|
||||
- AttributeArray::copyUncompressed is now deprecated.
|
||||
- @vdblink::points::AttributeArray::copyUncompressed() AttributeArray::copyUncompressed@endlink
|
||||
is now deprecated.
|
||||
|
||||
@par
|
||||
Python:
|
||||
@@ -1928,7 +1234,7 @@ Bug fixes:
|
||||
@par
|
||||
API changes:
|
||||
- Moved the @vdblink::CopyConstness CopyConstness@endlink metafunction from
|
||||
@link tree/TreeIterator.h TreeIterator.h@endlink to @link Types.h Types.h@endlink.
|
||||
@link tree/TreeIterator.h TreeIterator.h@endlink to @link Types.h@endlink.
|
||||
|
||||
@par
|
||||
Houdini:
|
||||
@@ -1995,7 +1301,8 @@ New features:
|
||||
AttributeArray::copyValues@endlink and
|
||||
@vdblink::points::AttributeArray::copyValuesUnsafe()
|
||||
AttributeArray::copyValuesUnsafe@endlink that significantly outperform
|
||||
the older AttributeArray::set() method.
|
||||
the older @vdblink::points::AttributeArray::set()
|
||||
AttributeArray::set@endlink method.
|
||||
|
||||
@par
|
||||
Improvements:
|
||||
@@ -2005,8 +1312,9 @@ Improvements:
|
||||
@vdblink::points::AttributeArray AttributeArray@endlink now errors.
|
||||
- Updated point deletion to use faster batch copying for ABI=6+.
|
||||
- Methods relating to in-memory Blosc compression for
|
||||
AttributeArray::compress() now do nothing and have been marked deprecated
|
||||
resulting in memory savings for ABI=6+.
|
||||
@vdblink::points::AttributeArray::compress() AttributeArray@endlink
|
||||
now do nothing and have been marked deprecated resulting in memory savings
|
||||
for ABI=6+.
|
||||
|
||||
@par
|
||||
Bug fixes:
|
||||
@@ -2027,8 +1335,8 @@ API changes:
|
||||
- Removed a number of methods that were deprecated in version 5.0.0 or
|
||||
earlier.
|
||||
- Removed the experimental @b ValueAccessor::newSetValue method.
|
||||
- Deprecated AttributeArray::compress() methods relating to in-memory Blosc
|
||||
compression.
|
||||
- Deprecated @vdblink::points::AttributeArray::compress()
|
||||
AttributeArray@endlink methods relating to in-memory Blosc compression.
|
||||
|
||||
@par
|
||||
Houdini:
|
||||
@@ -2891,8 +2199,8 @@ Bug fixes:
|
||||
- Fixed memory leak in a @vdblink::tools::meshToVolume tools::meshToVolume@endlink
|
||||
sub-tool (expandNarrowband).
|
||||
<I>[Reported by Kévin Dietrich]</I>
|
||||
- Fixed parameter type inconsistencies in @link math/Stencils.h math/Stencils.h@endlink
|
||||
and @link tools/RayIntersector.h tools/RayIntersector.h@endlink.
|
||||
- Fixed parameter type inconsistencies in @link math/Stencils.h@endlink and
|
||||
@link tools/RayIntersector.h@endlink.
|
||||
<I>[Contributed by Kévin Dietrich and Nick Avramoussis]</I>
|
||||
- Fixed a bug in the @vdblink::tools::VolumeToMesh VolumeToMesh@endlink tool that
|
||||
produced artifacts for adaptive surface extraction on clipped level sets.
|
||||
@@ -3143,7 +2451,7 @@ Houdini:
|
||||
modified or deleted, so for safety,
|
||||
@vdblink::io::File::open() File::open@endlink automatically makes
|
||||
private copies of source files that are smaller than a user-specified limit
|
||||
(see io::File::setCopyMaxBytes()).
|
||||
(see @vdblink::io::File::setCopyMaxBytes() File::setCopyMaxBytes@endlink).
|
||||
The limit can be set to zero to disable copying, but if it cannot be
|
||||
guaranteed that a file will not be modified, then it is best not to enable
|
||||
delayed loading for that file.
|
||||
@@ -3206,7 +2514,7 @@ Houdini:
|
||||
for material color lookups.
|
||||
- Added @vdblink::getLibraryVersionString()
|
||||
getLibraryVersionString@endlink and
|
||||
@link OPENVDB_LIBRARY_VERSION_STRING OPENVDB_LIBRARY_VERSION_STRING@endlink.
|
||||
@link OPENVDB_LIBRARY_VERSION_STRING@endlink.
|
||||
- Modified the mesh to volume converter to always set the grid background
|
||||
value to the exterior narrow-band width, and added finite value checks
|
||||
to narrow band parameters.
|
||||
@@ -3913,8 +3221,9 @@ API changes:
|
||||
the Resample SOP and the Combine SOP now use level set rebuild to correctly
|
||||
and safely resample level sets. Previously, scaling a level set would
|
||||
invalidate the signed distance field, leading to holes and other artifacts.
|
||||
- Added a mask-based topological tools::erodeVoxels() erosion tool and rewrote
|
||||
and simplified the tools::dilateVoxels() dilation tool.
|
||||
- Added a mask-based topological
|
||||
@vdblink::tools::erodeVoxels erosion tool@endlink, and rewrote and
|
||||
simplified the @vdblink::tools::dilateVoxels dilation tool@endlink.
|
||||
- The @vdblink::tools::LevelSetAdvection LevelSetAdvection@endlink tool
|
||||
can now advect forward or backward in time.
|
||||
- Tree::pruneLevelSet() now replaces each pruned node with a tile having
|
||||
@@ -4036,7 +3345,8 @@ API changes:
|
||||
that caused it to translate the output grid incorrectly in some cases.
|
||||
- Fixed a bug in the tree-level
|
||||
@vdblink::tree::LeafIteratorBase LeafIterator@endlink that resulted in
|
||||
intermittent crashes in @c tools::dilateVoxels().
|
||||
intermittent crashes in
|
||||
@vdblink::tools::dilateVoxels() tools::dilateVoxels@endlink.
|
||||
- The @c Hermite data type and Hermite grids are no longer supported.
|
||||
- Added tools/GridOperators.h, which includes new, cleaner implementations
|
||||
of the @vdblink::tools::cpt() closest point transform@endlink,
|
||||
@@ -4320,10 +3630,10 @@ API changes:
|
||||
@c LeafArray, which will be deprecated in the next release.
|
||||
- Added a @vdblink::tree::LeafNode::fill() LeafNode::fill@endlink method
|
||||
to efficiently populate leaf nodes with constant values.
|
||||
- Added a tree::Tree::visitActiveBBox() method that applies a functor to the
|
||||
bounding boxes of all active tiles and leaf nodes and that can be used to
|
||||
improve the performance of ray intersection tests, rendering of bounding
|
||||
boxes, etc.
|
||||
- Added a @vdblink::tree::Tree::visitActiveBBox() Tree::visitActiveBBox@endlink
|
||||
method that applies a functor to the bounding boxes of all active tiles
|
||||
and leaf nodes and that can be used to improve the performance of
|
||||
ray intersection tests, rendering of bounding boxes, etc.
|
||||
- Added a @vdblink::tree::Tree::voxelizeActiveTiles()
|
||||
Tree::voxelizeActiveTiles@endlink method to densify active tiles.
|
||||
While convenient and fast, this can produce large dense grids, so use
|
||||
@@ -4334,7 +3644,8 @@ API changes:
|
||||
- Added a GridBase::pruneGrid() method.
|
||||
- Added a @vdblink::Grid::hasUniformVoxels() Grid:hasUniformVoxels@endlink
|
||||
method.
|
||||
- Renamed @c tools::dilate to @c tools::dilateVoxels() and improved its
|
||||
- Renamed @c tools::dilate to
|
||||
@vdblink::tools::dilateVoxels() dilateVoxels@endlink and improved its
|
||||
performance. The new name reflects the fact that the current
|
||||
implementation ignores active tiles.
|
||||
- Added a @vdblink::tools::resampleToMatch() tools::resampleToMatch@endlink
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
This document details the coding practices that are used in the OpenVDB
|
||||
codebase. Contributed code should conform to these guidelines to maintain
|
||||
consistency and maintainability. If there is a rule that you would like
|
||||
clarified, changed, or added, please send a note to openvdb-dev@lists.aswf.io.
|
||||
clarified, changed, or added, please send a note to openvdb@gmail.com.
|
||||
|
||||
|
||||
@section sStyleContents Contents
|
||||
|
||||
+75
-59
@@ -9,6 +9,7 @@
|
||||
- @ref depInstallingDependencies
|
||||
- @ref depUsingAptGet
|
||||
- @ref depUsingHomebrew
|
||||
- @ref depManInstall
|
||||
<!-- - @ref depContents -->
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
@@ -34,18 +35,18 @@ Reference Platform, but for those that do, their specified versions are
|
||||
|
||||
@section depComponents OpenVDB Components
|
||||
|
||||
Component | Requirements | Optional
|
||||
----------------------- | ----------------------------------------------- | --------
|
||||
OpenVDB Core Library | CMake, C++17 compiler, TBB::tbb | Blosc, ZLib, Log4cplus, Imath::Imath, Boost::iostream
|
||||
OpenVDB Print | Core Library dependencies | -
|
||||
OpenVDB LOD | Core Library dependencies | -
|
||||
OpenVDB Render | Core Library dependencies | OpenEXR, Imath::Imath, libpng
|
||||
OpenVDB View | Core Library dependencies, OpenGL, GLFW3, GLEW* | -
|
||||
OpenVDB Python | Core Library dependencies, Python, nanobind | NumPy
|
||||
OpenVDB AX | Core Library dependencies, LLVM | Bison, Flex
|
||||
NanoVDB | - | Core Library, CUDA, TBB, Blosc, ZLib
|
||||
OpenVDB UnitTests | Core Library dependencies, GoogleTest | CppUnit**
|
||||
OpenVDB Documentation | Doxygen | -
|
||||
Component | Requirements | Optional
|
||||
----------------------- | ------------------------------------------------- | --------
|
||||
OpenVDB Core Library | CMake, C++14 compiler, TBB::tbb, Boost::iostream | Blosc, ZLib, Log4cplus, IlmBase::Half
|
||||
OpenVDB Print | Core Library dependencies | -
|
||||
OpenVDB LOD | Core Library dependencies | -
|
||||
OpenVDB Render | Core Library dependencies | OpenEXR, IlmBase, libpng
|
||||
OpenVDB View | Core Library dependencies, OpenGL, GLFW3, GLEW* | -
|
||||
OpenVDB Python | Core Library dependencies, Python, Boost::python | Boost::numpy, NumPy
|
||||
OpenVDB AX | Core Library dependencies, LLVM | Bison, Flex
|
||||
NanoVDB | - | Core Library, CUDA, TBB, Blosc, ZLib
|
||||
OpenVDB UnitTests | Core Library dependencies, GoogleTest | CppUnit**
|
||||
OpenVDB Documentation | Doxygen | -
|
||||
|
||||
- @b * GLEW is only required for building the vdb_view binary on Windows.
|
||||
- @b ** CppUnit is only required for building the AX unit tests.
|
||||
@@ -56,51 +57,57 @@ OpenVDB Documentation | Doxygen | -
|
||||
|
||||
Package | Minimum | Recommended | Description | apt-get | Homebrew | Source
|
||||
-------------- | ------- | ----------- | ----------------------------------------------------------------- | ------- | -------- | ------
|
||||
CMake | 3.20 | Latest | Cross-platform family of tools designed to help build software | Y | Y | https://cmake.org
|
||||
GCC | 11.2.1 | 11.2.1 | C++ 17 Compiler: The GNU Compiler Collection | Y | Y | https://www.gnu.org/software/gcc
|
||||
Clang | 5.0 | Latest | C++ 17 Compiler: A C language family frontend for LLVM | Y | Y | https://clang.llvm.org
|
||||
Intel ICC | 19 | Latest | C++ 17 Compiler: Intels C++ Compiler | Y | Y | https://software.intel.com/en-us/c-compilers
|
||||
MSVC | 19.30 | 19.30 | C++ 17 Compiler: Microsoft Visual C++ Compiler | Y | Y | https://visualstudio.microsoft.com/vs
|
||||
Imath | 3.1 | Latest | Half precision floating points | Y | Y | http://www.openexr.com
|
||||
OpenEXR | 3.1 | Latest | EXR serialization support | Y | Y | http://www.openexr.com
|
||||
TBB | 2020.3 | 2020.3 | Threading Building Blocks - template library for task parallelism | Y | Y | https://www.threadingbuildingblocks.org
|
||||
CMake | 3.12 | Latest | Cross-platform family of tools designed to help build software | Y | Y | https://cmake.org
|
||||
GCC | 6.3.1 | 6.3.1 | C++ 14 Compiler: The GNU Compiler Collection | Y | Y | https://www.gnu.org/software/gcc
|
||||
Clang | 3.8 | Latest | C++ 14 Compiler: A C language family frontend for LLVM | Y | Y | https://clang.llvm.org
|
||||
Intel ICC | 17 | Latest | C++ 14 Compiler: Intels C++ Compiler | Y | Y | https://software.intel.com/en-us/c-compilers
|
||||
MSVC | 19.10 | Latest | C++ 14 Compiler: Microsoft Visual C++ Compiler | Y | Y | https://visualstudio.microsoft.com/vs
|
||||
IlmBase | 2.2** | 2.3 | Used half precision floating points and EXR serialization support | Y | Y | http://www.openexr.com
|
||||
OpenEXR | 2.2** | 2.3 | EXR serialization support | Y | Y | http://www.openexr.com
|
||||
TBB | 2018 | 2018 | Threading Building Blocks - template library for task parallelism | Y | Y | https://www.threadingbuildingblocks.org
|
||||
ZLIB | 1.2.7 | Latest | Compression library for disk serialization compression | Y | Y | https://www.zlib.net
|
||||
Boost | 1.80 | 1.82 | Components: iostreams | Y | Y | https://www.boost.org
|
||||
LLVM | 13.0.0 | 15.0.0* | Target-independent code generation | Y | Y | https://llvm.org/
|
||||
Bison | 3.7.0 | 3.7.0 | General-purpose parser generator | Y | Y | https://www.gnu.org/software/gcc
|
||||
Flex | 2.6.4 | 2.6.4 | Fast lexical analyzer generator | Y | Y | https://github.com/westes/flex
|
||||
Python | 3.10 | 3.11 | The python interpreter and libraries | Y | Y | https://www.python.org
|
||||
nanobind | 2.0.0 | 2.1.0 | C++/python bindings | Y | Y | https://nanobind.readthedocs.io
|
||||
NumPy | 1.23.0 | 1.26.0 | Scientific computing with Python | Y | Y | http://www.numpy.org
|
||||
Boost | 1.66 | 1.66 | Components: iostreams, python, numpy | Y | Y | https://www.boost.org
|
||||
LLVM | 6.0.0 | 8.0.0 | Target-independent code generation | Y | Y | https://llvm.org/
|
||||
Bison | 3.0.0 | 3.0.5 | General-purpose parser generator | Y | Y | https://www.gnu.org/software/gcc
|
||||
Flex | 2.6 | 2.6.4 | Fast lexical analyzer generator | Y | Y | https://github.com/westes/flex
|
||||
Python | 2.7 | 2.7 | The python interpreter and libraries for C++/python bindings | Y | Y | https://www.python.org
|
||||
NumPy | 1.14.0 | 1.14.0 | Scientific computing with Python | Y | Y | http://www.numpy.org
|
||||
GoogleTest | 1.10 | Latest | A unit testing framework module for C++ | Y | Y | https://github.com/google/googletest
|
||||
CppUnit | 1.10 | Latest | A unit testing framework module for C++ | N | Y | https://freedesktop.org/wiki/Software/cppunit
|
||||
Blosc | 1.17.0* | 1.17.0 | Recommended dependency for improved disk compression | Y | Y | https://github.com/Blosc/c-blosc/releases
|
||||
Log4cplus | 1.1.2 | Latest | An optional dependency for improved OpenVDB Logging | Y | Y | https://github.com/log4cplus/log4cplus
|
||||
libpng | - | Latest | Library for manipulating PNG images | Y | Y | http://www.libpng.org/pub/png/libpng.html
|
||||
GLFW | 3.1 | > 3.3 | Simple API for OpenGL development | Y | Y | https://www.glfw.org
|
||||
GLFW | 3.1 | Latest | Simple API for OpenGL development | Y | Y | https://www.glfw.org
|
||||
OpenGL | 3.2 | Latest | Environment for developing portable graphics applications | Y | Y | https://www.opengl.org
|
||||
GLEW | 1.0.0 | Latest | A cross-platform OpenGL extension loading library. | Y | Y | http://glew.sourceforge.net
|
||||
CUDA | - | Latest | Parallel computing platform for graphical processing units. | Y | N | https://developer.nvidia.com/cuda-downloads
|
||||
Doxygen | 1.8.8 | 1.8.11 | Documentation generation from C++ | Y | Y | http://www.doxygen.nl
|
||||
|
||||
- @b * See the note in [known issues](@ref depKnownIssues) regarding supported blosc/llvm versions.
|
||||
- @b * See the note in [known issues](@ref depKnownIssues) regarding supported blosc versions.
|
||||
|
||||
- @b ** IlmBase/OpenEXR 2.2 is supported as Houdini 18.0 is shipped with
|
||||
VFX Reference Platform 2019, except for using older versions of these
|
||||
libraries.
|
||||
|
||||
@subsection depKnownIssues Known Issues
|
||||
|
||||
- @b LLVM >= 15. LLVM has recently changed their IR pointer data types to be
|
||||
completely opaque. Some support is provided in LLVM 15 but tests with AX show
|
||||
that this is extremely unstable. AX currently only supports LLVM versions up
|
||||
until 14.X.X. See https://llvm.org/docs/OpaquePointers.html for more details.
|
||||
|
||||
- @b GLFW: Crash with GLFW 3.2.1 when used with EGL on Linux. OpenVDB View may
|
||||
segfault on closure. Fixed in GLFW 3.3
|
||||
|
||||
- @b Boost 1.66/1.67 + @b Python3 + @b NumPy: Known issue on UNIX systems
|
||||
which can cause the below python runtime error. Consider updating to Boost 1.68
|
||||
if you require both Python3 and NumPy support:
|
||||
|
||||
@code{.sh}
|
||||
RuntimeError: FATAL: module compiled as little endian, but detected different endianness at runtime.
|
||||
@endcode
|
||||
|
||||
- @b Blosc: OpenVDB has historically used an old version of blosc (1.5.0) to
|
||||
serialize .vdb files. OpenVDB has moved to a new blosc version minimum of
|
||||
1.17.0. We have tested a range of blosc versions and found that the following
|
||||
versions are NOT compatible with OpenVDB caches written using blosc 1.5.0.
|
||||
Additionally these versions of blosc may generally not be compatible with OpenVDB
|
||||
itself. Avoid using these versions and upgrade to the new minimum of 1.17.0 where
|
||||
serialize .vdb files. OpenVDB is moving to a new blosc version minimum of 1.17.0.
|
||||
We have tested a range of blosc versions and found that the following versions
|
||||
are NOT compatible with OpenVDB caches written using blosc 1.5.0. Additionally
|
||||
these versions of blosc may generally not be compatible with OpenVDB itself.
|
||||
Avoid using these versions and upgrade to the new minimum of 1.17.0 where
|
||||
possible.
|
||||
|
||||
- All versions from 1.11.0 through to, but excluding, 1.14.0.
|
||||
@@ -119,22 +126,8 @@ required OpenVDB dependencies.
|
||||
|
||||
@subsection depUsingAptGet Using UNIX apt-get
|
||||
|
||||
You can use apt to automatically install required packages. Note that different
|
||||
Ubuntu distributions will have different versions available. You can use apt
|
||||
pinning to request newer versions of specific package from later distributions
|
||||
if the required version isn't available by default (see
|
||||
[man apt_preferences](https://linux.die.net/man/5/apt_preferences)). For
|
||||
example, the below settings will request TBB specifically from Ubuntu 22.04
|
||||
(Jammy).
|
||||
|
||||
@code{.sh}
|
||||
Package: libtbb-dev
|
||||
Pin: release n=jammy
|
||||
Pin-Priority: 990
|
||||
@endcode
|
||||
|
||||
Alternatively you can install any missing dependencies manually or through
|
||||
other package managers.
|
||||
@b Note:CppUnit is unavailable using apt-get. See the other package manager
|
||||
methods or the [manual installation](@ref depManInstall) options.
|
||||
|
||||
@code{.sh}
|
||||
#!/bin/bash
|
||||
@@ -145,17 +138,18 @@ apt-get install zlibc # zlib
|
||||
apt-get install libboost-iostreams-dev # Boost::iostream
|
||||
apt-get install libblosc-dev # Blosc
|
||||
# AX
|
||||
apt-get install llvm-15-dev # LLVM
|
||||
apt-get install llvm-8-dev # LLVM
|
||||
# Python
|
||||
apt-get install libboost-python-dev # Boost::python
|
||||
apt-get install libboost-numpy-dev # Boost::numpy
|
||||
apt-get install python-dev # Python
|
||||
apt-get install python-numpy # NumPy
|
||||
pip install nanobind # nanobind
|
||||
# Optional
|
||||
apt-get install libpng-dev # libpng
|
||||
apt-get install libilmbase-dev # IlmBase
|
||||
apt-get install libopenexr-dev # OpenEXR
|
||||
apt-get install liblog4cplus-dev # Log4cplus
|
||||
apt-get install googletest # GoogleTest
|
||||
apt-get install libcppunit-dev # CppUnit
|
||||
# vdb_view
|
||||
apt-get install libglfw3-dev # GLFW
|
||||
# Documentation
|
||||
@@ -180,19 +174,41 @@ brew install c-blosc # blosc
|
||||
# AX
|
||||
brew install llvm # LLVM
|
||||
# Python
|
||||
brew install boost-python # Boost-python
|
||||
brew install python # Python
|
||||
brew install numpy # NumPy
|
||||
brew install nanobind # nanobind
|
||||
# Unit Tests
|
||||
brew install gtest # GoogleTest
|
||||
brew install cppunit # CppUnit
|
||||
# vdb_view
|
||||
brew install glfw # GLFW
|
||||
# vdb_render
|
||||
brew install ilmbase # IlmBase
|
||||
brew install openexr # OpenEXR
|
||||
brew install libpng # libpng
|
||||
# Documentation
|
||||
brew install doxygen # Doxygen
|
||||
@endcode
|
||||
|
||||
@subsection depManInstall UNIX Manual Installations
|
||||
|
||||
Some dependencies may be unavailable using the above package manager methods.
|
||||
Below are manual installation methods for these packages. Note that you will
|
||||
have to provide your chosen installation locations to the OpenVDB CMake build
|
||||
system when building OpenVDB.
|
||||
|
||||
@b CppUnit (for AX Unit Tests)
|
||||
|
||||
@code{.sh}
|
||||
#!/bin/bash
|
||||
wget http://dev-www.libreoffice.org/src/cppunit-1.13.2.tar.gz
|
||||
tar -xvzf cppunit-1.13.2.tar.gz
|
||||
cd cppunit-1.13.2
|
||||
# Install to users home directory - you may customise this location
|
||||
mkdir -p $HOME/cppunit
|
||||
./configure --prefix=$HOME/cppunit
|
||||
make
|
||||
make install
|
||||
@endcode
|
||||
|
||||
*/
|
||||
|
||||
@@ -58,7 +58,6 @@ See @subpage NanoVDB_MainPage "NanoVDB" for the NanoVDB documentation.
|
||||
Contributors, please familiarize yourselves with our
|
||||
@subpage codingStyle "coding standards".
|
||||
|
||||
<a href="../code_coverage/index.html">Code Coverage</a>
|
||||
|
||||
|
||||
@page overview OpenVDB Overview
|
||||
|
||||
+7
-1
@@ -921,7 +921,7 @@ openvdb::Vec3SGrid::Ptr grid = ...;
|
||||
|
||||
// Construct the rotation matrix.
|
||||
openvdb::math::Mat3s rot45 =
|
||||
openvdb::math::rotation<openvdb::math::Mat3s>(openvdb::math::Y_AXIS, openvdb::math::pi<double>()/4.0);
|
||||
openvdb::math::rotation<openvdb::math::Mat3s>(openvdb::math::Y_AXIS, M_PI_4);
|
||||
|
||||
// Apply the functor to all active values.
|
||||
openvdb::tools::foreach(grid->beginValueOn(), MatMul(rot45));
|
||||
@@ -1199,6 +1199,7 @@ void processTypedGrid(openvdb::GridBase::Ptr grid, OpType& op)
|
||||
else if (grid->isType<openvdb::Vec3IGrid>()) CALL_OP(openvdb::Vec3IGrid);
|
||||
else if (grid->isType<openvdb::Vec3SGrid>()) CALL_OP(openvdb::Vec3SGrid);
|
||||
else if (grid->isType<openvdb::Vec3DGrid>()) CALL_OP(openvdb::Vec3DGrid);
|
||||
else if (grid->isType<openvdb::StringGrid>()) CALL_OP(openvdb::StringGrid);
|
||||
|
||||
#undef CALL_OP
|
||||
}
|
||||
@@ -1220,6 +1221,11 @@ struct PruneOp {
|
||||
{
|
||||
grid->tree().prune(typename GridType::ValueType(tolerance));
|
||||
}
|
||||
// Overload to handle string-valued grids
|
||||
void operator()(openvdb::StringGrid::Ptr grid) const
|
||||
{
|
||||
grid->tree().prune();
|
||||
}
|
||||
};
|
||||
|
||||
// Read all grids from a file.
|
||||
|
||||
+4
-4
@@ -40,10 +40,10 @@ details of VDB are described in the paper
|
||||
<a href="http://www.museth.org/Ken/Publications.html" target="_blank">"VDB: High-Resolution Sparse Volumes with Dynamic Topology"</a>.
|
||||
|
||||
@section sWhatLicense What license is OpenVDB distributed under?
|
||||
OpenVDB is released under the Apache License Version 2.0, which is a
|
||||
free, open source software license developed and maintained by the Apache Software
|
||||
Foundation. For more information about this license, see
|
||||
<a href="https://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License, Version 2</a>.
|
||||
OpenVDB is released under the Mozilla Public License Version 2.0, which is a
|
||||
free, open source software license developed and maintained by the Mozilla
|
||||
Foundation. For more information about this license, see the
|
||||
<a href="https://www.mozilla.org/en-US/MPL/" target="_blank">Mozilla FAQ</a>.
|
||||
|
||||
@section sWhatCLA Is there a Contributor License Agreement for OpenVDB?
|
||||
Yes, developers who wish to contribute code to be considered for inclusion
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 MiB |
+2
-2
@@ -78,7 +78,7 @@ openvdb::math::Transform::Ptr linearTransform =
|
||||
// Rotate the transform by 90 degrees about the X axis.
|
||||
// As a result the j-index will now map into the -z physical direction,
|
||||
// and the k-index will map to the +y physical direction.
|
||||
linearTransform->preRotate(openvdb::math::pi<double>()/2.0, openvdb::math::X_AXIS);
|
||||
linearTransform->preRotate(M_PI/2, openvdb::math::X_AXIS);
|
||||
@endcode
|
||||
|
||||
@subsection sFrustumTransforms Frustum Transforms
|
||||
@@ -302,7 +302,7 @@ convention of right-multiplication of the matrix against a vector:
|
||||
openvdb::math::Mat4d transform = openvdb::math::Mat4d::identity();
|
||||
transform.preScale(openvdb::math::Vec3d(2,3,2));
|
||||
transform.postTranslate(openvdb::math::Vec3d(1,0,0));
|
||||
transform.postRotate(openvdb::math::X_AXIS, openvdb::math::pi<double>()/3.0);
|
||||
transform.postRotate(openvdb::math::X_AXIS, M_PI/3.0);
|
||||
|
||||
// Location of a point in index space
|
||||
openvdb::math::Vec3d indexSpace(1,2,3);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
```cpp
|
||||
#include <openvdb/tools/LevelSetSphere.h> // replace with your own dependencies for generating the OpenVDB grid
|
||||
#include <nanovdb/util/CreateNanoGrid.h> // converter from OpenVDB to NanoVDB (includes NanoVDB.h and GridManager.h)
|
||||
#include <nanovdb/util/OpenToNanoVDB.h> // converter from OpenVDB to NanoVDB (includes NanoVDB.h and GridManager.h)
|
||||
#include <nanovdb/util/IO.h>
|
||||
|
||||
// Convert an openvdb level set sphere into a nanovdb, use accessors to print out multiple values from both
|
||||
@@ -17,7 +17,7 @@ int main()
|
||||
auto srcGrid = openvdb::tools::createLevelSetSphere<openvdb::FloatGrid>(100.0f, openvdb::Vec3f(0.0f), 1.0f);
|
||||
|
||||
// Convert the OpenVDB grid, srcGrid, into a NanoVDB grid handle.
|
||||
auto handle = nanovdb::createNanoGrid(*srcGrid);
|
||||
auto handle = nanovdb::openToNanoVDB(*srcGrid);
|
||||
|
||||
// Define a (raw) pointer to the NanoVDB grid on the host. Note we match the value type of the srcGrid!
|
||||
auto* dstGrid = handle.grid<float>();
|
||||
@@ -77,7 +77,7 @@ int main()
|
||||
|
||||
```cpp
|
||||
#include <nanovdb/util/IO.h> // this is required to read (and write) NanoVDB files on the host
|
||||
#include <nanovdb/util/cuda/CudaDeviceBuffer.h> // required for CUDA memory management
|
||||
#include <nanovdb/DefaultCudaAllocator.h> // required for CUDA memory management
|
||||
|
||||
extern "C" void launch_kernels(const nanovdb::NanoGrid<float>*,
|
||||
const nanovdb::NanoGrid<float>*,
|
||||
|
||||
+33
-167
@@ -5,174 +5,40 @@
|
||||
* [NanoVDB.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/NanoVDB.h) C++11 implementation of the core data structure and its access methods.
|
||||
* [CNanoVDB.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/CNanoVDB.h) Incomplete but useable C99 implementation of the core data structure and its access methods. Designed in particular for use in OpenCL kernels. Note that this relies on zero-sized arrays for the _reserved padding, so will not work on all compilers (with MSVC being a particular example)
|
||||
* [PNanoVDB.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/PNanoVDB.h) C99 implementation of the core data structure and its access methods. More complete coverage than CNanoVDB. This version is pointer-less and supports virtually all graphics APIs.
|
||||
* [GridHandle.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/GridHandle.h) defines a handler for the memory allocated to a NanoVDB grid.
|
||||
* [io/IO.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/io/IO.h) implements I/O support.
|
||||
* [tools/CreateNanoGrid.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/tools/CreateNanoGrid.h) defines the converter from OpenVDB to NanoVDB and obviously depends on the OpenVDB library (as the only header file).
|
||||
* [math/Ray.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/math/Ray.h) Ray class.
|
||||
* [math/HDDA.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/math/HDDA.h) HDDA related.
|
||||
* [math/SampleFromVoxels.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/math/SampleFromVoxels.h) interpolation.
|
||||
* [util/GridHandle.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/GridHandle.h) defines a handler for the memory allocated to a NanoVDB grid.
|
||||
* [util/IO.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/IO.h) implements I/O support.
|
||||
* [util/OpenToNanoVDB.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/OpenToNanoVDB.h) defines the converter from OpenVDB to NanoVDB and obviously depends on the OpenVDB library (as the only header file).
|
||||
* [Ray.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/Ray.h) Ray class.
|
||||
* [HDDA.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/HDDA.h) HDDA related.
|
||||
* [SampleFromVoxels.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/SampleFromVoxels.h) interpolation.
|
||||
|
||||
```bash
|
||||
foo@bar:~$ tree
|
||||
.
|
||||
├── CMakeLists.txt
|
||||
├── cmd
|
||||
│ ├── CMakeLists.txt
|
||||
│ ├── convert
|
||||
│ │ └── nanovdb_convert.cc
|
||||
│ ├── print
|
||||
│ │ └── nanovdb_print.cc
|
||||
│ ├── updateFiles.sh
|
||||
│ └── validate
|
||||
│ └── nanovdb_validate.cc
|
||||
├── CNanoVDB.h
|
||||
├── cuda
|
||||
│ ├── DeviceBuffer.h
|
||||
│ ├── GridHandle.cuh
|
||||
│ └── NodeManager.cuh
|
||||
├── docs
|
||||
│ ├── CMakeLists.txt
|
||||
│ ├── codingstyle.txt
|
||||
│ └── doxygen-config
|
||||
├── examples
|
||||
│ ├── CMakeLists.txt
|
||||
│ ├── ex_bump_pool_buffer
|
||||
│ │ └── bump_pool_buffer.cc
|
||||
│ ├── ex_collide_level_set
|
||||
│ │ ├── common.h
|
||||
│ │ ├── main.cc
|
||||
│ │ ├── nanovdb.cu
|
||||
│ │ └── openvdb.cc
|
||||
│ ├── ex_index_grid_cuda
|
||||
│ │ ├── index_grid_cuda.cc
|
||||
│ │ └── index_grid_cuda_kernel.cu
|
||||
│ ├── ex_make_custom_nanovdb
|
||||
│ │ └── make_custom_nanovdb.cc
|
||||
│ ├── ex_make_custom_nanovdb_cuda
|
||||
│ │ ├── make_custom_nanovdb_cuda.cc
|
||||
│ │ └── make_custom_nanovdb_cuda_kernel.cu
|
||||
│ ├── ex_make_funny_nanovdb
|
||||
│ │ └── make_funny_nanovdb.cc
|
||||
│ ├── ex_make_nanovdb_sphere
|
||||
│ │ └── make_nanovdb_sphere.cc
|
||||
│ ├── ex_make_typed_grids
|
||||
│ │ └── make_typed_grids.cc
|
||||
│ ├── ex_map_pool_buffer
|
||||
│ │ └── map_pool_buffer.cc
|
||||
│ ├── ex_modify_nanovdb_thrust
|
||||
│ │ ├── modify_nanovdb_thrust.cc
|
||||
│ │ └── modify_nanovdb_thrust.cu
|
||||
│ ├── ex_nodemanager_cuda
|
||||
│ │ ├── nodemanager_cuda.cc
|
||||
│ │ └── nodemanager_cuda_kernel.cu
|
||||
│ ├── ex_openvdb_to_nanovdb
|
||||
│ │ └── openvdb_to_nanovdb.cc
|
||||
│ ├── ex_openvdb_to_nanovdb_accessor
|
||||
│ │ └── openvdb_to_nanovdb_accessor.cc
|
||||
│ ├── ex_openvdb_to_nanovdb_cuda
|
||||
│ │ ├── openvdb_to_nanovdb_cuda.cc
|
||||
│ │ └── openvdb_to_nanovdb_cuda_kernel.cu
|
||||
│ ├── ex_raytrace_fog_volume
|
||||
│ │ ├── common.h
|
||||
│ │ ├── main.cc
|
||||
│ │ ├── nanovdb.cu
|
||||
│ │ └── openvdb.cc
|
||||
│ ├── ex_raytrace_level_set
|
||||
│ │ ├── common.h
|
||||
│ │ ├── main.cc
|
||||
│ │ ├── nanovdb.cu
|
||||
│ │ └── openvdb.cc
|
||||
│ ├── ex_read_nanovdb_sphere
|
||||
│ │ └── read_nanovdb_sphere.cc
|
||||
│ ├── ex_read_nanovdb_sphere_accessor
|
||||
│ │ └── read_nanovdb_sphere_accessor.cc
|
||||
│ ├── ex_read_nanovdb_sphere_accessor_cuda
|
||||
│ │ ├── read_nanovdb_sphere_accessor_cuda.cu
|
||||
│ │ └── read_nanovdb_sphere_accessor_cuda_kernel.cu
|
||||
│ ├── ex_util
|
||||
│ │ └── ComputePrimitives.h
|
||||
│ ├── ex_voxels_to_grid_cuda
|
||||
│ │ └── ex_voxels_to_grid_cuda.cu
|
||||
│ ├── ex_vox_to_nanovdb
|
||||
│ │ ├── vox_to_nanovdb.cc
|
||||
│ │ └── VoxToNanoVDB.h
|
||||
│ └── ex_write_nanovdb_grids
|
||||
│ └── write_nanovdb_grids.cc
|
||||
├── GridHandle.h
|
||||
├── HostBuffer.h
|
||||
├── io
|
||||
│ └── IO.h
|
||||
├── math
|
||||
│ ├── CSampleFromVoxels.h
|
||||
│ ├── DitherLUT.h
|
||||
│ ├── HDDA.h
|
||||
│ ├── Math.h
|
||||
│ ├── Ray.h
|
||||
│ ├── SampleFromVoxels.h
|
||||
│ └── Stencils.h
|
||||
├── NanoVDB.h
|
||||
├── NodeManager.h
|
||||
├── PNanoVDB.h
|
||||
├── Readme.md
|
||||
├── tools
|
||||
│ ├── CreateNanoGrid.h
|
||||
│ ├── CreatePrimitives.h
|
||||
│ ├── cuda
|
||||
│ │ ├── AddBlindData.cuh
|
||||
│ │ ├── GridChecksum.cuh
|
||||
│ │ ├── GridStats.cuh
|
||||
│ │ ├── GridValidator.cuh
|
||||
│ │ ├── IndexToGrid.cuh
|
||||
│ │ ├── PointsToGrid.cuh
|
||||
│ │ └── SignedFloodFill.cuh
|
||||
│ ├── GridBuilder.h
|
||||
│ ├── GridChecksum.h
|
||||
│ ├── GridStats.h
|
||||
│ ├── GridValidator.h
|
||||
│ └── NanoToOpenVDB.h
|
||||
├── unittest
|
||||
│ ├── CMakeLists.txt
|
||||
│ ├── pnanovdb_validate_strides.h
|
||||
│ ├── TestNanoVDB.cc
|
||||
│ ├── TestNanoVDB.cu
|
||||
│ └── TestOpenVDB.cc
|
||||
└── util
|
||||
├── CpuTimer.h
|
||||
├── CreateNanoGrid.h
|
||||
├── cuda
|
||||
│ ├── CudaAddBlindData.cuh
|
||||
│ ├── CudaDeviceBuffer.h
|
||||
│ ├── CudaGridChecksum.cuh
|
||||
│ ├── CudaGridHandle.cuh
|
||||
│ ├── CudaGridStats.cuh
|
||||
│ ├── CudaGridValidator.cuh
|
||||
│ ├── CudaIndexToGrid.cuh
|
||||
│ ├── CudaNodeManager.cuh
|
||||
│ ├── CudaPointsToGrid.cuh
|
||||
│ ├── CudaSignedFloodFill.cuh
|
||||
│ ├── CudaUtils.h
|
||||
│ ├── GpuTimer.h
|
||||
│ ├── Timer.h
|
||||
│ └── Util.h
|
||||
├── DitherLUT.h
|
||||
├── ForEach.h
|
||||
├── GridBuilder.h
|
||||
├── GridChecksum.h
|
||||
├── GridStats.h
|
||||
├── GridValidator.h
|
||||
├── HDDA.h
|
||||
├── HostBuffer.h
|
||||
├── Invoke.h
|
||||
├── IO.h
|
||||
├── NanoToOpenVDB.h
|
||||
├── NodeManager.h
|
||||
├── OpenToNanoVDB.h
|
||||
├── PrefixSum.h
|
||||
├── Primitives.h
|
||||
├── Range.h
|
||||
├── Ray.h
|
||||
├── Reduce.h
|
||||
├── SampleFromVoxels.h
|
||||
├── Stencils.h
|
||||
├── Timer.h
|
||||
└── Util.h
|
||||
├── nanovdb
|
||||
│ ├── CNanoVDB.h
|
||||
│ ├── NanoVDB.h
|
||||
│ ├── PNanoVDB.h
|
||||
│ └── util
|
||||
│ ├── CSampleFromVoxels.h
|
||||
│ ├── CudaDeviceBuffer.h
|
||||
| ├── DitherLUT.h
|
||||
│ ├── ForEach.h
|
||||
│ ├── GridBuilder.h
|
||||
│ ├── GridChecksum.h
|
||||
│ ├── GridHandle.h
|
||||
│ ├── GridStats.h
|
||||
│ ├── GridValidator.h
|
||||
│ ├── HDDA.h
|
||||
│ ├── HostBuffer.h
|
||||
│ ├── Invoke.h
|
||||
│ ├── IO.h
|
||||
│ ├── NanoToOpenVDB.h
|
||||
│ ├── OpenToNanoVDB.h
|
||||
| ├── Primitives.h
|
||||
│ ├── Range.h
|
||||
│ ├── Ray.h
|
||||
| ├── Reduce.h
|
||||
| ├── SampleFromVoxels.h
|
||||
| └── Stencils.h
|
||||
```
|
||||
|
||||
+4
-4
@@ -2,7 +2,7 @@
|
||||
|
||||
Welcome to the NanoVDB documentation page.
|
||||
|
||||
* @subpage NanoVDB_HowToBuild
|
||||
* @subpage NanoVDB_FAQ
|
||||
* @subpage NanoVDB_SourceTree
|
||||
* @subpage NanoVDB_HelloWorld
|
||||
* @ref NanoVDB_HowToBuild
|
||||
* @ref NanoVDB_FAQ
|
||||
* @ref NanoVDB_SourceTree
|
||||
* @ref NanoVDB_HelloWorld
|
||||
+4
-2
@@ -4,8 +4,10 @@
|
||||
|
||||
This section describes the OpenVDB Python module and includes Python code
|
||||
snippets and some complete programs that illustrate how to perform common tasks.
|
||||
The Python module exposes most of the functionality of the C++
|
||||
@vdblink::Grid Grid@endlink class, including I/O, metadata
|
||||
(An <a href="./python/index.html">API reference</a> is also available,
|
||||
if <a href="http://epydoc.sourceforge.net/">Epydoc</a> is installed.)
|
||||
As of OpenVDB 2.0, the Python module exposes most of the functionality
|
||||
of the C++ @vdblink::Grid Grid@endlink class, including I/O, metadata
|
||||
management, voxel access and iteration, but almost none of the many
|
||||
@ref secToolUtils "tools".
|
||||
We expect to add support for tools in forthcoming releases.
|
||||
|
||||
@@ -1,139 +0,0 @@
|
||||
---
|
||||
Language: Cpp
|
||||
Standard: c++20
|
||||
|
||||
# Indentation
|
||||
TabWidth: 4
|
||||
IndentWidth: 4
|
||||
UseTab: Never
|
||||
IndentPPDirectives: None
|
||||
IndentWrappedFunctionNames: false
|
||||
NamespaceIndentation: None
|
||||
|
||||
# Empty lines
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
MaxEmptyLinesToKeep: 1
|
||||
|
||||
# Line length
|
||||
ColumnLimit: 100
|
||||
|
||||
# Line endings
|
||||
DeriveLineEnding: false
|
||||
LineEnding: LF
|
||||
|
||||
# Breaking and Penalties
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
BreakInheritanceList: BeforeColon
|
||||
BreakStringLiterals: false
|
||||
|
||||
PenaltyBreakAssignment: 2
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
|
||||
# Spacing and padding
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterControlStatementKeyword: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeRangeBasedForLoopColon: false
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesInAngles: false
|
||||
SpacesInContainerLiterals: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpaceBeforeCpp11BracedList: false
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeSquareBrackets: false
|
||||
SpacesInSquareBrackets: false
|
||||
SpaceBeforeCaseColon: false
|
||||
|
||||
# Brace placement
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: false
|
||||
SplitEmptyRecord: false
|
||||
SplitEmptyNamespace: false
|
||||
Cpp11BracedListStyle: true
|
||||
|
||||
# Function definitions
|
||||
# BreakAfterReturnType: AllDefinitions
|
||||
AlwaysBreakAfterDefinitionReturnType: All
|
||||
|
||||
AttributeMacros:
|
||||
- __host__
|
||||
- __device__
|
||||
- __hostdev__
|
||||
- __global__
|
||||
- __forceinline__
|
||||
- __shared__
|
||||
- __launch_bounds__
|
||||
|
||||
# Alignment
|
||||
AlignConsecutiveAssignments: true
|
||||
AlignConsecutiveBitFields: true
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignConsecutiveMacros: true
|
||||
AlignEscapedNewlines: Left
|
||||
AlignOperands: true
|
||||
AlignTrailingComments:
|
||||
Kind: Always
|
||||
OverEmptyLines: 2
|
||||
|
||||
# Single line allowances
|
||||
BinPackParameters: false
|
||||
BinPackArguments: false
|
||||
AllowAllArgumentsOnNextLine: true
|
||||
AllowAllConstructorInitializersOnNextLine: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: true
|
||||
AllowShortCaseLabelsOnASingleLine: true
|
||||
AllowShortEnumsOnASingleLine: true
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLambdasOnASingleLine: true
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
|
||||
# Sorting
|
||||
IncludeBlocks: Regroup
|
||||
IncludeIsMainRegex: "$"
|
||||
IncludeCategories:
|
||||
- Regex: '^"' # quoted includes
|
||||
Priority: 1
|
||||
- Regex: '^<fvdb/' # fvdb includes
|
||||
Priority: 2
|
||||
- Regex: '^<nanovdb/' # nanovdb includes
|
||||
Priority: 3
|
||||
- Regex: '^<(torch|c10|THC|ATen)/' # torch includes
|
||||
Priority: 4
|
||||
- Regex: '^<(thrust|cub|cuda)/' # CCCL includes
|
||||
Priority: 5
|
||||
- Regex: '^<(cooperative_groups|cuco|cuda.h|cuda_|device_types|math_constants|nvtx3|cute)' # CUDA includes
|
||||
Priority: 6
|
||||
- Regex: '^<.*\..*' # other system includes (e.g. with a '.')
|
||||
Priority: 7
|
||||
- Regex: '^<[^.]+' # STL includes (no '.')
|
||||
Priority: 8
|
||||
IncludeIsMainSourceRegex: "$"
|
||||
SortIncludes: true
|
||||
SortUsingDeclarations: true
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
# https://clangd.llvm.org/config
|
||||
|
||||
# Apply a config conditionally to all C files
|
||||
If:
|
||||
PathMatch: .*\.(c|h)$
|
||||
|
||||
---
|
||||
|
||||
# Apply a config conditionally to all C++ files
|
||||
If:
|
||||
PathMatch: .*\.(c|h)pp
|
||||
|
||||
---
|
||||
|
||||
# Apply a config conditionally to all CUDA files
|
||||
If:
|
||||
PathMatch: .*\.cuh?
|
||||
CompileFlags:
|
||||
Add:
|
||||
- "-x"
|
||||
- "cuda"
|
||||
# No error on unknown CUDA versions
|
||||
- "-Wno-unknown-cuda-version"
|
||||
# Allow variadic CUDA functions
|
||||
- "-Xclang=-fcuda-allow-variadic-functions"
|
||||
Diagnostics:
|
||||
Suppress:
|
||||
- "variadic_device_fn"
|
||||
- "attributes_not_allowed"
|
||||
- "unknown_cuda_version"
|
||||
- "unknown_type_name"
|
||||
- "implicit_return_from_non_void_function"
|
||||
- "no_template_args_on_forwarding_function"
|
||||
|
||||
---
|
||||
|
||||
# Tweak the clangd parse settings for all files
|
||||
CompileFlags:
|
||||
Add:
|
||||
# report all errors
|
||||
- "-ferror-limit=0"
|
||||
- "-fmacro-backtrace-limit=0"
|
||||
- "-ftemplate-backtrace-limit=0"
|
||||
# Skip the CUDA version check
|
||||
- "--no-cuda-version-check"
|
||||
Remove:
|
||||
# remove gcc's -fcoroutines
|
||||
- -fcoroutines
|
||||
# remove nvc++ flags unknown to clang
|
||||
- "-gpu=*"
|
||||
- "-stdpar*"
|
||||
# remove nvcc flags unknown to clang
|
||||
- "-arch*"
|
||||
- "-gencode*"
|
||||
- "--generate-code*"
|
||||
- "-ccbin*"
|
||||
- "-t=*"
|
||||
- "--threads*"
|
||||
- "-Xptxas*"
|
||||
- "-Xcudafe*"
|
||||
- "-Xfatbin*"
|
||||
- "-Xcompiler*"
|
||||
- "--diag-suppress*"
|
||||
- "--diag_suppress*"
|
||||
- "--compiler-options*"
|
||||
- "--extended-lambda"
|
||||
- "--expt-extended-lambda"
|
||||
- "--expt-relaxed-constexpr"
|
||||
- "-forward-unknown-to-host-compiler"
|
||||
- "-Werror=cross-execution-space-call"
|
||||
- "-Werror=all-warnings"
|
||||
@@ -1,41 +0,0 @@
|
||||
// File location: openvdb/fvdb/.devcontainer/devcontainer.json
|
||||
{
|
||||
// A friendly name for the container configuration shown in VS Code
|
||||
"name": "FVDB Development Environment",
|
||||
|
||||
// Tells VS Code to use Docker Compose to define and run the environment.
|
||||
// The path is relative to this devcontainer.json file.
|
||||
"dockerComposeFile": [
|
||||
"../docker-compose.yml" // Points to openvdb/fvdb/docker-compose.yml
|
||||
],
|
||||
|
||||
// The name of the specific service within the docker-compose.yml file
|
||||
// that VS Code should connect to.
|
||||
"service": "fvdb-dev",
|
||||
|
||||
// Specifies the default directory VS Code should open *inside* the container.
|
||||
// Since the docker-compose.yml mounts the host's `openvdb/` directory to `/openvdb`
|
||||
// in the container, the fvdb code resides at `/openvdb/fvdb`.
|
||||
"workspaceFolder": "/openvdb/fvdb",
|
||||
|
||||
// Extensions to install inside the container's VS Code server
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-python.python", // Python language support
|
||||
"ms-vscode.cpptools", // C/C++ language support
|
||||
"ms-vscode.cmake-tools", // CMake integration
|
||||
"ms-azuretools.vscode-docker" // Docker integration (useful for managing containers)
|
||||
],
|
||||
"settings": {
|
||||
"python.defaultInterpreterPath": "/opt/conda/envs/fvdb/bin/python"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Optional: What to do when the VS Code window is closed.
|
||||
// "stopCompose" will stop the container(s) defined in the compose file.
|
||||
// "none" would leave them running.
|
||||
"shutdownAction": "stopCompose"
|
||||
}
|
||||
|
||||
Vendored
-106
@@ -1,106 +0,0 @@
|
||||
name: Building Release Wheels
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published, edited]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
||||
wheel:
|
||||
runs-on:
|
||||
- self-hosted
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# support version based on: https://download.pytorch.org/whl/torch/
|
||||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
||||
torch-version: [2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0]
|
||||
cuda-version: ['12.1.1']
|
||||
exclude:
|
||||
- torch-version: 2.1.2
|
||||
python-version: '3.12'
|
||||
- torch-version: 2.1.1
|
||||
python-version: '3.12'
|
||||
- torch-version: 2.1.0
|
||||
python-version: '3.12'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Generate release_environment.yml
|
||||
run: |
|
||||
echo "cp env/release_base_environment.yml release_environment.yml"
|
||||
cp env/release_base_environment.yml release_environment.yml
|
||||
echo " - python=${{ matrix.python-version }}" >> release_environment.yml
|
||||
echo " - pytorch=${{ matrix.torch-version }}" >> release_environment.yml
|
||||
perl -E '"${{ matrix.cuda-version }}" =~ /^(\d+\.\d+)/; say " - pytorch-cuda=$1"' >> release_environment.yml
|
||||
perl -E '"${{ matrix.cuda-version }}" =~ /^(\d+)\.(\d+)/; say " - cuda>=$1.$2.0, <$1." . ($2+1) . ".0"' >> release_environment.yml
|
||||
perl -E '"${{ matrix.cuda-version }}" =~ /^(\d+)\.(\d+)/; say " - cuda-nvcc>=$1.$2.0, <$1." . ($2+1) . ".0"' >> release_environment.yml
|
||||
|
||||
- name: Set up fvdb_release Conda env
|
||||
uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
miniconda-version: "latest"
|
||||
mamba-version: "*"
|
||||
channels: nvidia,pytorch,conda-forge,defaults
|
||||
channel-priority: true
|
||||
activate-environment: fvdb_release
|
||||
environment-file: release_environment.yml
|
||||
|
||||
- name: Set version
|
||||
run: |
|
||||
VERSION=`sed -n "s/^__version__ = '\(.*\)'/\1/p" fvdb/__init__.py`
|
||||
TORCH_VERSION=`echo "pt${{ matrix.torch-version }}" | sed "s/..$//" | sed "s/\.//g"`
|
||||
CUDA_VERSION=`perl -E '"${{ matrix.cuda-version }}" =~ /^(\d+)\.(\d+)/; say "cu$1$2"'`
|
||||
echo "New version name: $VERSION+$TORCH_VERSION$CUDA_VERSION"
|
||||
sed -i "s/$VERSION/$VERSION+$TORCH_VERSION$CUDA_VERSION/" fvdb/__init__.py
|
||||
shell:
|
||||
bash -el {0}
|
||||
|
||||
- name: Build wheel
|
||||
run: |
|
||||
conda activate fvdb_release
|
||||
mkdir dist
|
||||
TORCH_CUDA_ARCH_LIST="6.1;7.0;7.5;8.0;8.6+PTX" python setup.py bdist_wheel --dist-dir=dist
|
||||
shell:
|
||||
bash -el {0}
|
||||
|
||||
- name: Rename wheel
|
||||
run: |
|
||||
python scripts/rename_wheels.py ${{ matrix.torch-version }} `perl -E '"${{ matrix.cuda-version }}" =~ /^(\d+)\.(\d+)/; say "cu$1$2"'`
|
||||
shell:
|
||||
bash -el {0}
|
||||
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
token: ${{ secrets.RELEASE_ACTION_TOKEN }}
|
||||
files: |
|
||||
dist/*.whl
|
||||
|
||||
# - name: Upload to artifacts
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: wheels
|
||||
# path: |
|
||||
# dist/*.whl
|
||||
|
||||
# - name: Configure AWS
|
||||
# uses: aws-actions/configure-aws-credentials@v1
|
||||
# with:
|
||||
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
# aws-region: ap-northeast-1
|
||||
|
||||
# - name: Upload wheel
|
||||
# run: |
|
||||
# aws s3 sync dist s3://nksr/whl/torch-${{ matrix.torch-version }}+${{ matrix.cuda-version }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
|
||||
|
||||
- name: Clean Conda
|
||||
run: |
|
||||
conda clean -pty
|
||||
shell:
|
||||
bash -el {0}
|
||||
Vendored
-221
@@ -1,221 +0,0 @@
|
||||
name: Running Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- 'debug/**'
|
||||
- 'docs/**'
|
||||
- 'examples/**'
|
||||
- 'notebooks/**'
|
||||
- 'scripts/**'
|
||||
|
||||
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
deployments: write
|
||||
|
||||
jobs:
|
||||
fvdb-build:
|
||||
if: ${{ !startsWith(github.event.pull_request.title, 'Draft:') }}
|
||||
name: fVDB Build
|
||||
runs-on:
|
||||
- self-hosted
|
||||
container:
|
||||
image: aswf/ci-openvdb:2024
|
||||
env:
|
||||
PYTHONPATH: ""
|
||||
options: --rm
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -el {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up fvdb_build Conda env
|
||||
uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
miniforge-version: latest
|
||||
conda-remove-defaults: "true"
|
||||
activate-environment: fvdb_build
|
||||
environment-file: env/build_environment.yml
|
||||
|
||||
|
||||
- name: Buid fvdb
|
||||
run: |
|
||||
TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0;8.6+PTX" MAX_JOBS=$(($(nproc) < $(free -g | awk '/^Mem:/{jobs=int($4/2.5); if(jobs<1) jobs=1; print jobs}') ? $(nproc) : $(free -g | awk '/^Mem:/{jobs=int($4/2.5); if(jobs<1) jobs=1; print jobs}'))) conda run --no-capture-output -n fvdb_build python setup.py bdist_wheel --dist-dir=dist
|
||||
|
||||
- name: Upload package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fvdb-test-package
|
||||
path: dist/*.whl
|
||||
retention-days: 2
|
||||
|
||||
- name: Cleanup
|
||||
if: always()
|
||||
run: |
|
||||
echo "Cleaning up /__w/_temp directory"
|
||||
sudo rm -rf /__w/_temp/*
|
||||
echo "Cleanup completed"
|
||||
|
||||
|
||||
fvdb-unit-test:
|
||||
needs: [fvdb-build]
|
||||
name: fVDB Unit Tests
|
||||
runs-on:
|
||||
- self-hosted
|
||||
container:
|
||||
image: aswf/ci-openvdb:2024
|
||||
env:
|
||||
PYTHONPATH: ""
|
||||
options: --rm
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -el {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up fvdb_test Conda env
|
||||
uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
miniforge-version: latest
|
||||
conda-remove-defaults: "true"
|
||||
activate-environment: fvdb_test
|
||||
environment-file: env/test_environment.yml
|
||||
|
||||
- name: Download package
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: fvdb-test-package
|
||||
path: ./dist
|
||||
|
||||
- name: Install package
|
||||
run: |
|
||||
conda activate fvdb_test
|
||||
pip install ./dist/*.whl
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd tests;
|
||||
pytest -v unit
|
||||
|
||||
- name: Cleanup
|
||||
if: always()
|
||||
run: |
|
||||
echo "Cleaning up /__w/_temp directory"
|
||||
sudo rm -rf /__w/_temp/*
|
||||
echo "Cleanup completed"
|
||||
|
||||
fvdb-docs-test:
|
||||
needs: [fvdb-build]
|
||||
name: fVDB Documentation Tests
|
||||
runs-on:
|
||||
- self-hosted
|
||||
container:
|
||||
image: aswf/ci-openvdb:2024
|
||||
env:
|
||||
PYTHONPATH: ""
|
||||
options: --rm
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -el {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up fvdb_test Conda env
|
||||
uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
miniforge-version: latest
|
||||
conda-remove-defaults: "true"
|
||||
activate-environment: fvdb_test
|
||||
environment-file: env/test_environment.yml
|
||||
|
||||
- name: Download package
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: fvdb-test-package
|
||||
path: ./dist
|
||||
|
||||
- name: Install package
|
||||
run: |
|
||||
conda activate fvdb_test
|
||||
pip install ./dist/*.whl
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd .. && pytest --markdown-docs fvdb/docs
|
||||
|
||||
- name: Cleanup
|
||||
if: always()
|
||||
run: |
|
||||
echo "Cleaning up /__w/_temp directory"
|
||||
sudo rm -rf /__w/_temp/*
|
||||
echo "Cleanup completed"
|
||||
|
||||
fvdb-benchmarks:
|
||||
needs: [fvdb-build]
|
||||
name: fVDB Continuous Benchmarking
|
||||
runs-on:
|
||||
- self-hosted
|
||||
container:
|
||||
image: aswf/ci-openvdb:2024
|
||||
env:
|
||||
PYTHONPATH: ""
|
||||
options: --rm
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -el {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up fvdb_test Conda env
|
||||
uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
miniforge-version: latest
|
||||
conda-remove-defaults: "true"
|
||||
activate-environment: fvdb_test
|
||||
environment-file: env/test_environment.yml
|
||||
|
||||
- name: Download package
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: fvdb-test-package
|
||||
path: ./dist
|
||||
|
||||
- name: Install package
|
||||
run: |
|
||||
conda activate fvdb_test
|
||||
pip install ./dist/*.whl
|
||||
|
||||
- name: Disable git ownership verification
|
||||
run: |
|
||||
git config --global --add safe.directory "$(pwd)"
|
||||
|
||||
- name: Run benchmarks
|
||||
run: |
|
||||
cd tests;
|
||||
pytest benchmark --benchmark-json benchmark/output.json
|
||||
|
||||
- name: Store benchmark result
|
||||
uses: benchmark-action/github-action-benchmark@v1
|
||||
with:
|
||||
name: Python Benchmark with pytest-benchmark
|
||||
tool: 'pytest'
|
||||
output-file-path: tests/benchmark/output.json
|
||||
# Use personal access token instead of GITHUB_TOKEN due to https://github.community/t/github-action-not-triggering-gh-pages-upon-push/16096
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
auto-push: true
|
||||
# Show alert with commit comment on detecting possible performance regression
|
||||
alert-threshold: '200%'
|
||||
comment-on-alert: true
|
||||
fail-on-alert: true
|
||||
alert-comment-cc-users: '@swahtz'
|
||||
|
||||
- name: Cleanup
|
||||
if: always()
|
||||
run: |
|
||||
echo "Cleaning up /__w/_temp directory"
|
||||
sudo rm -rf /__w/_temp/*
|
||||
echo "Cleanup completed"
|
||||
@@ -1,60 +0,0 @@
|
||||
# Generated version file
|
||||
fvdb/version.py
|
||||
|
||||
# Generated compile_commands.json symlink
|
||||
compile_commands.json
|
||||
|
||||
# Build files
|
||||
/build/*
|
||||
/src/benchmarks/build/*
|
||||
/src/tests/build/*
|
||||
/src/build/*
|
||||
|
||||
*.creator
|
||||
*.includes
|
||||
*.files
|
||||
*.config
|
||||
*.obj
|
||||
*.off
|
||||
__pycache__
|
||||
*.pyc
|
||||
*.creator.user
|
||||
*.egg-info
|
||||
*.so
|
||||
dist
|
||||
.cache
|
||||
.idea
|
||||
.eggs
|
||||
cmake-build-debug
|
||||
external
|
||||
.polyscope.ini
|
||||
imgui.ini
|
||||
datasets/lib/external
|
||||
datasets/lib/build
|
||||
*.png
|
||||
!docs/imgs/**/*.png
|
||||
!notebooks/img/**/*.png
|
||||
*.ply
|
||||
apex/
|
||||
*.zip
|
||||
*.npz
|
||||
!kernel.npz
|
||||
*.npy
|
||||
*.o
|
||||
*.h5
|
||||
docs/_build
|
||||
fvdb/include/
|
||||
trash
|
||||
scratch
|
||||
_build
|
||||
docs/build
|
||||
*tmp*.py
|
||||
*.whl
|
||||
tests/benchmark/data
|
||||
releases/
|
||||
/data/
|
||||
/data/*
|
||||
!tests/data
|
||||
.vscode/launch.json
|
||||
lightning_logs
|
||||
tests/data/
|
||||
@@ -1,30 +0,0 @@
|
||||
# Gitlab CI Pipeline for building and deploying the documentation
|
||||
default:
|
||||
image: mambaorg/micromamba:focal-cuda-12.1.1
|
||||
tags:
|
||||
- os/linux
|
||||
- type/docker
|
||||
|
||||
before_script:
|
||||
# - apt-get update
|
||||
- export TORCH_CUDA_ARCH_LIST="Turing"
|
||||
- export FORCE_CUDA=1
|
||||
# install all required libraries using existing conda environment requirements file:
|
||||
- micromamba env create -f env/build_environment.yml
|
||||
- eval "$(micromamba shell hook --shell bash)"
|
||||
- micromamba activate
|
||||
- micromamba activate fvdb_build
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
script:
|
||||
# build and publish automated documentation with Sphinx:
|
||||
- export MAX_JOBS=$(free -g | awk '/^Mem:/{jobs=int($4/3); if(jobs<1) jobs=1; print jobs}')
|
||||
- python setup.py build_ext --inplace
|
||||
- sphinx-build -E -a docs/ public/
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
only:
|
||||
- main # Documentation will only be generated on the main branch
|
||||
Vendored
-51
@@ -1,51 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"${env:CONDA_PREFIX}/envs/fvdb/include",
|
||||
"${env:CONDA_PREFIX}/envs/fvdb/targets/x86_64-linux/include/",
|
||||
"${workspaceFolder}/src/tests/build/_deps/googletest-src/googletest/include",
|
||||
"${workspaceFolder}/src/tests/build/_deps/googletest-src/googlemock/include",
|
||||
"${workspaceFolder}/src/tests/build/_deps/nvtx3-src/include",
|
||||
"${workspaceFolder}/src",
|
||||
"${workspaceFolder}/../nanovdb",
|
||||
"${workspaceFolder}/external/glm",
|
||||
"${workspaceFolder}/external/cudnn_fe/include",
|
||||
"${workspaceFolder}/external/cutlass/include",
|
||||
"${workspaceFolder}/external/tinyply/source",
|
||||
"${env:CONDA_PREFIX}/envs/fvdb/include/python3.11",
|
||||
"${env:CONDA_PREFIX}/envs/fvdb/lib/python3.11/site-packages/torch/include",
|
||||
"${env:CONDA_PREFIX}/envs/fvdb/lib/python3.11/site-packages/torch/include/torch/csrc/api/include",
|
||||
"${env:CONDA_PREFIX}/envs/fvdb/lib/python3.11/site-packages/torch/include/THC",
|
||||
"${env:CONDA_PREFIX}/envs/fvdb/lib/python3.11/site-packages/torch/include/c10",
|
||||
"${default}"
|
||||
],
|
||||
"macFrameworkPath": [
|
||||
"${default}"
|
||||
],
|
||||
"defines": [
|
||||
"${default}",
|
||||
"NDEVELOP_IDE_ONLY",
|
||||
"__CUDA_ARCH__=800"
|
||||
],
|
||||
"forcedInclude": [
|
||||
"${default}"
|
||||
],
|
||||
"compileCommands": "${default}",
|
||||
"browse": {
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": "${default}",
|
||||
"path": [
|
||||
"${default}"
|
||||
]
|
||||
},
|
||||
"intelliSenseMode": "${default}",
|
||||
"cStandard": "${default}",
|
||||
"cppStandard": "c++20",
|
||||
"compilerPath": "${default}",
|
||||
"configurationProvider": "ms-vscode.cpptools"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
Vendored
-15
@@ -1,15 +0,0 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
|
||||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
|
||||
|
||||
// List of extensions which should be recommended for users of this workspace.
|
||||
"recommendations": [
|
||||
"llvm-vs-code-extensions.vscode-clangd",
|
||||
"ms-vscode.cpptools-extension-pack",
|
||||
"Seaube.clangformat"
|
||||
],
|
||||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
|
||||
"unwantedRecommendations": [
|
||||
|
||||
]
|
||||
}
|
||||
Vendored
-58
@@ -1,58 +0,0 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"*.cu": "cuda-cpp",
|
||||
"*.cuh": "cuda-cpp"
|
||||
},
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"files.insertFinalNewline": true,
|
||||
"editor.rulers": [ 100 ],
|
||||
"C_Cpp.intelliSenseEngine": "disabled",
|
||||
"C_Cpp.enhancedColorization": "enabled",
|
||||
"C_Cpp.errorSquiggles": "enabledIfIncludesResolve",
|
||||
"C_Cpp.autocomplete": "default",
|
||||
"C_Cpp.default.compilerPath": "${env:CONDA_PREFIX}/envs/fvdb/bin/x86_64-conda-linux-gnu-c++",
|
||||
"terminal.integrated.defaultLocation": "editor",
|
||||
"cmake.environment": {
|
||||
"PATH": "${env:CONDA_PREFIX}/envs/fvdb/bin:${env:PATH}"
|
||||
},
|
||||
"cmake.configureOnOpen": false,
|
||||
"C_Cpp.formatting": "clangFormat",
|
||||
"C_Cpp.clang_format_path": "${env:CONDA_PREFIX}/envs/fvdb/bin/clang-format-18",
|
||||
"C_Cpp.autoAddFileAssociations": false,
|
||||
|
||||
"[cpp]": {
|
||||
"editor.defaultFormatter": "seaube.clangformat",
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[cuda-cpp]": {
|
||||
"editor.defaultFormatter": "seaube.clangformat",
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[python]": {
|
||||
"editor.defaultFormatter": "ms-python.black-formatter",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.organizeImports": "explicit"
|
||||
},
|
||||
},
|
||||
"python.analysis.typeCheckingMode": "basic",
|
||||
"python.testing.unittestArgs": [
|
||||
"-v", "-s", "."
|
||||
],
|
||||
"python.testing.pytestEnabled": false,
|
||||
"python.testing.unittestEnabled": true,
|
||||
"black-formatter.args": [
|
||||
"--target-version=py311",
|
||||
"--line-length=120"
|
||||
],
|
||||
"python.analysis.diagnosticSeverityOverrides": {
|
||||
"reportPrivateImportUsage": "none",
|
||||
},
|
||||
"isort.args": [
|
||||
"--profile", "black"
|
||||
],
|
||||
"json.format.keepLines": true,
|
||||
|
||||
"clangd.path": "${env:CONDA_PREFIX}/envs/fvdb/bin/clangd",
|
||||
"clangFormat.executable.linux": "${env.CONDA_PREFIX}/envs/fvdb/bin/clang-format",
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.25 FATAL_ERROR)
|
||||
|
||||
# Set global download timeout to 600 seconds (10 minutes)
|
||||
set(CMAKE_DOWNLOAD_TIMEOUT 600 CACHE STRING "Time allowed for downloads in seconds")
|
||||
|
||||
project(${SKBUILD_PROJECT_NAME} VERSION ${SKBUILD_PROJECT_VERSION} LANGUAGES CXX)
|
||||
|
||||
find_package(Python3 COMPONENTS Development Interpreter)
|
||||
|
||||
message(STATUS "CMAKE_BUILD_PARALLEL_LEVEL: ${CMAKE_BUILD_PARALLEL_LEVEL}")
|
||||
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/src/cmake/get_cpm.cmake)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/src/cmake/get_nvtx.cmake)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/src/cmake/get_torch.cmake)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/src/cmake/get_pybind11.cmake)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/src/cmake/configure_torch_pybind11.cmake)
|
||||
|
||||
# Generate compile_commands.json
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
# configure libfvdb
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/)
|
||||
|
||||
# Source files
|
||||
set(FVDB_BINDINGS_CPP_FILES
|
||||
src/python/Bindings.cpp
|
||||
src/python/GaussianSplatBinding.cpp
|
||||
src/python/GridBatchBinding.cpp
|
||||
src/python/JaggedTensorBinding.cpp)
|
||||
|
||||
# Build library
|
||||
Python3_add_library(_Cpp ${FVDB_BINDINGS_CPP_FILES})
|
||||
if (DEFINED TORCH_PYBIND11_INCLUDE_DIR)
|
||||
target_link_libraries(_Cpp PUBLIC torch_pybind11_headers)
|
||||
else()
|
||||
target_link_libraries(_Cpp PUBLIC pybind11::headers)
|
||||
endif()
|
||||
set_target_properties(_Cpp PROPERTIES
|
||||
INTERPROCEDURAL_OPTIMIZATION ON
|
||||
CXX_VISIBILITY_PRESET hidden
|
||||
VISIBILITY_INLINES_HIDDEN ON)
|
||||
|
||||
target_link_options(_Cpp PRIVATE "-Wl,--no-as-needed")
|
||||
|
||||
set_target_properties(_Cpp PROPERTIES
|
||||
BUILD_RPATH "\$ORIGIN"
|
||||
INSTALL_RPATH "\$ORIGIN"
|
||||
INSTALL_RPATH_USE_LINK_PATH FALSE
|
||||
BUILD_WITH_INSTALL_RPATH TRUE
|
||||
CXX_STANDARD 20
|
||||
CXX_STANDARD_REQUIRED ON
|
||||
CXX_EXTENSIONS ON
|
||||
POSITION_INDEPENDENT_CODE ON
|
||||
INTERFACE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
target_include_directories(_Cpp PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
${TORCH_INCLUDE_DIRS})
|
||||
|
||||
target_link_libraries(_Cpp PRIVATE
|
||||
${TORCH_PYTHON_LIBRARY}
|
||||
${TORCH_LIBRARIES}
|
||||
fvdb)
|
||||
|
||||
target_compile_options(_Cpp PRIVATE
|
||||
$<$<COMPILE_LANGUAGE:CXX>:
|
||||
#"-Wno-unused-variable"
|
||||
"-fvisibility=hidden"
|
||||
"-fvisibility-inlines-hidden"
|
||||
"-Wall"
|
||||
"-Werror"
|
||||
"${TORCH_CXX_FLAGS}"
|
||||
>)
|
||||
|
||||
target_compile_definitions(_Cpp PRIVATE
|
||||
TORCH_EXTENSION_NAME=_Cpp
|
||||
TORCH_API_INCLUDE_EXTENSION_H)
|
||||
|
||||
# Configure the pybind11 module with PyTorch compatibility settings
|
||||
configure_torch_pybind11(_Cpp)
|
||||
|
||||
install(TARGETS _Cpp fvdb
|
||||
LIBRARY
|
||||
DESTINATION fvdb
|
||||
COMPONENT PythonModule
|
||||
RUNTIME
|
||||
DESTINATION fvdb
|
||||
COMPONENT PythonModule)
|
||||
|
||||
# Add at the beginning after project() call:
|
||||
set(VERSION_PY_PATH "${CMAKE_CURRENT_SOURCE_DIR}/fvdb/version.py")
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/fvdb/version.py.in" "${VERSION_PY_PATH}" @ONLY)
|
||||
|
||||
# Make sure version.py is included in the installation
|
||||
install(FILES "${VERSION_PY_PATH}" DESTINATION fvdb)
|
||||
@@ -1,19 +0,0 @@
|
||||
FROM condaforge/miniforge3:24.11.3-2
|
||||
|
||||
ARG MODE=dev
|
||||
RUN echo "Building fVDB container in $MODE mode"
|
||||
|
||||
# used for cross-compilation in docker build
|
||||
ENV FORCE_CUDA=1
|
||||
|
||||
WORKDIR /openvdb
|
||||
|
||||
# force this CUDA version to be used to build the docker container because `docker build` does not
|
||||
# expose the GPU to the docker build process for it to be detected
|
||||
ENV CONDA_OVERRIDE_CUDA=12.0
|
||||
# copy env/dev_environment.yml to /tmp/
|
||||
COPY fvdb/env/dev_environment.yml /tmp/
|
||||
RUN conda env create -f /tmp/dev_environment.yml
|
||||
|
||||
RUN conda init
|
||||
RUN echo "conda activate fvdb" >> ~/.bashrc
|
||||
-244
@@ -1,244 +0,0 @@
|
||||
# *ƒ*(VDB)
|
||||
|
||||
|
||||
This repository contains the code for *f*VDB, a data structure for encoding and operating on *sparse voxel hierarchies* of features in PyTorch. A sparse voxel hierarchy is a coarse-to-fine hierarchy of sparse voxel grids such that every fine voxel is contained within some coarse voxel. The image below illustrates an example. *f*VDB supports using PyTorch Tensors to represent features at the corners and centers of voxels in a hierarchy and enables a number of differentiable operations on these Tensors (*e.g.* trilinear interpolation, convolution, splatting, ray tracing).
|
||||
|
||||
<p align="center">
|
||||
<img src="docs/imgs/fvdb_teaser.png" style="width: 40%;"alt="fVDB Teaser">
|
||||
<!-- <img src="docs/imgs/readme/av_screenshot.png" style="width: 100%;"alt="fVDB Teaser"> -->
|
||||
<figcaption style="text-align: center; font-style: italic;">An example of a sparse voxel hierarchy with 3 levels. Each fine voxel is contained within exactly one coarse voxel.</figcaption>
|
||||
</p>
|
||||
|
||||
## Learning to Use *f*VDB
|
||||
|
||||
After [installing *f*VDB](#installing-fvdb), we recommend starting with our walk-through [notebooks](notebooks) which provide a gentle, illustrated introduction to the main concepts and operations in *f*VDB.
|
||||
|
||||
Once familiar with the basics, [Usage Examples](#usage-examples) introduces a few of the practical python scripts that can be further explored in the [examples](examples) directory.
|
||||
|
||||
Lastly, our [documentation](docs) provides deeper details on the concepts as well as an exhaustive set of illustrations of all the operations available in *f*VDB and an API reference. The [documentation can be built locally](#building-documentation) or can be accessed online at https://www.openvdb.org/documentation/fvdb/.
|
||||
|
||||
## Installing *f*VDB
|
||||
|
||||
During the project's initial development stages, it is necessary to [run the build steps](#building-fvdb-from-source) to install ƒVDB. Eventually, ƒVDB will be provided as a pre-built, installable package from anaconda. We support building the latest ƒVDB version for the following dependent library configurations:
|
||||
|
||||
| PyTorch | Python | CUDA |
|
||||
| -------------- | ----------- | ------------ |
|
||||
| 2.4.0-2.4.1 | 3.10 - 3.12 | 12.1 - 12.4 |
|
||||
|
||||
|
||||
|
||||
** Notes:**
|
||||
* Linux is the only platform currently supported (Ubuntu >= 20.04 recommended).
|
||||
* A CUDA-capable GPU with Ampere architecture or newer (i.e. compute capability >=8.0) is recommended to run the CUDA-accelerated operations in ƒVDB. A GPU with compute capabililty >=7.0 (Volta architecture) is the minimum requirement but some operations and data types are not supported.
|
||||
|
||||
|
||||
## Building *f*VDB from Source
|
||||
|
||||
### Environment Management
|
||||
ƒVDB is a Python library implemented as a C++ Pytorch extension. Of course you can build ƒVDB in whatever environment suits you, but we provide three paths to constructing reliable environments for building and running ƒVDB: using [docker](#setting-up-a-docker-container), [conda](#setting-up-a-conda-environment), or a Python virtual environment.
|
||||
|
||||
`conda` tends to be more flexible since reconfiguring toolchains and modules to suit your larger project can be dynamic, but at the same time this can be a more brittle experience compared to using a virtualized `docker` container. Using `conda` is generally recommended for development and testing, while using `docker` is recommended for CI/CD and deployment.
|
||||
|
||||
#### Setting up a Docker Container
|
||||
|
||||
Running a docker container is a great way to ensure that you have a consistent environment for building and running ƒVDB.
|
||||
|
||||
Our provided [`Dockerfile`](Dockerfile) constructs a Docker image which is ready to build ƒVDB. The docker image is configured to install miniforge and the `fvdb` conda environment with all the dependencies needed to build and run ƒVDB.
|
||||
|
||||
Building and starting the docker image is done by running the following command from the fvdb directory:
|
||||
```shell
|
||||
docker compose run --rm fvdb-dev
|
||||
```
|
||||
|
||||
|
||||
When you are ready to build ƒVDB, run the following command within the docker container. `TORCH_CUDA_ARCH_LIST` specifies which CUDA architectures to build for.
|
||||
```shell
|
||||
conda activate fvdb;
|
||||
cd /openvdb/fvdb;
|
||||
TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0;8.6+PTX" \
|
||||
./build.sh install
|
||||
```
|
||||
|
||||
Additional information about the ƒVDB docker setup, with troubleshooting for common errors, can be found
|
||||
here: [`ƒVDB Docker`](docs/markdown/docker_readme.md)
|
||||
|
||||
#### Setting up a Conda Environment
|
||||
|
||||
*f*VDB can be used with any Conda distribution installed on your system. Below is an installation guide using
|
||||
[miniforge](https://github.com/conda-forge/miniforge). You can skip steps 1-3 if you already have a Conda installation.
|
||||
|
||||
1. Download and Run Install Script. Copy the command below to download and run the [miniforge install script](https://github.com/conda-forge/miniforge?tab=readme-ov-file#unix-like-platforms-macos--linux):
|
||||
|
||||
```shell
|
||||
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
|
||||
bash Miniforge3-$(uname)-$(uname -m).sh
|
||||
```
|
||||
|
||||
2. Follow the prompts to customize Conda and run the install. Note, we recommend saying yes to enable `conda-init`.
|
||||
|
||||
3. Start Conda. Open a new terminal window, which should now show Conda initialized to the `(base)` environment.
|
||||
|
||||
4. Create the `fvdb` conda environment. Run the following command from the directory containing this README:
|
||||
|
||||
```shell
|
||||
conda env create -f env/dev_environment.yml
|
||||
```
|
||||
|
||||
5. Activate the *f*VDB environment:
|
||||
|
||||
```shell
|
||||
conda activate fvdb
|
||||
```
|
||||
|
||||
##### Other available environments
|
||||
* `fvdb_build`: Use `env/build_environment.yml` for a minimum set of dependencies needed just to build/package *f*VDB (note this environment won't have all the runtime dependencies needed to `import fvdb`).
|
||||
* `fvdb_test`: Use `env/test_environment.yml` for a runtime environment which has only the packages required to run the unit tests after building ƒVDB. This is the environment used by the CI pipeline to run the tests after building ƒVDB in the `fvdb_build` environment.
|
||||
* `fvdb_learn`: Use `env/learn_environment.yml` for additional runtime requirements and packages needed to run the [notebooks](notebooks) or [examples](examples) and view their visualizations.
|
||||
|
||||
#### Setting up a Python virtual environment
|
||||
|
||||
After creating a Python virtual environment, proceed to install the exact version of PyTorch that corresponds to your CUDA version. Then, install the rest of the build requirements.
|
||||
|
||||
```shell
|
||||
python -m venv fvdb
|
||||
source fvdb/bin/activate
|
||||
pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu126
|
||||
pip install -r env/build_requirements.txt
|
||||
```
|
||||
|
||||
When you're ready to build fVDB, run the following command after activating the Python virtual environment
|
||||
```shell
|
||||
TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0;8.6+PTX" ./build.sh install
|
||||
```
|
||||
|
||||
### Building *f*VDB
|
||||
|
||||
**:warning: Note:** Compilation can be very memory-consuming. As part of our build script, we set the `CMAKE_BUILD_PARALLEL_LEVEL` environment variable to control compilation job parallelism with a value that we find works well for most machines (allowing for one job every 2.5GB of memory) but this can be overridden by setting the `CMAKE_BUILD_PARALLEL_LEVEL` environment variable to a different value.
|
||||
|
||||
|
||||
You can either perform an install:
|
||||
```shell
|
||||
./build.sh
|
||||
```
|
||||
|
||||
or if you would like to build a packaged wheel for installing in other environments, you can run the following command:
|
||||
```shell
|
||||
./build.sh wheel
|
||||
```
|
||||
|
||||
|
||||
### Running Tests
|
||||
|
||||
To make sure that everything works by running tests:
|
||||
```shell
|
||||
cd tests
|
||||
pytest unit
|
||||
```
|
||||
|
||||
### Building Documentation
|
||||
|
||||
To build the documentation, simply run:
|
||||
```shell
|
||||
python setup.py build_ext --inplace
|
||||
sphinx-build -E -a docs/ build/sphinx
|
||||
# View the docs
|
||||
open build/sphinx/index.html
|
||||
```
|
||||
|
||||
### Setting up Intellisense with clangd in Visual Studio Code
|
||||
|
||||
Please see the guide [`Clangd for Intellisense in fVDB`](docs/markdown/clangd.md)
|
||||
|
||||
|
||||
## Usage Examples
|
||||
The [examples](examples) directory contains a number of useful illustrations using the `fvdb` Python package. The sections below show some notable examples and their outputs. Run all commands from the directory containing this README.
|
||||
|
||||
### Trilinear sampling of grids
|
||||
```
|
||||
python examples/sample_trilinear.py
|
||||
```
|
||||
This script generates a grid with scalars at the corners of each voxel and samples this grid at points. The visualization below shows the points colored according to their sampled values as well as the values at grid corners.
|
||||
<p align="center">
|
||||
<img src="docs/imgs/readme/trilerp.png" style="width: 40%;"alt="fVDB trilinear interpolation demo">
|
||||
<figcaption style="text-align: center; font-style: italic;">Trilinearly interpolate the corner values at the points.</figcaption>
|
||||
</p>
|
||||
|
||||
|
||||
### Trilinear splatting into grids
|
||||
```
|
||||
python examples/splat_trilinear.py
|
||||
```
|
||||
This script splats normals of a point cloud onto grid centers. The green arrows represent the values of the normals splatted onto each grid center
|
||||
<p align="center">
|
||||
<img src="docs/imgs/readme/splat.png" style="width: 40%;"alt="fVDB trilinear splatting demo">
|
||||
<figcaption style="text-align: center; font-style: italic;">Splat the normals at the blue points into the center of each grid cell. The green arrows are the splatted normals</figcaption>
|
||||
</p>
|
||||
|
||||
|
||||
### Tracing voxels along rays (hierarchical DDA)
|
||||
```
|
||||
python examples/ray_voxel_marching.py
|
||||
```
|
||||
This script demonstrates finding the first `N` voxels which lie along a ray (returning thier index as well as their entry and exit points).
|
||||
<p align="center">
|
||||
<img src="docs/imgs/readme/rayvox.png" style="width: 70%;"alt="fVDB ray voxel marching">
|
||||
<figcaption style="text-align: center; font-style: italic;">Find the voxels (yellow) which intersect the pink rays eminating from the green dot.</figcaption>
|
||||
</p>
|
||||
|
||||
|
||||
### Tracing contiguous segments along rays
|
||||
```
|
||||
python examples/ray_segment_marching.py
|
||||
```
|
||||
This script demonstrates finding the first `N` continuous segments of voxels which lie along a ray (returning thier index as well as their entry and exit points).
|
||||
<p align="center">
|
||||
<img src="docs/imgs/readme/rayseg.png" style="width: 70%;"alt="fVDB ray voxel marching">
|
||||
<figcaption style="text-align: center; font-style: italic;">Find the contiguous segments of voxels (red and blue lines) which intersect the cyan rays eminating from the pink dot.</figcaption>
|
||||
</p>
|
||||
|
||||
|
||||
### Backpropagating through sampling and splatting
|
||||
```
|
||||
python examples/overfit_sdf.py
|
||||
```
|
||||
This scripts fits SDF values at a grid corner to the SDF of a mesh using gradient descent.
|
||||
<p align="center">
|
||||
<img src="docs/imgs/readme/fitsdf.png" style="width: 70%;"alt="fVDB SDF fitting">
|
||||
<figcaption style="text-align: center; font-style: italic;">SDF values at grid corners (colored dots) fitted using gradient descent to the SDF of a mesh.</figcaption>
|
||||
</p>
|
||||
|
||||
The following scripts also show how to bakcprop through splatting and sampling with fVDB:
|
||||
```
|
||||
python scripts/debug_grad_trilerp.py
|
||||
```
|
||||
```
|
||||
python scripts/debug_grad_splat.py
|
||||
```
|
||||
|
||||
## Code Structure
|
||||
The main source code for fVDB lives in the [src](src) directory. There are several important files here:
|
||||
* `src/python/Bindings.cpp` exposes functionality directly to Python. It is mainly a wrapper around the core classes such as `fvdb::GridBatch` and `fvdb::JaggedTensor`.
|
||||
* `src/GridBatch.h` contains the implementation of `fvdb::GridBatch` which is the core data structure on which fVDB is built. A `GridBatch` acts as a map between `(i, j, k)` integer coordinates and offsets in linear memory. This mapping can be used to perform a host of operations. The methods in this class are mostly lightweight wrappers around a set of CPU and CUDA *kernels*. The function prototypes for these kernels are defined in `src/detail/ops/Ops.h`.
|
||||
* `src/detail/ops/Ops.h` contains the function prototypes for the main kernels used by fVDB. Host and device kernel implementations are provided in the `src/detail/ops/*.cu` source files.
|
||||
* `src/detail/autograd` contains C++ implementations of PyTorch autograd functions for differentiable operations. `#include <detail/autograd/Autograd.h>` includes all of the functions in this directory.
|
||||
* `src/detail/utils/nanovdb` contains a number of utilities which make it easier to use NanoVDB.
|
||||
|
||||
|
||||
## References
|
||||
|
||||
Please consider citing this when using *f*VDB in a project. You can use the citation BibTeX:
|
||||
|
||||
```bibtex
|
||||
@article{williams2024fvdb,
|
||||
title={fVDB: A Deep-Learning Framework for Sparse, Large-Scale, and High-Performance Spatial Intelligence},
|
||||
author={Williams, Francis and Huang, Jiahui and Swartz, Jonathan and Klar, Gergely and Thakkar, Vijay and Cong, Matthew and Ren, Xuanchi and Li, Ruilong and Fuji-Tsang, Clement and Fidler, Sanja and Sifakis, Eftychios and Museth, Ken},
|
||||
journal={ACM Transactions on Graphics (TOG)},
|
||||
volume={43},
|
||||
number={4},
|
||||
pages={133:1--133:15},
|
||||
year={2024},
|
||||
publisher={ACM New York, NY, USA}
|
||||
}
|
||||
```
|
||||
|
||||
## Contact
|
||||
-195
@@ -1,195 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [-h|--help] [build_type] [options...]"
|
||||
echo ""
|
||||
echo "Builds or tests FVDB."
|
||||
echo ""
|
||||
echo "Arguments:"
|
||||
echo " build_type Specifies the build operation. Can be one of:"
|
||||
echo " install - Build and install the package (default)."
|
||||
echo " wheel - Build the Python wheel."
|
||||
echo " ctest - Run tests (requires tests to be built)."
|
||||
echo " debug - Build in debug mode with full debug symbols and no optimizations."
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " -h, --help Display this help message and exit."
|
||||
echo ""
|
||||
echo "Build Modifiers (for 'install' and 'wheel' build types, typically passed after build_type):"
|
||||
echo " gtests Enable building tests (sets FVDB_BUILD_TESTS=ON)."
|
||||
echo " benchmarks Enable building benchmarks (sets FVDB_BUILD_BENCHMARKS=ON)."
|
||||
echo " verbose Enable verbose build output for pip and CMake."
|
||||
echo ""
|
||||
echo " Any modifier arguments not matching above are passed through to pip."
|
||||
exit 0
|
||||
}
|
||||
|
||||
setup_parallel_build_jobs() {
|
||||
# Calculate the optimal number of parallel build jobs based on available RAM
|
||||
RAM_GB=$(free -g | awk '/^Mem:/{print $4}')
|
||||
if [ -z "$RAM_GB" ]; then
|
||||
echo "Error: Unable to determine available RAM"
|
||||
exit 1
|
||||
fi
|
||||
JOB_RAM_GB=2.5
|
||||
|
||||
# Calculate max jobs based on RAM
|
||||
RAM_JOBS=$(awk -v ram="$RAM_GB" -v job_ram="$JOB_RAM_GB" 'BEGIN { print int(ram / job_ram) }')
|
||||
|
||||
# Get number of processors
|
||||
NPROC=$(nproc)
|
||||
|
||||
# if CMAKE_BUILD_PARALLEL_LEVEL is set, use that
|
||||
if [ -n "$CMAKE_BUILD_PARALLEL_LEVEL" ]; then
|
||||
echo "Using CMAKE_BUILD_PARALLEL_LEVEL=$CMAKE_BUILD_PARALLEL_LEVEL"
|
||||
else
|
||||
# Determine the minimum of RAM-based jobs and processor count
|
||||
if [ "$RAM_JOBS" -lt "$NPROC" ]; then
|
||||
CMAKE_BUILD_PARALLEL_LEVEL="$RAM_JOBS"
|
||||
else
|
||||
CMAKE_BUILD_PARALLEL_LEVEL="$NPROC"
|
||||
fi
|
||||
|
||||
# Ensure at least 1 job
|
||||
if [ "$CMAKE_BUILD_PARALLEL_LEVEL" -lt 1 ]; then
|
||||
CMAKE_BUILD_PARALLEL_LEVEL=1
|
||||
fi
|
||||
|
||||
echo "Setting CMAKE_BUILD_PARALLEL_LEVEL to $CMAKE_BUILD_PARALLEL_LEVEL based on available RAM to target $JOB_RAM_GB GB per translation unit"
|
||||
export CMAKE_BUILD_PARALLEL_LEVEL
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
# Determine BUILD_TYPE from the first positional argument, default to 'install'.
|
||||
# Handle shifting of arguments appropriately.
|
||||
_first_arg_val="$1"
|
||||
BUILD_TYPE="install" # Default build type
|
||||
|
||||
if [[ -n "$_first_arg_val" ]]; then
|
||||
if [[ "$_first_arg_val" == "install" || "$_first_arg_val" == "wheel" || "$_first_arg_val" == "ctest" ]]; then
|
||||
BUILD_TYPE="$_first_arg_val"
|
||||
shift # Consume the build_type argument
|
||||
else
|
||||
# _first_arg_val is not a recognized build type. Print usage and exit.
|
||||
echo "Error: Argument '$_first_arg_val' is not a recognized build_type."
|
||||
usage # This will also exit
|
||||
fi
|
||||
fi
|
||||
|
||||
CONFIG_SETTINGS=""
|
||||
PASS_THROUGH_ARGS=""
|
||||
|
||||
while (( "$#" )); do
|
||||
is_config_arg_handled=false
|
||||
if [[ "$BUILD_TYPE" == "install" || "$BUILD_TYPE" == "wheel" ]]; then
|
||||
if [[ "$1" == "gtests" ]]; then
|
||||
echo "Detected 'gtests' flag for $BUILD_TYPE build. Enabling FVDB_BUILD_TESTS."
|
||||
CONFIG_SETTINGS+=" --config-settings=cmake.define.FVDB_BUILD_TESTS=ON"
|
||||
is_config_arg_handled=true
|
||||
elif [[ "$1" == "benchmarks" ]]; then
|
||||
echo "Detected 'benchmarks' flag for $BUILD_TYPE build. Enabling FVDB_BUILD_BENCHMARKS."
|
||||
CONFIG_SETTINGS+=" --config-settings=cmake.define.FVDB_BUILD_BENCHMARKS=ON"
|
||||
is_config_arg_handled=true
|
||||
elif [[ "$1" == "verbose" ]]; then
|
||||
echo "Enabling verbose build"
|
||||
CONFIG_SETTINGS+=" -v -C build.verbose=true"
|
||||
is_config_arg_handled=true
|
||||
elif [[ "$1" == "debug" ]]; then
|
||||
echo "Enabling debug build"
|
||||
CONFIG_SETTINGS+=" --config-settings=cmake.build-type=debug"
|
||||
is_config_arg_handled=true
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! $is_config_arg_handled; then
|
||||
# Append other arguments, handling potential spaces safely
|
||||
PASS_THROUGH_ARGS+=" $(printf "%q" "$1")"
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
# Construct PIP_ARGS with potential CMake args and other pass-through args
|
||||
export PIP_ARGS="--no-build-isolation$CONFIG_SETTINGS$PASS_THROUGH_ARGS"
|
||||
|
||||
if [ "$BUILD_TYPE" != "ctest" ]; then
|
||||
setup_parallel_build_jobs
|
||||
fi
|
||||
|
||||
# if the user specified 'wheel' as the build type, then we will build the wheel
|
||||
if [ "$BUILD_TYPE" == "wheel" ]; then
|
||||
echo "Build wheel"
|
||||
echo "pip wheel . --wheel-dir dist/ $PIP_ARGS"
|
||||
pip wheel . --wheel-dir dist/ $PIP_ARGS
|
||||
elif [ "$BUILD_TYPE" == "install" ]; then
|
||||
echo "Build and install package"
|
||||
echo "pip install --force-reinstall $PIP_ARGS ."
|
||||
pip install --force-reinstall $PIP_ARGS .
|
||||
# TODO: Fix editable install
|
||||
# else
|
||||
# echo "Build and install editable package"
|
||||
# echo "pip install $PIP_ARGS -e . "
|
||||
# pip install $PIP_ARGS -e .
|
||||
elif [ "$BUILD_TYPE" == "ctest" ]; then
|
||||
|
||||
# --- Ensure Test Data is Cached via CMake Configure Step ---
|
||||
echo "Ensuring test data is available in CPM cache..."
|
||||
|
||||
if [ -z "$CPM_SOURCE_CACHE" ]; then
|
||||
echo "CPM_SOURCE_CACHE is not set"
|
||||
else
|
||||
echo "Using CPM_SOURCE_CACHE: $CPM_SOURCE_CACHE"
|
||||
fi
|
||||
|
||||
# Assume this script runs from the source root directory
|
||||
SOURCE_DIR=$(pwd)
|
||||
TEMP_BUILD_DIR="build_temp_download_data"
|
||||
|
||||
# Clean up previous temp dir and create anew
|
||||
rm -rf "$TEMP_BUILD_DIR"
|
||||
mkdir "$TEMP_BUILD_DIR"
|
||||
|
||||
echo "Running CMake configure in temporary directory ($TEMP_BUILD_DIR) to trigger data download..."
|
||||
pushd "$TEMP_BUILD_DIR" > /dev/null
|
||||
cmake "$SOURCE_DIR/src/cmake/download_test_data"
|
||||
popd > /dev/null # Back to SOURCE_DIR
|
||||
|
||||
# Clean up temporary directory
|
||||
rm -rf "$TEMP_BUILD_DIR"
|
||||
echo "Test data caching step finished."
|
||||
# --- End Test Data Caching ---
|
||||
|
||||
# --- Find and Run Tests ---
|
||||
echo "Searching for test build directory..."
|
||||
# Find the directory containing the compiled tests (adjust if needed)
|
||||
# Using -print -quit to stop after the first match for efficiency
|
||||
BUILD_DIR=$(find build -name tests -type d -print -quit)
|
||||
|
||||
if [ -z "$BUILD_DIR" ]; then
|
||||
echo "Error: Could not find build directory with tests"
|
||||
echo "Please enable tests by building with pip argument"
|
||||
echo "-C cmake.define.FVDB_BUILD_TESTS=ON"
|
||||
exit 1
|
||||
fi
|
||||
echo "Found test build directory: $BUILD_DIR"
|
||||
|
||||
# Run ctest within the test build directory
|
||||
pushd "$BUILD_DIR" > /dev/null
|
||||
echo "Running ctest..."
|
||||
ctest --output-on-failure
|
||||
CTEST_EXIT_CODE=$?
|
||||
popd > /dev/null # Back to SOURCE_DIR
|
||||
|
||||
echo "ctest finished with exit code $CTEST_EXIT_CODE."
|
||||
exit $CTEST_EXIT_CODE
|
||||
|
||||
else
|
||||
echo "Invalid build/run type: $BUILD_TYPE"
|
||||
echo "Valid build/run types are: wheel, install, ctest"
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,25 +0,0 @@
|
||||
version: '3'
|
||||
services:
|
||||
fvdb-dev:
|
||||
build:
|
||||
context: ../
|
||||
dockerfile: fvdb/Dockerfile
|
||||
args:
|
||||
MODE: dev
|
||||
volumes:
|
||||
- ../:/openvdb
|
||||
# Uncomment and adjust the following as needed
|
||||
# ports:
|
||||
# - "8888:8888" # Example for Jupyter notebook
|
||||
entrypoint: /bin/bash
|
||||
stdin_open: true
|
||||
tty: true
|
||||
environment:
|
||||
- NVIDIA_VISIBLE_DEVICES=all
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: all
|
||||
capabilities: [gpu]
|
||||
@@ -1,5 +0,0 @@
|
||||
GridBatch
|
||||
===============
|
||||
|
||||
.. autoclass:: fvdb.GridBatch
|
||||
:members:
|
||||
@@ -1,5 +0,0 @@
|
||||
JaggedTensor
|
||||
===============
|
||||
|
||||
.. autoclass:: fvdb.JaggedTensor
|
||||
:members:
|
||||
@@ -1,20 +0,0 @@
|
||||
fvdb.nn
|
||||
=======
|
||||
|
||||
`fvdb.nn` is a collection of neural network layers to build sparse neural networks.
|
||||
|
||||
.. autoclass:: fvdb.nn.VDBTensor
|
||||
.. autoclass:: fvdb.nn.MaxPool
|
||||
.. autoclass:: fvdb.nn.AvgPool
|
||||
.. autoclass:: fvdb.nn.UpsamplingNearest
|
||||
.. autoclass:: fvdb.nn.FillFromGrid
|
||||
.. autoclass:: fvdb.nn.SparseConv3d
|
||||
.. autoclass:: fvdb.nn.GroupNorm
|
||||
.. autoclass:: fvdb.nn.Linear
|
||||
.. autoclass:: fvdb.nn.ReLU
|
||||
.. autoclass:: fvdb.nn.LeakyReLU
|
||||
.. autoclass:: fvdb.nn.SELU
|
||||
.. autoclass:: fvdb.nn.SiLU
|
||||
.. autoclass:: fvdb.nn.Tanh
|
||||
.. autoclass:: fvdb.nn.Sigmoid
|
||||
.. autoclass:: fvdb.nn.Dropout
|
||||
@@ -1,4 +0,0 @@
|
||||
fvdb.utils
|
||||
==================
|
||||
|
||||
.. autofunction:: fvdb.utils.build_ext.FVDBExtension
|
||||
@@ -1,91 +0,0 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# -- Path setup --------------------------------------------------------------
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.abspath(".."))
|
||||
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = "fVDB"
|
||||
copyright = "Contributors to the OpenVDB Project"
|
||||
author = "Contributors to the OpenVDB Project"
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode", "sphinx.ext.napoleon", "myst_parser"]
|
||||
|
||||
myst_enable_extensions = [
|
||||
"amsmath",
|
||||
"attrs_inline",
|
||||
"colon_fence",
|
||||
"deflist",
|
||||
"dollarmath",
|
||||
"fieldlist",
|
||||
"html_admonition",
|
||||
"html_image",
|
||||
"linkify",
|
||||
"replacements",
|
||||
"smartquotes",
|
||||
"strikethrough",
|
||||
"substitution",
|
||||
"tasklist",
|
||||
]
|
||||
|
||||
# Fix return-type in google-style docstrings
|
||||
napoleon_custom_sections = [("Returns", "params_style")]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ["_templates"]
|
||||
|
||||
source_suffix = [".rst", ".md"]
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This pattern also affects html_static_path and html_extra_path.
|
||||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
||||
|
||||
autodoc_default_options = {"undoc-members": "forward, extra_repr"}
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
# html_static_path = ['imgs']
|
||||
|
||||
|
||||
# -- Custom hooks ------------------------------------------------------------
|
||||
|
||||
|
||||
def process_signature(app, what, name, obj, options, signature, return_annotation):
|
||||
if signature is not None:
|
||||
signature = signature.replace("._Cpp", "")
|
||||
signature = signature.replace("fvdb::", "fvdb.")
|
||||
|
||||
if return_annotation is not None:
|
||||
return_annotation = return_annotation.replace("._Cpp", "")
|
||||
return_annotation = return_annotation.replace("fvdb::", "fvdb.")
|
||||
|
||||
return signature, return_annotation
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.connect("autodoc-process-signature", process_signature)
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 418 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 415 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 53 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user