Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9aa5016553 | ||
|
|
d23549f24a | ||
|
|
2f93980ad2 | ||
|
|
3976c554be | ||
|
|
fec59777b7 | ||
|
|
402b91251c | ||
|
|
a04cae04ce | ||
|
|
0a1d7e5030 | ||
|
|
8e595b7dae | ||
|
|
6eebb573d5 | ||
|
|
bc6b33366a | ||
|
|
b6db81bf06 | ||
|
|
226be9fa5d | ||
|
|
7ece1dae7a | ||
|
|
39a284988e | ||
|
|
cfba6dff78 | ||
|
|
297be1c341 | ||
|
|
a780ec029d | ||
|
|
ec70b677da | ||
|
|
4a4d6730e3 | ||
|
|
522cecab27 | ||
|
|
a0a789ef8f | ||
|
|
f18950db05 | ||
|
|
05a658f5d9 | ||
|
|
55b94e2a79 | ||
|
|
3fa663d8d3 | ||
|
|
a91c2863ce | ||
|
|
8d9b1e0777 | ||
|
|
7f4a717e85 | ||
|
|
828641c552 | ||
|
|
3de00254b8 | ||
|
|
9fc4b8e0fe | ||
|
|
19013e3358 | ||
|
|
8ca4ac8a7f | ||
|
|
ae28d3ce14 | ||
|
|
0b3ce20f74 | ||
|
|
7fc793078c | ||
|
|
3733f2c372 | ||
|
|
0bb18adef6 | ||
|
|
41adf1baab | ||
|
|
0e29a1ff94 | ||
|
|
604ed38280 | ||
|
|
5a6714b67c | ||
|
|
c9293ed87c | ||
|
|
778e1efcb1 | ||
|
|
37c0c47bc4 | ||
|
|
2433964511 | ||
|
|
78b9cd84cf | ||
|
|
b8dd348aa5 | ||
|
|
6da1f9530a | ||
|
|
7c03e1f084 | ||
|
|
e9a1f1a3d2 | ||
|
|
f5a735a2af | ||
|
|
10da55d5c1 | ||
|
|
2901256875 | ||
|
|
a0df7e82fe | ||
|
|
c8ad233db1 | ||
|
|
687e6c405e | ||
|
|
7ba5bb1889 | ||
|
|
db301eb962 | ||
|
|
10aae7e90b | ||
|
|
5462395ae8 | ||
|
|
3fe53838b4 | ||
|
|
cd524c73ca | ||
|
|
ec28bf7d86 | ||
|
|
b8b2d78ba3 | ||
|
|
8884fd3e97 | ||
|
|
2892db60f8 | ||
|
|
ce6d2b5675 | ||
|
|
dfe40d98e8 | ||
|
|
763c09c57e | ||
|
|
154828954f | ||
|
|
3269bf764c | ||
|
|
22bb394214 | ||
|
|
b777c47370 | ||
|
|
1b9ca6408f | ||
|
|
df578c6bbc | ||
|
|
c69404e432 | ||
|
|
cf5ddffbfb | ||
|
|
2086e3c932 | ||
|
|
c78b9efb87 | ||
|
|
9aa8050c3c | ||
|
|
2072e1d82c | ||
|
|
75c1985ec9 | ||
|
|
8b64f41042 | ||
|
|
b44b2b31de | ||
|
|
57434bc985 | ||
|
|
84eea021f6 | ||
|
|
fae3ee95d1 | ||
|
|
a0e513862a | ||
|
|
a273ab358f | ||
|
|
8e901cc609 | ||
|
|
8e5972026d | ||
|
|
5d9e78992f | ||
|
|
ddb4629dec | ||
|
|
e5896971a9 | ||
|
|
fc745334da | ||
|
|
c98f29afcd | ||
|
|
a2c60a3a46 | ||
|
|
3cc39c7d25 | ||
|
|
92ec8d2c46 | ||
|
|
c3f0336f1a | ||
|
|
4fd1a8cd6c | ||
|
|
40e4129229 | ||
|
|
f2df83c304 | ||
|
|
bd7a2416d4 | ||
|
|
e269c9a6e0 | ||
|
|
93d0b3cb33 | ||
|
|
185ecc48ba | ||
|
|
e3beb85592 | ||
|
|
4027e3d66e | ||
|
|
8897a22033 | ||
|
|
893a03bed8 | ||
|
|
09b8ab83a0 | ||
|
|
91af0f5293 | ||
|
|
61a30b3e98 | ||
|
|
70b1593a18 | ||
|
|
bd16782e77 | ||
|
|
7f5538fe2c | ||
|
|
352e672e5b | ||
|
|
d3aaf4fe64 | ||
|
|
ae64b3c50c | ||
|
|
2dbc79024c | ||
|
|
4bdee3bd47 | ||
|
|
55258d0da9 | ||
|
|
e8f1f84f37 | ||
|
|
4e02cba85a | ||
|
|
ddaf9f42e3 | ||
|
|
dd34dc583b | ||
|
|
dc69e26dd5 | ||
|
|
592df88c88 | ||
|
|
3780d983a1 | ||
|
|
114db385da | ||
|
|
32dfc0e792 | ||
|
|
f564d35dca | ||
|
|
30a08a27c8 | ||
|
|
6f9ca0c05a | ||
|
|
747d029abc | ||
|
|
71a5f289cb | ||
|
|
1c5d8d1f57 | ||
|
|
0952c900f9 | ||
|
|
02478bd95f | ||
|
|
dd72d1f137 | ||
|
|
04f4dfba83 | ||
|
|
eab9aaaa7a | ||
|
|
e419f1c745 | ||
|
|
3b64696777 | ||
|
|
cf3c1923a5 | ||
|
|
86aa980c9c | ||
|
|
d3c8c640ce | ||
|
|
e3a9b1c1d9 | ||
|
|
e1944e98e5 | ||
|
|
176a3f3725 | ||
|
|
cb2ebfc840 | ||
|
|
7c108a5d9c | ||
|
|
796a07f3b8 | ||
|
|
345b74ef71 | ||
|
|
1c5a3bf382 | ||
|
|
d09c9a4f67 | ||
|
|
c7f7d6e737 | ||
|
|
f1c46db025 | ||
|
|
1f713afeee | ||
|
|
aa8dfc4f2a | ||
|
|
037aa886e5 | ||
|
|
ff78199ba9 | ||
|
|
29e764bac5 | ||
|
|
5f0432b338 | ||
|
|
b96fcf77a6 | ||
|
|
0cbfa274b2 | ||
|
|
edde9a605c | ||
|
|
4675f5b4bc | ||
|
|
3d45de107e | ||
|
|
ddc3d7a754 | ||
|
|
a25d824db4 | ||
|
|
5c1097e362 | ||
|
|
a02ae47d06 | ||
|
|
af240d55d4 | ||
|
|
c3219ccfd6 | ||
|
|
a948ff318e | ||
|
|
43329bd962 | ||
|
|
f91141ba9d | ||
|
|
559d7642c8 | ||
|
|
fc3f1d180f | ||
|
|
b3aead3529 | ||
|
|
08931d62b4 | ||
|
|
4fb969759e | ||
|
|
6f3f350daf | ||
|
|
178b816479 | ||
|
|
37c159260d | ||
|
|
5dddfa1fc0 | ||
|
|
759f8e59ee | ||
|
|
5bf378f89f | ||
|
|
372526723c | ||
|
|
2e576dbca8 | ||
|
|
4f6d0803b7 | ||
|
|
4e2546fe0c | ||
|
|
3b13980be2 | ||
|
|
90e84aa320 | ||
|
|
39b16cdd6c | ||
|
|
ac2e876b71 | ||
|
|
29dd88e5d9 | ||
|
|
ef3f85da9a | ||
|
|
cbe458cd8a | ||
|
|
166946c036 | ||
|
|
f6b627cb09 | ||
|
|
46371bbde9 | ||
|
|
dd0ac130d0 | ||
|
|
e4621ae7b3 | ||
|
|
1fceec9c6b | ||
|
|
9acc3af646 | ||
|
|
313af9a72a | ||
|
|
93b397cf81 | ||
|
|
cbda14ec8e | ||
|
|
62b95b4115 | ||
|
|
c2bc66e16d | ||
|
|
92ea3888c5 | ||
|
|
691cf1bcd1 | ||
|
|
556a326c4a | ||
|
|
3966b9f991 | ||
|
|
93549a75f2 | ||
|
|
8fc5038ecb | ||
|
|
c13dfc379c | ||
|
|
c391f89af5 | ||
|
|
c4a3cb3643 | ||
|
|
3917418d99 | ||
|
|
c7d1408aa9 | ||
|
|
8cd9a62f53 | ||
|
|
77fc6d05f7 | ||
|
|
c5f5777e08 | ||
|
|
ed5ad461d8 | ||
|
|
d3f37e7dfe | ||
|
|
952a86321c | ||
|
|
36b6043f93 | ||
|
|
6a43628236 | ||
|
|
a7cc7208d2 | ||
|
|
04a2340d2d | ||
|
|
1dc3f9d206 | ||
|
|
fed0143846 | ||
|
|
7885f4704f | ||
|
|
d7aea5d1a3 | ||
|
|
52406bf30f | ||
|
|
aaf0569678 | ||
|
|
b341d3cc50 | ||
|
|
8348da235c | ||
|
|
7ebe25fe55 | ||
|
|
d008d49eb3 | ||
|
|
188b8aeb1c | ||
|
|
286a197a80 | ||
|
|
6d238d412e | ||
|
|
584b2b5a1b | ||
|
|
786a33c2c7 | ||
|
|
5e1658e69b | ||
|
|
7b8f054f5f | ||
|
|
c2ac9bf519 | ||
|
|
67964d1e15 | ||
|
|
135616d177 | ||
|
|
7ac379d34b | ||
|
|
a58117a3df | ||
|
|
528c470d06 | ||
|
|
4ab3f27e48 | ||
|
|
4b7328db67 | ||
|
|
6e7ab0d49b | ||
|
|
2ba65fe8b4 | ||
|
|
16fb13286c | ||
|
|
5a0c07d06e | ||
|
|
1f35dfe61e | ||
|
|
f60217a439 | ||
|
|
aba9a149eb | ||
|
|
ff943a30eb | ||
|
|
ef94a3b184 | ||
|
|
5f1033dfd7 | ||
|
|
e48a8f8d5c | ||
|
|
b91cb6535a | ||
|
|
9b728cba18 | ||
|
|
88eb8c998b | ||
|
|
316e0b4d03 | ||
|
|
dd7f12eb23 | ||
|
|
72406ff08d | ||
|
|
4f96110d5a | ||
|
|
d0e37dff19 | ||
|
|
8598155fcb | ||
|
|
462aafda79 | ||
|
|
c945c36a09 | ||
|
|
267da7d91d | ||
|
|
74ae3a5989 | ||
|
|
1db28418eb | ||
|
|
690104f408 | ||
|
|
4adbccaee1 | ||
|
|
22e17e7956 | ||
|
|
d130267347 | ||
|
|
1d4cf67d80 | ||
|
|
4d500e10d0 | ||
|
|
1d1899bb0e | ||
|
|
242b573c75 | ||
|
|
d21bec89dc | ||
|
|
d71b7417ad | ||
|
|
9329349461 | ||
|
|
40853821a1 | ||
|
|
f96095f6cf | ||
|
|
97b229964c | ||
|
|
5f54d98080 | ||
|
|
a96cb41408 | ||
|
|
a79ec33944 | ||
|
|
0c94550eaa | ||
|
|
92d689c3bd | ||
|
|
a05dc7a903 | ||
|
|
8b7c521f4d | ||
|
|
e2e0cb6d03 | ||
|
|
f8a1b1ef71 | ||
|
|
2d7ae513ef | ||
|
|
692d63e3b8 | ||
|
|
109c3f2591 | ||
|
|
ac56c2496d | ||
|
|
68d9753437 | ||
|
|
dcd6744424 | ||
|
|
5df8871827 | ||
|
|
748ace48cd | ||
|
|
8a13cb2b02 | ||
|
|
ecb6e7b07c | ||
|
|
5e6a0d260b | ||
|
|
18c2c3a992 | ||
|
|
5beb2c5367 | ||
|
|
b44248b200 | ||
|
|
f25319edbb | ||
|
|
26ada31fa1 | ||
|
|
7aa4136886 | ||
|
|
efa5176137 | ||
|
|
a065b5e3de | ||
|
|
5c2f8e80f9 | ||
|
|
9bb34dff3f | ||
|
|
40a3ef4c05 | ||
|
|
29a17e36bc | ||
|
|
3ed5f6e93d |
@@ -1 +0,0 @@
|
||||
|
||||
@@ -30,9 +30,6 @@ on:
|
||||
- 'fvdb/**'
|
||||
- 'pendingchanges/**'
|
||||
- '**.md'
|
||||
schedule:
|
||||
# run this workflow every day 7am UTC
|
||||
- cron: '0 7 * * *'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
type:
|
||||
@@ -55,7 +52,7 @@ jobs:
|
||||
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' }}
|
||||
runs-on: ${{ (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:
|
||||
@@ -67,17 +64,22 @@ jobs:
|
||||
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: '' }
|
||||
- { image: '2026', cxx: 'clang++', build: 'Release', cmake: '' }
|
||||
- { image: '2026', cxx: 'g++', build: 'Release', cmake: '' }
|
||||
- { image: '2026', cxx: 'clang++', build: 'Debug', cmake: '' }
|
||||
- { image: '2025-clang19.1', cxx: 'clang++', build: 'Release', cmake: '' }
|
||||
- { image: '2024-clang16.2', cxx: 'clang++', build: 'Release', cmake: '' }
|
||||
# Needed to test LLVM 15.X
|
||||
- { image: '2023-clang15', cxx: 'clang++', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' }
|
||||
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
|
||||
run: ./ci/install_nanobind.sh 2.5.0
|
||||
# 2026 images are broken with gtest/glfw installs
|
||||
- name: deps
|
||||
if: contains(matrix.config.image, '2026')
|
||||
run: ./ci/install_gtest.sh latest
|
||||
- name: timestamp
|
||||
id: timestamp
|
||||
run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
|
||||
@@ -94,12 +96,11 @@ jobs:
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--build-type=${{ matrix.config.build }}
|
||||
--components='core,python,bin,axcore,axbin,axtest'
|
||||
--components='core,python,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
|
||||
@@ -122,9 +123,13 @@ jobs:
|
||||
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' }
|
||||
- { runner: 'macos-15', cxx: 'clang++', build: 'Release', llvm: '21' }
|
||||
- { runner: 'macos-14', cxx: 'clang++', build: 'Release', llvm: '21' }
|
||||
- { runner: 'macos-14', cxx: 'clang++', build: 'Release', llvm: '20' }
|
||||
- { runner: 'macos-14', cxx: 'clang++', build: 'Release', llvm: '19' }
|
||||
- { runner: 'macos-14', cxx: 'clang++', build: 'Release', llvm: '18' }
|
||||
- { runner: 'macos-14', cxx: 'clang++', build: 'Release', llvm: '17' }
|
||||
- { runner: 'macos-14', cxx: 'clang++', build: 'Release', llvm: '16' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -136,7 +141,7 @@ jobs:
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--build-type=${{ matrix.config.build }}
|
||||
--components="core,python,bin,axcore,axbin,axtest"
|
||||
--components="core,python,axcore,axbin,axtest"
|
||||
--cargs=\"
|
||||
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
|
||||
-DUSE_EXPLICIT_INSTANTIATION=OFF
|
||||
@@ -152,15 +157,15 @@ jobs:
|
||||
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' }}
|
||||
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
|
||||
container:
|
||||
image: aswf/ci-openvdb:2023-clang15
|
||||
image: aswf/ci-openvdb:2025-clang19.1
|
||||
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
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ax_grammar
|
||||
path: ./build/openvdb_ax/openvdb_ax/openvdb_ax/grammar
|
||||
|
||||
@@ -32,12 +32,6 @@ on:
|
||||
- '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:
|
||||
@@ -62,12 +56,9 @@ jobs:
|
||||
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' }}
|
||||
runs-on: ${{ (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 }}
|
||||
linux:${{ matrix.config.image }}-abi:${{ matrix.config.abi }}-cxx:${{ matrix.config.cxx }}-type:${{ matrix.config.build }}
|
||||
container:
|
||||
image: aswf/ci-openvdb:${{ matrix.config.image }}
|
||||
env:
|
||||
@@ -76,21 +67,22 @@ jobs:
|
||||
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' }
|
||||
- { cxx: clang++, image: '2026', abi: '13', build: 'Release', cmake: '-DOPENVDB_USE_FUTURE_ABI_13=ON -DOPENVDB_ENABLE_ASSERTS=ON' }
|
||||
- { cxx: g++, image: '2026', abi: '13', build: 'Release', cmake: '-DOPENVDB_USE_FUTURE_ABI_13=ON' }
|
||||
- { cxx: clang++, image: '2026', abi: '13', build: 'Debug', cmake: '-DOPENVDB_USE_FUTURE_ABI_13=ON' }
|
||||
- { cxx: clang++, image: '2025-clang19.1', abi: '12', build: 'Release', cmake: '' }
|
||||
- { cxx: clang++, image: '2024-clang17.2', 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
|
||||
run: ./ci/install_nanobind.sh 2.5.0
|
||||
# 2026 images are broken with gtest/glfw installs
|
||||
- name: deps
|
||||
if: contains(matrix.config.image, '2026')
|
||||
run: |
|
||||
./ci/install_gtest.sh latest
|
||||
./ci/install_glfw.sh latest
|
||||
- name: timestamp
|
||||
id: timestamp
|
||||
run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
|
||||
@@ -114,9 +106,8 @@ jobs:
|
||||
-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'
|
||||
# Skip Debug on commits as they take a while.
|
||||
if: github.event_name == 'workflow_dispatch' || matrix.config.build == 'Release'
|
||||
run: |
|
||||
cd build && ctest -V
|
||||
cd - && ./ci/test_install.sh
|
||||
@@ -148,6 +139,9 @@ jobs:
|
||||
- name: install
|
||||
shell: powershell
|
||||
run: .\ci\install_windows.ps1
|
||||
- name: install_numpy
|
||||
shell: powershell
|
||||
run: .\ci\install_windows_numpy.ps1
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
@@ -172,9 +166,15 @@ jobs:
|
||||
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)
|
||||
runs-on: ${{ matrix.config.image }}
|
||||
name: ${{ matrix.config.image }}
|
||||
env:
|
||||
CXX: clang++
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- { image: macos-14 }
|
||||
- { image: macos-15 }
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: install
|
||||
@@ -191,3 +191,4 @@ jobs:
|
||||
\'
|
||||
- name: test
|
||||
run: cd build && ctest -V
|
||||
|
||||
|
||||
@@ -34,25 +34,19 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
doxygen:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
|
||||
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:2026
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: install_doxygen
|
||||
run: ./ci/install_doxygen.sh 1_8_11
|
||||
run: ./ci/install_doxygen.sh 1_14_0
|
||||
- name: nanobind
|
||||
#if: contains(matrix.config.image, '2023') == false
|
||||
run: ./ci/install_nanobind.sh 2.0.0
|
||||
# - name: install_epydoc
|
||||
# run: pip install epydoc
|
||||
run: ./ci/install_nanobind.sh 2.5.0
|
||||
- name: install_latex
|
||||
run: |
|
||||
yum -y install texlive-latex-bin texlive-dvips texlive-collection-fontsrecommended texlive-collection-latexrecommended
|
||||
run: ./ci/install_texlive.sh
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
@@ -65,9 +59,6 @@ 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: pre_deploy
|
||||
# Overwrite global SSH configuration
|
||||
# https://github.com/peaceiris/actions-gh-pages/issues/719
|
||||
@@ -106,7 +97,7 @@ jobs:
|
||||
github.event.inputs.deploy == 'coverage'
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: aswf/ci-openvdb:2023
|
||||
image: aswf/ci-openvdb:2025-clang19.1
|
||||
env:
|
||||
CXX: g++
|
||||
steps:
|
||||
|
||||
@@ -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
|
||||
@@ -28,9 +28,6 @@ on:
|
||||
- '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.
|
||||
@@ -65,8 +62,8 @@ jobs:
|
||||
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 }}
|
||||
runs-on: ${{ (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 }}-build:${{ matrix.config.build }}
|
||||
container:
|
||||
image: aswf/ci-base:${{ matrix.config.image }}
|
||||
env:
|
||||
@@ -75,26 +72,18 @@ jobs:
|
||||
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' }
|
||||
- { cxx: clang++, image: '2026', hou_hash: '21_0', build: 'Release', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest' }
|
||||
- { cxx: clang++, image: '2026', hou_hash: '21_0', build: 'Debug', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest' }
|
||||
- { cxx: g++, image: '2026', hou_hash: '21_0', build: 'Release', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest' }
|
||||
- { cxx: clang++, image: '2024', hou_hash: '20_5', build: 'Release', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest' }
|
||||
- { cxx: g++, image: '2024', hou_hash: '20_5', 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
|
||||
run: ./ci/install_nanobind.sh 2.5.0
|
||||
- name: install_gtest
|
||||
run: ./ci/install_gtest.sh 1.15.2
|
||||
run: ./ci/install_gtest.sh latest
|
||||
- name: timestamp
|
||||
id: timestamp
|
||||
run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
|
||||
@@ -125,7 +114,7 @@ jobs:
|
||||
- name: build
|
||||
run: |
|
||||
./ci/build.sh -v \
|
||||
--build-type=Release \
|
||||
--build-type="${{ matrix.config.build }}" \
|
||||
--components="${{ matrix.config.components }}" \
|
||||
--cargs=\" \
|
||||
-DHOUDINI_ROOT=$HOME/houdini_install/hou \
|
||||
@@ -135,6 +124,7 @@ jobs:
|
||||
-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON \
|
||||
\"
|
||||
- name: test
|
||||
if: matrix.config.build == 'Release'
|
||||
run: cd build && ctest -V
|
||||
# Keep ccache light by stripping out any caches not accessed in the last day
|
||||
- name: ccache_clean
|
||||
@@ -165,12 +155,12 @@ jobs:
|
||||
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
|
||||
run: ./ci/install_macos.sh 20
|
||||
- name: build
|
||||
run: |
|
||||
./ci/build.sh -v \
|
||||
--build-type=Release \
|
||||
--components="core,hou,bin,view,render,python,test,axcore,axbin" \
|
||||
--components="core,hou,bin,view,render,test,axcore,axbin" \
|
||||
--cargs=\" \
|
||||
-DHOUDINI_ROOT=$HOME/houdini_install/hou \
|
||||
-DOPENVDB_BUILD_HOUDINI_ABITESTS=OFF \
|
||||
@@ -178,8 +168,7 @@ jobs:
|
||||
-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 \
|
||||
-DLLVM_DIR=/opt/homebrew/opt/llvm@20/lib/cmake/llvm \
|
||||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install \
|
||||
\"
|
||||
- name: test
|
||||
|
||||
@@ -30,9 +30,6 @@ on:
|
||||
- 'fvdb/**'
|
||||
- 'pendingchanges/**'
|
||||
- '**.md'
|
||||
schedule:
|
||||
# run this workflow every day 7am UTC
|
||||
- cron: '0 7 * * *'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
type:
|
||||
@@ -51,7 +48,7 @@ jobs:
|
||||
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' }}
|
||||
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
|
||||
name: >
|
||||
linux-nanovdb:cxx:${{ matrix.config.cxx }}-${{ matrix.config.build }}
|
||||
container:
|
||||
@@ -61,36 +58,37 @@ jobs:
|
||||
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' }
|
||||
- { cxx: g++, image: '2024-clang17.2', build: 'Release' }
|
||||
- { cxx: g++, image: '2024-clang17.2', build: 'Debug' }
|
||||
- { cxx: clang++, image: '2024-clang17.2', build: 'Release' }
|
||||
- { cxx: clang++, image: '2024-clang17.2', 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: nanobind
|
||||
run: ./ci/install_nanobind.sh 2.5.0
|
||||
- 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
|
||||
--components=core,nano,nanotest,nanoexam,nanobench,nanotool,nanopython,nanopytest
|
||||
--cargs=\'
|
||||
-DUSE_EXPLICIT_INSTANTIATION=OFF
|
||||
-DNANOVDB_USE_CUDA=ON
|
||||
-DCMAKE_CUDA_ARCHITECTURES="80"
|
||||
-DNANOVDB_USE_OPENVDB=ON
|
||||
-DCMAKE_INSTALL_PREFIX=`pwd`
|
||||
-DUSE_BLOSC=OFF
|
||||
-DUSE_BLOSC=ON
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
\'
|
||||
- name: test
|
||||
run: cd build && sudo ctest -V -E ".*cuda.*"
|
||||
run: cd build && sudo ctest -V -E ".*cuda.*|.*mgpu.*"
|
||||
|
||||
windows-nanovdb:
|
||||
if: |
|
||||
@@ -118,24 +116,26 @@ jobs:
|
||||
shell: powershell
|
||||
run: .\ci\install_windows.ps1
|
||||
- name: build
|
||||
# nvcc doesn't set _WIN32 when run in bash so we need to set it manually
|
||||
shell: bash
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
--config=Release
|
||||
--components=core,nano,nanotest,nanoexam,nanobench,nanotool
|
||||
--components=core,nano,nanotest,nanoexam,nanobench,nanotool,nanopython,nanopytest
|
||||
--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"
|
||||
-DCMAKE_CUDA_FLAGS="-D_WIN32"
|
||||
-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.*"
|
||||
run: cd build && ctest -V -C Release -E ".*cuda.*|.*mgpu.*"
|
||||
|
||||
macos-nanovdb:
|
||||
if: |
|
||||
@@ -148,8 +148,8 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- { runner: 'macos-13', cxx: 'clang++', build: 'Release' }
|
||||
- { runner: 'macos-13', cxx: 'clang++', build: 'Debug' }
|
||||
- { runner: 'macos-14', cxx: 'clang++', build: 'Release' }
|
||||
- { runner: 'macos-14', cxx: 'clang++', build: 'Debug' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -161,23 +161,23 @@ jobs:
|
||||
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\'
|
||||
--components=core,nano,nanotest,nanoexam,nanobench,nanotool,nanopython,nanopytest
|
||||
--cargs=\'-DUSE_EXPLICIT_INSTANTIATION=OFF -DNANOVDB_USE_CUDA=OFF -DNANOVDB_USE_OPENVDB=ON -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install \'
|
||||
- name: test
|
||||
run: cd build && ctest -V -E ".*cuda.*"
|
||||
run: cd build && ctest -V -E ".*cuda.*|.*mgpu.*"
|
||||
|
||||
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' }}
|
||||
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
|
||||
container:
|
||||
image: aswf/ci-openvdb:2024
|
||||
image: aswf/ci-openvdb:2024-clang17.2
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: install_gtest
|
||||
run: ./ci/install_gtest.sh 1.15.2
|
||||
run: ./ci/install_gtest.sh latest
|
||||
- name: build_and_test
|
||||
run: |
|
||||
cd nanovdb/nanovdb
|
||||
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
(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' }}
|
||||
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
|
||||
name: linux-houdini:${{ matrix.config.hou_hash }}
|
||||
env:
|
||||
CXX: clang++
|
||||
@@ -70,23 +70,13 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- { houdini_version: '20.0', platform: 'linux_x86_64_gcc11.2', hou_hash: '20_0-newabi' }
|
||||
- { houdini_version: '21.0', platform: 'linux_x86_64_gcc11.2', hou_hash: '21_0' }
|
||||
- { 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
|
||||
@@ -113,7 +103,7 @@ jobs:
|
||||
# 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
|
||||
name: macos-houdini
|
||||
env:
|
||||
HOUDINI_CLIENT_ID: ${{ secrets.HOUDINI_CLIENT_ID }}
|
||||
HOUDINI_SECRET_KEY: ${{ secrets.HOUDINI_SECRET_KEY }}
|
||||
@@ -123,7 +113,7 @@ jobs:
|
||||
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
|
||||
run: ./ci/download_houdini.sh 21.0 macosx_arm64_clang15.0_14 --prod
|
||||
- name: install_houdini
|
||||
run: |
|
||||
mkdir $HOME/houdini_install
|
||||
@@ -146,31 +136,38 @@ jobs:
|
||||
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' }}
|
||||
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
|
||||
name: linux-extra:${{ matrix.config.name }}
|
||||
container:
|
||||
image: aswf/ci-openvdb:2024
|
||||
image: aswf/ci-openvdb:${{ matrix.config.image }}
|
||||
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' }
|
||||
- { name: 'all', image: '2026', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DUSE_BLOSC=ON -DUSE_ZLIB=ON -DUSE_EXR=ON -DUSE_PNG=ON' }
|
||||
- { name: 'lite', image: '2026', 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', image: '2026', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DUSE_BLOSC=OFF -DUSE_IMATH_HALF=ON' }
|
||||
- { name: 'sse', image: '2026', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DOPENVDB_SIMD=SSE42' }
|
||||
- { name: 'avx', image: '2026', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DOPENVDB_SIMD=AVX' }
|
||||
- { name: 'pygrid', image: '2026', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DOPENVDB_PYTHON_WRAP_ALL_GRID_TYPES=ON' }
|
||||
- { name: 'asan', image: '2026', build: 'asan', components: 'core,test', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON -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', image: '2026', build: 'ubsan', components: 'core,test', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" ' }
|
||||
- { name: 'c++20', image: '2026', build: 'Release', components: 'core,test', cmake: '-DCMAKE_CXX_STANDARD=20' }
|
||||
- { name: 'conf', image: '2026', 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
|
||||
run: ./ci/install_nanobind.sh 2.5.0
|
||||
# 2026 images are broken with gtest/glfw/exr installs
|
||||
- name: deps
|
||||
if: contains(matrix.config.image, '2026')
|
||||
run: |
|
||||
./ci/install_gtest.sh latest
|
||||
./ci/install_glfw.sh latest
|
||||
./ci/install_imath.sh v3.2.2
|
||||
./ci/install_exr.sh v3.2.2
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
@@ -192,21 +189,22 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- { runson: ubuntu-latest, cxx: g++, cmake: '' }
|
||||
# llvm-17 is currently the default which has symbol issues with the python module
|
||||
- { runson: ubuntu-latest, cxx: g++, cmake: '-DOPENVDB_PYTHON_USE_AX=OFF' }
|
||||
# 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' }
|
||||
- { runson: macos-latest, cxx: '', cmake: '-DLLVM_DIR=/opt/homebrew/opt/llvm@20/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
|
||||
sudo apt-get -q install -y libboost-dev libboost-iostreams-dev libtbb-dev libblosc-dev libgtest-dev libgmock-dev python3-numpy
|
||||
./ci/install_nanobind.sh 2.5.0
|
||||
elif [ "$RUNNER_OS" == "macOS" ]; then
|
||||
./ci/install_macos.sh 15
|
||||
./ci/install_macos.sh 20
|
||||
./ci/install_tbb_macos.sh
|
||||
else
|
||||
echo "$RUNNER_OS not supported"; exit 1
|
||||
@@ -216,7 +214,12 @@ jobs:
|
||||
./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 }}\"
|
||||
--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
|
||||
|
||||
@@ -253,6 +256,10 @@ jobs:
|
||||
- name: install
|
||||
shell: powershell
|
||||
run: .\ci\install_windows.ps1
|
||||
- name: install_numpy
|
||||
if: matrix.config.vc == 'x64-windows'
|
||||
shell: powershell
|
||||
run: .\ci\install_windows_numpy.ps1
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
@@ -284,7 +291,7 @@ jobs:
|
||||
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' }}
|
||||
runs-on: ${{ (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:
|
||||
@@ -294,15 +301,14 @@ jobs:
|
||||
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: '' }
|
||||
- { image: '2025-clang18.1', cxx: 'clang++', build: 'Release', components: 'core,axcore,axbin,axtest', cmake: '' }
|
||||
# @note LLVM 17 builds are incompatible with the vdb python plugin on linux
|
||||
- { image: '2024-clang17.2', cxx: 'clang++', build: 'Release', components: 'core,axcore,axbin,axtest', cmake: '-DOPENVDB_PYTHON_USE_AX=OFF' }
|
||||
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
|
||||
run: ./ci/install_nanobind.sh 2.5.0
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
@@ -313,6 +319,7 @@ jobs:
|
||||
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
|
||||
-DUSE_EXPLICIT_INSTANTIATION=OFF
|
||||
-DOPENVDB_CXX_STRICT=ON
|
||||
-DOPENVDB_BUILD_VDB_TOOL=OFF
|
||||
\"
|
||||
- name: clean
|
||||
if: matrix.config.components == 'core'
|
||||
@@ -328,6 +335,7 @@ jobs:
|
||||
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
|
||||
-DUSE_EXPLICIT_INSTANTIATION=OFF
|
||||
-DOPENVDB_CXX_STRICT=ON
|
||||
-DOPENVDB_BUILD_VDB_TOOL=OFF
|
||||
\"
|
||||
- name: test
|
||||
run: cd build && ctest -V
|
||||
@@ -339,14 +347,14 @@ jobs:
|
||||
github.event_name != 'workflow_dispatch' ||
|
||||
github.event.inputs.type == 'all' ||
|
||||
github.event.inputs.type == 'ax'
|
||||
runs-on: macos-13
|
||||
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:
|
||||
- { cxx: 'clang++', build: 'Release', llvm: '15' }
|
||||
- { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '20' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -376,7 +384,7 @@ jobs:
|
||||
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 }}
|
||||
name: ${{ matrix.config.vc }}-${{ matrix.config.crt }}-${{ matrix.config.build }}-llvm${{ matrix.config.llvm }}
|
||||
env:
|
||||
VCPKG_DEFAULT_TRIPLET: ${{ matrix.config.vc }}
|
||||
# Export this with '' avoid bash treating \ as escape
|
||||
@@ -390,17 +398,22 @@ jobs:
|
||||
# @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' }
|
||||
# @note currently only test static builds with MT as building LLVM as
|
||||
# a shared lib on windows is a bit dicey
|
||||
- { vc: 'x64-windows-static', llvm: '18.1.0', crt: 'MultiThreaded', components: 'core,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', llvm: '18.1.0', crt: 'MultiThreadedDebug', components: 'core,axcore,axbin,axtest', build: 'Debug', cmake: '-DOPENVDB_CORE_SHARED=OFF -DOPENVDB_AX_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON' }
|
||||
- { vc: 'x64-windows', llvm: '18.1.0', crt: 'MultiThreadedDLL', components: 'core,axcore,axbin', build: 'Release', cmake: '-DOPENVDB_CORE_STATIC=OFF -DOPENVDB_AX_STATIC=OFF' }
|
||||
- { vc: 'x64-windows-static', llvm: '15.0.0', crt: 'MultiThreaded', components: 'core,axcore,axbin,axtest', build: 'Release', 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 }}
|
||||
run: ./ci/install_llvm_windows.sh ${{ matrix.config.llvm }} ${{ matrix.config.crt }}
|
||||
- name: install
|
||||
shell: powershell
|
||||
run: .\ci\install_windows.ps1
|
||||
run: |
|
||||
vcpkg update
|
||||
vcpkg install tbb gtest
|
||||
- name: build
|
||||
run: >
|
||||
./ci/build.sh -v
|
||||
@@ -408,10 +421,13 @@ jobs:
|
||||
--components="${{ matrix.config.components }}"
|
||||
--cargs=\'
|
||||
-A x64 -G \"Visual Studio 17 2022\"
|
||||
-DOPENVDB_USE_DELAYED_LOADING=OFF
|
||||
-DUSE_BLOSC=OFF \
|
||||
-DUSE_ZLIB=OFF \
|
||||
-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
|
||||
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=OFF
|
||||
-DUSE_EXPLICIT_INSTANTIATION=OFF
|
||||
-DLLVM_DIR=\"${HOME}\\llvm_install\\lib\\cmake\\llvm\"
|
||||
-DCMAKE_INSTALL_PREFIX=\"${VDB_INSTALL_PREFIX}\"
|
||||
@@ -483,7 +499,7 @@ jobs:
|
||||
\'
|
||||
- name: test
|
||||
shell: bash
|
||||
run: cd build && ctest -V -E ".*cuda.*"
|
||||
run: cd build && ctest -V -E ".*cuda.*|.*mgpu.*"
|
||||
|
||||
#############################################################################
|
||||
################################## Blosc ####################################
|
||||
@@ -494,13 +510,13 @@ jobs:
|
||||
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' }}
|
||||
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
|
||||
name: linux-blosc:${{ matrix.blosc }}
|
||||
container:
|
||||
image: aswf/ci-base:2023
|
||||
image: aswf/ci-openvdb:2025-clang19.1
|
||||
strategy:
|
||||
matrix:
|
||||
blosc: ['1.18.0','1.19.0','1.20.0','1.21.0']
|
||||
blosc: ['1.21.0', 'latest']
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -590,7 +606,7 @@ jobs:
|
||||
-strict
|
||||
-extended
|
||||
- name: upload_report
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
name: abi_report
|
||||
|
||||
@@ -4,10 +4,12 @@ name: Whitespace
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'ext/**'
|
||||
- 'pendingchanges/**'
|
||||
- 'tsc/meetings/**'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'ext/**'
|
||||
- 'pendingchanges/**'
|
||||
- 'tsc/meetings/**'
|
||||
|
||||
@@ -25,7 +27,7 @@ jobs:
|
||||
- name: test
|
||||
run: |
|
||||
set +e
|
||||
git grep -n -I -E '^.+[ ]+$' -- ':!tsc/meetings/*' ':!pendingchanges/*' ':!*.wlt'
|
||||
git grep -n -I -E '^.+[ ]+$' -- ':!tsc/meetings/*' ':!pendingchanges/*' ':!ext/*' ':!*.wlt'
|
||||
test $? -eq 1
|
||||
|
||||
# Search for any tabs excluding meeting notes, image files and a few others
|
||||
@@ -36,5 +38,5 @@ jobs:
|
||||
- name: test
|
||||
run: |
|
||||
set +e
|
||||
git grep -n " " -- ':!*/whitespace.yml' ':!tsc/meetings/*' ':!*.svg' ':!*.cmd' ':!*.png' ':!pendingchanges/*' ':!*.wlt' ':!*.jpg' ':!*.gif' ':!*.mp4' ':!*.pt' ':!*.pth' ':!*.nvdb' ':!*.npz'
|
||||
git grep -n " " -- ':!*/whitespace.yml' ':!tsc/meetings/*' ':!*.svg' ':!*.cmd' ':!*.png' ':!pendingchanges/*' ':!ext/*' ':!*.wlt' ':!*.jpg' ':!*.gif' ':!*.mp4' ':!*.pt' ':!*.pth' ':!*.nvdb' ':!*.npz'
|
||||
test $? -eq 1
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
/build/*
|
||||
**/src/benchmarks/build/*
|
||||
nanovdb/nanovdb/build/*
|
||||
.DS_Store
|
||||
|
||||
@@ -1,18 +1,306 @@
|
||||
OpenVDB Version History
|
||||
=======================
|
||||
|
||||
Version 12.0.2 - In development
|
||||
Version 13.0.1 - In Development
|
||||
|
||||
Version 13.0.0 - November 3, 2025
|
||||
|
||||
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 11 for
|
||||
Houdini 20.5 and 12 for Houdini 21.0.
|
||||
|
||||
Support for reading .vdb files written prior to VDB 1.0 has been removed.
|
||||
To read older .vdb files, please use VDB 12.x or older and re-write them,
|
||||
so that they use the newer file format and can be read in VDB 13+.
|
||||
|
||||
Highlights:
|
||||
- OpenVDB now includes in-memory support for Half Grids and the file format
|
||||
has been extended to add I/O serialization for half grids. More work is
|
||||
planned on adapting algorithms when using Half Grids for better performance
|
||||
and improved precision.
|
||||
- NanoVDB is no longer limited to static applications, such as rendering, but
|
||||
can increasingly be applied to problems that involve dynamic topology, such
|
||||
as level set tracking, grid building, morphology operations and merging of
|
||||
grids. This is due to the fact that we keep adding more and more tools to
|
||||
NanoVDB that facilitates tree modification. However, unlike OpenVDB, these
|
||||
operations generate new NanoVDB grids (as oppose to in-palace modifications
|
||||
in OpenVDB), yet are typically much faster since they are performed on the
|
||||
GPU. Many of these exciting new features are the foundation of fVDB.
|
||||
|
||||
OpenVDB:
|
||||
New features:
|
||||
- Added native registration of HalfGrid type.
|
||||
- Added customization of the output transformation attribute for
|
||||
points::pca(). Can be output as a quaternion or as a combined affine
|
||||
transform with the scale/stretch ommitted.
|
||||
- Added support for input quaternions attributes and affine
|
||||
transformations (that include scale) in points::rasterizeSdf() for
|
||||
ellipsoidal rasterizations.
|
||||
|
||||
API Changes:
|
||||
- Added LeafBuffer::storage() for direct const access to the raw data
|
||||
buffer when using the bool LeafNode.
|
||||
- Removed Grid::evalMinMax(), use tools::minMax for superior threaded
|
||||
performance.
|
||||
- Removed points::rasterize() that took a custom filter and interrupter.
|
||||
- Removed LeafNode<bool, ...>() TopologyCopy constructor in favor of using
|
||||
explicit mask/buffer constructors.
|
||||
- Removed ValueAccessor NodeT0, NodeT1, NodeT2 aliases, use NodeTypeAtLevel
|
||||
instead.
|
||||
- Add InternalNode::setValueMaskUnsafe() to write a value mask directly.
|
||||
- LegacyFrustum and RootNodeMask have been removed. These classes were only
|
||||
used for reading old .vdb files, which is no longer supported.
|
||||
- io::writeCompressedValues() now takes a const ValueT* source buffer for
|
||||
improved const-correctness.
|
||||
|
||||
Bug Fixes:
|
||||
- Fix a bug in the LevelSetRayIntersector class where two of the methods
|
||||
were incorrectly adjusting the time even when an intersection was not
|
||||
found.
|
||||
- Fixed an assertion in math::Quat where a vector length check was using
|
||||
too small a tolerance.
|
||||
- Fixed a bug in the unit tests where detecting if assertions were enabled
|
||||
was using NDEBUG rather than OpenVDB assertions.
|
||||
|
||||
Build:
|
||||
- Removed the unnecessary USE_NUMPY build option for the OpenVDB Python
|
||||
module. All functions which take numpy arrays are now always generated
|
||||
(numpy is not required at compile time for this support).
|
||||
- Bumped minimum supported CMake version to 3.24, and new future minimum
|
||||
to 4.0.0.
|
||||
- Bumped minimum supported OpenEXR and Imath versions to 3.2, and new
|
||||
future minimum to 3.3.
|
||||
- Bumped minimum supported Boost version to 1.82, and new future minimum
|
||||
to 1.85.
|
||||
- Bumped minimum supported Python version to 3.11
|
||||
- Bumped minimum supported Log4cplus version to 2.0
|
||||
- Bumped minimum supported Houdini version to 20.5
|
||||
- Bumped minimum supported GLFW version to 3.3
|
||||
- Bumped future minimum for TBB to 2021 (oneapi).
|
||||
- Bumped future minimum for nanobind to 2.5.0.
|
||||
|
||||
OpenVDB AX:
|
||||
New:
|
||||
- Added support for LLVM 21.
|
||||
|
||||
NanoVDB:
|
||||
Highlights:
|
||||
- NanoVDB is no longer limited to static applications, such as rendering,
|
||||
but can increasingly be applied to problems that involve dynamic
|
||||
topology, such as level set tracking, grid building, morphology
|
||||
operations and merging of grids. This is due to the fact that we keep
|
||||
adding more and more tools to NanoVDB that facilitates tree modification.
|
||||
However, unlike OpenVDB, these operations generate new NanoVDB grids (as
|
||||
oppose to in-palace modifications in OpenVDB), yet are typically much
|
||||
faster since they are performed on the GPU. Many of these exciting new
|
||||
features are the foundation of fVDB.
|
||||
|
||||
New features:
|
||||
- Added nanovdb/tools/cuda/DilateGrid.cuh, which performs topology dilation
|
||||
on the GPU.
|
||||
- Added nanovdb/tools/cuda/MergeGrids.cuh, which merges the topology of two
|
||||
grids on the GPU.
|
||||
- Added nanovdb/tools/cuda/CoarsenGrid.cuh, which performs topological
|
||||
coarsening of grids on the GPU.
|
||||
- Added nanovdb/tools/cuda/RefineGrid.cuh, which performs topological
|
||||
refinement of grids on the GPU.
|
||||
- Added nanovdb/tools/cuda/PruneGrid.cuh, which prunes the topology of a
|
||||
grid using a sidecar mask on the GPU.
|
||||
- Added nanovdb/util/cuda/Injection.cuh, which facilitates sidecar data
|
||||
copying - on the GPU - in the overlap of two grids with different
|
||||
topology.
|
||||
- Added Mat classes and other math types to NanoVDB.
|
||||
- Major rewrite of nanovdb::NanoToOpenVDB, which now allows
|
||||
nanovdb::IndexGrids and blind (or sidecar) data to be converted into an
|
||||
openvdb grid.
|
||||
- Added support for LevelSet, FogVolume, and Staggered grid semantics.
|
||||
Added toGridClass and toSemantic to map Grid Blind data semantic to Grid
|
||||
class and vice versa.
|
||||
|
||||
Improvements:
|
||||
- Improvements to mGPU grid building and introduction of a separate test
|
||||
executable for mGPU tests
|
||||
- Added stand-alone function nanovdb::writeUncompressedGrid that allows
|
||||
nanovdb::IndexGrids and blind (or sidecar) data to be written directly to
|
||||
a stream.
|
||||
- nanovdb_print now (optionally) prints the blind data count per grid.
|
||||
- Extended nanovdb::GridBlindDataSemantic with nanovdb::GridClass types to
|
||||
support conversion between IndexGrid and regular grids.
|
||||
- Improvements and bugfixes to PNanoVDB.
|
||||
|
||||
API Changes:
|
||||
- Removed nanovdb::ValueIndexMask and nanovdb::ValueOnIndexMask since they
|
||||
are no longer used by fVDB (or elsewhere).
|
||||
- NanoVDB version is now 32.9.0, so the ABI of the grid is preserved but
|
||||
not the API. However, the API changes are very minor!
|
||||
|
||||
Bug Fixes:
|
||||
- Several fixes for compiler warnings.
|
||||
- Fixed error in nanovdb/io/IO.h related to missing throws.
|
||||
|
||||
Houdini:
|
||||
- Remove support for openvdb_houdini::Interrupter, use
|
||||
openvdb_houdini::HoudiniInterrupter instead.
|
||||
- Remove input-stealing via duplicateSourceStealable(), SideFX have since
|
||||
introduced verbification and compiled SOPs to provide zero-copy node
|
||||
evaluation.
|
||||
|
||||
|
||||
Version 12.1.1 - September 30, 2025
|
||||
|
||||
OpenVDB AX:
|
||||
Fixes:
|
||||
- Fixed an issue which was causing host specific optimization passes to be
|
||||
omitted when using LLVM 16 and higher.
|
||||
|
||||
Houdini:
|
||||
- Fixed a compilation issue with the OpenVDB Activate SOP with Houdini 21
|
||||
[Reported by @callen128]
|
||||
|
||||
|
||||
Version 12.1.0 - August 8, 2025
|
||||
|
||||
OpenVDB:
|
||||
New features:
|
||||
- New level set constructor tools::createLevelSetCapsule creates a grid
|
||||
containing a narrow-band level set representation of a capsule (tube
|
||||
with constant radius and sphere caps).
|
||||
- New level set constructor tools::createLevelSetTaperedCapsule creates a
|
||||
grid containing a narrow-band level set representation of a tapered
|
||||
capsule (tube with sphere caps and different radii at both ends, or
|
||||
equivalently the convex hull of two spheres with possibly different
|
||||
centers and radii).
|
||||
- New level set constructor tools::createLevelSetTubeComplex creates a grid
|
||||
containing a narrow-band level set representation of a tube complex (a
|
||||
collection of capsules or tapered capsules defined by endpoint coordinates
|
||||
and segment indices).
|
||||
- New level set constructor tools::createLevelSetDilatedMesh creates a grid
|
||||
containing a narrow-band level set representation of a dilated surface
|
||||
mesh (dilated by a radius in all directions).
|
||||
- New class tools::ConvexVoxelizer, used by the above methods, which can be
|
||||
inherited to implement a convex level set constructor.
|
||||
- Introduced anisotropic surfacing tools in points/PointRasterizeSDF.h and
|
||||
principal component analysis (PCA) methods in points/PrincipalComponentAnalysis.h.
|
||||
The latter tool analyses point neighborhoods and computes affine
|
||||
transformations representing elliptical distributions. The prior tool
|
||||
takes rotational and stretch point attributes (optionally computed from
|
||||
the prior PCA methods) and generates anisotropic surfaces.
|
||||
|
||||
Improvements:
|
||||
- Significantly improved the performance of all LeafNode ValueIterators,
|
||||
up to 5x on some platforms and up to 10x when delay loading is enabled.
|
||||
Construction of a ValueIterator from a leaf node now requests the leaf
|
||||
buffers ahead of iteration to avoid potentially expensive API calls.
|
||||
- Improved the performance of PointRasterizeSDF.h tools with larger radii
|
||||
with better bound computation approximations.
|
||||
- Significant performance improvement to delay loaded files - the warning
|
||||
logic which checks the underlying mapped file for the last modified time
|
||||
has been removed, resulting in performance gains upwards of 10x when
|
||||
loading in node data buffers. Note that the check that was removed is
|
||||
entirely redundant on Windows and would only print a warning on other
|
||||
system.
|
||||
[Contributed by jjtParadox]
|
||||
- Added OPENVDB_HAS_INVOKABLE_MEMBER_FUNCTION and OPENVDB_HAS_MEMBER_FUNCTION
|
||||
macros to help determine the presence and compatibility of interface
|
||||
member functions at compile time.
|
||||
- Added OPENVDB_ASSUME macros to mimic builtin assume and C++23 assume
|
||||
attributes.
|
||||
- Improved read and write of PLY files with vdb_tool so they support Vec3d
|
||||
and 64 bit attributes. Changed vdb_tool version number from 10.6.1 to
|
||||
10.7.0.
|
||||
|
||||
API Changes:
|
||||
- Mat3 and Mat4 functions have been marked [[nodiscard]] where it may be
|
||||
confusing if they are operating in place or returning a result, in
|
||||
particular tranpose, invert, adjoint, and timesDiagonal.
|
||||
- Re-worked the API in PointRasterizeSDF.h with the addition of anisotropic
|
||||
surfacing kernels. The new API exposes more concise free functions which
|
||||
take structs of parameters. The old API remains supported but is
|
||||
deprecated.
|
||||
- Deprecated providing a filter or interrupter as arguments to
|
||||
points::rasterize. These can instead be implemented on user transfer
|
||||
schemes.
|
||||
- Transfer schemes provided to points::rasterize can now optionally
|
||||
implement a rasterizePoints callback that takes a range of points per
|
||||
voxel.
|
||||
|
||||
Fixes:
|
||||
- Fixed a bug in points::rasterizeSpheres and points::rasterizeSmoothSpheres
|
||||
which could cause sections of the generated surface to incorrectly be
|
||||
marked as negative interior values.
|
||||
- Fixed a bug in points::rasterizeSmoothSpheres which could result in
|
||||
incomplete surface reconstruction with significantly larger search
|
||||
distances.
|
||||
- Fixed some precision issues in various Matrix methods.
|
||||
- Fixed bugs in vdb_tool that prevented build with newer namespaces in
|
||||
nanovdb.
|
||||
|
||||
OpenVDB AX:
|
||||
Improvements:
|
||||
- Added support for LLVM versions greater than 15. Upgraded CI to test with
|
||||
LLVM versions 16, 17, 18, 19 and 20.
|
||||
- As of this release, LLVM 15 is the minimum required version for OpenVDB
|
||||
AX. Note that there is an issue with LLVM 17 symbols which makes it
|
||||
incompatible with the OpenVDB Python plugin. AS such, LLVM version 18 and
|
||||
greater are the recommended LLVM versions to use, with LLVM 18 being the
|
||||
new future minimum version.
|
||||
- Significant performance improvement to the compilation of AX kernels when
|
||||
using LLVM 18 and greater.
|
||||
- Significant backend refactoring to AX IR generation to support newer
|
||||
versions of LLVM. In particular, parts of the codegen::Function and
|
||||
codegen::FunctionBuilder API require new usage from LLVM 16 due to
|
||||
the LLVM opaque pointer changes. If you're not using the OpenVDB AX
|
||||
Function codegen API then no client changes should be necessary.
|
||||
- Migrated OpenVDB AX unit tests from cppunit to gtest
|
||||
[Contributed by Tim Straubinger]
|
||||
|
||||
Fixes:
|
||||
- Fixed a case of undefined behaviour when explicitly casting variables to
|
||||
the same type as their storage type e.g:
|
||||
double a; double b = double(a);
|
||||
- Fixed an AX compiler error which would produce invalid IR when using 64bit
|
||||
integer variables for matrix array offsetting e.g:
|
||||
int64 a = 0; mat4f b = 1; float c = b[a,a];
|
||||
|
||||
NanoVDB:
|
||||
- Added nanovdb::openToIndexVDB, which can convert an OpenVDB grid into a
|
||||
NanoVDB IndexGrid.
|
||||
- Added new options "--index" and "--onIndex" to the command-line tool
|
||||
nanovdb_convert so it can produce IndexGrids.
|
||||
- Fixed memory leak in DeviceBuffer.
|
||||
- Added constructor for DeviceBuffer from an existing HostBuffer.
|
||||
- Added VoxelBlockManager, an acceleration structure for sequential access
|
||||
and stencil ops over active voxels.
|
||||
- Added helper functions for kernel launches with shared memory.
|
||||
- Added support for CUDA 13.0.
|
||||
- Fix warnings and compilation errors for GCC and Clang.
|
||||
- Fixed inconsistent usage of util::cuda::mallocAsync/freeAsync that
|
||||
affected vGPUs.
|
||||
- Added support for custom memory resources in PointsToGrid.
|
||||
- Fixed race condition in split/mergeGridHandles.
|
||||
- Fixed offset bug in nanovdb::tools::cuda::IndexToGrid related to non-POD
|
||||
build types.
|
||||
[Contributed by Andreas Henne]
|
||||
|
||||
Houdini:
|
||||
- Define OP_InputIdx and OP_OutputIdx for Houdini 21.0 compatibility
|
||||
- Add Houdini 21 style camera interface to support LOP cameras
|
||||
- Include env flag for avoiding stream writing (was backported to 19.5)
|
||||
|
||||
|
||||
Version 12.0.1 - April 3, 2025
|
||||
|
||||
OpenVDB:
|
||||
New features:
|
||||
- Added read and write support for OFF (Object File Format) files to vdb_tool
|
||||
- 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
|
||||
- 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:
|
||||
@@ -20,10 +308,12 @@ Version 12.0.1 - April 3, 2025
|
||||
- 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
|
||||
- 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
|
||||
- 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.
|
||||
|
||||
@@ -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.24)
|
||||
|
||||
# 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 13)
|
||||
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})
|
||||
@@ -268,6 +268,13 @@ mark_as_advanced(
|
||||
|
||||
include(cmake/config/OpenVDBVersions.cmake)
|
||||
|
||||
if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_CMAKE_VERSION)
|
||||
if(CMAKE_VERSION VERSION_LESS ${FUTURE_MINIMUM_CMAKE_VERSION})
|
||||
message(DEPRECATION "Support for CMake versions < ${FUTURE_MINIMUM_CMAKE_VERSION} "
|
||||
"is deprecated and will be removed.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
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})
|
||||
@@ -478,10 +485,7 @@ 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} "
|
||||
@@ -489,6 +493,20 @@ if(OPENVDB_BUILD_PYTHON_MODULE OR (OPENVDB_BUILD_NANOVDB AND NANOVDB_BUILD_PYTHO
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(nanobind REQUIRED CONFIG)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(nanobind
|
||||
FOUND_VAR nanobind_FOUND
|
||||
REQUIRED_VARS NB_DIR
|
||||
VERSION_VAR nanobind_VERSION)
|
||||
|
||||
if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_NANOBIND_VERSION)
|
||||
if(nanobind_VERSION VERSION_LESS ${FUTURE_MINIMUM_NANOBIND_VERSION})
|
||||
message(DEPRECATION "Support for nanobind versions < ${FUTURE_MINIMUM_NANOBIND_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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -95,8 +95,6 @@ vcpkg install zlib:x64-windows
|
||||
vcpkg install blosc:x64-windows
|
||||
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-interprocess:x64-windows
|
||||
```
|
||||
|
||||
|
||||
@@ -33,8 +33,13 @@ PARMS[--target]=install
|
||||
PARMS[--build-dir]=build
|
||||
|
||||
if [[ $RUNNER_NAME == *"8c-32g-300h"* ]]; then
|
||||
# ASWF github actions runners have 8 threads
|
||||
PARMS[-j]=8
|
||||
if [[ $CXX == "g++" ]]; then
|
||||
# GCC hits memory limits on runners, reduce threads
|
||||
PARMS[-j]=6
|
||||
else
|
||||
# ASWF github actions runners have 8 threads
|
||||
PARMS[-j]=8
|
||||
fi
|
||||
else
|
||||
# Github actions runners have 2 threads
|
||||
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
|
||||
@@ -51,7 +56,8 @@ declare -A COMPONENTS
|
||||
COMPONENTS['core']='OPENVDB_BUILD_CORE'
|
||||
COMPONENTS['python']='OPENVDB_BUILD_PYTHON_MODULE'
|
||||
COMPONENTS['test']='OPENVDB_BUILD_UNITTESTS'
|
||||
COMPONENTS['bin']='OPENVDB_BUILD_BINARIES'
|
||||
# @todo split out vdb tool from this...
|
||||
COMPONENTS['bin']='OPENVDB_BUILD_VDB_PRINT,OPENVDB_BUILD_VDB_LOD,OPENVDB_BUILD_VDB_TOOL,OPENVDB_BUILD_VDB_TOOL_UNITTESTS'
|
||||
COMPONENTS['view']='OPENVDB_BUILD_VDB_VIEW'
|
||||
COMPONENTS['render']='OPENVDB_BUILD_VDB_RENDER'
|
||||
COMPONENTS['hou']='OPENVDB_BUILD_HOUDINI_PLUGIN'
|
||||
@@ -67,6 +73,8 @@ COMPONENTS['nanotest']='NANOVDB_BUILD_UNITTESTS'
|
||||
COMPONENTS['nanoexam']='NANOVDB_BUILD_EXAMPLES'
|
||||
COMPONENTS['nanobench']='NANOVDB_BUILD_BENCHMARK'
|
||||
COMPONENTS['nanotool']='NANOVDB_BUILD_TOOLS'
|
||||
COMPONENTS['nanopython']='NANOVDB_BUILD_PYTHON_MODULE'
|
||||
COMPONENTS['nanopytest']='NANOVDB_BUILD_PYTHON_UNITTESTS'
|
||||
|
||||
################################################
|
||||
|
||||
@@ -150,7 +158,11 @@ for comp in "${!COMPONENTS[@]}"; do
|
||||
setting="ON"; break
|
||||
fi
|
||||
done
|
||||
CMAKE_EXTRA+=("-D${COMPONENTS[$comp]}=$setting")
|
||||
OPENVDB_TOGGLES="${COMPONENTS[$comp]}"
|
||||
OPENVDB_TOGGLES=(${OPENVDB_TOGGLES//,/ })
|
||||
for toggle in "${!OPENVDB_TOGGLES[@]}"; do
|
||||
CMAKE_EXTRA+=("-D${OPENVDB_TOGGLES[$toggle]}=$setting")
|
||||
done
|
||||
done
|
||||
|
||||
################################################
|
||||
@@ -182,17 +194,14 @@ cd ${BUILD_DIR}
|
||||
set -x
|
||||
|
||||
# Note:
|
||||
# - print and lod binary options are always on and can be toggles with: OPENVDB_BUILD_BINARIES=ON/OFF
|
||||
# - OPENVDB_BUILD_BINARIES is always ON, but each binary will be toggled depending on the provided comps
|
||||
# - 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_BUILD_VDB_PRINT=ON \
|
||||
-DOPENVDB_BUILD_VDB_LOD=ON \
|
||||
-DOPENVDB_BUILD_VDB_TOOL=ON \
|
||||
-DOPENVDB_BUILD_VDB_TOOL_UNITTESTS=ON \
|
||||
-DOPENVDB_USE_DEPRECATED_ABI_12=ON \
|
||||
-DOPENVDB_TOOL_USE_NANO=OFF \
|
||||
-DOPENVDB_BUILD_BINARIES=ON \
|
||||
-DOPENVDB_BUILD_PYTHON_UNITTESTS=ON \
|
||||
-DMSVC_MP_THREAD_COUNT=${PARMS[-j]} \
|
||||
"${CMAKE_EXTRA[@]}" \
|
||||
|
||||
@@ -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/**/*'
|
||||
@@ -8,8 +8,14 @@ HOUDINI_MAJOR="$1"
|
||||
PLATFORM="$2"
|
||||
OTHER_ARGS="$3"
|
||||
|
||||
pip install --user requests
|
||||
python ci/download_houdini.py $HOUDINI_MAJOR $PLATFORM $OTHER_ARGS
|
||||
if [[ $PLATFORM =~ "linux" ]]; then
|
||||
pip3 install --user requests
|
||||
elif [[ $PLATFORM =~ "macos" ]]; then
|
||||
# Tell the homebrew install of pip3 that we don't care about installing directly through pip3
|
||||
pip3 install --user requests --break-system-packages
|
||||
fi
|
||||
|
||||
python3 ci/download_houdini.py $HOUDINI_MAJOR $PLATFORM $OTHER_ARGS
|
||||
|
||||
if [[ $PLATFORM =~ "linux" ]]; then
|
||||
# create dir hierarchy
|
||||
@@ -31,20 +37,20 @@ if [[ $PLATFORM =~ "linux" ]]; then
|
||||
ls -al 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/.
|
||||
mv toolkit/cmake ../hou/toolkit/.
|
||||
mv toolkit/include ../hou/toolkit/.
|
||||
mv dsolib/libHoudini* ../hou/dsolib/.
|
||||
mv dsolib/libopenvdb_sesi* ../hou/dsolib/.
|
||||
mv dsolib/libblosc* ../hou/dsolib/.
|
||||
mv dsolib/libhboost* ../hou/dsolib/.
|
||||
mv dsolib/libz* ../hou/dsolib/.
|
||||
mv dsolib/libbz2* ../hou/dsolib/.
|
||||
mv dsolib/libtbb* ../hou/dsolib/.
|
||||
mv dsolib/libjemalloc* ../hou/dsolib/.
|
||||
mv dsolib/liblzma* ../hou/dsolib/.
|
||||
mv dsolib/libIex* ../hou/dsolib/.
|
||||
mv dsolib/libImath* ../hou/dsolib/.
|
||||
mv dsolib/libIlmThread* ../hou/dsolib/.
|
||||
cd ..
|
||||
|
||||
elif [[ $PLATFORM =~ "macos" ]]; then
|
||||
|
||||
@@ -15,6 +15,6 @@ fi
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../.
|
||||
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ../.
|
||||
make -j8
|
||||
make install
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -ex
|
||||
EXR_VERSION="$1"
|
||||
|
||||
git clone https://github.com/AcademySoftwareFoundation/openexr.git
|
||||
cd openexr
|
||||
|
||||
if [ "$EXR_VERSION" != "latest" ]; then
|
||||
git checkout tags/${EXR_VERSION} -b ${EXR_VERSION}
|
||||
fi
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake ..
|
||||
|
||||
make -j$(nproc)
|
||||
sudo make install
|
||||
@@ -3,16 +3,19 @@
|
||||
# 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 tags/${GTEST_VERSION} -b ${GTEST_VERSION}
|
||||
fi
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake ..
|
||||
|
||||
make -j$(nproc)
|
||||
|
||||
sudo make install
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -ex
|
||||
IMATH_VERSION="$1"
|
||||
|
||||
git clone https://github.com/AcademySoftwareFoundation/Imath.git
|
||||
cd Imath
|
||||
|
||||
if [ "$IMATH_VERSION" != "latest" ]; then
|
||||
git checkout tags/${IMATH_VERSION} -b ${IMATH_VERSION}
|
||||
fi
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake ..
|
||||
|
||||
make -j$(nproc)
|
||||
sudo make install
|
||||
@@ -4,26 +4,55 @@
|
||||
|
||||
set -ex
|
||||
|
||||
LLVM_CRT="$1"
|
||||
LLVM_VER="$1"
|
||||
LLVM_CRT="$2"
|
||||
|
||||
git clone -b llvmorg-14.0.0 --depth 1 https://github.com/llvm/llvm-project.git llvm
|
||||
# Legacy define for older versions of LLVM
|
||||
LLVM_LEGACY_CRT_DEFINE=""
|
||||
if [[ "${LLVM_CRT}" == "MultiThreaded" ]]; then
|
||||
LLVM_LEGACY_CRT_DEFINE="MT"
|
||||
elif [[ "${LLVM_CRT}" == "MultiThreadedDebug" ]]; then
|
||||
LLVM_LEGACY_CRT_DEFINE="MTd"
|
||||
elif [[ "${LLVM_CRT}" == "MultiThreadedDLL" ]]; then
|
||||
LLVM_LEGACY_CRT_DEFINE="MD"
|
||||
elif [[ "${LLVM_CRT}" == "MultiThreadedDebugDLL" ]]; then
|
||||
LLVM_LEGACY_CRT_DEFINE="MDd"
|
||||
fi
|
||||
|
||||
git clone -b llvmorg-${LLVM_VER} --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 \
|
||||
-DCMAKE_INSTALL_PREFIX="${HOME}/llvm_install" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
||||
-DLLVM_ENABLE_PROJECTS="" \
|
||||
-DLLVM_ENABLE_RUNTIMES="" \
|
||||
-DLLVM_ENABLE_UNWIND_TABLES=OFF \
|
||||
-DLLVM_TARGETS_TO_BUILD="host" \
|
||||
-DLLVM_BUILD_TOOLS=OFF \
|
||||
-DLLVM_INCLUDE_BENCHMARKS=OFF \
|
||||
-DLLVM_INCLUDE_EXAMPLES=OFF \
|
||||
-DLLVM_INCLUDE_TESTS=OFF \
|
||||
-DLLVM_INCLUDE_DOCS=OFF \
|
||||
-DLLVM_INCLUDE_TOOLS=OFF \
|
||||
-DLLVM_USE_CRT_RELEASE=${LLVM_CRT}
|
||||
-DLLVM_INCLUDE_UTILS=OFF \
|
||||
-DLLVM_BUILD_BENCHMARKS=OFF \
|
||||
-DLLVM_BUILD_EXAMPLES=OFF \
|
||||
-DLLVM_BUILD_TESTS=OFF \
|
||||
-DLLVM_BUILD_DOCS=OFF \
|
||||
-DLLVM_BUILD_TOOLS=OFF \
|
||||
-DLLVM_BUILD_UTILS=OFF \
|
||||
-DLLVM_ENABLE_BINDINGS=OFF \
|
||||
-DLLVM_ENABLE_OCAMLDOC=OFF \
|
||||
-DLLVM_PARALLEL_COMPILE_JOBS=4 \
|
||||
-DLLVM_PARALLEL_LINK_JOBS=4 \
|
||||
-DCMAKE_MSVC_RUNTIME_LIBRARY=${LLVM_CRT} \
|
||||
-DLLVM_USE_CRT_RELEASE=${LLVM_LEGACY_CRT_DEFINE}
|
||||
|
||||
cmake --build . --config Release --target install
|
||||
cmake --build . --parallel 4 --config Release --target install
|
||||
|
||||
cd ..
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ 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 numpy # only for python tests
|
||||
brew install zlib
|
||||
brew install jemalloc
|
||||
|
||||
@@ -45,9 +46,7 @@ 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
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -ex
|
||||
|
||||
# Download the TeX Live installer
|
||||
wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
|
||||
|
||||
# Extract
|
||||
tar xzf install-tl-unx.tar.gz
|
||||
rm install-tl-unx.tar.gz
|
||||
cd install-tl-*
|
||||
|
||||
# Run the installer with no docs or source installation
|
||||
./install-tl --no-interaction --no-doc-install --no-src-install --scheme=minimal
|
||||
|
||||
# Export the texlive PATH to GITHUB_PATH
|
||||
TEXLIVE_PATH=$(echo /usr/local/texlive/*/bin/x86_64-linux)
|
||||
export PATH=${TEXLIVE_PATH}:${PATH}
|
||||
echo "${TEXLIVE_PATH}" >> $GITHUB_PATH
|
||||
|
||||
# Install the required packages
|
||||
tlmgr install latex-bin dvips collection-fontsrecommended collection-latexrecommended
|
||||
|
||||
# Validate that installing dvips and latex has been successful
|
||||
dvips --version
|
||||
latex --version
|
||||
@@ -0,0 +1,9 @@
|
||||
# Enable verbose and stop on error
|
||||
$ErrorActionPreference = "Stop"
|
||||
$VerbosePreference = "Continue"
|
||||
|
||||
# Install numpy for tests
|
||||
& "$env:VCPKG_INSTALLATION_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\python3\python.exe" -m ensurepip --upgrade
|
||||
& "$env:VCPKG_INSTALLATION_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\python3\python.exe" -m pip install numpy
|
||||
|
||||
Write-Host "pip numpy install completed successfully"
|
||||
@@ -10,7 +10,7 @@ set -e
|
||||
# the expected VDB installation
|
||||
|
||||
cmakelists="
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
project(TestInstall LANGUAGES CXX)
|
||||
find_package(OpenVDB REQUIRED COMPONENTS openvdb)
|
||||
add_executable(test_vdb_print \"../openvdb_cmd/vdb_print/main.cc\")
|
||||
|
||||
@@ -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.24)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
mark_as_advanced(
|
||||
|
||||
@@ -1,320 +0,0 @@
|
||||
# Copyright Contributors to the OpenVDB Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
#[=======================================================================[.rst:
|
||||
|
||||
FindCppUnit
|
||||
-----------
|
||||
|
||||
Find CppUnit include dirs and libraries
|
||||
|
||||
Use this module by invoking find_package with the form::
|
||||
|
||||
find_package(CppUnit
|
||||
[version] [EXACT] # Minimum or EXACT version
|
||||
[REQUIRED] # Fail with error if CppUnit is not found
|
||||
)
|
||||
|
||||
|
||||
IMPORTED Targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
``CppUnit::cppunit``
|
||||
This module defines IMPORTED target CppUnit::cppunit, if CppUnit has been
|
||||
found.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This will define the following variables:
|
||||
|
||||
``CppUnit_FOUND``
|
||||
True if the system has the CppUnit library.
|
||||
``CppUnit_VERSION``
|
||||
The version of the CppUnit library which was found.
|
||||
``CppUnit_INCLUDE_DIRS``
|
||||
Include directories needed to use CppUnit.
|
||||
``CppUnit_RELEASE_LIBRARIES``
|
||||
Libraries needed to link to the release version of CppUnit.
|
||||
``CppUnit_RELEASE_LIBRARY_DIRS``
|
||||
CppUnit release library directories.
|
||||
``CppUnit_DEBUG_LIBRARIES``
|
||||
Libraries needed to link to the debug version of CppUnit.
|
||||
``CppUnit_DEBUG_LIBRARY_DIRS``
|
||||
CppUnit debug library directories.
|
||||
|
||||
Deprecated - use [RELEASE|DEBUG] variants:
|
||||
|
||||
``CppUnit_LIBRARIES``
|
||||
Libraries needed to link to CppUnit.
|
||||
``CppUnit_LIBRARY_DIRS``
|
||||
CppUnit library directories.
|
||||
|
||||
Cache Variables
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The following cache variables may also be set:
|
||||
|
||||
``CppUnit_INCLUDE_DIR``
|
||||
The directory containing ``cppunit/Portability.h``.
|
||||
``CppUnit_LIBRARY``
|
||||
The path to the CppUnit library.
|
||||
|
||||
Hints
|
||||
^^^^^
|
||||
|
||||
Instead of explicitly setting the cache variables, the following variables
|
||||
may be provided to tell this module where to look.
|
||||
|
||||
``CppUnit_ROOT``
|
||||
Preferred installation prefix.
|
||||
``CPPUNIT_INCLUDEDIR``
|
||||
Preferred include directory e.g. <prefix>/include
|
||||
``CPPUNIT_LIBRARYDIR``
|
||||
Preferred library directory e.g. <prefix>/lib
|
||||
``CPPUNIT_DEBUG_SUFFIX``
|
||||
Suffix of the debug version of CppUnit libs. Defaults to "_d".
|
||||
``SYSTEM_LIBRARY_PATHS``
|
||||
Global list of library paths intended to be searched by and find_xxx call
|
||||
``CPPUNIT_USE_STATIC_LIBS``
|
||||
Only search for static cppunit libraries
|
||||
``DISABLE_CMAKE_SEARCH_PATHS``
|
||||
Disable CMakes default search paths for find_xxx calls in this module
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
||||
mark_as_advanced(
|
||||
CppUnit_INCLUDE_DIR
|
||||
CppUnit_LIBRARY
|
||||
)
|
||||
|
||||
set(_FIND_CPPUNIT_ADDITIONAL_OPTIONS "")
|
||||
if(DISABLE_CMAKE_SEARCH_PATHS)
|
||||
set(_FIND_CPPUNIT_ADDITIONAL_OPTIONS NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
# Set _CPPUNIT_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 CPPUNIT_ROOT from CMake 3.12
|
||||
if(CppUnit_ROOT)
|
||||
set(_CPPUNIT_ROOT ${CppUnit_ROOT})
|
||||
elseif(DEFINED ENV{CppUnit_ROOT})
|
||||
set(_CPPUNIT_ROOT $ENV{CppUnit_ROOT})
|
||||
elseif(CPPUNIT_ROOT)
|
||||
set(_CPPUNIT_ROOT ${CPPUNIT_ROOT})
|
||||
elseif(DEFINED ENV{CPPUNIT_ROOT})
|
||||
set(_CPPUNIT_ROOT $ENV{CPPUNIT_ROOT})
|
||||
endif()
|
||||
|
||||
# Additionally try and use pkconfig to find cppunit
|
||||
if(USE_PKGCONFIG)
|
||||
if(NOT DEFINED PKG_CONFIG_FOUND)
|
||||
find_package(PkgConfig)
|
||||
endif()
|
||||
pkg_check_modules(PC_CppUnit QUIET cppunit)
|
||||
endif()
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Search for CppUnit include DIR
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
set(_CPPUNIT_INCLUDE_SEARCH_DIRS "")
|
||||
list(APPEND _CPPUNIT_INCLUDE_SEARCH_DIRS
|
||||
${CPPUNIT_INCLUDEDIR}
|
||||
${_CPPUNIT_ROOT}
|
||||
${PC_CppUnit_INCLUDEDIR}
|
||||
${SYSTEM_LIBRARY_PATHS}
|
||||
)
|
||||
|
||||
# Look for a standard cppunit header file.
|
||||
find_path(CppUnit_INCLUDE_DIR cppunit/Portability.h
|
||||
${_FIND_CPPUNIT_ADDITIONAL_OPTIONS}
|
||||
PATHS ${_CPPUNIT_INCLUDE_SEARCH_DIRS}
|
||||
PATH_SUFFIXES ${CMAKE_INSTALL_INCLUDEDIR} include
|
||||
)
|
||||
|
||||
if(EXISTS "${CppUnit_INCLUDE_DIR}/cppunit/Portability.h")
|
||||
file(STRINGS "${CppUnit_INCLUDE_DIR}/cppunit/Portability.h"
|
||||
_cppunit_version_string REGEX "#define CPPUNIT_VERSION "
|
||||
)
|
||||
string(REGEX REPLACE "#define CPPUNIT_VERSION +\"(.+)\".*$" "\\1"
|
||||
_cppunit_version_string "${_cppunit_version_string}"
|
||||
)
|
||||
string(STRIP "${_cppunit_version_string}" CppUnit_VERSION)
|
||||
unset(_cppunit_version_string )
|
||||
endif()
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Search for CppUnit lib DIR
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
if(NOT DEFINED CPPUNIT_DEBUG_SUFFIX)
|
||||
set(CPPUNIT_DEBUG_SUFFIX "d")
|
||||
endif()
|
||||
|
||||
set(_CPPUNIT_LIBRARYDIR_SEARCH_DIRS "")
|
||||
list(APPEND _CPPUNIT_LIBRARYDIR_SEARCH_DIRS
|
||||
${CPPUNIT_LIBRARYDIR}
|
||||
${_CPPUNIT_ROOT}
|
||||
${PC_CppUnit_LIBDIR}
|
||||
${SYSTEM_LIBRARY_PATHS}
|
||||
)
|
||||
|
||||
# Library suffix handling
|
||||
|
||||
set(_CPPUNIT_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
|
||||
if(MSVC)
|
||||
if(CPPUNIT_USE_STATIC_LIBS)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
|
||||
else()
|
||||
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "_dll.lib")
|
||||
endif()
|
||||
else()
|
||||
if(CPPUNIT_USE_STATIC_LIBS)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND CPPUNIT_BUILD_TYPES RELEASE DEBUG)
|
||||
|
||||
foreach(BUILD_TYPE ${CPPUNIT_BUILD_TYPES})
|
||||
set(_CPPUNIT_LIB_NAME cppunit)
|
||||
if(BUILD_TYPE STREQUAL DEBUG)
|
||||
set(_CPPUNIT_LIB_NAME "${_CPPUNIT_LIB_NAME}${CPPUNIT_DEBUG_SUFFIX}")
|
||||
endif()
|
||||
|
||||
# Find the lib
|
||||
find_library(CppUnit_LIBRARY_${BUILD_TYPE} ${_CPPUNIT_LIB_NAME}
|
||||
${_FIND_CPPUNIT_ADDITIONAL_OPTIONS}
|
||||
PATHS ${_CPPUNIT_LIBRARYDIR_SEARCH_DIRS}
|
||||
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib
|
||||
)
|
||||
endforeach()
|
||||
|
||||
# Reset library suffix
|
||||
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_CPPUNIT_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
unset(_CPPUNIT_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
|
||||
|
||||
if(CppUnit_LIBRARY_DEBUG AND CppUnit_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(CppUnit_LIBRARY optimized ${CppUnit_LIBRARY_RELEASE} debug ${CppUnit_LIBRARY_DEBUG})
|
||||
else()
|
||||
# For single-config generators where CMAKE_BUILD_TYPE has no value,
|
||||
# just use the release libraries
|
||||
set(CppUnit_LIBRARY ${CppUnit_LIBRARY_RELEASE})
|
||||
endif()
|
||||
# FIXME: This probably should be set for both cases
|
||||
set(CppUnit_LIBRARIES optimized ${CppUnit_LIBRARY_RELEASE} debug ${CppUnit_LIBRARY_DEBUG})
|
||||
endif()
|
||||
|
||||
# if only the release version was found, set the debug variable also to the release version
|
||||
if(CppUnit_LIBRARY_RELEASE AND NOT CppUnit_LIBRARY_DEBUG)
|
||||
set(CppUnit_LIBRARY_DEBUG ${CppUnit_LIBRARY_RELEASE})
|
||||
set(CppUnit_LIBRARY ${CppUnit_LIBRARY_RELEASE})
|
||||
set(CppUnit_LIBRARIES ${CppUnit_LIBRARY_RELEASE})
|
||||
endif()
|
||||
|
||||
# if only the debug version was found, set the release variable also to the debug version
|
||||
if(CppUnit_LIBRARY_DEBUG AND NOT CppUnit_LIBRARY_RELEASE)
|
||||
set(CppUnit_LIBRARY_RELEASE ${CppUnit_LIBRARY_DEBUG})
|
||||
set(CppUnit_LIBRARY ${CppUnit_LIBRARY_DEBUG})
|
||||
set(CppUnit_LIBRARIES ${CppUnit_LIBRARY_DEBUG})
|
||||
endif()
|
||||
|
||||
# If the debug & release library ends up being the same, omit the keywords
|
||||
if("${CppUnit_LIBRARY_RELEASE}" STREQUAL "${CppUnit_LIBRARY_DEBUG}")
|
||||
set(CppUnit_LIBRARY ${CppUnit_LIBRARY_RELEASE} )
|
||||
set(CppUnit_LIBRARIES ${CppUnit_LIBRARY_RELEASE} )
|
||||
endif()
|
||||
|
||||
if(CppUnit_LIBRARY)
|
||||
set(CppUnit_FOUND TRUE)
|
||||
else()
|
||||
set(CppUnit_FOUND FALSE)
|
||||
endif()
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Cache and set CppUnit_FOUND
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(CppUnit
|
||||
FOUND_VAR CppUnit_FOUND
|
||||
REQUIRED_VARS
|
||||
CppUnit_LIBRARY
|
||||
CppUnit_INCLUDE_DIR
|
||||
VERSION_VAR CppUnit_VERSION
|
||||
)
|
||||
|
||||
if(NOT CppUnit_FOUND)
|
||||
if(CppUnit_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Unable to find CppUnit")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Partition release/debug lib vars
|
||||
|
||||
set(CppUnit_RELEASE_LIBRARIES ${CppUnit_LIBRARY_RELEASE})
|
||||
get_filename_component(CppUnit_RELEASE_LIBRARY_DIRS ${CppUnit_RELEASE_LIBRARIES} DIRECTORY)
|
||||
set(CppUnit_DEBUG_LIBRARIES ${CppUnit_LIBRARY_DEBUG})
|
||||
get_filename_component(CppUnit_DEBUG_LIBRARY_DIRS ${CppUnit_DEBUG_LIBRARIES} DIRECTORY)
|
||||
set(CppUnit_LIBRARIES ${CppUnit_RELEASE_LIBRARIES})
|
||||
set(CppUnit_LIBRARY_DIRS ${CppUnit_RELEASE_LIBRARY_DIRS})
|
||||
set(CppUnit_INCLUDE_DIRS ${CppUnit_INCLUDE_DIR})
|
||||
|
||||
# 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(CPPUNIT_LIB_TYPE UNKNOWN)
|
||||
if(CPPUNIT_USE_STATIC_LIBS)
|
||||
set(CPPUNIT_LIB_TYPE STATIC)
|
||||
elseif(UNIX)
|
||||
get_filename_component(_CPPUNIT_EXT ${CppUnit_LIBRARY_RELEASE} EXT)
|
||||
if(_CPPUNIT_EXT STREQUAL ".a")
|
||||
set(CPPUNIT_LIB_TYPE STATIC)
|
||||
elseif(_CPPUNIT_EXT STREQUAL ".so" OR
|
||||
_CPPUNIT_EXT STREQUAL ".dylib")
|
||||
set(CPPUNIT_LIB_TYPE SHARED)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT TARGET CppUnit::cppunit)
|
||||
add_library(CppUnit::cppunit ${CPPUNIT_LIB_TYPE} IMPORTED)
|
||||
set_target_properties(CppUnit::cppunit PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "${PC_CppUnit_CFLAGS_OTHER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CppUnit_INCLUDE_DIRS}")
|
||||
|
||||
# Standard location
|
||||
set_target_properties(CppUnit::cppunit PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${CppUnit_LIBRARY}")
|
||||
|
||||
# Release location
|
||||
if(EXISTS "${CppUnit_LIBRARY_RELEASE}")
|
||||
set_property(TARGET CppUnit::cppunit APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(CppUnit::cppunit PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
|
||||
IMPORTED_LOCATION_RELEASE "${CppUnit_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
|
||||
# Debug location
|
||||
if(EXISTS "${CppUnit_LIBRARY_DEBUG}")
|
||||
set_property(TARGET CppUnit::cppunit APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG)
|
||||
set_target_properties(CppUnit::cppunit PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
|
||||
IMPORTED_LOCATION_DEBUG "${CppUnit_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
endif()
|
||||
@@ -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.24)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
||||
|
||||
@@ -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.24)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
||||
|
||||
@@ -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.24)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ may be provided to tell this module where to look.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
||||
|
||||
@@ -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.24)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
||||
|
||||
@@ -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.24)
|
||||
|
||||
set(_FIND_GLFW3_ADDITIONAL_OPTIONS "")
|
||||
if(DISABLE_CMAKE_SEARCH_PATHS)
|
||||
|
||||
@@ -73,7 +73,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.24)
|
||||
|
||||
# Include utility functions for version information
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/OpenVDBUtils.cmake)
|
||||
|
||||
@@ -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.24)
|
||||
|
||||
|
||||
set(_FIND_MAYA_ADDITIONAL_OPTIONS "")
|
||||
|
||||
@@ -57,7 +57,7 @@ The following functions are provided:
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
|
||||
|
||||
function(OPENVDB_GET_VERSION_DEFINE HEADER KEY VALUE)
|
||||
|
||||
@@ -16,7 +16,7 @@ existing from a previous run of cmake.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
|
||||
set(MANIFEST "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -27,7 +27,9 @@ set(OPENVDB_DEPRECATED_ABI_LIST ${MINIMUM_OPENVDB_ABI_VERSION} ${_PREV_ABI})
|
||||
unset(_PREV_ABI)
|
||||
|
||||
if(NOT DISABLE_DEPENDENCY_VERSION_CHECKS)
|
||||
# @note Currently tracking CY2022 of the VFX platform where available
|
||||
# @note Currently tracking CY2024 of the VFX platform where available
|
||||
# (that is, our minimum requirements are for the current VFX platform)
|
||||
# minus 2 years to be able to build with legacy ABI)
|
||||
|
||||
# @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).
|
||||
@@ -39,32 +41,27 @@ if(NOT DISABLE_DEPENDENCY_VERSION_CHECKS)
|
||||
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.82)
|
||||
set(MINIMUM_OPENEXR_VERSION 3.2)
|
||||
set(MINIMUM_IMATH_VERSION 3.2)
|
||||
set(MINIMUM_ZLIB_VERSION 1.2.7)
|
||||
set(MINIMUM_TBB_VERSION 2020.3)
|
||||
set(MINIMUM_LLVM_VERSION 13.0.0)
|
||||
set(MINIMUM_LLVM_VERSION 15.0.0)
|
||||
set(MINIMUM_BLOSC_VERSION 1.17.0)
|
||||
set(MINIMUM_GLFW_VERSION 3.1)
|
||||
set(MINIMUM_GLFW_VERSION 3.3)
|
||||
|
||||
set(MINIMUM_PYTHON_VERSION 3.10)
|
||||
set(MINIMUM_NUMPY_VERSION 1.23.0)
|
||||
set(MINIMUM_PYTHON_VERSION 3.11)
|
||||
|
||||
set(MINIMUM_GOOGLETEST_VERSION 1.10)
|
||||
set(MINIMUM_LOG4CPLUS_VERSION 1.1.2)
|
||||
set(MINIMUM_HOUDINI_VERSION 19.5)
|
||||
set(MINIMUM_LOG4CPLUS_VERSION 2.0)
|
||||
set(MINIMUM_HOUDINI_VERSION 20.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
|
||||
# VFX 24 deprecations to transition to MINIMUM_* variables in OpenVDB 14.0.0
|
||||
# @note At the time of writing, any variables that are commented out don't
|
||||
# have target transitional versions.
|
||||
|
||||
@@ -73,16 +70,16 @@ endif()
|
||||
# set(FUTURE_MINIMUM_ICC_VERSION 19)
|
||||
|
||||
# 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_CMAKE_VERSION 4.0)
|
||||
set(FUTURE_MINIMUM_OPENEXR_VERSION 3.3)
|
||||
set(FUTURE_MINIMUM_IMATH_VERSION 3.3)
|
||||
set(FUTURE_MINIMUM_TBB_VERSION 2021)
|
||||
set(FUTURE_MINIMUM_BOOST_VERSION 1.85)
|
||||
#set(FUTURE_MINIMUM_GLFW_VERSION 3.3)
|
||||
#set(FUTURE_MINIMUM_LOG4CPLUS_VERSION 2.0)
|
||||
set(FUTURE_MINIMUM_NANOBIND_VERSION 2.5.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_PYTHON_VERSION 3.11)
|
||||
# set(FUTURE_MINIMUM_HOUDINI_VERSION 20.0)
|
||||
set(FUTURE_MINIMUM_LLVM_VERSION 15.0.0)
|
||||
set(FUTURE_MINIMUM_LLVM_VERSION 18.0.0)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
project(OpenVDBDocs LANGUAGES NONE)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
@@ -26,7 +26,7 @@ option(OPENVDB_DOXYGEN_INTERNAL [=[
|
||||
Enable documentation of methods and classes which have been explicitly marked as internal
|
||||
]=] OFF)
|
||||
|
||||
find_package(Doxygen REQUIRED doxygen)
|
||||
find_package(Doxygen 1.0...<1.15.0 REQUIRED doxygen)
|
||||
if(MINIMUM_DOXYGEN_VERSION)
|
||||
if(DOXYGEN_VERSION VERSION_LESS MINIMUM_DOXYGEN_VERSION)
|
||||
message(WARNING "The doxygen-config doxyfile has been generated with version "
|
||||
@@ -41,12 +41,11 @@ set(DOXY_FILES
|
||||
openvdb/openvdb/io
|
||||
openvdb/openvdb/math
|
||||
openvdb/openvdb/points
|
||||
openvdb/openvdb/points/impl
|
||||
openvdb/openvdb/python/pyopenvdb.h
|
||||
openvdb/openvdb/thread
|
||||
openvdb/openvdb/tools
|
||||
openvdb/openvdb/tools/impl
|
||||
openvdb/openvdb/tree
|
||||
openvdb/openvdb/util
|
||||
ext/imath/openvdb/math
|
||||
doc/build.txt
|
||||
doc/changes.txt
|
||||
doc/codingstyle.txt
|
||||
@@ -58,28 +57,62 @@ set(DOXY_FILES
|
||||
doc/points.txt
|
||||
doc/python.txt)
|
||||
|
||||
if(OPENVDB_DOXYGEN_INTERNAL)
|
||||
list(APPEND
|
||||
openvdb/openvdb/points/impl
|
||||
openvdb/openvdb/tools/impl)
|
||||
endif()
|
||||
|
||||
if(NOT OPENVDB_DOXYGEN_INTERNAL)
|
||||
set(DOXYGEN_EXCLUDE_SYMBOLS
|
||||
"*internal*"
|
||||
"*Internal*")
|
||||
endif()
|
||||
|
||||
set(DOXYGEN_PROJECT_NAME "OpenVDB")
|
||||
set(DOXYGEN_PROJECT_LOGO "${CMAKE_CURRENT_SOURCE_DIR}/img/openvdb_logo.png")
|
||||
set(DOXYGEN_PROJECT_NUMBER "${OpenVDB_VERSION}")
|
||||
set(DOXYGEN_PROJECT_BRIEF "")
|
||||
set(DOXYGEN_FILE_PATTERNS *.h *h.in) # headers only
|
||||
set(DOXYGEN_EXTENSION_MAPPING .in=C) # parse CMake config headers as C
|
||||
set(DOXYGEN_IMAGE_PATH "doc/img")
|
||||
set(DOXYGEN_IMAGE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/img")
|
||||
set(DOXYGEN_RECURSIVE NO)
|
||||
set(DOXYGEN_QUIET YES)
|
||||
set(DOXYGEN_NUM_PROC_THREADS 0) # detects from system
|
||||
|
||||
set(DOXYGEN_GENERATE_HTML YES)
|
||||
set(DOXYGEN_GENERATE_MAN NO)
|
||||
set(DOXYGEN_GENERATE_LATEX NO)
|
||||
set(DOXYGEN_GENERATE_TODOLIST NO)
|
||||
|
||||
set(DOXYGEN_HTML_COLORSTYLE_HUE 4)
|
||||
set(DOXYGEN_HTML_COLORSTYLE_SAT 222)
|
||||
set(DOXYGEN_HTML_TIMESTAMP NO) # for simpler website diffs
|
||||
|
||||
set(DOXYGEN_EXTRACT_ALL YES)
|
||||
set(DOXYGEN_EXTRACT_STATIC YES)
|
||||
set(DOXYGEN_EXTRACT_LOCAL_CLASSES NO)
|
||||
|
||||
# Configuration for doxygen-awesome-css
|
||||
# {
|
||||
set(DOXYGEN_HTML_COLORSTYLE_HUE 209)
|
||||
set(DOXYGEN_HTML_COLORSTYLE_SAT 255)
|
||||
set(DOXYGEN_HTML_COLORSTYLE_GAMMA 113)
|
||||
set(DOXYGEN_GENERATE_TREEVIEW YES)
|
||||
set(DOXYGEN_DISABLE_INDEX NO)
|
||||
set(DOXYGEN_FULL_SIDEBAR NO)
|
||||
set(DOXYGEN_HTML_HEADER
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/header.html")
|
||||
set(DOXYGEN_HTML_EXTRA_STYLESHEET
|
||||
"${CMAKE_SOURCE_DIR}/ext/doxygen-awesome/doxygen-awesome.css"
|
||||
"${CMAKE_SOURCE_DIR}/ext/doxygen-awesome/doxygen-awesome-sidebar-only.css"
|
||||
"${CMAKE_SOURCE_DIR}/ext/doxygen-awesome/doxygen-awesome-sidebar-only-darkmode-toggle.css"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/openvdb.css")
|
||||
set(DOXYGEN_HTML_EXTRA_FILES
|
||||
"${CMAKE_SOURCE_DIR}/ext/doxygen-awesome/doxygen-awesome-paragraph-link.js"
|
||||
"${CMAKE_SOURCE_DIR}/ext/doxygen-awesome/doxygen-awesome-fragment-copy-button.js"
|
||||
"${CMAKE_SOURCE_DIR}/ext/doxygen-awesome/doxygen-awesome-darkmode-toggle.js")
|
||||
set(DOXYGEN_HTML_COPY_CLIPBOARD NO) # required with Doxygen >= 1.10.0
|
||||
set(DOXYGEN_HTML_COLORSTYLE LIGHT) # required with Doxygen >= 1.9.5
|
||||
# }
|
||||
|
||||
# Allow for root directory paths to be listed (e.g. openvdb/io/File.h)
|
||||
# Rather than just the file names (e.g. File.h). This makes it far
|
||||
# easier to navigate the docs
|
||||
@@ -110,12 +143,13 @@ set(DOXYGEN_HIDE_SCOPE_NAMES YES)
|
||||
set(DOXYGEN_INLINE_INHERITED_MEMB YES)
|
||||
set(DOXYGEN_MACRO_EXPANSION YES)
|
||||
# @todo use dot with class diagrams for relevant classes
|
||||
set(DOXYGEN_HAVE_DOT NO)
|
||||
set(DOXYGEN_CLASS_GRAPH NO)
|
||||
set(DOXYGEN_CLASS_DIAGRAMS NO)
|
||||
|
||||
|
||||
set(DOXYGEN_ALIASES
|
||||
[[ijk="(<i>i</i>, <i>j</i>, <i>k</i>)"]]
|
||||
[[xyz="(<i>x</i>, <i>y</i>, <i>z</i>)"]]
|
||||
[[ijk="(<i>i</i>, \;<i>j</i>, \;<i>k</i>)"]]
|
||||
[[xyz="(<i>x</i>, \;<i>y</i>, \;<i>z</i>)"]]
|
||||
[[const="<tt>const</tt>"]]
|
||||
"\"vdbnamespace=openvdb::v${OpenVDB_MAJOR_VERSION}_${OpenVDB_MINOR_VERSION}\""
|
||||
[["hunamespace=houdini_utils"]]
|
||||
@@ -148,7 +182,8 @@ set(DOXYGEN_PREDEFINED
|
||||
# even if it was not properly tagged
|
||||
[["OPENVDB_DEPRECATED=/** \deprecated */"]]
|
||||
[["OPENVDB_DEPRECATED_MESSAGE(x)=/** \deprecated x */"]]
|
||||
"OPENVDB_USE_LOG4CPLUS=")
|
||||
"OPENVDB_USE_LOG4CPLUS="
|
||||
"OPENVDB_UBSAN_SUPPRESS=")
|
||||
|
||||
set(DOXYGEN_ENABLED_SECTIONS "")
|
||||
|
||||
@@ -190,9 +225,9 @@ if(OPENVDB_DOXYGEN_HOUDINI)
|
||||
list(APPEND DOXY_FILES
|
||||
doc/houdini.txt
|
||||
openvdb_houdini/openvdb_houdini/AttributeTransferUtil.h
|
||||
openvdb_houdini/openvdb_houdini/GEO_PrimVDB.h
|
||||
openvdb_houdini/openvdb_houdini/reference/GEO_PrimVDB.h
|
||||
openvdb_houdini/openvdb_houdini/reference/GU_PrimVDB.h
|
||||
openvdb_houdini/openvdb_houdini/GT_GEOPrimCollectVDB.h
|
||||
openvdb_houdini/openvdb_houdini/GU_PrimVDB.h
|
||||
openvdb_houdini/openvdb_houdini/GU_VDBPointTools.h
|
||||
openvdb_houdini/openvdb_houdini/GeometryUtil.h
|
||||
openvdb_houdini/openvdb_houdini/ParmFactory.h
|
||||
@@ -221,8 +256,7 @@ if(OPENVDB_DOXYGEN_AX)
|
||||
openvdb_ax/openvdb_ax/compiler
|
||||
openvdb_ax/openvdb_ax/grammar
|
||||
openvdb_ax/openvdb_ax/grammar/generated
|
||||
openvdb_ax/openvdb_ax/math
|
||||
openvdb_ax/openvdb_ax/test)
|
||||
openvdb_ax/openvdb_ax/math)
|
||||
endif()
|
||||
|
||||
if(OPENVDB_DOXYGEN_NANOVDB)
|
||||
@@ -236,7 +270,6 @@ if(OPENVDB_DOXYGEN_NANOVDB)
|
||||
doc/nanovdb/HelloWorld.md
|
||||
nanovdb/nanovdb
|
||||
nanovdb/nanovdb/util
|
||||
nanovdb/nanovdb/examples/benchmark
|
||||
nanovdb/nanovdb/examples/ex_bump_pool_buffer
|
||||
nanovdb/nanovdb/examples/ex_collide_level_set
|
||||
nanovdb/nanovdb/examples/ex_make_custom_nanovdb
|
||||
@@ -255,8 +288,7 @@ if(OPENVDB_DOXYGEN_NANOVDB)
|
||||
nanovdb/nanovdb/examples/ex_read_nanovdb_sphere_accessor_cuda
|
||||
nanovdb/nanovdb/examples/ex_util
|
||||
nanovdb/nanovdb/examples/ex_vox_to_nanovdb
|
||||
nanovdb/nanovdb/examples/ex_write_nanovdb_grids
|
||||
nanovdb/nanovdb/unittest)
|
||||
nanovdb/nanovdb/examples/ex_write_nanovdb_grids)
|
||||
endif()
|
||||
|
||||
set(DOXYGEN_VERBATIM_VARS DOXYGEN_ALIASES DOXYGEN_PREDEFINED)
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
/**
|
||||
<div style="width:800px;text-align:justify;">
|
||||
|
||||
@page ax AX
|
||||
@page ax AX Language Documentation
|
||||
|
||||
@section axlanguage AX Language Documentation
|
||||
@section axlanguage Intro
|
||||
@par
|
||||
Welcome to the AX Language documentation. These docs provide detailed
|
||||
information on the AX language including syntax, data types, available
|
||||
functionality (including OpenVDB specific methods) execution structure and
|
||||
control flow. See the @subpage axcplusplus documentation for the C++ developer
|
||||
control flow. See the @ref axcplusplus documentation for the C++ developer
|
||||
documentation.
|
||||
@note
|
||||
Some sections of this document are still to be completed. Please get in touch
|
||||
@@ -108,8 +107,8 @@ function (see @ref axprogramexample) and whilst there are ways to achieve
|
||||
reductions, it is an example which would be better suited to a custom C++
|
||||
implementation.
|
||||
@par
|
||||
For details of extending AX for custom geometry, see the @subpage axcplusplus
|
||||
developer documentation. Note that custom geometry support requires C++ extension.
|
||||
For details of extending AX for custom geometry, see the @ref axcplusplus
|
||||
developer documentation. Note that custom geometry support requires `C++` extension.
|
||||
|
||||
|
||||
@subsection axprogramexample A Program Example
|
||||
@@ -133,20 +132,20 @@ The following explains the above example in relation to OpenVDB data; OpenVDB
|
||||
points and OpenVDB volumes. The example demonstrates reading from a value on
|
||||
some input, either a point attribute or a voxel value, and storing the
|
||||
result in a @ref axdecls "local variable". Importantly, the attribute being
|
||||
accessed has the name @b `myattribute` and the type @b `float`. The first statement:
|
||||
accessed has the name `myattribute` and the type `float`. The first statement:
|
||||
<!-- A -->@code{.c}
|
||||
float temp = float@myattribute;
|
||||
@endcode
|
||||
Invokes a @b read from this attribute (see @ref axattribaccess), retrieving the
|
||||
value from the geometry and storing it in the variable @b `temp` to be used in
|
||||
value from the geometry and storing it in the variable `temp` to be used in
|
||||
the AX program. The second statement:
|
||||
@code{.c}
|
||||
if (temp > 0.0f) float@myattribute = 0.0f;
|
||||
@endcode
|
||||
Performs a comparison of this value with @b `0.0f` and, if the value is greater
|
||||
than @b `0.0f`, performs a @b write to the geometry in the form of
|
||||
<b>`float@myattribute = 0.0f;`</b> which sets the value of this attribute on the
|
||||
geometry to @b `0.0f`.
|
||||
Performs a comparison of this value with `0.0f` and, if the value is greater
|
||||
than `0.0f`, performs a @b write to the geometry in the form of
|
||||
`float@myattribute = 0.0f;` which sets the value of this attribute on the
|
||||
geometry to `0.0f`.
|
||||
@par
|
||||
For OpenVDB Points, this kernel is run over every point in an OpenVDB Points
|
||||
Grid. In simple pseudo code:
|
||||
@@ -155,7 +154,7 @@ foreach(point in pointgrid)
|
||||
run_ax_kernel(point)
|
||||
done()
|
||||
@endcode
|
||||
Where @b `pointgrid` is a single Point Data Grid. For OpenVDB volumes the kernel
|
||||
Where `pointgrid` is a single Point Data Grid. For OpenVDB volumes the kernel
|
||||
is run over each voxel in a provided grid:
|
||||
@code{.unparsed}
|
||||
foreach(grid in grids)
|
||||
@@ -165,8 +164,8 @@ foreach(grid in grids)
|
||||
done()
|
||||
@endcode
|
||||
@par
|
||||
Where @b `grids` can comprise of any number of OpenVDB volumes. In this program,
|
||||
only a floating point grid with the name @b `myattribute` will be updated. Each
|
||||
Where `grids` can comprise of any number of OpenVDB volumes. In this program,
|
||||
only a floating point grid with the name `myattribute` will be updated. Each
|
||||
voxel in this grid will have it's value compared in the same way as the points
|
||||
example given above.
|
||||
|
||||
@@ -282,9 +281,9 @@ missing types from OpenVDB.
|
||||
|
||||
@subsection axscalars Scalars
|
||||
@par
|
||||
AX Supports boolean, integer and floating point scalar types. @b `int` and
|
||||
@b `int32` represent 32-bit integer values and @b `int64` represents a 64-bit
|
||||
value. @b `float` and @b `double` represent 32-bit and 64-bit floating point
|
||||
AX Supports boolean, integer and floating point scalar types. `int` and
|
||||
`int32` represent 32-bit integer values and `int64` represents a 64-bit
|
||||
value. `float` and `double` represent 32-bit and 64-bit floating point
|
||||
values respectively. All scalars, excluding bools, are signed; there are no
|
||||
other unsigned scalar types in AX.
|
||||
@par Integer Overflow and Floating Point Truncation
|
||||
@@ -309,10 +308,10 @@ int64 a = 2147483648l; // one more than can be held in an int (note the last let
|
||||
int b = a; // implicit conversion. "b" is set to -2147483648
|
||||
@endcode
|
||||
@par Infinite and NaN values
|
||||
Floating point values have two additional intrinsic states; @b `inf` and @b `nan`.
|
||||
Floating point values have two additional intrinsic states; `inf` and `nan`.
|
||||
These states can occur during invalid floating point arithmetic. AX performs no
|
||||
checks on arithmetic to catch these values. A typical example of both @b `inf`
|
||||
and @b `nan` values are division by zero expressions:
|
||||
checks on arithmetic to catch these values. A typical example of both `inf`
|
||||
and `nan` values are division by zero expressions:
|
||||
@code
|
||||
float a = 1.0f/0.0f;
|
||||
print(a); // prints "inf"
|
||||
@@ -337,16 +336,16 @@ There is currently support for vectors of sizes 2, 3 and 4 elements. The suffix
|
||||
letter on the vector types denotes the contained elements precision, with the
|
||||
number corresponding to the vector size. For example, @b `vec2i` denotes a vector
|
||||
of two 32-bit integer elements. There are no native types for vectors with
|
||||
@b `bool`, @b `int16` or @b `int64` elements, so these are not supported.
|
||||
`bool`, `int16` or `int64` elements, so these are not supported.
|
||||
@par Matrices
|
||||
Matrices are stored in row major layout (lexographical access order) which
|
||||
matches the representation of a matrix in OpenVDB. Matrix support consists of
|
||||
@b `float` and @b `double` precision elements with dimensions either @b `3x3` or
|
||||
@b `4x4` (total size of 9 and 16 elements respectively). There are no integer or
|
||||
`float` and `double` precision elements with dimensions either `3x3` or
|
||||
`4x4` (total size of 9 and 16 elements respectively). There are no integer or
|
||||
boolean matrix types. Similiar to vectors, the suffix letter on the type denotes
|
||||
the contained elements precision, with the number corresponding to the matrix
|
||||
dimension. A matrix of type @b `mat3d` therefor corresponds to a @b `3x3` matrix
|
||||
(9 elements) with @b `double` precision elements.
|
||||
dimension. A matrix of type `mat3d` therefor corresponds to a `3x3` matrix
|
||||
(9 elements) with `double` precision elements.
|
||||
@par Element Access
|
||||
As elements of all matrix and vector types are stored contiguously, they can be
|
||||
accessed by the @ref axvecaccessop "[] operator". Vector elements can also be
|
||||
@@ -370,10 +369,10 @@ performing matrix projections (transformations) on vector arguments.
|
||||
Strings are an array of characters stored in a unique AX type which is
|
||||
incompatible with @ref axopaccess "container accesses". As such, string support
|
||||
is currently fairly limited. Characters themselves (users may know this as a
|
||||
@b `char` type) have no frontend type, so a @b `string` type must be used for
|
||||
`char` type) have no frontend type, so a `string` type must be used for
|
||||
any number of characters (including the empty string). String literals are
|
||||
represented by enclosing any number of @ref axtokens "supported AX characters"
|
||||
by quotes <b>\" \"</b>.
|
||||
by quotes `" "`.
|
||||
|
||||
@subsection axtypeprecedence Implicit conversion / type precedence
|
||||
@par
|
||||
@@ -441,9 +440,9 @@ depending on the operand types.
|
||||
<th colspan="9"> Operators
|
||||
</th></tr>
|
||||
<tr style="text-align:center">
|
||||
<td bgcolor="#ffc4c4" style="border-right-width: thick" colspan="4"> @ref axopbinary </td>
|
||||
<td bgcolor="#ffc4c4" style="border-right-width: thick" colspan="3"> @ref axopunary </td>
|
||||
<td bgcolor="#ffc4c4" colspan="2"> Other </td></tr>
|
||||
<td style="border-right-width: thick" colspan="4"> @ref axopbinary </td>
|
||||
<td style="border-right-width: thick" colspan="3"> @ref axopunary </td>
|
||||
<td colspan="2"> Other </td></tr>
|
||||
<tr style="text-align:center">
|
||||
<td> @ref axopassignment </td>
|
||||
<td> @ref axopbinarithmetic </td>
|
||||
@@ -456,50 +455,33 @@ depending on the operand types.
|
||||
<td> @ref axopother </td></tr>
|
||||
<tr style="text-align:center">
|
||||
<td><p> <!-- *********************** COLUMN ASSIGNMENT *********************** -->
|
||||
<code>
|
||||
a = b<br/>a += b<br/>a -= b<br/>a *= b<br/>a /= b<br/>a %= b<br/>
|
||||
a &= b<br/>a |= b<br/>a ^= b<br/>a <<= b<br/>a >>= b
|
||||
</code>
|
||||
`a = b`<br/>`a += b`<br/>`a -= b`<br/>`a *= b`<br/>`a /= b`<br/>`a %= b`<br/>
|
||||
`a &= b`<br/>`a |= b`<br/>`a ^= b`<br/>`a <<= b`<br/>`a >>= b`
|
||||
</p></td>
|
||||
<td><p> <!-- *********************** COLUMN ARITH *********************** -->
|
||||
<code>
|
||||
a + b<br/>a - b<br/>a * b<br/>a / b<br/>a % b<br/>a & b<br/>a | b<br/>
|
||||
a ^ b<br/>a << b<br/>a >> b
|
||||
</code></p></td>
|
||||
`a + b`<br/>`a - b`<br/>`a * b`<br/>`a / b`<br/>`a % b`<br/>`a & b`<br/>`a | b`<br/>
|
||||
`a ^ b`<br/>`a << b`<br/>`a >> b`
|
||||
</p></td>
|
||||
<td><p> <!-- *********************** COLUMN COMP *********************** -->
|
||||
<code>
|
||||
a == b<br/>a != b<br/>a < b<br/>a > b<br/>a <= b<br/>a >= b
|
||||
</code>
|
||||
`a == b`<br/>`a != b`<br/>`a < b`<br/>`a > b`<br/>`a <= b`<br/>`a >= b`
|
||||
</p></td>
|
||||
<td style="border-right-width: thick"><p> <!-- *********************** COLUMN LOGICAL *********************** -->
|
||||
<code>
|
||||
a && b<br/>a || b
|
||||
</code>
|
||||
`a && b`<br/>`a || b`
|
||||
</p></td>
|
||||
<td><p> <!-- *********************** COLUMN ARITH *********************** -->
|
||||
<code>
|
||||
+a<br/>-a<br/>~a
|
||||
</code>
|
||||
`+a`<br/>`-a`<br/>`~a`
|
||||
</p></td>
|
||||
<td><p> <!-- *********************** COLUMN LOGICAL *********************** -->
|
||||
<code>
|
||||
!a
|
||||
</code>
|
||||
`!a`
|
||||
</p></td>
|
||||
<td style="border-right-width: thick"><p> <!-- *********************** COLUMN INC/DEC *********************** -->
|
||||
<code>
|
||||
++a<br/>\-\-a<br/>a++<br/>a\-\-
|
||||
</code>
|
||||
`++a`<br/>`--a`<br/>`a++`<br/>`a--`
|
||||
</p></td>
|
||||
<td><p> <!-- *********************** COLUMN OTHER *********************** -->
|
||||
<code>
|
||||
a[]<br/>a[,]<br/>a.b
|
||||
</code>
|
||||
`a[]`<br/>`a[,]`<br/>`a.b`
|
||||
</p></td>
|
||||
<td><p> <!-- *********************** COLUMN OTHER *********************** -->
|
||||
<code>
|
||||
a(...)<br/>a, b<br/>a ? b : c<br/>{ a,b ... }
|
||||
</code>
|
||||
`a(...)`<br/>`a, b`<br/>`a ? b : c`<br/>`a ?: c`<br/>`{ a,b ... }`
|
||||
</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -522,34 +504,34 @@ assignment operators have the following forms:
|
||||
@par
|
||||
<table>
|
||||
<tr><th>Operator Name</th><th>Operator Syntax</th><th>Returns</th></tr>
|
||||
<tr><td>Simple assignment</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`=`</b> @a `rhs` </td><td>Reference to @a `lhs`</td></tr>
|
||||
<tr><td>Addition assignment</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`+=`</b> @a `rhs` </td><td>Reference to @a `lhs`</td></tr>
|
||||
<tr><td>Subtraction assignment</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`-=`</b> @a `rhs` </td><td>Reference to @a `lhs`</td></tr>
|
||||
<tr><td>Multiplication assignment</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`*=`</b> @a `rhs` </td><td>Reference to @a `lhs`</td></tr>
|
||||
<tr><td>Division assignment</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`/=`</b> @a `rhs` </td><td>Reference to @a `lhs`</td></tr>
|
||||
<tr><td>Modulo assignment</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`%=`</b> @a `rhs` </td><td>Reference to @a `lhs`</td></tr>
|
||||
<tr><td>Bitwise AND assignment</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`&=`</b> @a `rhs` </td><td>Reference to @a `lhs`</td></tr>
|
||||
<tr><td>Bitwise OR assignment</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`|=`</b> @a `rhs` </td><td>Reference to @a `lhs`</td></tr>
|
||||
<tr><td>Bitwise XOR assignment</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`^=`</b> @a `rhs` </td><td>Reference to @a `lhs`</td></tr>
|
||||
<tr><td>Bitwise shift left assignment</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`<<=`</b> @a `rhs` </td><td>Reference to @a `lhs`</td></tr>
|
||||
<tr><td>Bitwise shift right assignment</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`>>=`</b> @a `rhs` </td><td>Reference to @a `lhs`</td></tr>
|
||||
<tr><td>Simple assignment</td><td> @a lhs <b>`=`</b> @a rhs </td>
|
||||
<td rowspan="11">Reference to @a lhs</td></tr>
|
||||
<tr><td>Addition assignment</td><td> @a lhs <b>`+=`</b> @a rhs </td></tr>
|
||||
<tr><td>Subtraction assignment</td><td> @a lhs <b>`-=`</b> @a rhs </td></tr>
|
||||
<tr><td>Multiplication assignment</td><td> @a lhs <b>`*=`</b> @a rhs </td></tr>
|
||||
<tr><td>Division assignment</td><td> @a lhs <b>`/=`</b> @a rhs </td></tr>
|
||||
<tr><td>Modulo assignment</td><td> @a lhs <b>`%=`</b> @a rhs </td></tr>
|
||||
<tr><td>Bitwise AND assignment</td><td> @a lhs <b>`&=`</b> @a rhs </td></tr>
|
||||
<tr><td>Bitwise OR assignment</td><td> @a lhs <b>`|=`</b> @a rhs </td></tr>
|
||||
<tr><td>Bitwise XOR assignment</td><td> @a lhs <b>`^=`</b> @a rhs </td></tr>
|
||||
<tr><td>Bitwise shift left assignment</td><td> @a lhs <b>`<<=`</b> @a rhs </td></tr>
|
||||
<tr><td>Bitwise shift right assignment</td><td> @a lhs <b>`>>=`</b> @a rhs </td></tr>
|
||||
</table>
|
||||
@par
|
||||
These can be further categorised into two types; direct assignment, which is
|
||||
comprised only of the <b>simple assignment</b> operator, and compound assignments,
|
||||
which is the set of all other assignment operators.
|
||||
@par Direct Assignment
|
||||
Direct assignments replace the contents of the @b `lhs` with a copy of the @b
|
||||
`rhs`:
|
||||
Direct assignments replace the contents of the `lhs` with a copy of the `rhs`:
|
||||
@par
|
||||
<table><tr>
|
||||
<td bgcolor="#ffc4c4"> @a `lhs` <b>= </b> @a `rhs` </td>
|
||||
<td> @a lhs <b>=</b> @a rhs </td>
|
||||
</tr></table>
|
||||
@par
|
||||
The @b `rhs` side is not modified and the @b `lhs` is not read - only written
|
||||
to. If the @b `rhs` type does not match the @b `lhs` type, the @b `rhs` is first
|
||||
implicitly converted into a new temporary with the @b `lhs` type before being
|
||||
copied into the @b `lhs`. The following combination of AX type categories are
|
||||
The `rhs` side is not modified and the `lhs` is not read - only written
|
||||
to. If the `rhs` type does not match the `lhs` type, the `rhs` is first
|
||||
implicitly converted into a new temporary with the `lhs` type before being
|
||||
copied into the `lhs`. The following combination of AX type categories are
|
||||
supported for direct assignment (if an operation is not listed, it is not
|
||||
supported):
|
||||
@par
|
||||
@@ -569,15 +551,14 @@ supported):
|
||||
<td style="border-top-width: thick">@ref axscalars "scalar"</td>
|
||||
<td style="border-top-width:thick;text-align:left">
|
||||
Each element of the vector is set to the right hand side scalar. i.e.
|
||||
<br/> `a[0] = b; ... a[n-1] = b;` <br/>
|
||||
where `n` is the size of the vector. If the scalar type does not match
|
||||
element type of vector, the scalar is copied and @ref axtypeprecedence
|
||||
"implicitly cast" to that type.</td>
|
||||
`a[0] = b; ... a[n-1] = b;` where `n` is the size of the vector. If the
|
||||
scalar type does not match element type of vector, the scalar is copied and
|
||||
@ref axtypeprecedence "implicitly cast" to that type.</td>
|
||||
</tr>
|
||||
<tr style="text-align:center"><td>@ref axvecmats "vector"</td>
|
||||
<td style="text-align:left">Component wise assignment i.e.
|
||||
<br/> `a[0] = b; ... a[n-1] = b;` <br/>
|
||||
where `n` is the size of the vector.
|
||||
<td style="text-align:left">
|
||||
Component wise assignment i.e. `a[0] = b; ... a[n-1] = b;` where `n` is the size
|
||||
of the vector.
|
||||
<!-- A -->@code{.c}
|
||||
vec3f a = 0, b = 1;
|
||||
a = b;
|
||||
@@ -612,7 +593,7 @@ of matrix, the scalar is copied and @ref axtypeprecedence "implicitly cast" to
|
||||
that type.</td>
|
||||
<tr style="text-align:center"><td>@ref axvecmats "matrix"</td>
|
||||
<td style="text-align:left">Component wise assignment i.e.
|
||||
<br/> `a[0] = b[0]; ... a[n-1] = b[n-1];` <br/>
|
||||
<br/> `a[0] = b[0]; ... a[n-1] = b[n-1];` <br/>
|
||||
where `n` is the @b total size of the matrix.
|
||||
<!-- A -->@code{.c}
|
||||
mat4f a = 0, b = 1;
|
||||
@@ -645,25 +626,27 @@ int a = 1; // assign a from an integer literal of value 1
|
||||
c = a; // assign components of c (x/y/z) to the result of float(a)
|
||||
@endcode
|
||||
@par Compound Assignment
|
||||
Compound assignments replace the the contents of the @b `lhs` with the result of
|
||||
a @ref axopbinarithmetic "binary arithmetic" operation of the @b `lhs` with the
|
||||
@b `rhs`:
|
||||
Compound assignments replace the the contents of the `lhs` with the result of
|
||||
a @ref axopbinarithmetic "binary arithmetic" operation of the `lhs` with the
|
||||
`rhs`:
|
||||
@par
|
||||
<table>
|
||||
<tr><td bgcolor="#ffc4c4"> @a `lhs` @b op @a `rhs` </td></tr>
|
||||
<tr><td> @a lhs @b op @a rhs </td></tr>
|
||||
</table>
|
||||
Where @b op is one of :
|
||||
|
||||
Where @b op is one of:
|
||||
|
||||
<table><tr>
|
||||
<td bgcolor="#ffc4c4"> <b>`+=`</b></td>
|
||||
<td bgcolor="#ffc4c4"> <b>`-=`</b></td>
|
||||
<td bgcolor="#ffc4c4"> <b>`*=`</b></td>
|
||||
<td bgcolor="#ffc4c4"> <b>`/=`</b></td>
|
||||
<td bgcolor="#ffc4c4"> <b>`%=`</b></td>
|
||||
<td bgcolor="#ffc4c4"> <b>`&=`</b></td>
|
||||
<td bgcolor="#ffc4c4"> <b>`|=`</b></td>
|
||||
<td bgcolor="#ffc4c4"> <b>`^=`</b></td>
|
||||
<td bgcolor="#ffc4c4"> <b>`<<=`</b></td>
|
||||
<td bgcolor="#ffc4c4"> <b>`>>= `</b></td>
|
||||
<td> <b>`+=`</b></td>
|
||||
<td> <b>`-=`</b></td>
|
||||
<td> <b>`*=`</b></td>
|
||||
<td> <b>`/=`</b></td>
|
||||
<td> <b>`%=`</b></td>
|
||||
<td> <b>`&=`</b></td>
|
||||
<td> <b>`|=`</b></td>
|
||||
<td> <b>`^=`</b></td>
|
||||
<td> <b>`<<=`</b></td>
|
||||
<td> <b>`>>= `</b></td>
|
||||
</tr></table>
|
||||
@par
|
||||
The behaviour of a given compound assignment (for example `a += b`) is similar
|
||||
@@ -680,8 +663,8 @@ int a = 1;
|
||||
++a += 1; // equal to a = ++a + 1 which is equal to 3
|
||||
@endcode
|
||||
@par
|
||||
The @b `rhs` side is not modified, however the @b `lhs` is both read from and
|
||||
written to. Note that the arithmetic operation may cast either @b `lhs` or @b
|
||||
The `rhs` side is not modified, however the `lhs` is both read from and
|
||||
written to. Note that the arithmetic operation may cast either `lhs` or
|
||||
`rhs` following the rules of AX's @ref axopbinarithmetic
|
||||
"arithmetic type precedence". See the @ref axopbinarithmetic
|
||||
"arithmetic operations" section for more information on arithmetic type
|
||||
@@ -720,7 +703,7 @@ b = c; // b becomes 4
|
||||
a = b; // a becomes float(4)
|
||||
@endcode
|
||||
@par
|
||||
Importantly, @b `a` receives the result of any previous implicit casts to the
|
||||
Importantly, `a` receives the result of any previous implicit casts to the
|
||||
right hand side of its binary assignment.
|
||||
|
||||
|
||||
@@ -737,20 +720,20 @@ container types). Binary arithmetic operations have the following forms:
|
||||
@par
|
||||
<table>
|
||||
<tr><th>Operator Name</th><th>Operator Syntax</th><th>Returns</th></tr>
|
||||
<tr><td>Addition</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`+`</b> @a `rhs` </td><td>The sum of both operands</td></tr>
|
||||
<tr><td>Subtraction</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`-`</b> @a `rhs` </td><td>The first operand minus the second operand</td></tr>
|
||||
<tr><td>Multiplication</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`*`</b> @a `rhs` </td><td>The product of both operands</td></tr>
|
||||
<tr><td>Division</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`/`</b> @a `rhs` </td><td>The first operand divided by the second operand</td></tr>
|
||||
<tr><td>Modulo</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`%`</b> @a `rhs` </td><td>The @b floored modulo operator. See @ref axbinmultop "Multiplicative operands"</td></tr>
|
||||
<tr><td>Bitwise AND</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`&`</b> @a `rhs` </td>
|
||||
<tr><td>Addition</td><td> @a lhs <b>`+`</b> @a rhs </td><td>The sum of both operands</td></tr>
|
||||
<tr><td>Subtraction</td><td> @a lhs <b>`-`</b> @a rhs </td><td>The first operand minus the second operand</td></tr>
|
||||
<tr><td>Multiplication</td><td> @a lhs <b>`*`</b> @a rhs </td><td>The product of both operands</td></tr>
|
||||
<tr><td>Division</td><td> @a lhs <b>`/`</b> @a rhs </td><td>The first operand divided by the second operand</td></tr>
|
||||
<tr><td>Modulo</td><td> @a lhs <b>`%`</b> @a rhs </td><td>The @b floored modulo operator. See @ref axbinmultop "Multiplicative operands"</td></tr>
|
||||
<tr><td>Bitwise AND</td><td> @a lhs <b>`&`</b> @a rhs </td>
|
||||
<td>The @b integral bitwise AND result of each bit in the first operand applied to the bit at the same location in the second operand</td></tr>
|
||||
<tr><td>Bitwise OR</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`|`</b> @a `rhs` </td>
|
||||
<tr><td>Bitwise OR</td><td> @a lhs <b>`|`</b> @a rhs </td>
|
||||
<td>The @b integral bitwise OR result of each bit in the first operand applied to the bit at the same location in the second operand</td></tr>
|
||||
<tr><td>Bitwise XOR</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`^`</b> @a `rhs` </td>
|
||||
<tr><td>Bitwise XOR</td><td> @a lhs <b>`^`</b> @a rhs </td>
|
||||
<td>The @b integral bitwise XOR result of each bit in the first operand applied to the bit at the same location in the second operand</td></tr>
|
||||
<tr><td>Bitwise shift left</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`<<`</b> @a `rhs` </td>
|
||||
<tr><td>Bitwise shift left</td><td> @a lhs <b>`<<`</b> @a rhs </td>
|
||||
<td>The @b integral bitwise left shift of the first operand by the second operand</td></tr>
|
||||
<tr><td>Bitwise shift right</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`>>`</b> @a `rhs` </td>
|
||||
<tr><td>Bitwise shift right</td><td> @a lhs <b>`>>`</b> @a rhs </td>
|
||||
<td>The @b integral bitwise right shift of the first operand by the second operand</td></tr>
|
||||
</table>
|
||||
@anchor axbinadditiveop
|
||||
@@ -759,13 +742,13 @@ Binary additive operations perform summations on the input arguments. They have
|
||||
the following forms:
|
||||
@par
|
||||
<table>
|
||||
<tr><td bgcolor="#ffc4c4"> @a `lhs` @b `+` @a `rhs` </td></tr>
|
||||
<tr><td bgcolor="#ffc4c4"> @a `lhs` @b `-` @a `rhs` </td></tr>
|
||||
<tr><td> @a lhs @b + @a rhs </td></tr>
|
||||
<tr><td> @a lhs @b - @a rhs </td></tr>
|
||||
</table>
|
||||
@par
|
||||
After @ref axtypeprecedence "implicit conversion", the result of the binary
|
||||
operation with the arithmetic @b `+` (@ref axtokens "plus token") is the sum of
|
||||
the operands, and the result of the binary operation with the arithmetic @b `-`
|
||||
operation with the arithmetic `+` (@ref axtokens "plus token") is the sum of
|
||||
the operands, and the result of the binary operation with the arithmetic `-`
|
||||
(@ref axtokens "minus token") token is the second operand subtracted from the
|
||||
first operand. The following combination of AX type categories are supported for
|
||||
additive operations (if an operation is not listed, it is not supported):
|
||||
@@ -870,19 +853,19 @@ c - b; // valid vec - scalar
|
||||
The binary multiplicative operands have the following forms:
|
||||
@par
|
||||
<table>
|
||||
<tr><td bgcolor="#ffc4c4"> @a `lhs` @b `*` @a `rhs` </td></tr>
|
||||
<tr><td bgcolor="#ffc4c4"> @a `lhs` @b `/` @a `rhs` </td></tr>
|
||||
<tr><td bgcolor="#ffc4c4"> @a `lhs` @b `%` @a `rhs` </td></tr>
|
||||
<tr><td> @a lhs `*` @a rhs </td></tr>
|
||||
<tr><td> @a lhs `/` @a rhs </td></tr>
|
||||
<tr><td> @a lhs `%` @a rhs </td></tr>
|
||||
</table>
|
||||
@par
|
||||
After @ref axtypeprecedence "implicit conversion", the result of the binary
|
||||
operation:
|
||||
- with the arithmetic @b `*` (@ref axtokens "asterisk token") is:
|
||||
- with the arithmetic `*` (@ref axtokens "asterisk token") is:
|
||||
- the product of the operands
|
||||
- @b OR performs matrix multiplication for vector and matrix types.
|
||||
- with the arithmetic @b `/` (@ref axtokens "forward slash token") is the first
|
||||
- with the arithmetic `/` (@ref axtokens "forward slash token") is the first
|
||||
operand divided by the second operand.
|
||||
- with the arithmetic @b `%` (@ref axtokens "percentage token") is the
|
||||
- with the arithmetic `%` (@ref axtokens "percentage token") is the
|
||||
@b floored modulo operations .i.e. the expression `d % D` returns the result
|
||||
`D - d * floor(D/d)`. This is in contrast to truncated modulo operations
|
||||
`D - d * (D/d)` where the division is truncated.
|
||||
@@ -894,7 +877,7 @@ mean that the relationship properties between `%` and `/` differ when either
|
||||
@b `d` or @b `D` is negative. i.e.:
|
||||
`(d/D)*D + (d%D) != d`
|
||||
@note
|
||||
The multiplicative operation @b `*` has important behaviour for vectors and
|
||||
The multiplicative operation `*` has important behaviour for vectors and
|
||||
matrix types.
|
||||
@par
|
||||
The following combination of AX type categories are supported for multiplicative
|
||||
@@ -907,7 +890,7 @@ operations (if an operation is not listed, it is not supported):
|
||||
<tr style="text-align:center"><td rowspan="3">@ref axscalars "scalar"</td><td rowspan="2">`* / %`</td><td rowspan="1">@ref axscalars "scalar"</td>
|
||||
<td style="text-align:left">Returns the result of the scalar multiplication, division or remainder of the division respectively. </td>
|
||||
</tr>
|
||||
<tr style="text-align:center"><td>@ref axvecmats "vector"</td></td>
|
||||
<tr style="text-align:center"><td>@ref axvecmats "vector"</td>
|
||||
<td style="text-align:left" rowspan="1">
|
||||
Performs per component binary operations (after
|
||||
@ref axtypeprecedence "implicit conversion") with the left hand side scalar to
|
||||
@@ -1096,27 +1079,27 @@ Floating point multiplication is communicative (`a * b = b * a`) but is not
|
||||
Binary bitwise operations have the following forms:
|
||||
@par
|
||||
<table>
|
||||
<tr><td bgcolor="#ffc4c4"> @a `lhs` @b `&` @a `rhs` </td></tr>
|
||||
<tr><td bgcolor="#ffc4c4"> @a `lhs` <b> `|` </b> @a `rhs` </td></tr>
|
||||
<tr><td bgcolor="#ffc4c4"> @a `lhs` @b `^` @a `rhs` </td></tr>
|
||||
<tr><td bgcolor="#ffc4c4"> @a `lhs` @b `<<` @a `rhs` </td></tr>
|
||||
<tr><td bgcolor="#ffc4c4"> @a `lhs` @b `>>` @a `rhs` </td></tr>
|
||||
<tr><td> @a lhs <b> `&` </b> @a rhs </td></tr>
|
||||
<tr><td> @a lhs <b> `|` </b> @a rhs </td></tr>
|
||||
<tr><td> @a lhs <b> `^` </b> @a rhs </td></tr>
|
||||
<tr><td> @a lhs <b> `<<` </b> @a rhs </td></tr>
|
||||
<tr><td> @a lhs <b> `>>` </b> @a rhs </td></tr>
|
||||
</table>
|
||||
@par
|
||||
These operations only run on @b integral operands. After @ref axtypeprecedence
|
||||
"implicit conversion", the result of the binary operation:
|
||||
- with the @b `&` (@ref axtokens "ampersand token") is the result of the
|
||||
- with the @b & (@ref axtokens "ampersand token") is the result of the
|
||||
logical AND operation on each pair of the corresponding bits of the input
|
||||
operands.
|
||||
- with the <b> `|` </b> (@ref axtokens "pipe token") is the result of the
|
||||
- with the <b> | </b> (@ref axtokens "pipe token") is the result of the
|
||||
logical OR operation on each pair of the corresponding bits of the input
|
||||
operands.
|
||||
- with the @b `^` (@ref axtokens "hat token") is the result of the
|
||||
- with the @b ^ (@ref axtokens "hat token") is the result of the
|
||||
logical XOR operation on each pair of the corresponding bits of the input
|
||||
operands.
|
||||
- with the @b `<<` (@ref axtokens "less than tokens") is the value shifted left
|
||||
- with the @b << (@ref axtokens "less than tokens") is the value shifted left
|
||||
with zeros shifted in on the right.
|
||||
- with the @b `>>` (@ref axtokens "greater than tokens") is the value shifted
|
||||
- with the @b >> (@ref axtokens "greater than tokens") is the value shifted
|
||||
right with zeros shifted in on the left.
|
||||
@par
|
||||
<table>
|
||||
@@ -1144,17 +1127,17 @@ is of type @b `bool`. Binary comparison operations have the following forms:
|
||||
@par
|
||||
<table>
|
||||
<tr><th>Operator Name</th><th>Operator Syntax</th><th>Returns</th></tr>
|
||||
<tr><td>Equal to</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`==`</b> @a `rhs` </td>
|
||||
<tr><td>Equal to</td><td> @a lhs <b>`==`</b> @a rhs </td>
|
||||
<td>Returns `true` if both operands are equal</td></tr>
|
||||
<tr><td>Not equal to</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`!=`</b> @a `rhs` </td>
|
||||
<tr><td>Not equal to</td><td> @a lhs <b>`!=`</b> @a rhs </td>
|
||||
<td>Returns `true` if operands are not equal</td></tr>
|
||||
<tr><td>Less than</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`<`</b> @a `rhs` </td>
|
||||
<tr><td>Less than</td><td> @a lhs <b>`<`</b> @a rhs </td>
|
||||
<td>Returns `true` the left hand side value is less than the right hand side</td></tr>
|
||||
<tr><td>Greater than</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`>`</b> @a `rhs` </td>
|
||||
<tr><td>Greater than</td><td> @a lhs <b>`>`</b> @a rhs </td>
|
||||
<td>Returns `true` the left hand side value is greater than the right hand side</td></tr>
|
||||
<tr><td>Less than or equal to</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`<=`</b> @a `rhs` </td>
|
||||
<tr><td>Less than or equal to</td><td> @a lhs <b>`<=`</b> @a rhs </td>
|
||||
<td>Returns `true` the left hand side value is less than or equal to the right hand side</td></tr>
|
||||
<tr><td>Greater than or equal to</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`>=`</b> @a `rhs` </td>
|
||||
<tr><td>Greater than or equal to</td><td> @a lhs <b>`>=`</b> @a rhs </td>
|
||||
<td>Returns `true` the left hand side value is greater than or equal to the right hand side</td></tr>
|
||||
</table>
|
||||
@par
|
||||
@@ -1264,10 +1247,10 @@ They have the following forms:
|
||||
@par
|
||||
<table>
|
||||
<tr><th>Operator Name</th><th>Operator Syntax</th><th>Returns</th></tr>
|
||||
<tr><td>AND</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`&&`</b> @a `rhs` </td>
|
||||
<tr><td>AND</td><td> @a lhs <b>`&&`</b> @a rhs </td>
|
||||
<td>Returns true if both operands are true. Otherwise, the result is false. This
|
||||
operator is short-circuiting.</td></tr>
|
||||
<tr><td>Inclusive OR</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`||`</b> @a `rhs` </td>
|
||||
<tr><td>Inclusive OR</td><td> @a lhs <b>`||`</b> @a rhs </td>
|
||||
<td>Returns true if either the first or the second operand is true. This operator
|
||||
is short-circuiting.</td></tr>
|
||||
</table>
|
||||
@@ -1300,14 +1283,14 @@ Arithmetic unary operators are comprised of arithemtic and bitwise operators.
|
||||
@par
|
||||
<table>
|
||||
<tr><th>Operator Name</th><th>Operator Syntax</th><th>Returns</th></tr>
|
||||
<tr><td>Unary plus</td><td bgcolor="#ffc4c4"> <b>`+`</b>@a `a` </td>
|
||||
<td>Returns the value of its operand, @b `a`</td>
|
||||
<tr><td>Unary plus</td><td> `+a` </td>
|
||||
<td>Returns the value of its operand, `a`</td>
|
||||
</tr>
|
||||
<tr><td>Unary minus</td><td bgcolor="#ffc4c4"> <b>`-`</b>@a `a` </td>
|
||||
<td>Returns the negative representation of @b `a`</td>
|
||||
<tr><td>Unary minus</td><td> `-a` </td>
|
||||
<td>Returns the negative representation of `a`</td>
|
||||
</tr>
|
||||
<tr><td>Bitwise NOT</td><td bgcolor="#ffc4c4"> <b>`~`</b>@a `a` </td>
|
||||
<td>Returns the bitwise NOT (one's complement) value of @b `a`. This operator
|
||||
<tr><td>Bitwise NOT</td><td> `~a` </td>
|
||||
<td>Returns the bitwise NOT (one's complement) value of `a`. This operator
|
||||
is only valid on integral element types.</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -1365,7 +1348,7 @@ Logical unary operators consist of a single operand.
|
||||
@par
|
||||
<table>
|
||||
<tr><th>Operator Name</th><th>Operator Syntax</th><th>Returns</th></tr>
|
||||
<tr><td>Logical NOT</td><td bgcolor="#ffc4c4"> <b>`!`</b>@a `a` </td>
|
||||
<tr><td>Logical NOT</td><td> `!a` </td>
|
||||
<td>Returns true if the operand is false. Otherwise, returns false.</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -1409,10 +1392,10 @@ each component of a vector or matrix. They have the following forms:
|
||||
@par
|
||||
<table>
|
||||
<tr><th>Operator Name</th><th>Operator Syntax</th><th>Returns</th></tr>
|
||||
<tr><td>Pre-increment</td><td bgcolor="#ffc4c4"> <b>`++`</b>@a `a` </td><td>Returns a reference to the incremented result.</td>
|
||||
<tr><td>Post-increment</td><td bgcolor="#ffc4c4">@a `a`<b>`++`</b> </td><td>Returns a copy of the incremented result.</td>
|
||||
<tr><td>Pre-decrement</td><td bgcolor="#ffc4c4"> <b>`--`</b>@a `a` </td><td>Returns a reference to the decremented result.</td>
|
||||
<tr><td>Post-decrement</td><td bgcolor="#ffc4c4"> @a `a`<b>`--`</b> </td><td>Returns a copy of the decremented result.</td>
|
||||
<tr><td>Pre-increment</td><td> `++a` </td><td>Returns a reference to the incremented result.</td>
|
||||
<tr><td>Post-increment</td><td> `a++` </td><td>Returns a copy of the incremented result.</td>
|
||||
<tr><td>Pre-decrement</td><td> `--a` </td><td>Returns a reference to the decremented result.</td>
|
||||
<tr><td>Post-decrement</td><td> `a--` </td><td>Returns a copy of the decremented result.</td>
|
||||
</tr>
|
||||
</table>
|
||||
@par
|
||||
@@ -1444,20 +1427,20 @@ the following forms:
|
||||
<tr><th>Operator Name</th><th>Operator Syntax</th><th>Returns</th></tr>
|
||||
<tr style="text-align:left">
|
||||
<td>Dot Component Access</td>
|
||||
<td bgcolor="#ffc4c4"> <em>`vector`</em> <b>.</b> @a `component` </td>
|
||||
<td>Reference to component @a `component` of @a `vector`</td>
|
||||
<td> <em>`vector`</em> <b>.</b> `component` </td>
|
||||
<td>Reference to component `component` of `vector`</td>
|
||||
</tr>
|
||||
<tr style="text-align:left">
|
||||
<td>Container Component Access</td>
|
||||
<td bgcolor="#ffc4c4"> <em>`container`</em> <b>[</b> @a `exp` <b>]</b> </td>
|
||||
<td>Reference to component at index @a `exp` of @a `container`</td>
|
||||
<td> <em>`container`</em> <b>[</b> `exp` <b>]</b> </td>
|
||||
<td>Reference to component at index `exp` of `container`</td>
|
||||
</tr>
|
||||
<tr style="text-align:left">
|
||||
<td>Matrix Component Access</td>
|
||||
<td bgcolor="#ffc4c4"> <em>`matrix`</em> <b>[</b> @a `exp1`, <em>`exp2`</em> <b>]</b> </td>
|
||||
<td> <em>`matrix`</em> <b>[</b> `exp1`, <em>`exp2`</em> <b>]</b> </td>
|
||||
<td>Reference to component in row <b><em>`exp1`</em></b>, column <b><em>`exp2`</em></b>.
|
||||
Also equal to returning a reference to component at index: <b><em> `[exp1 * dimension + exp2]` </em></b>
|
||||
of @a `matrix` where @a `dimension` is the the size of the matrix</td>
|
||||
Also equal to returning a reference to component at index: <b><em> `[exp1 * dimension + exp2]` </em></b>
|
||||
of `matrix` where `dimension` is the the size of the matrix</td>
|
||||
</tr>
|
||||
</table>
|
||||
@par
|
||||
@@ -1471,11 +1454,11 @@ container.
|
||||
The dot operator <b>.</b> is only valid for vector types. It has the form:
|
||||
@par
|
||||
<table><tr>
|
||||
<td bgcolor="#ffc4c4"> @a `vector` <b>.</b> @a `component` </td>
|
||||
<td> `vector` <b>.</b> `component` </td>
|
||||
</tr></table>
|
||||
@par
|
||||
Where component is one of the below supported component letters. It only provides
|
||||
access for the first three elements of any vector (for @b `vec2` types, only the
|
||||
access for the first three elements of any vector (for `vec2` types, only the
|
||||
first 2 components are accessible). Accessing a vector using the dot operator is
|
||||
fundamentally the same as using the <b>`[]`</b> operator with the corresponding
|
||||
integer index.
|
||||
@@ -1492,12 +1475,12 @@ a_{0}\quad a_{1}\quad a_{2}
|
||||
@f]
|
||||
| Component | Access Index | Result |
|
||||
|:-----------:|:--------------:|:-------------:|
|
||||
| @b `A.x` | 0 | @f$ a_{0} @f$ |
|
||||
| @b `A.r` | 0 | @f$ a_{0} @f$ |
|
||||
| @b `A.y` | 1 | @f$ a_{1} @f$ |
|
||||
| @b `A.g` | 1 | @f$ a_{1} @f$ |
|
||||
| @b `A.z` | 2 | @f$ a_{2} @f$ |
|
||||
| @b `A.b` | 2 | @f$ a_{2} @f$ |
|
||||
| `A.x` | 0 | @f$ a_{0} @f$ |
|
||||
| `A.r` | 0 | @f$ a_{0} @f$ |
|
||||
| `A.y` | 1 | @f$ a_{1} @f$ |
|
||||
| `A.g` | 1 | @f$ a_{1} @f$ |
|
||||
| `A.z` | 2 | @f$ a_{2} @f$ |
|
||||
| `A.b` | 2 | @f$ a_{2} @f$ |
|
||||
</center>
|
||||
@par
|
||||
This operator can provide more immediately readability when working with
|
||||
@@ -1507,12 +1490,12 @@ expressions that focus on colour or Cartesian coordinate systems.
|
||||
The <b>`[]`</b> operator is valid for both vectors and matrices. It has the form:
|
||||
@par
|
||||
<table><tr>
|
||||
<td bgcolor="#ffc4c4"> @a `container` <b>[</b><em>`exp`</em><b>]</b> </td>
|
||||
<td> `container` <b>[</b><em>`exp`</em><b>]</b> </td>
|
||||
</tr></table>
|
||||
@par
|
||||
@a `exp` is expected to evaluate to a value which is castable to an integer
|
||||
`exp` is expected to evaluate to a value which is castable to an integer
|
||||
following the @ref axopassignment "assignment casting" rules and falls within
|
||||
the valid size of the @a `container`. <b>No bounds checking is performed</b>.
|
||||
the valid size of the `container`. <b>No bounds checking is performed</b>.
|
||||
@par
|
||||
As matrices are also an array of contigous values, they can be accessed in the
|
||||
same way. This can make some operations much simplier; a typical example being
|
||||
@@ -1533,16 +1516,16 @@ for (int i = 0; i < 16; ++i) b[i] = i;
|
||||
The <b>`[,]`</b> operator is only valid for matrices. It has the form:
|
||||
@par
|
||||
<table><tr>
|
||||
<td bgcolor="#ffc4c4"> @a `matrix` <b>[</b><em>`exp1`</em>, <em>`exp2`</em><b>]</b> </td>
|
||||
<td> `matrix` <b>[</b><em>`exp1`</em>, <em>`exp2`</em><b>]</b> </td>
|
||||
</tr></table>
|
||||
@par
|
||||
@a `exp1` and @a `exp2` are expected to evaluate to a value which is castable to
|
||||
`exp1` and `exp2` are expected to evaluate to a value which is castable to
|
||||
an integer following the @ref axopassignment "assignment casting" rules and
|
||||
falls within the valid size of the @a `matrix` dimensions. <b>No bounds checking
|
||||
falls within the valid size of the `matrix` dimensions. <b>No bounds checking
|
||||
is performed</b>. In general it is more readable to use this operator when
|
||||
accessing specific elements, where @b `exp1` is the row index and @b `exp2` is
|
||||
accessing specific elements, where `exp1` is the row index and `exp2` is
|
||||
the column index. The tables below show the different access patterns for
|
||||
@b `3x3` and @b `4x4` matrices.
|
||||
`3x3` and `4x4` matrices.
|
||||
@par
|
||||
<!-- A -->@code{.c}
|
||||
mat3f a;
|
||||
@@ -1555,22 +1538,26 @@ for (int i = 0; i < 3; ++i)
|
||||
<tr style="text-align:center">
|
||||
<td style="border:none" colspan=3>
|
||||
@f[
|
||||
{
|
||||
A=\begin{bmatrix}
|
||||
a_{00}\quad a_{01}\quad a_{02}\\
|
||||
a_{10}\quad a_{11}\quad a_{12}\\
|
||||
a_{20}\quad a_{21}\quad a_{22}\\
|
||||
\end{bmatrix}
|
||||
}
|
||||
@f]
|
||||
</td>
|
||||
<td style="border:none"></td>
|
||||
<td style="border:none" colspan=3>
|
||||
@f[
|
||||
{
|
||||
A=\begin{bmatrix}
|
||||
a_{00}\quad a_{01}\quad a_{02}\quad a_{03}\\
|
||||
a_{10}\quad a_{11}\quad a_{12}\quad a_{13}\\
|
||||
a_{20}\quad a_{21}\quad a_{22}\quad a_{23}\\
|
||||
a_{30}\quad a_{31}\quad a_{32}\quad a_{33}\\
|
||||
\end{bmatrix}
|
||||
}
|
||||
@f]
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1584,112 +1571,62 @@ a_{30}\quad a_{31}\quad a_{32}\quad a_{33}\\
|
||||
<th>Result</th>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td><code>A[0]</code></td>
|
||||
<td><code>A[0,0]</code></td>
|
||||
<td>@f$ a_{00} @f$</td>
|
||||
<td><code>A[0]</code></td>
|
||||
<td><code>A[0,0]</code></td>
|
||||
<td>@f$ a_{00} @f$</td>
|
||||
<td>`A[0]`</td><td>`A[0,0]`</td><td>@f$ a_{00} @f$</td>
|
||||
<td>`A[0]`</td><td>`A[0,0]`</td><td>@f$ a_{00} @f$</td>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td><code>A[1]</code></td>
|
||||
<td><code>A[0,1]</code></td>
|
||||
<td>@f$ a_{01} @f$</td>
|
||||
<td><code>A[1]</code></td>
|
||||
<td><code>A[0,1]</code></td>
|
||||
<td>@f$ a_{01} @f$</td>
|
||||
<td>`A[1]`</td><td>`A[0,1]`</td><td>@f$ a_{01} @f$</td>
|
||||
<td>`A[1]`</td><td>`A[0,1]`</td><td>@f$ a_{01} @f$</td>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td><code>A[2]</code></td>
|
||||
<td><code>A[0,2]</code></td>
|
||||
<td>@f$ a_{02} @f$</td>
|
||||
<td><code>A[2]</code></td>
|
||||
<td><code>A[0,2]</code></td>
|
||||
<td>@f$ a_{02} @f$</td>
|
||||
<td>`A[2]`</td><td>`A[0,2]`</td><td>@f$ a_{02} @f$</td>
|
||||
<td>`A[2]`</td><td>`A[0,2]`</td><td>@f$ a_{02} @f$</td>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td><code>A[3]</code></td>
|
||||
<td><code>A[1,0]</code></td>
|
||||
<td>@f$ a_{10} @f$</td>
|
||||
<td><code>A[3]</code></td>
|
||||
<td><code>A[0,3]</code></td>
|
||||
<td>@f$ a_{03} @f$</td>
|
||||
<td>`A[3]`</td><td>`A[1,0]`</td><td>@f$ a_{10} @f$</td>
|
||||
<td>`A[3]`</td><td>`A[0,3]`</td><td>@f$ a_{03} @f$</td>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td><code>A[4]</code></td>
|
||||
<td><code>A[1,1]</code></td>
|
||||
<td>@f$ a_{10} @f$</td>
|
||||
<td><code>A[4]</code></td>
|
||||
<td><code>A[1,0]</code></td>
|
||||
<td>@f$ a_{10} @f$</td>
|
||||
<td>`A[4]`</td><td>`A[1,1]`</td><td>@f$ a_{10} @f$</td>
|
||||
<td>`A[4]`</td><td>`A[1,0]`</td><td>@f$ a_{10} @f$</td>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td><code>A[5]</code></td>
|
||||
<td><code>A[1,2]</code></td>
|
||||
<td>@f$ a_{12} @f$</td>
|
||||
<td><code>A[5]</code></td>
|
||||
<td><code>A[1,1]</code></td>
|
||||
<td>@f$ a_{11} @f$</td>
|
||||
<td>`A[5]`</td><td>`A[1,2]`</td><td>@f$ a_{12} @f$</td>
|
||||
<td>`A[5]`</td><td>`A[1,1]`</td><td>@f$ a_{11} @f$</td>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td><code>A[6]</code></td>
|
||||
<td><code>A[2,0]</code></td>
|
||||
<td>@f$ a_{20} @f$</td>
|
||||
<td><code>A[6]</code></td>
|
||||
<td><code>A[1,2]</code></td>
|
||||
<td>@f$ a_{12} @f$</td>
|
||||
<td>`A[6]`</td><td>`A[2,0]`</td><td>@f$ a_{20} @f$</td>
|
||||
<td>`A[6]`</td><td>`A[1,2]`</td><td>@f$ a_{12} @f$</td>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td><code>A[7]</code></td>
|
||||
<td><code>A[2,1]</code></td>
|
||||
<td>@f$ a_{21} @f$</td>
|
||||
<td><code>A[7]</code></td>
|
||||
<td><code>A[1,3]</code></td>
|
||||
<td>@f$ a_{13} @f$</td>
|
||||
<td>`A[7]`</td><td>`A[2,1]`</td><td>@f$ a_{21} @f$</td>
|
||||
<td>`A[7]`</td><td>`A[1,3]`</td><td>@f$ a_{13} @f$</td>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td><code>A[8]</code></td>
|
||||
<td><code>A[2,2]</code></td>
|
||||
<td>@f$ a_{22} @f$</td>
|
||||
<td><code>A[8]</code></td>
|
||||
<td><code>A[2,0]</code></td>
|
||||
<td>@f$ a_{20} @f$</td>
|
||||
<td>`A[8]`</td><td>`A[2,2]`</td><td>@f$ a_{22} @f$</td>
|
||||
<td>`A[8]`</td><td>`A[2,0]`</td><td>@f$ a_{20} @f$</td>
|
||||
</tr> <!-- ******************** MAT4 DATA ONLY ******************** -->
|
||||
<tr style="text-align:center">
|
||||
<td style="border:none;" colspan="3" rowspan="7"></td>
|
||||
<td><code>A[9]</code></td>
|
||||
<td><code>A[2,1]</code></td>
|
||||
<td>@f$ a_{21} @f$</td>
|
||||
<td style="border:right;" colspan="4" rowspan="7"></td>
|
||||
<td>`A[9]`</td><td>`A[2,1]`</td><td>@f$ a_{21} @f$</td>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td><code>A[10]</code></td>
|
||||
<td><code>A[2,2]</code></td>
|
||||
<td>@f$ a_{22} @f$</td>
|
||||
<td>`A[10]`</td><td>`A[2,2]`</td><td>@f$ a_{22} @f$</td>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td><code>A[11]</code></td>
|
||||
<td><code>A[2,3]</code></td>
|
||||
<td>@f$ a_{23} @f$</td>
|
||||
<td>`A[11]`</td><td>`A[2,3]`</td><td>@f$ a_{23} @f$</td>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td><code>A[12]</code></td>
|
||||
<td><code>A[3,0]</code></td>
|
||||
<td>@f$ a_{30} @f$</td>
|
||||
<td>`A[12]`</td><td>`A[3,0]`</td><td>@f$ a_{30} @f$</td>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td><code>A[13]</code></td>
|
||||
<td><code>A[3,1]</code></td>
|
||||
<td>@f$ a_{31} @f$</td>
|
||||
<td>`A[13]`</td><td>`A[3,1]`</td><td>@f$ a_{31} @f$</td>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td><code>A[14]</code></td>
|
||||
<td><code>A[3,2]</code></td>
|
||||
<td>@f$ a_{32} @f$</td>
|
||||
<td>`A[14]`</td><td>`A[3,2]`</td><td>@f$ a_{32} @f$</td>
|
||||
</tr>
|
||||
<tr style="text-align:center">
|
||||
<td><code>A[15]</code></td>
|
||||
<td><code>A[3,3]</code></td>
|
||||
<td>@f$ a_{33} @f$</td>
|
||||
<td>`A[15]`</td><td>`A[3,3]`</td><td>@f$ a_{33} @f$</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -1703,22 +1640,27 @@ section. They have the following forms:
|
||||
<tr><th>Operator Name</th><th>Operator Syntax</th><th>Returns</th></tr>
|
||||
<tr style="text-align:left">
|
||||
<td>Call / Explicit Cast</td>
|
||||
<td bgcolor="#ffc4c4"> <em>`a`</em><b>`(...)`</b></td>
|
||||
<td> `a(...)` </td>
|
||||
<td>Returns the result of a function call or inbuilt explicit cast</td>
|
||||
</tr>
|
||||
<tr style="text-align:left">
|
||||
<td>Comma</td>
|
||||
<td bgcolor="#ffc4c4"> <em>`a`</em><b>,</b> <em>`b`</em></td>
|
||||
<td>Returns the value of @b `b` after chained evaluation</td>
|
||||
<td> `a, b, ...` </td>
|
||||
<td>Returns the value of the last expression after chained evaluation</td>
|
||||
</tr>
|
||||
<tr style="text-align:left">
|
||||
<td>Ternary Conditional</td>
|
||||
<td bgcolor="#ffc4c4"> <em>`a`</em> <b>`?`</b> <em>`b`</em> <b>`:`</b><em>`c`</em></td>
|
||||
<td>@b `b` if @b `a` is @b true, @b `c` otherwise.</td>
|
||||
<td> `a ? b : c` </td>
|
||||
<td> `b` if `a` is true, `c` otherwise.</td>
|
||||
</tr>
|
||||
<tr style="text-align:left">
|
||||
<td>Ternary Conditional</td>
|
||||
<td> `a ? : c` </td>
|
||||
<td> `a` if `a` is true, `c` otherwise.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Vector/Matrix Initializer</td>
|
||||
<td bgcolor="#ffc4c4"> <b>`{`</b> <em> `a, `</em> `b `<b>`... }`</b> </td>
|
||||
<td>`{ a, b, ... }`</td>
|
||||
<td>Returns a temporary vector or matrix</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -1728,10 +1670,10 @@ The function call operator provides the ability to invoke functions @b or invoke
|
||||
a supported explicit cast. It has the form:
|
||||
@par
|
||||
<table><tr>
|
||||
<td bgcolor="#ffc4c4"> <em> `func(a, b, c, ...)` </em></td>
|
||||
<td> `func(a, b, c, ...)` </td>
|
||||
</tr></table>
|
||||
@par
|
||||
Where @b `func` is a function name @b or a valid explicit cast typename. Explicit
|
||||
Where `func` is a function name @b or a valid explicit cast typename. Explicit
|
||||
casts are only supported for @ref axscalars "scalar types". For example:
|
||||
<!-- A -->@code{.c}
|
||||
int a = int(1.1f);
|
||||
@@ -1740,7 +1682,7 @@ a = int(b.x);
|
||||
@endcode
|
||||
@par
|
||||
Whilst explicit casts take only a single argument, the operator itself supports
|
||||
multiple or empty arguments for function calls. Whe multiple arguments are
|
||||
multiple or empty arguments for function calls. When multiple arguments are
|
||||
provided, they are parsed from first to last and processed in reverse order.
|
||||
@b However, the order of runtime evaluation is @b unspecified i.e. they may
|
||||
evaluate in any order. Each function parameter is initialized with its
|
||||
@@ -1753,10 +1695,10 @@ functions.
|
||||
The Comma operator has the form:
|
||||
@par
|
||||
<table><tr>
|
||||
<td bgcolor="#ffc4c4"><em>`a`</em><b>`,` </b><em>`b`</em></td>
|
||||
<td>`a, b, ...`</td>
|
||||
</tr></table>
|
||||
@par
|
||||
Where @b `a` and @b `b` are expressions. Chained expressions evaluate each
|
||||
Where `a` and `b` are expressions. Chained expressions evaluate each
|
||||
expression in syntactical order (first to last), discarding any return value
|
||||
except for the last expression, which is returned from the entire list. Note that
|
||||
although return values for any expression but the last are discarded, their side
|
||||
@@ -1780,32 +1722,33 @@ The ternary conditional operator can be thought of as an in-line @ref axbranchin
|
||||
a single expression that will be returned. It has the form:
|
||||
@par
|
||||
<table><tr>
|
||||
<td bgcolor="#ffc4c4"><em>`a`</em> <b>`?`</b> <em>`b`</em> <b>`:`</b><em>`c`</em></td>
|
||||
<td>`a ? b : c`</td>
|
||||
</tr></table>
|
||||
Where @b `a` is the condition, evaluated and converted to @b bool, and @b `b` and @b
|
||||
`c` are expressions of the same or implicit-castable types. @b `b` is evaluated and
|
||||
returned if the condition is @b true, @b `c` is evaluated and returned if the
|
||||
condition is @b false. Only the expression out of @b `b` and @b `c` that is
|
||||
returned will be evaluated. Expressions with no return value (a.k.a @b `void`)
|
||||
are supported as long as @b `b` and @b `c` are both of this type.
|
||||
@par
|
||||
Also supported is the 'Elvis' operator, <b>`a` `?` `:` `c`</b> (or `?:`).
|
||||
Here, @b `a` is evaluated once, and if when converted to @b bool is @b true, @b `a` is
|
||||
returned, otherwise @b `c` is evaluated and returned. In this case, @b `a` and @b
|
||||
Where `a` is the condition, evaluated and converted to @b bool, and `b` and
|
||||
`c` are expressions of the same or implicit-castable types. `b` is evaluated and
|
||||
returned if the condition is @b true, `c` is evaluated and returned if the
|
||||
condition is @b false. Only the expression out of `b` and `c` that is
|
||||
returned will be evaluated. Expressions with no return value (a.k.a `void`)
|
||||
are supported as long as `b` and `c` are both of this type.
|
||||
@par
|
||||
Also supported is the 'Elvis' operator, `a ? : c` (or `?:`).
|
||||
Here, `a` is evaluated once, and if when converted to @b bool is @b true, `a` is
|
||||
returned, otherwise `c` is evaluated and returned. In this case, `a` and
|
||||
`c` must be the same or implicit-castable types, and both implicit-castable to @b bool.
|
||||
|
||||
@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
|
||||
`vec3f`), external attributes or parameters (e.g. `vec3f@attrib`) or as
|
||||
temporary values using the vector/matrix initializer syntax. This operator has
|
||||
the form:
|
||||
@par
|
||||
<table><tr>
|
||||
<td bgcolor="#ffc4c4"> <b>`{`</b> <em>`a, b `</em><b>`... }`</b> </td>
|
||||
<td> `{ a, b, ... }`</td>
|
||||
</tr></table>
|
||||
@par
|
||||
Where @b `a` and @b `b` are expressions returning a scalar value. When this
|
||||
Where `a` and `b` are expressions returning a scalar value. When this
|
||||
operator is invoked with a specific number of arguments, a vector or matrix is
|
||||
implicitly created with a copy of those arguments which can be assigned to an
|
||||
existing container of matching size. Expression in the operator are evaluated
|
||||
@@ -1833,7 +1776,7 @@ The temporary container evaluates all expressions and uses the @b highest rankin
|
||||
type (as defined by @ref axtypeprecedence "arithmetic type precedence") to infer
|
||||
the element type of the container, implicitly casting all other types to that
|
||||
type where necessary. In the above example, the temporary created forms a
|
||||
@b `mat3d`, before being implicitly cast to a @b `mat3f` due to the assignment.
|
||||
`mat3d`, before being implicitly cast to a `mat3f` due to the assignment.
|
||||
|
||||
|
||||
@subsection axopprecedence Operator Precedence
|
||||
@@ -2004,10 +1947,10 @@ can be used to assign any scalar a value.
|
||||
@par
|
||||
<table>
|
||||
<tr><th>Type</th><th>Literal Tokens</th></tr>
|
||||
<tr><td>`bool`</td><td>Tokens @b `true` and @b `false`</td></tr>
|
||||
<tr><td>`bool`</td><td>Tokens `true` and `false`</td></tr>
|
||||
<tr><td>`int32`</td><td>No suffix, automatically infered from integral literals</td></tr>
|
||||
<tr><td>`int64`</td><td>The letter @b `l` e.g. @code int64 a = 10l; @endcode</td></tr>
|
||||
<tr><td>`float`</td><td>The letter @b `f` e.g. @code float a = 0.0f; @endcode</td></tr>
|
||||
<tr><td>`int64`</td><td>The letter `l` e.g. @code int64 a = 10l; @endcode</td></tr>
|
||||
<tr><td>`float`</td><td>The letter `f` e.g. @code float a = 0.0f; @endcode</td></tr>
|
||||
<tr><td>`double`</td><td>No suffix, automatically infered from floating point literals.</td></tr>
|
||||
<tr><td>`string`</td><td>Character strings wrapped in double quotes @b \" @b \"</td></tr>
|
||||
</table>
|
||||
@@ -2025,7 +1968,6 @@ can be used to assign any scalar a value.
|
||||
@subsection axattribaccess Attribute Access
|
||||
<!-- codecs not supported, how are points and volumes sampled (point vs volume) -->
|
||||
|
||||
<!--
|
||||
Further, the active states of
|
||||
OpenVDB voxels change which voxels AX will process. The defined behavior for all
|
||||
cases is shown below.
|
||||
@@ -2064,8 +2006,6 @@ foreach(ActiveVoxel in surface)
|
||||
DensityIndexSpaceCoord = density.transformToIndex(SurfaceWorldSpaceCoord);
|
||||
ActiveVoxel = density.getValue(DensityIndexSpaceCoord);
|
||||
@endcode
|
||||
done()
|
||||
-->
|
||||
|
||||
|
||||
@subsection axexternalaccess External Parameter Access
|
||||
@@ -2108,6 +2048,4 @@ AX Roadmap as a near future feature.
|
||||
|
||||
@section axvexsupport AX VEX Support
|
||||
|
||||
</div>
|
||||
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
/**
|
||||
<div style="width:800px;text-align:justify;">
|
||||
|
||||
@page axcplusplus OpenVDB AX
|
||||
@page axcplusplus AX C++ Documentation
|
||||
|
||||
@section axcdocs AX C++ Documentation
|
||||
@section axcdocs Intro
|
||||
@par
|
||||
The following documentation focuses on the C++ design and API of OpenVDB AX,
|
||||
@b not the front end AX language. For the latter, see the
|
||||
@@ -27,7 +26,6 @@ API doxygen comments or contact us for more information.
|
||||
- @ref vdbaxcompiler
|
||||
- @ref vdbaxbinary
|
||||
- @ref vdbaxtoaxtypes
|
||||
- @ref vdbaxextend
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -118,7 +116,7 @@ parser is accessed through the @b ast module.
|
||||
@par
|
||||
The @b ast module provides:
|
||||
- The complete implemenation of an @ref AST.h "AX abstract syntax tree"
|
||||
- The openvdb::ax::ast::parse() method
|
||||
- The @vdblink::ax::ast::parse ax::ast::parse()@endlink method
|
||||
- The @vdblink::ax::ast::Visitor AST Visitor@endlink
|
||||
- AST scanners and tools
|
||||
@par
|
||||
@@ -128,7 +126,7 @@ The complete AST hierarchy is visualized by the @vdblink::ax::ast::Node doxygen
|
||||
class graph for an openvdb::ax::ast::Node@endlink, which represents the top most
|
||||
node in the AST. The AST API exists in a nested namespace (`openvdb::ax::ast`)
|
||||
and can be used by clients for more granular control and modifications to an AST.
|
||||
Importantly, the AST API contains the openvdb::ax::ast::parse() method, which
|
||||
Importantly, the AST API contains the `openvdb::ax::ast::parse()` method, which
|
||||
invokes the C/C++ functions built by the grammar to iteratively construct an
|
||||
AST from a provided character string.
|
||||
@par
|
||||
@@ -139,7 +137,7 @@ branches. All these methods use the @vdblink::ax::ast::Visitor AX visitor
|
||||
framework@endlink, a visitor pattern traversal class strongly influenced by
|
||||
<A HREF="https://clang.llvm.org/doxygen/classclang_1_1RecursiveASTVisitor.html">
|
||||
Clang's RecursiveVisitor</A>. Clients can use the AX visitor to implement their
|
||||
own AST analysis or modifications (see @ref vdbaxextend).
|
||||
own AST analysis or modifications.
|
||||
|
||||
@subsubsection vdbaxastscanners Scanners
|
||||
@par
|
||||
@@ -285,11 +283,11 @@ AX ASTs to verify access patterns of your data.
|
||||
@subsubsection vdbaxcompilercustomdata Custom Data
|
||||
@par
|
||||
The AX language provides two main tokens to access memory which has not been
|
||||
allocated by AX itself. The first token, @b \@ (the "at" symbol), is designed to
|
||||
allocated by AX itself. The first token, `@` (the "at" symbol), is designed to
|
||||
provide read/write access to geometry attributes. The second token is the dollar
|
||||
character @b $. This allows <b>read only</b> access to custom data that can be
|
||||
character `$`. This allows <b>read only</b> access to custom data that can be
|
||||
modified in C++ i.e. outside the scope of an AX program. In the same way as the
|
||||
@b \@attribute syntax, the value of this data can change without the need for AX
|
||||
`@attribute` syntax, the value of this data can change without the need for AX
|
||||
to re-compile the program. It is, however, solely on the C++ clients of AX to
|
||||
make sure that this data is setup correctly when integrating AX into their
|
||||
applications.
|
||||
@@ -487,10 +485,9 @@ Vec4IGrid::registerGrid();
|
||||
@endcode
|
||||
|
||||
<hr>
|
||||
@section vdbaxextend Extending OpenVDB AX
|
||||
<!--@section vdbaxextend Extending OpenVDB AX-->
|
||||
<!--@subsection vdbaxcustomtraversal Custom AST Traversal-->
|
||||
<!--@subsection vdbaxcustomtraversal Designing an Executable-->
|
||||
<!--@subsection vdbaxcustomtraversal Geometry Callbacks-->
|
||||
<!--@subsection vdbaxcustomtraversal Custom Code Generation-->
|
||||
</div>
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/**
|
||||
<div style="width:800px;text-align:justify;">
|
||||
|
||||
@page axexamples AX Code Examples
|
||||
|
||||
@@ -30,12 +29,12 @@ These examples demonstrate how to use AX on OpenVDB points grids.
|
||||
@subsection axexamplepointbasic Basic point attributes
|
||||
@par
|
||||
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.
|
||||
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: `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.
|
||||
a `vec3f` float attribute @b velocity and a `vec3f` float attribute @b colour.
|
||||
@par
|
||||
This snippet uses the functions @ref axlength "length" and @ref axfit "fit" to
|
||||
give points a colour between black and white based on their speed.
|
||||
@@ -68,8 +67,8 @@ special attribute.
|
||||
@subsection axexamplepointdelete Deleting Points
|
||||
@par
|
||||
This example demonstrates a simple way of removing points from a VDB points grid.
|
||||
It uses a combination of @ref axrand and @ref axdeletepoint to randomly delete
|
||||
roughly half of the points in the input VDB points grid.
|
||||
It uses a combination of @ref axrand "rand()" and @ref axdeletepoint "deletepoint()"
|
||||
to randomly delete roughly half of the points in the input VDB points grid.
|
||||
@par
|
||||
<!-- P -->@code{.c}
|
||||
float threshold = 0.5f;
|
||||
@@ -83,7 +82,7 @@ if (rand(int64@id) > threshold) {
|
||||
@endcode
|
||||
@par
|
||||
The @b id attribute in this example is assumed to be a unique @b integer for
|
||||
each point in the VDB points grid such that @ref axrand will receive a
|
||||
each point in the VDB points grid such that @ref axrand "rand()" will receive a
|
||||
different seed value per point producing a good distribution of random values.
|
||||
|
||||
@subsection axexamplepointdrag Applying Drag
|
||||
@@ -114,7 +113,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 `v@P`. Whenever position is written to in this way, the AX
|
||||
`PointExecutable` will move (re-bucket) points in PointDataGrids.
|
||||
|
||||
@subsection axexamplepointcurlnoise Curl Noise
|
||||
@@ -198,12 +197,12 @@ These examples demonstrate how to use AX on VDB volume grids.
|
||||
@subsection axexamplevolumeclamp Volume Clamping
|
||||
@par
|
||||
Below is a small example of reading adn writing to voxels within a VDB volume.
|
||||
As with points, the @ symbol specifies an access to a named volume, with the
|
||||
As with points, the `@` symbol specifies an access to a named volume, with the
|
||||
type of each volume preceding it and the name appearing as a suffix. For
|
||||
example: `float@density` would imply a @b float volume called @b density.
|
||||
@par
|
||||
This snippet uses @ref axclamp function to constrain the @b density attribute
|
||||
between zero and one.
|
||||
This snippet uses @ref axclamp "clamp()" function to constrain the @b density
|
||||
attribute between zero and one.
|
||||
@par
|
||||
<!-- V -->@code{.c}
|
||||
float@density = clamp(float@density, 0.f, 1.f);
|
||||
@@ -234,10 +233,10 @@ 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 `@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.
|
||||
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.
|
||||
@par
|
||||
<!-- V -->@code{.c}
|
||||
// time constants for each run.
|
||||
@@ -263,5 +262,4 @@ mask = clamp(mask, 0.0f, 1.0f);
|
||||
@surface_a = a + (b-a) * mask;
|
||||
@endcode
|
||||
|
||||
</div>
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/**
|
||||
<div style="width:800px;text-align:justify;">
|
||||
|
||||
@page axfunctionlist AX Supported Functions
|
||||
|
||||
@@ -721,7 +720,7 @@ double(int64 seed);
|
||||
@anchor axrand32
|
||||
@par rand32
|
||||
Creates a random number based on the provided 32 bit seed. The number will be in the range of 0 to
|
||||
1. The same number is produced for the same seed. NOTE: This function does not share the same
|
||||
1\. The same number is produced for the same seed. NOTE: This function does not share the same
|
||||
random number generator as rand(). rand32() may provide a higher throughput on some
|
||||
architectures, but will produce different results to rand(). NOTE: If rand32 is called without
|
||||
a seed the previous state of the random number generator is advanced for the currently
|
||||
@@ -881,6 +880,4 @@ int64(int64 dividend; int64 divisor);
|
||||
int32(int32 dividend; int32 divisor);
|
||||
@endcode
|
||||
|
||||
|
||||
</div>
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/**
|
||||
<div style="width:800px;text-align:justify;">
|
||||
|
||||
@page openvdbax OpenVDB AX
|
||||
|
||||
@@ -41,7 +40,7 @@ provided:
|
||||
@par
|
||||
- @subpage axexamples "Code Examples" for examples of OpenVDB AX in action.
|
||||
- @subpage axfunctionlist "AX Functions" for a list of all available AX functions.
|
||||
- @subpage build "Building OpenVDB" and @subpage dependencies "OpenVDB Dependencies" for information on building OpenVDB and <b>OpenVDB AX</b>.
|
||||
- @ref build "Building OpenVDB" and @ref dependencies "OpenVDB Dependencies" for information on building OpenVDB and <b>OpenVDB AX</b>.
|
||||
|
||||
</div>
|
||||
*/
|
||||
|
||||
@@ -238,8 +238,8 @@ 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 | 21.0 | 12 |
|
||||
|
||||
@subsection buildBuildHou Building Against Houdini
|
||||
|
||||
@@ -257,12 +257,10 @@ CMake | Cross-platform family of tools designed to help build software
|
||||
C++17 Compiler | Matching Houdini compiler and version | All |
|
||||
Boost | Components: iostreams | 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
|
||||
@@ -290,7 +288,7 @@ Required:
|
||||
|
||||
Optional:
|
||||
|
||||
- @b [CMAKE_INSTALL_PREFIX](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html)
|
||||
- [CMAKE_INSTALL_PREFIX](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html)
|
||||
=`/path/to/install/dir` # The location you wish to install OpenVDB to. See
|
||||
the link for default values.
|
||||
- @b OPENVDB_HOUDINI_INSTALL_PREFIX =`/path/to/install/dir` # The location to
|
||||
@@ -349,14 +347,12 @@ Boost | Components: iostreams
|
||||
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 |
|
||||
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 |
|
||||
OpenEXR | EXR serialization support | OpenVDB Render |
|
||||
Imath | 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 |
|
||||
|
||||
|
||||
@@ -385,7 +381,7 @@ Required:
|
||||
|
||||
Optional:
|
||||
|
||||
- @b [CMAKE_INSTALL_PREFIX](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html)
|
||||
- [CMAKE_INSTALL_PREFIX](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html)
|
||||
=`/path/to/install/dir` # The location you wish to install OpenVDB to. See
|
||||
the link for default values.
|
||||
- @b OPENVDB_MAYA_INSTALL_PREFIX =`/path/to/install/dir` # The location to
|
||||
@@ -453,7 +449,7 @@ Now you can call CMake by providing the absolute or relative path to the root
|
||||
of the OpenVDB source tree. Below are some common options you may want to
|
||||
provide:
|
||||
|
||||
- @b [CMAKE_INSTALL_PREFIX](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html)
|
||||
- [CMAKE_INSTALL_PREFIX](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html)
|
||||
=`/path/to/install/dir` # The location you wish to install OpenVDB to. See
|
||||
the link for default values.
|
||||
- @b Xxx_ROOT =`/path/to/Xxx/` # Give CMake a path to where a package has been
|
||||
@@ -512,7 +508,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.24)
|
||||
list(APPEND CMAKE_MODULE_PATH "/location/of/openvdb/install/lib/cmake/OpenVDB")
|
||||
find_package(OpenVDB REQUIRED)
|
||||
target_link_libraries(myapp OpenVDB::openvdb)
|
||||
@@ -583,8 +579,7 @@ bypass these checks with `-D DISABLE_DEPENDENCY_VERSION_CHECKS=ON` if necessary.
|
||||
Note that using older or untested dependencies may produce undesired behavior.
|
||||
Older versions in particular are not supported by OpenVDB.
|
||||
|
||||
@b Note: Boost will produce a version error in the format `Detected version of
|
||||
Boost is too old.`
|
||||
@b Note: Boost will produce a version error in the format: `Detected version of Boost is too old.`
|
||||
|
||||
@subsection troubleshoot3 CMake warnings/errors in FindBoost.cmake
|
||||
|
||||
@@ -605,10 +600,12 @@ 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.84 requires CMake 3.28.2 or newer.
|
||||
- Boost 1.85 requires CMake 3.29.3 or newer.
|
||||
- Boost 1.86 requires CMake 3.30.6, 3.31.1, or newer.
|
||||
- Boost 1.87 requires CMake 3.31.4 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.
|
||||
@@ -634,9 +631,9 @@ Note that you can provide a value for `CMAKE_MSVC_RUNTIME_LIBRARY` which is a
|
||||
native CMake variable to override any CRT selection done by OpenVDB.
|
||||
|
||||
For more information, see the following articles:
|
||||
Description of CRT selection: https://docs.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library
|
||||
In depth descriptopn of the CRT on Windows: https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features
|
||||
Related errors: https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk2038
|
||||
- Description of CRT selection: https://docs.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library
|
||||
- In depth descriptopn of the CRT on Windows: https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features
|
||||
- Related errors: https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk2038
|
||||
`CMAKE_MSVC_RUNTIME_LIBRARY` docs: https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html
|
||||
|
||||
@subsection troubleshoot5 Unexpected value for the Windows CRT with target build artifacts.
|
||||
@@ -658,9 +655,9 @@ usage, it is strongly encouraged to match the selection against your desired
|
||||
build type.
|
||||
|
||||
For more information, see the following articles:
|
||||
Description of CRT selection: https://docs.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library
|
||||
In depth descriptopn of the CRT on Windows: https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features
|
||||
Related errors: https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk2038
|
||||
- Description of CRT selection: https://docs.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library
|
||||
- In depth descriptopn of the CRT on Windows: https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features
|
||||
- Related errors: https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk2038
|
||||
`CMAKE_MSVC_RUNTIME_LIBRARY` docs: https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html
|
||||
|
||||
@subsection troubleshoot6 error LNK2038: mismatch detected for 'RuntimeLibrary'
|
||||
|
||||
@@ -2,9 +2,322 @@
|
||||
|
||||
@page changes Release Notes
|
||||
|
||||
@htmlonly <a name="v12_0_2_changes"></a>@endhtmlonly
|
||||
@htmlonly <a name="v13_0_1_changes"></a>@endhtmlonly
|
||||
@par
|
||||
<B>Version 12.0.2</B> - <I>In development</I>
|
||||
<B>Version 13.0.1</B> - <I>In Development</I>
|
||||
|
||||
@htmlonly <a name="v13_0_0_changes"></a>@endhtmlonly
|
||||
@par
|
||||
<B>Version 13.0.0</B> - <I>November 3, 2025</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>, where, for example,
|
||||
<I>N</I> is 11 for Houdini 20.5 and 12 for Houdini 21.0.
|
||||
</BLOCKQUOTE>
|
||||
|
||||
@par
|
||||
<BLOCKQUOTE>
|
||||
Support for reading <TT>.vdb</TT> files written prior to VDB 1.0 has been
|
||||
removed. To read older <TT>.vdb</TT> files, please use VDB 12.x or older
|
||||
and re-write them, so that they use the newer file format and can be read in
|
||||
VDB 13+.
|
||||
</BLOCKQUOTE>
|
||||
|
||||
@par
|
||||
Highlights:
|
||||
- OpenVDB now includes in-memory support for Half Grids and the file format
|
||||
has been extended to add I/O serialization for half grids. More work is
|
||||
planned on adapting algorithms when using Half Grids for better performance
|
||||
and improved precision.
|
||||
- NanoVDB is no longer limited to static applications, such as rendering, but
|
||||
can increasingly be applied to problems that involve dynamic topology, such
|
||||
as level set tracking, grid building, morphology operations and merging of
|
||||
grids. This is due to the fact that we keep adding more and more tools to
|
||||
NanoVDB that facilitates tree modification. However, unlike OpenVDB, these
|
||||
operations generate new NanoVDB grids (as oppose to in-palace modifications
|
||||
in OpenVDB), yet are typically much faster since they are performed on the
|
||||
GPU. Many of these exciting new features are the foundation of fVDB.
|
||||
|
||||
@par
|
||||
OpenVDB:
|
||||
- New features:
|
||||
- Added native registration of HalfGrid type.
|
||||
- Added customization of the output transformation attribute for
|
||||
@vdblink::points::pca points::pca@endlink. Can be output as a quaternion
|
||||
or as a combined affine transform with the scale/stretch ommitted.
|
||||
- Added support for input quaternions attributes and affine transformations
|
||||
(that include scale) in
|
||||
@vdblink::points::rasterizeSdf points::rasterizeSdf@endlink for
|
||||
ellipsoidal rasterizations.
|
||||
|
||||
- API Changes:
|
||||
- Added @vdblink::tree::LeafBuffer::storage() LeafBuffer::storage()@endlink
|
||||
for direct const access to the raw data buffer when using the bool LeafNode.
|
||||
- Removed Grid::evalMinMax(), use
|
||||
@vdblink::tools::minMax tools::minMax@endlink for superior threaded
|
||||
performance.
|
||||
- Removed points::rasterize() that took a custom filter and interrupter.
|
||||
- Removed LeafNodeBool TopologyCopy constructor in favor of using explicit
|
||||
mask/buffer constructors.
|
||||
- Removed @vdblink::tree::ValueAccessor ValueAccessor@endlink NodeT0,
|
||||
NodeT1, NodeT2 aliases, use NodeTypeAtLevel instead.
|
||||
- Add @vdblink::tree::InternalNode::setValueMaskUnsafe() InternalNode::setValueMaskUnsafe()@endlink
|
||||
to write a value mask directly.
|
||||
- LegacyFrustum and RootNodeMask have been removed. These classes were
|
||||
only used for reading old .vdb files, which is no longer supported.
|
||||
- @vdblink::io::writeCompressedValues() io::writeCompressedValues()@endlink
|
||||
now takes a const ValueT* source buffer for improved const-correctness.
|
||||
|
||||
- Bug Fixes:
|
||||
- Fix a bug in the
|
||||
@vdblink::tools::LevelSetRayIntersector LevelSetRayIntersector@endlink class
|
||||
where two of the methods were incorrectly adjusting the time even when an
|
||||
intersection was not found.
|
||||
- Fixed an assertion in @vdblink::math::Quat math::Quat@endlink where a
|
||||
vector length check was using too small a tolerance.
|
||||
- Fixed a bug in the unit tests where detecting if assertions were enabled
|
||||
was using @c NDEBUG rather than OpenVDB assertions.
|
||||
|
||||
- Build:
|
||||
- Removed the unnecessary @c USE_NUMPY build option for the OpenVDB Python
|
||||
module. All functions which take numpy arrays are now always generated
|
||||
(numpy is not required at compile time for this support).
|
||||
- Bumped minimum supported CMake version to 3.24, and new future minimum to
|
||||
4.0.0.
|
||||
- Bumped minimum supported OpenEXR and Imath versions to 3.2, and new
|
||||
future minimum to 3.3.
|
||||
- Bumped minimum supported Boost version to 1.82, and new future minimum to
|
||||
1.85.
|
||||
- Bumped minimum supported Python version to 3.11
|
||||
- Bumped minimum supported Log4cplus version to 2.0
|
||||
- Bumped minimum supported Houdini version to 20.5
|
||||
- Bumped minimum supported GLFW version to 3.3
|
||||
- Bumped future minimum for TBB to 2021 (oneapi).
|
||||
- Bumped future minimum for nanobind to 2.5.0.
|
||||
|
||||
@par
|
||||
OpenVDB AX:
|
||||
- New:
|
||||
- Added support for LLVM 21.
|
||||
|
||||
@par
|
||||
NanoVDB:
|
||||
- Highlights:
|
||||
- NanoVDB is no longer limited to static applications, such as rendering,
|
||||
but can increasingly be applied to problems that involve dynamic topology,
|
||||
such as level set tracking, grid building, morphology operations and
|
||||
merging of grids. This is due to the fact that we keep adding more and
|
||||
more tools to NanoVDB that facilitates tree modification. However, unlike
|
||||
OpenVDB, these operations generate new NanoVDB grids (as oppose to
|
||||
in-palace modifications in OpenVDB), yet are typically much faster since
|
||||
they are performed on the GPU. Many of these exciting new features are the
|
||||
foundation of fVDB.
|
||||
|
||||
- New features:
|
||||
- Added <TT>nanovdb/tools/cuda/DilateGrid.cuh</TT>, which performs topology
|
||||
dilation on the GPU.
|
||||
- Added <TT>nanovdb/tools/cuda/MergeGrids.cuh</TT>, which merges the topology
|
||||
of two grids on the GPU.
|
||||
- Added <TT>nanovdb/tools/cuda/CoarsenGrid.cuh</TT>, which performs topological
|
||||
coarsening of grids on the GPU.
|
||||
- Added <TT>nanovdb/tools/cuda/RefineGrid.cuh</TT>, which performs topological
|
||||
refinement of grids on the GPU.
|
||||
- Added <TT>nanovdb/tools/cuda/PruneGrid.cuh</TT>, which prunes the topology of
|
||||
a grid using a sidecar mask on the GPU.
|
||||
- Added <TT>nanovdb/util/cuda/Injection.cuh</TT>, which facilitates sidecar
|
||||
data copying - on the GPU - in the overlap of two grids with different
|
||||
topology.
|
||||
- Added Mat classes and other math types to NanoVDB.
|
||||
- Major rewrite of nanovdb::NanoToOpenVDB, which now allows
|
||||
nanovdb::IndexGrids and blind (or sidecar) data to be converted into
|
||||
an openvdb grid.
|
||||
- Added support for LevelSet, FogVolume, and Staggered grid semantics.
|
||||
Added toGridClass and toSemantic to map Grid Blind data semantic to
|
||||
Grid class and vice versa.
|
||||
|
||||
- Improvements:
|
||||
- Improvements to mGPU grid building and introduction of a separate test
|
||||
executable for mGPU tests
|
||||
- Added stand-alone function nanovdb::writeUncompressedGrid that allows
|
||||
nanovdb::IndexGrids and blind (or sidecar) data to be written directly
|
||||
to a stream.
|
||||
- @c nanovdb_print now (optionally) prints the blind data count per grid.
|
||||
- Extended nanovdb::GridBlindDataSemantic with nanovdb::GridClass types
|
||||
to support conversion between IndexGrid and regular grids.
|
||||
- Improvements and bugfixes to PNanoVDB.
|
||||
|
||||
- API Changes:
|
||||
- Removed nanovdb::ValueIndexMask and nanovdb::ValueOnIndexMask since
|
||||
they are no longer used by fVDB (or elsewhere).
|
||||
- NanoVDB version is now 32.9.0, so the ABI of the grid is preserved
|
||||
but not the API. However, the API changes are very minor!
|
||||
|
||||
- Bug Fixes:
|
||||
- Several fixes for compiler warnings.
|
||||
- Fixed error in <TT>nanovdb/io/IO.h</TT> related to missing throws.
|
||||
|
||||
@par
|
||||
Houdini:
|
||||
- Remove support for openvdb_houdini::Interrupter, use
|
||||
openvdb_houdini::HoudiniInterrupter instead.
|
||||
- Remove input-stealing via duplicateSourceStealable(), SideFX have since
|
||||
introduced verbification and compiled SOPs to provide zero-copy node
|
||||
evaluation.
|
||||
|
||||
|
||||
@htmlonly <a name="v12_1_1_changes"></a>@endhtmlonly
|
||||
@par
|
||||
<B>Version 12.1.1</B> - <I>September 30, 2025</I>
|
||||
|
||||
@par
|
||||
OpenVDB AX:
|
||||
- Fixes:
|
||||
- Fixed an issue which was causing host specific optimization passes to be
|
||||
omitted when using LLVM 16 and higher.
|
||||
|
||||
@par
|
||||
Houdini:
|
||||
- Fixed a compilation issue with the OpenVDB Activate SOP with Houdini 21
|
||||
[Reported by \@callen128]
|
||||
|
||||
|
||||
@htmlonly <a name="v12_1_0_changes"></a>@endhtmlonly
|
||||
@par
|
||||
<B>Version 12.1.0</B> - <I>August 8, 2025</I>
|
||||
|
||||
@par
|
||||
OpenVDB:
|
||||
- New features:
|
||||
- New level set constructor tools::createLevelSetCapsule creates a grid
|
||||
containing a narrow-band level set representation of a capsule (tube
|
||||
with constant radius and sphere caps).
|
||||
- New level set constructor tools::createLevelSetTaperedCapsule creates a
|
||||
grid containing a narrow-band level set representation of a tapered
|
||||
capsule (tube with sphere caps and different radii at both ends, or
|
||||
equivalently the convex hull of two spheres with possibly different
|
||||
centers and radii).
|
||||
- New level set constructor tools::createLevelSetTubeComplex creates a grid
|
||||
containing a narrow-band level set representation of a tube complex (a
|
||||
collection of capsules or tapered capsules defined by endpoint coordinates
|
||||
and segment indices).
|
||||
- New level set constructor tools::createLevelSetDilatedMesh creates a grid
|
||||
containing a narrow-band level set representation of a dilated surface
|
||||
mesh (dilated by a radius in all directions).
|
||||
- New class tools::ConvexVoxelizer, used by the above methods, which can be
|
||||
inherited to implement a convex level set constructor.
|
||||
- Introduced anisotropic surfacing tools in points/PointRasterizeSDF.h and
|
||||
principal component analysis (PCA) methods in points/PrincipalComponentAnalysis.h.
|
||||
The latter tool analyses point neighborhoods and computes affine
|
||||
transformations representing elliptical distributions. The prior tool
|
||||
takes rotational and stretch point attributes (optionally computed from
|
||||
the prior PCA methods) and generates anisotropic surfaces.
|
||||
|
||||
- Improvements:
|
||||
- Significantly improved the performance of all LeafNode ValueIterators,
|
||||
up to 5x on some platforms and up to 10x when delay loading is enabled.
|
||||
Construction of a ValueIterator from a leaf node now requests the leaf
|
||||
buffers ahead of iteration to avoid potentially expensive API calls.
|
||||
- Improved the performance of PointRasterizeSDF.h tools with larger radii
|
||||
with better bound computation approximations.
|
||||
- Significant performance improvement to delay loaded files - the warning
|
||||
logic which checks the underlying mapped file for the last modified time
|
||||
has been removed, resulting in performance gains upwards of 10x when
|
||||
loading in node data buffers. Note that the check that was removed is
|
||||
entirely redundant on Windows and would only print a warning on other
|
||||
system.
|
||||
[Contributed by jjtParadox]
|
||||
- Added OPENVDB_HAS_INVOKABLE_MEMBER_FUNCTION and OPENVDB_HAS_MEMBER_FUNCTION
|
||||
macros to help determine the presence and compatibility of interface
|
||||
member functions at compile time.
|
||||
- Added OPENVDB_ASSUME macros to mimic builtin assume and C++23 assume
|
||||
attributes.
|
||||
- Improved read and write of PLY files with vdb_tool so they support Vec3d
|
||||
and 64 bit attributes. Changed vdb_tool version number from 10.6.1 to
|
||||
10.7.0.
|
||||
|
||||
- API Changes:
|
||||
- Mat3 and Mat4 functions have been marked [[nodiscard]] where it may be
|
||||
confusing if they are operating in place or returning a result, in
|
||||
particular tranpose, invert, adjoint, and timesDiagonal.
|
||||
- Re-worked the API in PointRasterizeSDF.h with the addition of anisotropic
|
||||
surfacing kernels. The new API exposes more concise free functions which
|
||||
take structs of parameters. The old API remains supported but is
|
||||
deprecated.
|
||||
- Deprecated providing a filter or interrupter as arguments to
|
||||
points::rasterize. These can instead be implemented on user transfer
|
||||
schemes.
|
||||
- Transfer schemes provided to points::rasterize can now optionally
|
||||
implement a rasterizePoints callback that takes a range of points per
|
||||
voxel.
|
||||
|
||||
- Fixes:
|
||||
- Fixed a bug in points::rasterizeSpheres and points::rasterizeSmoothSpheres
|
||||
which could cause sections of the generated surface to incorrectly be
|
||||
marked as negative interior values.
|
||||
- Fixed a bug in points::rasterizeSmoothSpheres which could result in
|
||||
incomplete surface reconstruction with significantly larger search
|
||||
distances.
|
||||
- Fixed some precision issues in various Matrix methods.
|
||||
- Fixed bugs in vdb_tool that prevented build with newer namespaces in
|
||||
nanovdb.
|
||||
|
||||
@par
|
||||
OpenVDB AX:
|
||||
- Improvements:
|
||||
- Added support for LLVM versions greater than 15. Upgraded CI to test with
|
||||
LLVM versions 16, 17, 18, 19 and 20.
|
||||
- As of this release, LLVM 15 is the minimum required version for OpenVDB
|
||||
AX. Note that there is an issue with LLVM 17 symbols which makes it
|
||||
incompatible with the OpenVDB Python plugin. AS such, LLVM version 18 and
|
||||
greater are the recommended LLVM versions to use, with LLVM 18 being the
|
||||
new future minimum version.
|
||||
- Significant performance improvement to the compilation of AX kernels when
|
||||
using LLVM 18 and greater.
|
||||
- Significant backend refactoring to AX IR generation to support newer
|
||||
versions of LLVM. In particular, parts of the codegen::Function and
|
||||
codegen::FunctionBuilder API require new usage from LLVM 16 due to
|
||||
the LLVM opaque pointer changes. If you're not using the OpenVDB AX
|
||||
Function codegen API then no client changes should be necessary.
|
||||
- Migrated OpenVDB AX unit tests from cppunit to gtest
|
||||
[Contributed by Tim Straubinger]
|
||||
|
||||
- Fixes:
|
||||
- Fixed a case of undefined behaviour when explicitly casting variables to
|
||||
the same type as their storage type e.g:
|
||||
double a; double b = double(a);
|
||||
- Fixed an AX compiler error which would produce invalid IR when using 64bit
|
||||
integer variables for matrix array offsetting e.g:
|
||||
int64 a = 0; mat4f b = 1; float c = b[a,a];
|
||||
|
||||
@par
|
||||
NanoVDB:
|
||||
- Added nanovdb::openToIndexVDB, which can convert an OpenVDB grid into a
|
||||
NanoVDB IndexGrid.
|
||||
- Added new options "--index" and "--onIndex" to the command-line tool
|
||||
nanovdb_convert so it can produce IndexGrids.
|
||||
- Fixed memory leak in DeviceBuffer.
|
||||
- Added constructor for DeviceBuffer from an existing HostBuffer.
|
||||
- Added VoxelBlockManager, an acceleration structure for sequential access
|
||||
and stencil ops over active voxels.
|
||||
- Added helper functions for kernel launches with shared memory.
|
||||
- Added support for CUDA 13.0.
|
||||
- Fix warnings and compilation errors for GCC and Clang.
|
||||
- Fixed inconsistent usage of util::cuda::mallocAsync/freeAsync that
|
||||
affected vGPUs.
|
||||
- Added support for custom memory resources in PointsToGrid.
|
||||
- Fixed race condition in split/mergeGridHandles.
|
||||
- Fixed offset bug in nanovdb::tools::cuda::IndexToGrid related to non-POD
|
||||
build types.
|
||||
[Contributed by Andreas Henne]
|
||||
|
||||
@par
|
||||
Houdini:
|
||||
- Define OP_InputIdx and OP_OutputIdx for Houdini 21.0 compatibility
|
||||
- Add Houdini 21 style camera interface to support LOP cameras
|
||||
- Include env flag for avoiding stream writing (was backported to 19.5)
|
||||
|
||||
|
||||
@htmlonly <a name="v12_0_1_changes"></a>@endhtmlonly
|
||||
@@ -38,7 +351,7 @@ NanoVDB:
|
||||
- Fixed a call to a non-existent method in GridBuild.h
|
||||
|
||||
|
||||
@htmlonly <a name="v1_changes"></a>@endhtmlonly
|
||||
@htmlonly <a name="v12_0_0_changes"></a>@endhtmlonly
|
||||
@par
|
||||
<B>Version 12.0.0</B> - <I>October 31, 2024</I>
|
||||
|
||||
@@ -427,10 +740,10 @@ OpenVDB:
|
||||
- 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]
|
||||
[Reported by \@lanwatch]
|
||||
- Fixed a bug with LeafNodeBool Topology constructor with designated
|
||||
on/off values which wouldn't apply them correctly.
|
||||
[Reported by @hozhaoea]
|
||||
[Reported by \@hozhaoea]
|
||||
|
||||
@par
|
||||
OpenVDB AX:
|
||||
@@ -2489,7 +2802,7 @@ Improvements:
|
||||
util::PagedArray@endlink.
|
||||
- Added an @c install_lib build target to the Makefile.
|
||||
<I>[Contributed by Double Negative]</I>
|
||||
- Added @subpage points "documentation" and Cookbook
|
||||
- Added @ref points "documentation" and Cookbook
|
||||
@ref openvdbPointsHelloWorld "examples" for OpenVDB Points.
|
||||
<I>[Contributed by Double Negative]</I>
|
||||
- Registration of OpenVDB Points grid and attribute types is now
|
||||
|
||||
@@ -41,14 +41,14 @@ 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 Python | Core Library dependencies, Python, nanobind | -
|
||||
OpenVDB AX | Core Library dependencies, LLVM | Bison, Flex
|
||||
NanoVDB | - | Core Library, CUDA, TBB, Blosc, ZLib
|
||||
OpenVDB UnitTests | Core Library dependencies, GoogleTest | CppUnit**
|
||||
OpenVDB UnitTests | Core Library dependencies, GoogleTest, numpy* | -
|
||||
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.
|
||||
- @b * numpy only required for python binding unit tests
|
||||
- @b Note - Bison and Flex are only required for re-generation of the AX
|
||||
grammar which is not typically necessary for the majority of users.
|
||||
|
||||
@@ -56,41 +56,39 @@ 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
|
||||
CMake | 3.24 | 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
|
||||
Imath | 3.2 | >= 3.3 | Half precision floating points | Y | Y | http://www.openexr.com
|
||||
OpenEXR | 3.2 | >= 3.3 | EXR serialization support | Y | Y | http://www.openexr.com
|
||||
TBB | 2020.3 | >= 2021 | 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/
|
||||
Boost | 1.82 | >= 1.85 | Components: iostreams | Y | Y | https://www.boost.org
|
||||
LLVM | 15.0.0* | 18.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
|
||||
nanobind** | 2.0.0 | >= 2.5.0 | C++/python bindings | Y | Y | https://nanobind.readthedocs.io
|
||||
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
|
||||
Blosc | 1.17.0* | Latest | 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.3 | 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
|
||||
Doxygen | 1.8.8 | <= 1.14.0 | 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/llvm versions.
|
||||
- @b ** See the note in [known issues](@ref depKnownIssues) regarding supported nanobind build issues.
|
||||
|
||||
@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 On Linux, LLVM == 17 has symbol issues which makes it incompatible when
|
||||
used with the OpenVDB Python plugin. LLVM versions greater than 18 should be
|
||||
preferred.
|
||||
|
||||
- @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
|
||||
@@ -102,15 +100,18 @@ Doxygen | 1.8.8 | 1.8.11 | Documentation generation from C++
|
||||
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.
|
||||
- Versions 1.16.0 and 1.16.1.
|
||||
|
||||
- All versions from 1.11.0 through to, but excluding, 1.14.0.
|
||||
- Versions 1.16.0 and 1.16.1.
|
||||
.
|
||||
For more information see:
|
||||
- https://www.blosc.org/posts/new-forward-compat-policy/
|
||||
- https://github.com/Blosc/c-blosc/issues/260
|
||||
- https://github.com/Blosc/c-blosc/issues/261
|
||||
|
||||
- https://www.blosc.org/posts/new-forward-compat-policy/
|
||||
- https://github.com/Blosc/c-blosc/issues/260
|
||||
- https://github.com/Blosc/c-blosc/issues/261
|
||||
- @b nanobind: Nanobind requires a fast-hash-map implementation library called
|
||||
tsl-robin-map. If you're installing nanobind through homebrew, this library
|
||||
may not be installed correctly and OpenVDB's CMake will only produce a warning.
|
||||
Make sure to also: `brew install robin-map`.
|
||||
|
||||
@section depInstallingDependencies Installing Dependencies
|
||||
|
||||
@@ -148,14 +149,12 @@ apt-get install libblosc-dev # Blosc
|
||||
apt-get install llvm-15-dev # LLVM
|
||||
# Python
|
||||
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 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
|
||||
@@ -181,11 +180,9 @@ brew install c-blosc # blosc
|
||||
brew install llvm # LLVM
|
||||
# Python
|
||||
brew install python # Python
|
||||
brew install numpy # NumPy
|
||||
brew install nanobind # nanobind
|
||||
brew install nanobind robin-map # nanobind
|
||||
# Unit Tests
|
||||
brew install gtest # GoogleTest
|
||||
brew install cppunit # CppUnit
|
||||
# vdb_view
|
||||
brew install glfw # GLFW
|
||||
# vdb_render
|
||||
|
||||
@@ -22,44 +22,30 @@ primarily by
|
||||
- Mihai Aldén
|
||||
- David Hill
|
||||
|
||||
See the @subpage changes "Release Notes" for what’s new in this version
|
||||
of @b OpenVDB.
|
||||
|
||||
See the @subpage dependencies "Dependencies" page for @b OpenVDB requirements.
|
||||
|
||||
See @subpage build "Building OpenVDB" for information on building @b OpenVDB.
|
||||
|
||||
See the @subpage overview "Overview" for an introduction to the library.
|
||||
|
||||
See @subpage transformsAndMaps "Transforms and Maps" for more
|
||||
discussion of the transforms used in @b OpenVDB.
|
||||
|
||||
See the @subpage faq "FAQ" for frequently asked questions about @b OpenVDB.
|
||||
|
||||
See the @subpage codeExamples "Cookbook" to get started using @b OpenVDB.
|
||||
|
||||
See @subpage points "OpenVDB Points" to store point data using @b OpenVDB.
|
||||
|
||||
See @subpage python "Using OpenVDB in Python" to get started with the
|
||||
@b OpenVDB Python module.
|
||||
|
||||
@par Quick Links
|
||||
- @subpage changes "Release Notes"
|
||||
- @subpage dependencies "Dependencies"
|
||||
- @subpage build "Building OpenVDB"
|
||||
- @subpage overview "Overview"
|
||||
- @ref transformsAndMaps "Transforms and Maps"
|
||||
- @ref codeExamples "Cookbook"
|
||||
- @ref faq "FAQ"
|
||||
- @subpage python "OpenVDB Python"
|
||||
- @subpage points "OpenVDB Points"
|
||||
@if OPENVDB_AX
|
||||
See @subpage openvdbax "OpenVDB AX" for the AX documentation.
|
||||
- @subpage openvdbax "OpenVDB AX"
|
||||
@endif
|
||||
|
||||
@if OPENVDB_HOUDINI
|
||||
See the @subpage houdini "Houdini Cookbook" for help on implementing Houdini nodes.
|
||||
- @subpage houdini "Houdini Cookbook"
|
||||
@endif
|
||||
|
||||
@if NANOVDB
|
||||
See @subpage NanoVDB_MainPage "NanoVDB" for the NanoVDB documentation.
|
||||
- @subpage NanoVDB_MainPage "NanoVDB"
|
||||
@endif
|
||||
- <a href="../code_coverage/index.html">Code Coverage</a>
|
||||
|
||||
Contributors, please familiarize yourselves with our
|
||||
@subpage codingStyle "coding standards".
|
||||
|
||||
<a href="../code_coverage/index.html">Code Coverage</a>
|
||||
|
||||
|
||||
@page overview OpenVDB Overview
|
||||
|
||||
@@ -81,6 +67,9 @@ Contributors, please familiarize yourselves with our
|
||||
- @ref subsecNodeIter
|
||||
- @ref subsecValueAccessor
|
||||
- @ref subsecTraversal
|
||||
- @subpage transformsAndMaps "Transforms and Maps"
|
||||
|
||||
|
||||
<!-- - @ref secRegistry -->
|
||||
|
||||
|
||||
@@ -320,7 +309,7 @@ as level sets.
|
||||
(The lower-level @vdblink::tools::GridResampler GridResampler@endlink does not,
|
||||
but it is optimized for level set grids in that it transforms only voxels
|
||||
in the narrow band and relies on
|
||||
@vdblink::Grid::signedFloodFill() signed flood fill@endlink to reconstruct
|
||||
@vdblink::tools::signedFloodFill() signed flood fill@endlink to reconstruct
|
||||
the inside and outside regions.)
|
||||
Other tools whose behavior is affected by the grid class include the
|
||||
@vdblink::tools::divergence() divergence@endlink operator (which has an
|
||||
|
||||
@@ -196,7 +196,7 @@ For multithreaded insertion operations we typically assign a separate grid
|
||||
to each thread and then merge the grids as threads terminate.
|
||||
This technique works remarkably well: because OpenVDB
|
||||
is sparse and hierarchical, merging is very efficient.
|
||||
For more details, please consult the @subpage codeExamples and
|
||||
For more details, please consult the @ref codeExamples and
|
||||
Appendix B in the <i>Transactions on Graphics</i> paper.
|
||||
|
||||
@section sMaxRes Is OpenVDB unbounded?
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
<!-- HTML header for doxygen 1.15.0-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="$langISO">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen $doxygenversion"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
|
||||
<!--BEGIN PROJECT_ICON-->
|
||||
<link rel="icon" href="$relpath^$projecticon" type="image/x-icon" />
|
||||
<!--END PROJECT_ICON-->
|
||||
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<script type="text/javascript">var page_layout=1;</script>
|
||||
<!--END FULL_SIDEBAR-->
|
||||
<script type="text/javascript" src="$relpath^jquery.js"></script>
|
||||
<script type="text/javascript" src="$relpath^dynsections.js"></script>
|
||||
<!--BEGIN COPY_CLIPBOARD-->
|
||||
<script type="text/javascript" src="$relpath^clipboard.js"></script>
|
||||
<!--END COPY_CLIPBOARD-->
|
||||
$treeview
|
||||
$search
|
||||
$mathjax
|
||||
$darkmode
|
||||
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
|
||||
$extrastylesheet
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-darkmode-toggle.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeDarkModeToggle.init()
|
||||
</script>
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-fragment-copy-button.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeFragmentCopyButton.init()
|
||||
</script>
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-paragraph-link.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeParagraphLink.init()
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<!--END FULL_SIDEBAR-->
|
||||
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
|
||||
<!--BEGIN TITLEAREA-->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<!--BEGIN PROJECT_LOGO-->
|
||||
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"$logosize/></td>
|
||||
<!--END PROJECT_LOGO-->
|
||||
<!--BEGIN PROJECT_NAME-->
|
||||
<td id="projectalign">
|
||||
<div id="projectname">$projectname<!--BEGIN PROJECT_NUMBER--><span id="projectnumber"> $projectnumber</span><!--END PROJECT_NUMBER-->
|
||||
</div>
|
||||
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
|
||||
</td>
|
||||
<!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME-->
|
||||
<!--BEGIN PROJECT_BRIEF-->
|
||||
<td>
|
||||
<div id="projectbrief">$projectbrief</div>
|
||||
</td>
|
||||
<!--END PROJECT_BRIEF-->
|
||||
<!--END !PROJECT_NAME-->
|
||||
<!--BEGIN DISABLE_INDEX-->
|
||||
<!--BEGIN SEARCHENGINE-->
|
||||
<!--BEGIN !FULL_SIDEBAR-->
|
||||
<td>$searchbox</td>
|
||||
<!--END !FULL_SIDEBAR-->
|
||||
<!--END SEARCHENGINE-->
|
||||
<!--END DISABLE_INDEX-->
|
||||
</tr>
|
||||
<!--BEGIN SEARCHENGINE-->
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<tr><td colspan="2">$searchbox</td></tr>
|
||||
<!--END FULL_SIDEBAR-->
|
||||
<!--END SEARCHENGINE-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--END TITLEAREA-->
|
||||
<!-- end header part -->
|
||||
|
After Width: | Height: | Size: 15 KiB |
@@ -0,0 +1,26 @@
|
||||
|
||||
html {
|
||||
/* override light-mode variables here */
|
||||
}
|
||||
|
||||
html.dark-mode {
|
||||
/* define dark-mode variable overrides here */
|
||||
--openvdb-group-header-override: white;
|
||||
}
|
||||
|
||||
/* Fix @name group sections in dark theme appearing strangely */
|
||||
div.groupHeader
|
||||
{
|
||||
box-shadow: none;
|
||||
color: var(--openvdb-group-header-override);
|
||||
}
|
||||
|
||||
/* Apply invert to all images in tables, regardless of nesting, required to
|
||||
properly handle latex formulas in dark theme (for some reason
|
||||
doxygen-awesome only applies this to the first level of nested tables via:
|
||||
html.dark-mode div.contents > table img)
|
||||
*/
|
||||
html.dark-mode div.contents table img
|
||||
{
|
||||
filter: brightness(89%) hue-rotate(180deg) invert();
|
||||
}
|
||||
@@ -21,7 +21,6 @@
|
||||
- @ref secPtIndexFilters
|
||||
- @ref secPtSpaceAndTrans
|
||||
|
||||
|
||||
@section secPtOverview Introduction
|
||||
@anchor openvdbPointsOverview
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
|
||||
@page python Using OpenVDB in Python
|
||||
@page python OpenVDB Python
|
||||
|
||||
This section describes the OpenVDB Python module and includes Python code
|
||||
snippets and some complete programs that illustrate how to perform common tasks.
|
||||
@@ -441,11 +441,9 @@ not on their active states or other attributes.
|
||||
|
||||
Large data sets are often handled in Python using
|
||||
<a href="http://www.numpy.org/">NumPy</a>.
|
||||
The OpenVDB Python module can optionally be compiled with NumPy support.
|
||||
With NumPy enabled, the @b copyFromArray and @b copyToArray grid methods
|
||||
can be used to exchange data efficiently between scalar-valued grids
|
||||
and three-dimensional NumPy arrays and between vector-valued grids and
|
||||
four-dimensional NumPy arrays.
|
||||
The @b copyFromArray and @b copyToArray grid methods can be used to exchange
|
||||
data efficiently between scalar-valued grids and three-dimensional NumPy
|
||||
arrays and between vector-valued grids and four-dimensional NumPy arrays.
|
||||
@code{.py}
|
||||
>>> import pyopenvdb as vdb
|
||||
>>> import numpy
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
See [LICENSE](LICENSE) for the main open source license of original
|
||||
code written for the OpenVDB project.
|
||||
|
||||
The remainder of this file reproduces the open source licensing details
|
||||
of other projects that have been imported, incorporated into, or derived
|
||||
into parts of OpenVDB.
|
||||
|
||||
In no particular order:
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
BSD 3-Clause License
|
||||
SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
* Imath, Copyright (c) Contributors to the Imath Project.
|
||||
https://github.com/AcademySoftwareFoundation/Imath
|
||||
|
||||
OpenVDB includes a copy of Half.h from the Imath project. This copy can
|
||||
be disabled in favour of using Half.h from the Imath project - but one
|
||||
must be provided either way.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
MIT License
|
||||
|
||||
* doxygen-awesome Copyright (c) 2021 - 2023 jothepro
|
||||
https://github.com/jothepro/doxygen-awesome-css
|
||||
|
||||
OpenVDB uses doxygen-awesome for stylized html output with doxygen and
|
||||
comes bundled with copies of the css provided by doxygen-awesome. Usage
|
||||
of this css can be disabled.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Public domain
|
||||
|
||||
* The simplex noise implementation included in OpenVDB AX is Copyright (c)
|
||||
Arthur Tombs. It bears the following notice:
|
||||
|
||||
This is a derivative work based on OpenSimplex by Kurt Spencer:
|
||||
https://gist.github.com/KdotJPG/b1270127455a94ac5d19
|
||||
|
||||
Anyone is free to make use of this software in whatever way they want.
|
||||
Attribution is appreciated, but not required.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
If we have left anything out, it is unintentional. Please let us know.
|
||||
@@ -0,0 +1,138 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
/**
|
||||
|
||||
Doxygen Awesome
|
||||
https://github.com/jothepro/doxygen-awesome-css
|
||||
|
||||
Copyright (c) 2021 - 2025 jothepro
|
||||
|
||||
*/
|
||||
|
||||
class DoxygenAwesomeDarkModeToggle extends HTMLElement {
|
||||
// SVG icons from https://fonts.google.com/icons
|
||||
// Licensed under the Apache 2.0 license:
|
||||
// https://www.apache.org/licenses/LICENSE-2.0.html
|
||||
static lightModeIcon = `<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#FCBF00"><rect fill="none" height="24" width="24"/><circle cx="12" cy="12" opacity=".3" r="3"/><path d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"/></svg>`
|
||||
static darkModeIcon = `<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#FE9700"><rect fill="none" height="24" width="24"/><path d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27 C17.45,17.19,14.93,19,12,19c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z" opacity=".3"/><path d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"/></svg>`
|
||||
static title = "Toggle Light/Dark Mode"
|
||||
|
||||
static prefersLightModeInDarkModeKey = "prefers-light-mode-in-dark-mode"
|
||||
static prefersDarkModeInLightModeKey = "prefers-dark-mode-in-light-mode"
|
||||
|
||||
static _staticConstructor = function() {
|
||||
DoxygenAwesomeDarkModeToggle.enableDarkMode(DoxygenAwesomeDarkModeToggle.userPreference)
|
||||
// Update the color scheme when the browsers preference changes
|
||||
// without user interaction on the website.
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
|
||||
DoxygenAwesomeDarkModeToggle.onSystemPreferenceChanged()
|
||||
})
|
||||
// Update the color scheme when the tab is made visible again.
|
||||
// It is possible that the appearance was changed in another tab
|
||||
// while this tab was in the background.
|
||||
document.addEventListener("visibilitychange", visibilityState => {
|
||||
if (document.visibilityState === 'visible') {
|
||||
DoxygenAwesomeDarkModeToggle.onSystemPreferenceChanged()
|
||||
}
|
||||
});
|
||||
}()
|
||||
|
||||
static init() {
|
||||
$(function() {
|
||||
$(document).ready(function() {
|
||||
const toggleButton = document.createElement('doxygen-awesome-dark-mode-toggle')
|
||||
toggleButton.title = DoxygenAwesomeDarkModeToggle.title
|
||||
toggleButton.updateIcon()
|
||||
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
|
||||
toggleButton.updateIcon()
|
||||
})
|
||||
document.addEventListener("visibilitychange", visibilityState => {
|
||||
if (document.visibilityState === 'visible') {
|
||||
toggleButton.updateIcon()
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function(){
|
||||
document.getElementById("MSearchBox").parentNode.appendChild(toggleButton)
|
||||
})
|
||||
$(window).resize(function(){
|
||||
document.getElementById("MSearchBox").parentNode.appendChild(toggleButton)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.onclick=this.toggleDarkMode
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns `true` for dark-mode, `false` for light-mode system preference
|
||||
*/
|
||||
static get systemPreference() {
|
||||
return window.matchMedia('(prefers-color-scheme: dark)').matches
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns `true` for dark-mode, `false` for light-mode user preference
|
||||
*/
|
||||
static get userPreference() {
|
||||
return (!DoxygenAwesomeDarkModeToggle.systemPreference && localStorage.getItem(DoxygenAwesomeDarkModeToggle.prefersDarkModeInLightModeKey)) ||
|
||||
(DoxygenAwesomeDarkModeToggle.systemPreference && !localStorage.getItem(DoxygenAwesomeDarkModeToggle.prefersLightModeInDarkModeKey))
|
||||
}
|
||||
|
||||
static set userPreference(userPreference) {
|
||||
DoxygenAwesomeDarkModeToggle.darkModeEnabled = userPreference
|
||||
if(!userPreference) {
|
||||
if(DoxygenAwesomeDarkModeToggle.systemPreference) {
|
||||
localStorage.setItem(DoxygenAwesomeDarkModeToggle.prefersLightModeInDarkModeKey, true)
|
||||
} else {
|
||||
localStorage.removeItem(DoxygenAwesomeDarkModeToggle.prefersDarkModeInLightModeKey)
|
||||
}
|
||||
} else {
|
||||
if(!DoxygenAwesomeDarkModeToggle.systemPreference) {
|
||||
localStorage.setItem(DoxygenAwesomeDarkModeToggle.prefersDarkModeInLightModeKey, true)
|
||||
} else {
|
||||
localStorage.removeItem(DoxygenAwesomeDarkModeToggle.prefersLightModeInDarkModeKey)
|
||||
}
|
||||
}
|
||||
DoxygenAwesomeDarkModeToggle.onUserPreferenceChanged()
|
||||
}
|
||||
|
||||
static enableDarkMode(enable) {
|
||||
if(enable) {
|
||||
DoxygenAwesomeDarkModeToggle.darkModeEnabled = true
|
||||
document.documentElement.classList.add("dark-mode")
|
||||
document.documentElement.classList.remove("light-mode")
|
||||
} else {
|
||||
DoxygenAwesomeDarkModeToggle.darkModeEnabled = false
|
||||
document.documentElement.classList.remove("dark-mode")
|
||||
document.documentElement.classList.add("light-mode")
|
||||
}
|
||||
}
|
||||
|
||||
static onSystemPreferenceChanged() {
|
||||
DoxygenAwesomeDarkModeToggle.darkModeEnabled = DoxygenAwesomeDarkModeToggle.userPreference
|
||||
DoxygenAwesomeDarkModeToggle.enableDarkMode(DoxygenAwesomeDarkModeToggle.darkModeEnabled)
|
||||
}
|
||||
|
||||
static onUserPreferenceChanged() {
|
||||
DoxygenAwesomeDarkModeToggle.enableDarkMode(DoxygenAwesomeDarkModeToggle.darkModeEnabled)
|
||||
}
|
||||
|
||||
toggleDarkMode() {
|
||||
DoxygenAwesomeDarkModeToggle.userPreference = !DoxygenAwesomeDarkModeToggle.userPreference
|
||||
this.updateIcon()
|
||||
}
|
||||
|
||||
updateIcon() {
|
||||
if(DoxygenAwesomeDarkModeToggle.darkModeEnabled) {
|
||||
this.innerHTML = DoxygenAwesomeDarkModeToggle.darkModeIcon
|
||||
} else {
|
||||
this.innerHTML = DoxygenAwesomeDarkModeToggle.lightModeIcon
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("doxygen-awesome-dark-mode-toggle", DoxygenAwesomeDarkModeToggle);
|
||||
@@ -0,0 +1,66 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
/**
|
||||
|
||||
Doxygen Awesome
|
||||
https://github.com/jothepro/doxygen-awesome-css
|
||||
|
||||
Copyright (c) 2022 - 2025 jothepro
|
||||
|
||||
*/
|
||||
|
||||
class DoxygenAwesomeFragmentCopyButton extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
this.onclick=this.copyContent
|
||||
}
|
||||
static title = "Copy to clipboard"
|
||||
static copyIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M23.04,10.322c0,-2.582 -2.096,-4.678 -4.678,-4.678l-6.918,-0c-2.582,-0 -4.678,2.096 -4.678,4.678c0,-0 0,8.04 0,8.04c0,2.582 2.096,4.678 4.678,4.678c0,-0 6.918,-0 6.918,-0c2.582,-0 4.678,-2.096 4.678,-4.678c0,-0 0,-8.04 0,-8.04Zm-2.438,-0l-0,8.04c-0,1.236 -1.004,2.24 -2.24,2.24l-6.918,-0c-1.236,-0 -2.239,-1.004 -2.239,-2.24l-0,-8.04c-0,-1.236 1.003,-2.24 2.239,-2.24c0,0 6.918,0 6.918,0c1.236,0 2.24,1.004 2.24,2.24Z"/><path d="M5.327,16.748c-0,0.358 -0.291,0.648 -0.649,0.648c0,0 0,0 0,0c-2.582,0 -4.678,-2.096 -4.678,-4.678c0,0 0,-8.04 0,-8.04c0,-2.582 2.096,-4.678 4.678,-4.678l6.918,0c2.168,0 3.994,1.478 4.523,3.481c0.038,0.149 0.005,0.306 -0.09,0.428c-0.094,0.121 -0.239,0.191 -0.392,0.191c-0.451,0.005 -1.057,0.005 -1.457,0.005c-0.238,0 -0.455,-0.14 -0.553,-0.357c-0.348,-0.773 -1.128,-1.31 -2.031,-1.31c-0,0 -6.918,0 -6.918,0c-1.236,0 -2.24,1.004 -2.24,2.24l0,8.04c0,1.236 1.004,2.24 2.24,2.24l0,-0c0.358,-0 0.649,0.29 0.649,0.648c-0,0.353 -0,0.789 -0,1.142Z" style="fill-opacity:0.6;"/></svg>`
|
||||
static successIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M8.084,16.111c-0.09,0.09 -0.212,0.141 -0.34,0.141c-0.127,-0 -0.249,-0.051 -0.339,-0.141c-0.746,-0.746 -2.538,-2.538 -3.525,-3.525c-0.375,-0.375 -0.983,-0.375 -1.357,0c-0.178,0.178 -0.369,0.369 -0.547,0.547c-0.375,0.375 -0.375,0.982 -0,1.357c1.135,1.135 3.422,3.422 4.75,4.751c0.27,0.27 0.637,0.421 1.018,0.421c0.382,0 0.749,-0.151 1.019,-0.421c2.731,-2.732 10.166,-10.167 12.454,-12.455c0.375,-0.375 0.375,-0.982 -0,-1.357c-0.178,-0.178 -0.369,-0.369 -0.547,-0.547c-0.375,-0.375 -0.982,-0.375 -1.357,0c-2.273,2.273 -9.567,9.567 -11.229,11.229Z"/></svg>`
|
||||
static successDuration = 980
|
||||
static init() {
|
||||
$(function() {
|
||||
$(document).ready(function() {
|
||||
if(navigator.clipboard) {
|
||||
const fragments = document.getElementsByClassName("fragment")
|
||||
for(const fragment of fragments) {
|
||||
const fragmentWrapper = document.createElement("div")
|
||||
fragmentWrapper.className = "doxygen-awesome-fragment-wrapper"
|
||||
const fragmentCopyButton = document.createElement("doxygen-awesome-fragment-copy-button")
|
||||
fragmentCopyButton.innerHTML = DoxygenAwesomeFragmentCopyButton.copyIcon
|
||||
fragmentCopyButton.title = DoxygenAwesomeFragmentCopyButton.title
|
||||
|
||||
fragment.parentNode.replaceChild(fragmentWrapper, fragment)
|
||||
fragmentWrapper.appendChild(fragment)
|
||||
fragmentWrapper.appendChild(fragmentCopyButton)
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
copyContent() {
|
||||
const content = this.previousSibling.cloneNode(true)
|
||||
// filter out line number from file listings
|
||||
content.querySelectorAll(".lineno, .ttc").forEach((node) => {
|
||||
node.remove()
|
||||
})
|
||||
let textContent = content.textContent
|
||||
// remove trailing newlines that appear in file listings
|
||||
let numberOfTrailingNewlines = 0
|
||||
while(textContent.charAt(textContent.length - (numberOfTrailingNewlines + 1)) == '\n') {
|
||||
numberOfTrailingNewlines++;
|
||||
}
|
||||
textContent = textContent.substring(0, textContent.length - numberOfTrailingNewlines)
|
||||
navigator.clipboard.writeText(textContent);
|
||||
this.classList.add("success")
|
||||
this.innerHTML = DoxygenAwesomeFragmentCopyButton.successIcon
|
||||
window.setTimeout(() => {
|
||||
this.classList.remove("success")
|
||||
this.innerHTML = DoxygenAwesomeFragmentCopyButton.copyIcon
|
||||
}, DoxygenAwesomeFragmentCopyButton.successDuration);
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("doxygen-awesome-fragment-copy-button", DoxygenAwesomeFragmentCopyButton)
|
||||
@@ -0,0 +1,32 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
/**
|
||||
|
||||
Doxygen Awesome
|
||||
https://github.com/jothepro/doxygen-awesome-css
|
||||
|
||||
Copyright (c) 2022 - 2025 jothepro
|
||||
|
||||
*/
|
||||
|
||||
class DoxygenAwesomeParagraphLink {
|
||||
// Icon from https://fonts.google.com/icons
|
||||
// Licensed under the Apache 2.0 license:
|
||||
// https://www.apache.org/licenses/LICENSE-2.0.html
|
||||
static icon = `<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5zm-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-2zm-3-4h8v2H8z"/></svg>`
|
||||
static title = "Permanent Link"
|
||||
static init() {
|
||||
$(function() {
|
||||
$(document).ready(function() {
|
||||
document.querySelectorAll(".contents a.anchor[id], .contents .groupheader > a[id]").forEach((node) => {
|
||||
let anchorlink = document.createElement("a")
|
||||
anchorlink.setAttribute("href", `#${node.getAttribute("id")}`)
|
||||
anchorlink.setAttribute("title", DoxygenAwesomeParagraphLink.title)
|
||||
anchorlink.classList.add("anchorlink")
|
||||
node.classList.add("anchor")
|
||||
anchorlink.innerHTML = DoxygenAwesomeParagraphLink.icon
|
||||
node.parentElement.appendChild(anchorlink)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/**
|
||||
|
||||
Doxygen Awesome
|
||||
https://github.com/jothepro/doxygen-awesome-css
|
||||
|
||||
Copyright (c) 2021 - 2025 jothepro
|
||||
|
||||
*/
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
|
||||
#MSearchBox {
|
||||
width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium)) - var(--searchbar-height) - 1px);
|
||||
}
|
||||
|
||||
#MSearchField {
|
||||
width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium)) - 66px - var(--searchbar-height));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/**
|
||||
|
||||
Doxygen Awesome
|
||||
https://github.com/jothepro/doxygen-awesome-css
|
||||
|
||||
Copyright (c) 2021 - 2025 jothepro
|
||||
|
||||
*/
|
||||
|
||||
html {
|
||||
/* side nav width. MUST be = `TREEVIEW_WIDTH`.
|
||||
* Make sure it is wide enough to contain the page title (logo + title + version)
|
||||
*/
|
||||
--side-nav-fixed-width: 335px;
|
||||
--menu-display: none;
|
||||
|
||||
--top-height: 120px;
|
||||
--toc-sticky-top: -25px;
|
||||
--toc-max-height: calc(100vh - 2 * var(--spacing-medium) - 25px);
|
||||
}
|
||||
|
||||
#projectname {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
html {
|
||||
--searchbar-background: var(--page-background-color);
|
||||
}
|
||||
|
||||
#side-nav {
|
||||
min-width: var(--side-nav-fixed-width);
|
||||
max-width: var(--side-nav-fixed-width);
|
||||
top: var(--top-height);
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
#nav-tree, #side-nav {
|
||||
height: calc(100vh - var(--top-height)) !important;
|
||||
}
|
||||
|
||||
#top {
|
||||
display: block;
|
||||
border-bottom: none;
|
||||
height: var(--top-height);
|
||||
margin-bottom: calc(0px - var(--top-height));
|
||||
max-width: var(--side-nav-fixed-width);
|
||||
overflow: hidden;
|
||||
background: var(--side-nav-background);
|
||||
}
|
||||
|
||||
#main-nav {
|
||||
float: left;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.ui-resizable-handle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ui-resizable-e {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
#nav-path {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
left: calc(var(--side-nav-fixed-width) + 1px);
|
||||
bottom: 0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#doc-content {
|
||||
height: calc(100vh - 31px) !important;
|
||||
padding-bottom: calc(3 * var(--spacing-large));
|
||||
padding-top: calc(var(--top-height) - 80px);
|
||||
box-sizing: border-box;
|
||||
margin-left: var(--side-nav-fixed-width) !important;
|
||||
}
|
||||
|
||||
#MSearchBox {
|
||||
width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium)));
|
||||
}
|
||||
|
||||
#MSearchField {
|
||||
width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium)) - 65px);
|
||||
}
|
||||
|
||||
#MSearchResultsWindow {
|
||||
left: var(--spacing-medium) !important;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
#nav-sync {
|
||||
bottom: 4px;
|
||||
right: auto;
|
||||
left: 300px;
|
||||
width: 35px;
|
||||
top: auto !important;
|
||||
user-select: none;
|
||||
position: fixed
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
@@ -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
|
||||
@@ -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
|
||||
}
|
||||
@@ -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": [
|
||||
|
||||
]
|
||||
}
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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)
|
||||
|
Before Width: | Height: | Size: 418 KiB |
|
Before Width: | Height: | Size: 415 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 362 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 811 KiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 193 KiB |
|
Before Width: | Height: | Size: 958 KiB |
|
Before Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 622 KiB |
|
Before Width: | Height: | Size: 190 KiB |