Compare commits

...
804 Commits
Author SHA1 Message Date
Ken Museth c81d904ded fixed bug in VolumeToMesh.cuh (#2306)
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2026-08-31 10:31:01 -07:00
Ken Museth a89012d569 improved the vdb option in the vdb_tool (#2294)
* improved the vdb option in the vdb_tool

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* vdb_tool: address review of the vdb/geo name-resolution option

Two issues raised in review of the name-resolution feature:

1. Resolution was written back into Option::value, destroying the parsed source
   expression. Because a loop body revisits the same Action every iteration, this
   pinned the option to whatever the first iteration resolved: the documented
   pattern "-for v=0,3 -render vdb={$v} -end" rendered age 0 on every pass. It
   would also have corrupted the source form that -write emits to a config file,
   which reads Option::value directly.

   Resolution now runs per-read on a copy instead of mutating the option:
   Parser::beforeActionRun is replaced by Parser::onGetOption, invoked from
   Parser::getStr() after expression expansion. Every accessor (get<T>, getVec<T>,
   getVec3<T>) funnels through getStr(), so coverage is unchanged, but the stored
   expression survives and is re-expanded and re-resolved each iteration.

2. Expanding a duplicated name to several ages was unsafe. Most actions read
   vdb/geo as a single age via get<int>() and cannot parse a list at all (29 such
   call sites versus 19 list consumers), and list consumers such as -clear erase
   by index while iterating, so a multi-age value could delete the wrong entry.
   A name must now identify exactly one entry; an ambiguous name is rejected with
   an error listing the matching ages so an explicit index can be used. Because
   this fires during option resolution, the action aborts before mutating anything.

Also exempts -soup2ls, whose "vdb" option selects an output resolution level of
the shrink-wrap hierarchy rather than an entry on the grid stack.

Tests: inverted the ambiguity case, added the requested loop regression using
vdb={$v}, a bare-name-in-loop case, a no-partial-deletion check, and a
singleton-consumer (-rename) ambiguity check.

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* vdb_tool: fix partial deletion in -clear with multiple ages

"-clear" erased entries one at a time inside its loop, but an age is a distance
from the back of the stack, so removing one shifted the ages of those still to be
processed. On a three-grid stack "-clear vdb=0,2" erased age 0, leaving two
grids, and then failed on age 2 -- having already destroyed a grid. An invalid
age behaved the same way, aborting only after earlier deletions had been applied.

Reachable with plain integer indices and unrelated to name resolution, though the
name-resolution work made it easy to hit.

Every requested age is now resolved to a list iterator, and duplicate ages
removed, before anything is erased. An out-of-range index therefore leaves both
stacks untouched, matching how "-copy" validates all of its indices up front, and
a repeated age such as "vdb=0,0" deletes a single entry instead of erasing the
same iterator twice (which is undefined behaviour). Resolving up front is safe
because mGrid/mGeom are std::lists, whose iterators remain valid when other
elements are erased.

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* vdb_tool: rename the -soup2ls "vdb" option to "levels"

"-soup2ls" used "vdb" for something no other action does: selecting which
resolution levels of the shrink-wrap hierarchy to output, rather than referring
to an entry on the VDB stack. That collision forced the grid-name resolution
introduced earlier in this branch to special-case the action, and it read badly
in help output, needing the caveat "unlike other actions, here vdb selects
outputs (not inputs)".

Renaming the option to "levels" removes both problems: the resolution hook no
longer needs an exemption, and every remaining "vdb"/"geo" option in the tool
now uniformly means "an entry on one of the two stacks". No other option on the
action begins with "l", so the name stays unambiguous under prefix matching.

Also drops the stale reference to "vdb" in the neighbouring "dim" description,
copy-pasted from actions where "vdb" supplies a transform; -soup2ls never read
it that way.

This option has not appeared in a release (it is still described only in
pendingchanges), so the rename is not a break for any published version and the
existing changelog entry is amended in place rather than adding a deprecation.

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* review comments

Signed-off-by: Ken Museth <ken.museth@gmail.com>

---------

Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Ken Museth <1495380+kmuseth@users.noreply.github.com>
2026-08-27 12:43:32 -07:00
Nick Avramoussis a14a735de9 Merge pull request #2204 from Idclip/vectorize_pca_transfers
Vectorized weights and covariance transfers in points::pca methods
2026-08-28 03:14:05 +12:00
Jonathan Swartz 9df9ec060d NanoVDB ReadAccessor::getDimAndActive (#2220)
* Add fused ReadAccessor::getDimAndActive API

Introduce a fused getDim + isActive traversal that shares the
Root->Internal->Leaf descent, the accessor cache update, and the
terminating-level mask read between the two queries. Adds a
DimAndActive POD, getDimAndActiveAndCache on Root/Internal/Leaf,
and getDimAndActive on all four ReadAccessor specializations.

Two policy tags control how `active` is resolved when an
InternalNode skip-flag fires along the descent:

  - ActiveExact (default): preserves byte-for-byte semantics of
    separate getDim + getAndCache<GetState>. `active` is correct
    even when the skip-flag is set, at the cost of forcing the
    child descent. Required by callers that read `active` at
    upper levels (e.g. fvdb HDDA iterators).

  - ActiveOnLeafOnly: cheap skip-flag short-circuit; `active` is
    unspecified when the returned `dim` exceeds leaf-dim, and the
    caller must gate on `dim` first
    (`if (hdda.dim() > 1 || !active) continue;`).

HDDA.h ZeroCrossing is intentionally not migrated -- on the
register-tight sm_120 kernel, any fused shape grows reg/thread by
2-3 and drops occupancy from 4 to 3 blocks/SM. The kernel is
memory-latency bound (~14% achieved occupancy) and the L1 cache
absorbs the second descent at ~87% hit rate, so the occupancy hit
dominates the descent-fusion savings. Rationale recorded inline.

Also rework the ex_raytrace_level_set benchmark harness for honest
measurement: kernel-only cudaEvent timing on the CUDA path, 2
untimed warmup iters, min/median/mean/max reporting,
numIterations 50 -> 200, block size 512 -> 256.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb: pack DimAndActive into a single int32_t

The fused getDim+isActive traversal returns a {dim, active} pair. The
otherwise-natural {uint32_t, bool} struct layout passes through two
registers (or a packed 64-bit pair) at the function-return boundary.

NanoVDB's getDim return value is bounded by the largest internal-node
DIM in the default FloatTree hierarchy (4096 for an upper internal --
2^12, well below 2^31). The sign bit is unused, so we can pack:

  low 31 bits = dim
  sign bit    = active

The struct keeps its existing API surface (aggregate-init via a 2-arg
constructor, accessors dim() and active()), so callers that used
`return {dim, active}` continue to work; consumers that previously
read `.dim` / `.active` as members switch to `.dim()` / `.active()`.

Effect on consumers:

  - On the static ZeroCrossing kernel (which does not use the fused
    API; rationale comment updated below): no change.

  - On lean_hdda + fusion (a separate experiment) the renderOp kernel
    drops from 62 regs (struct encoding) to 61 regs (packed encoding).
    Doesn't cross an occupancy tier on sm_120 at b=256, so the wall-
    time delta is within noise. Still useful: any consumer holding
    DimAndActive live across other work gains 1 reg of headroom for
    no semantic change.

  - On fvdb's HDDA iterators (the productive consumer that reads
    active unconditionally at upper levels), the packing reduces
    return-boundary register pressure in a hot path.

Also expand the rationale comment in HDDA.h's ZeroCrossing. The
original justification framed the don't-migrate decision as a
register-cliff problem; testing against lean_hdda (which has 3 regs
of headroom for fusion) shows the same negative wall-time result
without an occupancy hit. The real reason is the second descent is
L1-warm at ~87 % hit rate, so eliminating it saves ~no cycles, and
the fused call's slightly heavier per-call overhead nets out slightly
worse. Verified both struct- and packed-encoded fusion across both
regimes.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb: drop ZeroCrossing rationale comment

The long NB block that explained why HDDA::ZeroCrossing keeps
separate getDim + isActive calls (instead of using the fused API
this branch adds) was useful during the iteration but doesn't earn
its keep in the source tree -- a future reader doesn't need to relive
the cliff/lean/descent-cost investigation that justified the decision.

The rationale is preserved in the PR description: ZeroCrossing's
`dim > 1 || !active` short-circuit makes the active read dead at upper
levels, and the L1 cache absorbs the leaf-level descent at ~87% hit
rate, so fusion saves essentially no cycles while adding a small per-
call overhead.  The fused API is retained for callers that read active
unconditionally (fvdb's HDDA iterators -- -27% to -62% wall time win).

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* comment cleanup

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* comment update

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb: fix DimAndActive packing UB and add getDimAndActive test

The DimAndActive constructor packed active via 'int32_t(a) << 31',
which shifts 1 into the sign bit of a signed int -- undefined behavior
under C++17 (the repo's minimum standard). Do the OR in uint32_t so the
shift is well-defined, and mask dim to 31 bits so a stray high bit can't
clobber the active bit.

Add TestNanoVDB.GetDimAndActive, which asserts the fused
getDimAndActive matches the separate getDim + isActive it replaces:

  - ActiveExact: {dim, active} equals getDim(ijk, ray) and isActive(ijk)
    byte-for-byte across a box spanning interior, surface and exterior.
  - ActiveOnLeafOnly: dim always matches getDim; active matches isActive
    whenever dim == 1 (the contract gate).

The sphere's narrow band is too thin to fill an InternalNode, so a
skip-flagged internal node above an active voxel cannot arise from the
geometry. The test forces that case by setting the skip-flag on the
lower node over a known-active voxel, then confirms ActiveExact descends
past it (active == true) while ActiveOnLeafOnly short-circuits
(active == false), both reporting the skipped dim.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* comment cleanup

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb: address PR review on DimAndActive and raytrace example

- DimAndActive: store the packed field as uint32_t instead of int32_t.
  The previous int32_t form converted a uint32_t with bit 31 set to a
  signed int (implementation-defined) and left the defaulted ctor's
  member uninitialized. uint32_t packs/decodes with no conversion, the
  default ctor zero-initializes, and the size/ABI is unchanged.

- ex_raytrace_level_set reportStats: take samples by const reference,
  early-return on an empty vector (front()/back() would otherwise be
  UB if numIterations were 0), and sort a local copy.

- ex_raytrace_level_set common.h: check the cudaEventDestroy return
  codes with NANOVDB_CUDA_CHECK_ERROR, consistent with the rest of the
  CUDA timing path.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb: assert dim fits in 31 bits when packing DimAndActive

The packed encoding masks dim to 31 bits (bit 31 holds active). dim is
1u << TOTAL, bounded by the deepest node dim (4096 for the default tree),
so it always fits -- but a pathological tree config with TOTAL >= 31 would
be silently truncated. Add a debug assert documenting the invariant, in
the same style as the version-packing asserts above. Release builds are
unaffected (assert compiles out; the mask still protects the active bit).

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* Add pending changes entry

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* Fix compile warnings

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* Reduce comment verbosity

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-08-25 15:15:25 -07:00
Mark HarrisandClaude Fable 5 71da3a862e NanoVDB: add cuda::copyTo cross-space transfers and pinned-buffer GridHandles (CUDA) (#2292)
cuda::copyTo is the explicit, stream-carrying deep copy between grid
handles in different address spaces: a single-space device handle copies to
a host-readable handle (HostBuffer or a cuda::Buffer over a host-accessible
resource) and back, and device-to-device across different resources. An
optional prototype buffer routes the destination allocation through a
caller-supplied resource, which non-default-constructible resources (e.g.
ResourceRef) require. A host-readable destination synchronizes the transfer
stream before returning; a device destination parses and validates its
metadata on the transferred bytes. Dual-space buffers are rejected with a
named error: they keep deviceUpload/deviceDownload until their retirement.

GridHandle now accepts buffers over host-accessible resources (e.g.
PinnedResource) as host-readable single-space handles instead of rejecting
them: metadata parses on the host, the host accessors and write() apply,
and read() and copy() allocate through the buffer's resource via a shared
host-storage factory (BufferT::create for buffers that provide it, the
resource otherwise). The byte-element requirement now covers host-single
buffers, and splitGrids/mergeGrids name their create() requirement instead
of failing inside the template body.

Signed-off-by: Mark Harris <mharris@nvidia.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-25 09:48:10 -07:00
Jonathan SwartzandClaude Fable 5 c814fae1fe NanoVDB: chain DeviceBuffer::recordUse and expose orderAfterPriorUses (CUDA) (#2287)
* NanoVDB: chain DeviceBuffer::recordUse and expose orderAfterPriorUses (CUDA)

recordUse re-records the single per-device tracking event, and re-recording
moves an event: uses recorded on streams A then B left only B's coverage, so
the device free could run while A's work was in flight — violating the
invariant documented on mEvents ("every use waits on this event before
issuing work and re-records it afterwards"). Record now waits on the prior
capture first, so the event transitively covers every recorded use. Also make
orderAfterPriorUses public as the consume-side companion, so external
consumers (e.g. the Python bindings' zero-copy exports) can order their own
stream after the tracked uses. Adds a DeviceBufferChainedRecordUse regression
test that fails before the fix and passes after.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* Address review: doc concurrent-reader trade-off, guard vacuous test pass, tidy access sections

- recordUse's doc note now states that concurrent READERS recording uses
  serialize behind each other (the single per-device event cannot distinguish
  read-read from write-read) and names the upgrade path (read/write-separated
  or per-record events) should a profile ever surface it.
- DeviceBufferChainedRecordUse now GTEST_SKIPs when the allocator did not
  recycle the freed block, making a vacuous run visible instead of green.
  Verified on sm_120 that stream-ordered pools recycle WITH the dependency
  attached even post-fix, so the skip does not fire on a working platform.
- orderAfterPriorUses moved into the public section next to recordUse instead
  of a public/private island inside the private section.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-24 22:42:22 -07:00
Jonathan SwartzandClaude Opus 5 2176f69923 NanoVDB: assign each upper-node tile to a single GPU in DistributedPointsToGrid (#2283)
* NanoVDB: assign each upper-node tile to a single GPU in DistributedPointsToGrid

The device segment boundaries produced by the initial even split were
rebalanced by adjusting only adjacent pairs of boundaries. That cannot
consolidate an upper-node tile spanning three or more GPUs, since a
fully-interior device lies entirely within the tile. Downstream
construction assumes each tile - and therefore each lower node, leaf node
and voxel - is owned by exactly one device, so multiple devices built the
same leaf concurrently and raced on its value mask, silently dropping
active voxels.

Replace the pairwise GPU rebalance with a global, monotonic snap performed
on the host over the (small) set of device boundaries. The keys are
globally sorted at that point, so a tile boundary is simply a position
where the key changes; fully-interior devices are left empty, which the
rest of the pipeline already handles.

Add two multi-GPU regression tests: SingleUpperNode, which places all
input in one upper-node tile and asserts the exact unique active-voxel
count, and MatchesSingleGpu, which cross-checks topology and occupancy
against the single-GPU builder on the same input.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* Added a `snapBoundariesToRunsKernel` and running on device to avoid stream sync

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-25 17:16:36 +12:00
Ken Museth 83890bd879 fixed warnings that caused build to fail (#2297)
* fixed warnings that caused build to fail

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* reviewer comment

Signed-off-by: Ken Museth <ken.museth@gmail.com>

---------

Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Ken Museth <1495380+kmuseth@users.noreply.github.com>
2026-08-24 21:13:17 -07:00
Ken MusethandClaude Opus 4.8 eb0f1bfd83 added build support on Ampere (#2267)
* added build support on Ampere

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* vdb_tool: link vdb_tool_test against GTest::gtest only

The unit test provides its own main() and uses only gtest (no gmock), so it
needs just GTest::gtest. Listing gmock / gtest_main / gmock_main as well pulled
libgtest.a and libgmock.a onto the link line multiple times, which the macOS
(Xcode 15+) linker flags as "ignoring duplicate libraries". Linking only
GTest::gtest removes the warning and also works against gtest-only GoogleTest
installs (BUILD_GMOCK=OFF).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Ken Museth <ken.museth@gmail.com>

* review comments

Signed-off-by: Ken Museth <ken.museth@gmail.com>

---------

Signed-off-by: Ken Museth <ken.museth@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-24 21:07:34 -07:00
Ken Museth c6353069c8 added histogram action to vdb_tool (#2296)
* added histogram action to vdb_tool

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* now -stats and -histogram handles vector grids

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* fixed various issues (see comment in PR)

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* addressed reviewer comments

Signed-off-by: Ken Museth <ken.museth@gmail.com>

---------

Signed-off-by: Ken Museth <ken.museth@gmail.com>
2026-08-24 20:28:26 -07:00
Mark HarrisandClaude Fable 5 d19e483564 NanoVDB: migrate handle reset() onto destroy() and give NodeManager a single-space overload (CUDA) (#2293)
The handles (GridHandle, NodeManagerHandle, tools::VoxelBlockManager) now
release storage through the buffer's destroy() when it provides one and
fall back to the legacy clear() otherwise, detected by a BufferHasDestroy
trait companion. That lets the transitional cuda::Buffer::clear() and
cuda::BufferView::clear() finally carry their [[deprecated]] attribute
(BufferView gains destroy() with its detach semantics); the legacy
HostBuffer/DeviceBuffer clear() methods are unaffected.

cuda::createNodeManager gains a single-space overload taking a memory
resource: the returned handle owns a cuda::Buffer<std::byte,
ResourceRef<ResourceT>> whose storage and size scratch allocate through the
injected resource, which must outlive the handle -- the builders'
ownership contract. NodeManagerHandle supports single-space buffers
(deviceMgr maps onto the buffer, host accessors become compile-time
errors, constructors member-initialize so non-default-constructible
buffers work), and tools::cuda::GridStats builds its temporary NodeManager
through its injected resource, closing the last allocation that bypassed
ResourceT. The dual-space overload's raw size-scratch pair becomes an RAII
buffer, and both overloads now synchronize before the host reads the
device-computed size, which the old code consumed without ordering.

Signed-off-by: Mark Harris <mharris@nvidia.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-24 20:11:14 -07:00
Jonathan Swartz b2b4d30648 Fix out-of-date signature in TEACHME (#2295)
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-08-23 15:45:30 -07:00
Mark HarrisandClaude Opus 4.8 2a301b1290 Add NanoVDB TEACHME interactive tutorial + docs-compile test harness (#2226)
* Add NanoVDB TEACHME interactive tutorial + docs-compile test harness

doc/nanovdb/TEACHME/ is an interactive, LLM-guided tutorial for the
NanoVDB user API: 10 modules (reading grids, ReadAccessor, math/HDDA
sampling, GPU kernels, GPU grid builders, topology operators + data
re-homing via Injection, IndexGrid/VoxelBlockManager, OpenVDB
conversion), a cheat sheet, and a GPU level-set ray-march capstone.

To keep the tutorial from drifting from the API, the test harness in
doc/nanovdb/TEACHME/test/ extracts every C++/CUDA code block from the
docs and compiles it against the real NanoVDB headers, and validates
that every #include and prose header reference resolves. ~64 blocks
compile green.

A CI workflow (.github/workflows/teachme.yml) runs the harness whenever
the NanoVDB headers or the tutorial change, so API drift is caught
automatically. It is compile-only and needs no GPU.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: add pending-changes note for the TEACHME tutorial

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: note the TEACHME tutorial in pendingchanges

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

---------

Signed-off-by: Mark Harris <mharris@nvidia.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-23 20:53:21 +00:00
Ken Museth e68ff4bc8e Added new actions to vdb tool (#2259)
* added a new -copy action to vdb_tool

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* added the actions: copy,diagnose,rename,stats,swap,multiply,divide to vdb_tool

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* fixed some issues

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* major cleanup

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* added line continuation to config files

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* removed duplicate headers

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* snapshot

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* addressed reviewer comments (see detailed below)

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* review comments

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* fix to change log

Signed-off-by: Ken Museth <ken.museth@gmail.com>

---------

Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Ken Museth <1495380+kmuseth@users.noreply.github.com>
2026-08-23 11:29:29 -07:00
Mark HarrisandClaude Fable 5 e679862fca NanoVDB: support single-space device buffers in GridHandle (CUDA) (#2288)
* NanoVDB: support single-space device buffers in GridHandle (CUDA)

GridHandle can now own a nanovdb::cuda::Buffer<std::byte, R>: a new
hasDeviceSingle buffer trait selects a constructor (implemented in
cuda/GridHandle.cuh) that parses the grid metadata through the device,
with every operation -- the validated header walk, metadata scratch
allocation through the buffer's resource, the copy kernel and the
readback -- ordered on the buffer's retained stream.
deviceData()/deviceGrid() work on such handles. The host accessors
(data, grid, gridData, gridMetaData) are SFINAE-removed for them,
since the handle owns no host-readable bytes; the read/write I/O
members and splitGrids/mergeGrids stay addressable (the python
bindings take write's address via overload_cast) and fail instead
with an explanatory static_assert when instantiated for a
single-space handle.

The device parse validates the whole grid chain (per-header bounds
checks against the allocation) before launching the metadata kernel,
so truncated buffers and forged mGridCount/mGridSize headers are
rejected with an exception instead of an out-of-bounds device read;
the pre-existing dual-space parse had the same hole and now shares the
validation helper. Its metadata scratch uses MallocResource so that
long-standing path keeps working on devices without memory-pool
support, and the dirty-flag scratch in splitGridHandles and
mergeGridHandles is a resource-aware buffer as well -- together
replacing the file's six raw cudaMalloc/mallocAsync sites, one of
which was missing its cudaCheck.

copy() dispatches on the traits: host buffers keep the memcpy path,
single-space buffers deep-copy device-to-device through their own
resource on the retained stream and reuse the host-resident metadata
instead of re-parsing. Buffer gains ElementType/ResourceType typedefs,
a resource() accessor, and a no-argument copy() for stream-ordered
resources that orders the copy on the retained stream.

Host accessibility is a property of the resource, not the element
type: the new is_host_accessible_resource trait detects a
HOST_ACCESSIBLE marker (declared by PinnedResource and forwarded by
ResourceRef and AsyncFromSync). A cuda::Buffer over a host-accessible
resource is rejected at handle scope with a named error for now --
GridHandle's host paths require an allocation interface cuda::Buffer
does not yet provide -- and non-byte element types fail loudly in the
single-space constructor. Both hasDeviceSingle and hasHostSingle are
detected rather than required, so pre-existing BufferTraits
specializations in and out of tree compile unchanged.

Part of #2232 (step 3).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: validate and parse the device grid chain in one kernel pass

Replace the per-header device-to-host walk in the GridHandle constructors
with a single host read of the head header (which sizes the metadata
scratch) followed by one kernel that validates every header and fills the
metadata scratch in the same pass, plus one readback and one
synchronization regardless of the grid count. The previous walk issued one
synchronizing copy per header, so constructing the handle that
cuda::mergeGridHandles returns cost O(N) stream drains for N grids; it now
costs the same two round trips as a single-grid buffer, and the separate
metadata kernel launch, its scratch copy and final synchronization are
gone. Bounds are still checked before every header read, on the host for
the head and on the device for the rest, so a truncated buffer or forged
header can never read out of bounds.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: normalize grid index/count in addBlindData and indexToGrid output

Both tools copy the source grid's header verbatim into a new single-grid
buffer, so a source grid taken from a multi-grid handle left a stale
mGridIndex/mGridCount in the output. The returned handle's metadata parse
then walked a grid chain that is not there: past the end of the buffer for
index 0 of a multi-grid source, or starting at a nonzero index. The output
header is now normalized to index 0 / count 1 in the same kernels that
already patch its other fields, before each tool's existing checksum
update. The other handle-returning GPU tools were audited: the topology
ops and MeshToGrid normalize in TopologyBuilder, and the point builders
initialize fresh headers via GridData::init.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: share the buffer trait detectors and deduplicate GridHandle lookups

BufferHasDeviceSingle/BufferHasHostSingle move next to the BufferTraits
primary in HostBuffer.h: they are companions to the trait protocol, not
GridHandle-specific, so other handle types can consume them without
including GridHandle.h. The three identical grid-lookup bodies behind
grid() and both deviceGrid() families collapse into one private gridAt()
helper, and the supported-combination guard for GridHandle::copy() now
lives solely in the no-arg overload, so the two spellings cannot drift
apart when cross-space transfers relax it. cuda::Buffer documents the
single-space device-buffer concept on its BufferTraits specialization --
naming exactly the interface a consumer of hasDeviceSingle may rely on --
and gains a rebind alias for generic code that constructs sibling buffers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

---------

Signed-off-by: Mark Harris <mharris@nvidia.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-22 21:23:34 -07:00
Ken Museth 568538e9ec added vdb option to -soup2ls action and improved error handeling (#2266)
* added vdb option to -soup2ls action and improved error handeling

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* improved the documentation

Signed-off-by: Ken Museth <ken.museth@gmail.com>

---------

Signed-off-by: Ken Museth <ken.museth@gmail.com>
2026-08-20 22:11:15 -07:00
Jonathan SwartzandClaude Fable 5 c3ee2009c0 VBM select-based inverse-map decode (#2258)
* NanoVDB CUDA: select-based VoxelBlockManager inverse-map decode

Replace the O(nLeaves x 512) cooperative sweep in decodeInverseMaps with an
O(1)-per-slot select: one thread per output slot ranks itself into its leaf via
the jumpMap popcount, then locates its voxel with the leaf's 9-bit mPrefixSum plus
an in-word __fns bit select. Same signature, byte-exact decode maps.

Verified byte-exact on the VBM goldens for all consumers (decode/box/lap/weno) at
widths 64/128/256/512, and faster for every consumer with no regression: decode-only
2.17x/1.97x/1.62x/1.42x (w6/w7/w8/w9), 7-pt Laplacian -8.5..-15.4%, box/weno -4..-9%.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* NanoVDB: add pending changes entry for the select-based VBM decode

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* Additional explanatory comments and cleanup

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* NanoVDB CUDA: consolidate VBM decode to a thread-local per-slot API

Replace the cooperative shared-memory decodeInverseMaps with decodeInverseMap:
a per-slot decode into registers (no shared memory or synchronization; callable
from divergent threads), factored into jumpMapRank + selectVoxelInLeaf helpers.
computeBoxStencil now takes the decoded (leafIndex, voxelOffset) by value.
Block-level facts formerly read from the materialized maps derive directly from
the VBM metadata: the block's first leaf is firstLeafID, slot p starts a new
leaf iff jumpMap bit p is set, and the spanned-leaf count is 1 + the jumpMap
popcount.

Decode maps and all 27 box-stencil taps verified byte-exact against the prior
select decode at widths 64/128/512 across 16-86% leaf occupancy. Decode-only
+14..17% at width 128 and +8..13% at width 512 over the prior select, neutral
at width 64; vs master's sweep: 1.56-2.08x (w7) and 1.24-1.68x (w9) across the
sparsity range.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* NanoVDB CUDA: preserve decodeInverseMaps as a wrapper over the per-slot decode

Restore the cooperative decodeInverseMaps with its pre-existing signature as a
thin wrapper that materializes all BlockWidth slots via decodeInverseMap
(grid-striding over the slots, ending in __syncthreads), so existing callers
keep compiling and behaving unchanged. The per-slot decodeInverseMap remains
the preferred form for consumers that only read their own slot's result.

The unit test decodes through the wrapper (which exercises decodeInverseMap
internally) and resolves via the by-value computeBoxStencil; both
VoxelBlockManager tests pass.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 11:12:37 +12:00
Mark HarrisandClaude Fable 5 7946f17edb NanoVDB: own the small builders' device scratch with cuda::Buffer (CUDA) (#2286)
* NanoVDB: own the small builders' device scratch with cuda::Buffer (CUDA)

Route the last raw mallocAsync/freeAsync pairs in the GPU tools through
RAII cuda::Buffer scratch over an injectable resource, completing the
audit that PointsToGrid, TopologyBuilder, MeshToGrid and the topology-op
consumers already went through: IndexToGrid (node accessor + grid name),
addBlindData (byte-size scratch), GridStats (per-node statistics
scratch) and SignedFloodFill (node counts). Each gains a defaulted
ResourceT template parameter following the established conventions --
classes take a must-outlive resource instance in the constructor, free
functions take the template parameter and route through the per-type
default instance. Every replaced free keeps its position in stream
order via destroy(stream) at the old freeAsync site, and GridStats'
mode-dependent allocation becomes a zero-element buffer when the mode
has no average, so the resource sees identical traffic.

IndexToGrid's nested NodeAccessor is hoisted to the namespace-scope
IndexToGridNodeAccessor so the kernels that name it do not acquire a
spurious ResourceT dependency; a public alias preserves the nested
spelling.

Seam tests with exact allocation counts cover all four (including the
grid-name path, the Extrema zero-allocation path, and free-function
forwarding to the default instance).

Part of #2232 (step 2).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: document GridStats' NodeManager allocation boundary

The temporary NodeManager in GridStats::update allocates through the
dual-space DeviceBuffer, which cannot yet take a resource; make that
visible on update() so users injecting a resource for accounting or
limits know this allocation bypasses it until the single-space handle
work lands.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

---------

Signed-off-by: Mark Harris <mharris@nvidia.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 10:12:11 +12:00
Nick Avramoussis 204fce09fb Merge pull request #2285 from Idclip/codeowners
Improve codeowners lists for more targetted reviewers
2026-08-19 10:57:14 +12:00
Nick Avramoussis 385584be80 Improve codeowners lists for more targetted reviewers
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-08-19 10:36:13 +12:00
Eftychios Sifakis 2728de45a1 nanovdb: undef CALL_CUBS at the end of MeshToGrid.cuh (#2284)
TopologyBuilder.cuh and PointsToGrid.cuh both undef CALL_CUBS after
their last use so the macro doesn't leak into whatever gets included
next in the same translation unit. MeshToGrid.cuh was missing this.

Signed-off-by: Efty Sifakis <esifakis@nvidia.com>
2026-08-19 10:05:12 +12:00
Mark HarrisandClaude Fable 5 3f35101729 NanoVDB: run the builders on a synchronous memory resource (CUDA) (#2272)
* NanoVDB: align cuda::Buffer member names with cuda::buffer

Name the free operation destroy, as cuda::buffer does, and add the
stream-taking overload it also provides. clear stays but only as a
transitional delegate, marked as such: it exists because
GridHandle::reset still calls it, and goes away with the legacy dual
buffers that cuda::Buffer replaces.

Rename setStream to set_stream. Member names cannot be aliased, so
matching the standard spelling is the whole reason the resource concept
kept allocate_async; the same argument applies here. Note in passing that
ours deliberately does not synchronize, matching cuda::buffer's
set_stream_unsynchronized rather than its set_stream, whose own
documentation and implementation disagree (NVIDIA/cccl#10649).

Add swap. The generic std::swap already does the right thing through the
move operations, but both std::vector and rmm::device_buffer provide one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: allocate TopologyBuilder scratch from an injected resource

Eleven of the builder's buffers are device-only -- nothing reads them on
the host -- yet they were cuda::DeviceBuffer, whose host pointer and
per-device array they never use. Move them to the single-space
cuda::Buffer and give the builder a resource parameter, so its scratch is
injectable like PointsToGrid's already is, and freed by scope rather than
by hand. mProcessedRoot and mData are read on the host and stay dual.

This is not a speedup: DeviceBuffer::init allocates host or device memory
but never both, and these buffers always passed a real device id, so no
cudaMallocHost was on this path to begin with. Measured dilate on 1k/20k/
200k points, and the difference is within run-to-run noise.

Hoist the Data struct out of the class. It does not depend on the
resource, and leaving it nested would give every ResourceT its own
incompatible type for the device functors to name.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: add SyncFromAsync, and give MeshToGrid a resource seam

A stream-ordered resource must also model the synchronous concept, which
means writing four methods where two would do. The synchronous pair is
not a bare delegate -- memory from allocate must be usable on any stream
when it returns, so the null-stream allocation has to be synchronized
first -- and omitting that yields memory which satisfies the concept but
is not actually synchronous. Put it in one place rather than leaving each
author to rediscover it.

The two resources in TestMemoryResource are the first users, and were
already wrong in exactly that way: they provide only the async pair, so
they never modelled is_async_resource. TempPool duck-typed and never
checked, so nothing caught it.

MeshToGrid was the last builder allocating from a hard-wired
DeviceResource, through TempDevicePool. Give it a ResourceT parameter and
thread it into both its TopologyBuilder and its pool. As with Data in the
builder, BoxTrianglePair is hoisted out of the class: it does not depend
on the resource, and leaving it nested would give every ResourceT its own
incompatible type for the device functors to name.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: add ResourceRef and route TempPool's scratch through cuda::Buffer

Buffer holds its resource by value, matching cuda::buffer -- whose model
this completes: in CCCL the ownership semantics are selected by what is
placed in the by-value slot, an owning any_resource or a borrowing
resource_ref. We adopted the slot without the borrowing type, so a
container like TempPool, whose contract is a non-owning pointer to a
possibly stateful resource, had no way to hold a Buffer without copying
that resource and stranding its state. ResourceRef is the missing piece:
a non-owning reference that is itself a resource, so copying the ref
shares the underlying instance. Its async methods exist only when R
models AsyncResource, so a ref over a synchronous resource does not
misreport its tier, and two refs compare equal exactly when they
reference the same resource.

TempPool now keeps its bytes in a Buffer<std::byte, ResourceRef<R>>:
same resource contract, same stream retention, same discard-on-growth
reallocation, but the block is freed by ownership rather than by hand.
The TempPool unit tests, which assert traffic against the caller's own
resource instance, pass unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: note cuda::Buffer and cuda::BufferView in pendingchanges

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: express PointsToGrid's density search as a loop

The bisection search over voxel size was written as a backward goto,
which made the lifetimes of the buffers it retries over non-lexical.
Rewrite it as while(true) with continue on retry and break on
convergence; the six hand-written frees before the jump are unchanged.
The change is easiest to review with whitespace ignored, since the loop
body re-indents: git diff -w shows 27 changed lines.

d_keys and d_node_count carry results past the loop, so their
declarations move above it, as does the copy event, which was created
inside the retried region on every iteration but destroyed only once at
the end -- each retry leaked the previous handle.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: own PointsToGrid's device arrays with cuda::Buffer

Every device array PointsToGrid allocates is now owned by a
Buffer<T, ResourceRef<ResourceT>> borrowing the injected resource --
members where the pipeline frees them in a later member function than
the one that allocated them (countNodes allocates; processUpperNodes,
processLeafNodes, processPoints and processBBox release), locals where
the lifetime is contained. The raw pointers survive only as views: the
device-visible fields inside mData, and the working pointers the cub
and kernel calls take. Every owner event -- assignment, swap, destroy
-- immediately refreshes its view, and released views are nulled so a
stale use faults instead of reading a freed block. The index ping-pong
becomes a swap of owners across the member/local boundary, replacing
the bare pointer swap whose safety depended on nothing reading the
device copy of d_indx between the two uploads.

The density-search retry keeps its free-before-reallocate order via
explicit destroy calls, so peak device memory is unchanged. The
hand-matched byte sizes at every free site disappear, and the arrays
released one line before scope exit now just leave scope. One behavior
change worth naming: the too-many-points-per-leaf throw previously
leaked the reduction scratch; ownership now releases it during unwind.

Verified against the previous commit with a counting resource over
three shapes (bulk segmented-sort branch, serial per-tile branch, and
the bisection retry engaged): allocation count, free count, and total
bytes are identical. Full CUDA and memory-resource suites unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: free TopologyBuilder scratch on the caller's stream

Each release site sits in a function that receives the stream, so pass
it to destroy rather than relying on the retained stream matching --
they are the same on every current path, but the explicit form does not
depend on that staying true. Also drop the cudaGetDevice calls whose
result the Buffer conversion left unused.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: borrow TopologyBuilder scratch through ResourceRef

The scratch buffers held their resource by value, so each of the eight
carried its own copy -- fine for the stateless default, wrong for a
stateful resource, whose accounting would be split across copies while
the caller's instance saw nothing. Borrow through ResourceRef instead,
the same reconciliation TempPool uses.

Assert the stream-ordered requirement directly in TopologyBuilder and
MeshToGrid so a synchronous-only resource fails with a diagnostic that
names the builder, not just the pool inside it. Note SyncFromAsync's
synchronize cost on its allocate.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: guard PointsToGrid's copy event with a scope owner

The too-many-points-per-leaf throw unwinds past the event's manual
destroy, leaking the handle. Own it with a small guard so unwinding
releases it, consistent with the buffer ownership in this function.
Also assert the stream-ordered resource requirement on the class, so a
synchronous-only resource fails naming PointsToGrid rather than the
pool inside it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: run the builders on a synchronous memory resource

The builders require a stream-ordered resource, which a device without
memory-pool support cannot provide through cudaMallocAsync. Two additions
close the gap. MallocResource is a synchronous cudaMalloc/cudaFree
resource that works on any device. AsyncFromSync presents a synchronous
resource as a stream-ordered one -- the mirror of SyncFromAsync, and the
analog of cuda::mr's synchronous_resource_adapter: allocate_async
forwards, since synchronously allocated memory is already valid on every
stream, and deallocate_async synchronizes the stream first, which makes
the synchronous contract's quiescence requirement hold. The serialization
cost of that synchronize is documented at the type, so a synchronous
backend is an explicit caller choice rather than a silent substitution.

The new test drives PointsToGrid end-to-end with an injected
AsyncFromSync over a stateful synchronous resource: every scratch
allocation routes through cudaMalloc and is freed through the caller's
instance, never touching stream-ordered allocation -- which is exactly
what a pool-less device requires of the scratch path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: assert the scratch alignment TopologyBuilder relies on

The byte scratch is reinterpreted as word-sized types, which is valid
for every resource whose DEFAULT_ALIGNMENT is at least word alignment --
all CUDA allocation paths give 256 -- but nothing said so. Assert it, so
a custom resource with a weaker guarantee fails at compile time instead
of misaligning on the device.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: terminate a bare cudaCheckError with a semicolon

Legal without one -- the macro expands to a braced block -- but every
other use in the file spells it as a statement.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: make AsyncFromSync's null deallocation a no-op

Null-free is a no-op everywhere else, so there is no quiescence to
establish and no reason to synchronize the stream for it. Also correct
the sync-resource test's comment: the grid handle's output buffer is
allocated through BufferT, not the injected resource, so "every builder
allocation" overstated what the test demonstrates -- it is the scratch
allocations that never touch stream-ordered allocation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: set_stream matches cuda::buffer's contract, not a divergence

cuda::buffer's set_stream is deliberately non-synchronizing -- its
documented synchronization is a stale note left behind when the
synchronization was removed -- so our non-synchronizing set_stream
matches it in both name and contract, and the comment claiming a
divergence was wrong.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: mark cuda::Buffer::clear deprecated in the documentation

Documentation-level only: the [[deprecated]] attribute would warn from
GridHandle::reset and NodeManager::reset, template members in our own
headers that must keep calling clear() until every buffer type provides
destroy() -- an unactionable diagnostic for callers of reset(), and a
build break under -Werror. The attribute lands when those callers
migrate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: exercise the concept-required members of the test resources

The trait checks detect allocate/deallocate through unevaluated contexts,
which never odr-use them, so nvcc warned that every synchronous pair and
stub member was declared but never referenced (#177-D). The attribute
route is closed -- nvcc's front end ignores [[maybe_unused]] for this
diagnostic -- so reference them the honest way: a test that verifies the
synchronous halves of the counting and stream-recording doubles behave
like their stream-ordered halves, and one that pins the trait probes'
stub behavior. The TU now builds with no warnings at all.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

---------

Signed-off-by: Mark Harris <mharris@nvidia.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 12:36:46 -07:00
Jonathan Swartz 8a8ed7ca3e NanoVDB Python: restructure to mirror the C++ NanoVDB API (#2219)
* nanovdb python: Phase 0 foundation for C++ API mirror (#2209)

* nanovdb python: Phase 0 foundation for C++ API mirror

First slice of the Python bindings restructure tracked in #2208 and
laid out in nanovdb-python-plan.md. Phase 0 is the mechanical
groundwork the rest of the plan builds on:

- BuildTypes.def: single X-macro list of currently-bound BuildT types
  (scalar / vector / point / sampleable). NanoVDBModule.cc, PyMath.cc,
  PySampleFromVoxels.cc, PyCreateNanoGrid.cc, PyTools.cc, PyGridHandle.h
  and cuda/PyDeviceGridHandle.cu now drive their per-type instantiations
  from this one file. Adding a BuildT in Phase 2 becomes one line.

- CMakeLists.txt: under SKBUILD, ship the nanovdb/ headers inside the
  Python wheel at nanovdb/include/nanovdb/ so downstream extension
  authors can compile against the same headers the wheel was built with.
  Also wire nanobind_add_stub so a nanovdb.pyi (and py.typed marker) are
  emitted into the wheel for IDE / type-checker support; gated behind
  NANOVDB_BUILD_PYTHON_STUBS and silently skipped on older nanobind.

- __init__.py: add nanovdb.get_include() returning the bundled include
  dir. Also fix the Windows DLL shim, which referenced an undefined
  `directory` variable instead of the local `openvdb_dll_directory`.

- Relocate the batched sampleFromVoxels CUDA kernel binding from the
  phantom nanovdb.math.cuda submodule (which has no C++ counterpart) to
  nanovdb.tools.cuda, alongside the existing signedFloodFill and
  pointsToRGBA8Grid kernels. The math.cuda submodule is no longer
  registered. TestNanoVDB.py updated to match.

- Pre-existing observable bug fixes:
  * GridHandle.__bool__ returned None (lambda was missing return);
    it now returns !handle.empty() as intended.
  * Enable __repr__ on GridType, GridClass and io::Codec via the
    nanovdb::toStr / strlen<> helpers — previously commented out.

Build + pytest verified locally (CPU-only): 28 tests pass; the single
pre-existing test_read_write_grid BLOSC failure is unrelated (test
doesn't wrap the optional codec call in try/except like its sibling
does).

Part of #2208.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: align Phase 0 X-macros with codingstyle.txt

Audit of the new BuildTypes.def + consumers against
nanovdb/nanovdb/docs/codingstyle.txt:

- Rename the X-macro family NVDB_PY_FOR_EACH_*_BUILDT to
  NANOVDB_PY_FOR_EACH_*_BUILDT and the helper sentinels
  NVDB_PY_LOCAL_DEFINED_* to NANOVDB_PY_LOCAL_DEFINED_* to match the
  established NANOVDB_ macro prefix used everywhere else in the codebase
  (NANOVDB_USE_CUDA, NANOVDB_BUILD_PYTHON_MODULE, NANOVDB_HOSTDEV, ...).

- Bring lines under the 100-column limit:
    * Wrap the long VECTOR_BUILDT lines in BuildTypes.def across two
      lines each (cleaner alignment, no behavior change).
    * Rename the consumer macro parameter DeviceHandleMethod to
      DeviceMethod so the #define line itself fits (was 102 cols).
    * Reformat the GridHandle __bool__ lambda onto three lines instead
      of one 119-col line (made worse by the `return` fix in the
      previous commit).

- Add a top-of-file justification block in BuildTypes.def explaining why
  this file is a deliberate exception to the codingstyle "avoid macro
  functions" rule (templates can't emit top-level declarations and
  explicit instantiations across translation units from a single
  canonical list).

No functional change. Rebuild + pytest_nanovdb is identical to the
previous commit: 28 tests pass, 8 CUDA skips, 1 pre-existing BLOSC
failure.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: only generate .pyi stubs under SKBUILD by default

Fixes the macOS CI failure on #2209. The previous commit defaulted
NANOVDB_BUILD_PYTHON_STUBS to ON, which made the nanovdb_python_stub
target fire on every in-tree CI build. The macOS GitHub Actions runner
wraps the stubgen invocation with

  cmake -E env DYLD_INSERT_LIBRARIES=.../libclang_rt.tsan_osx_dynamic.dylib:
                                      .../libclang_rt.asan_osx_dynamic.dylib:
                                      .../libclang_rt.ubsan_osx_dynamic.dylib
  ASAN_OPTIONS=detect_leaks=0 python stubgen.py -m nanovdb ...

(this preamble is added by the runner / CMake env wrapper — nothing in
our nanobind_add_stub call sets it, and the .so itself is not built with
-fsanitize). ThreadSanitizer can only install its interceptors at
process start; Python loads first and then dlopen's the compiled .so,
which TSan considers "too late" and aborts:

  ==49907==ERROR: Interceptors are not working. This may be because
  ThreadSanitizer is loaded too late (e.g. via dlopen).

So the macOS build target failed with exit 2 after the .so itself built
fine. The other matrix legs (linux-nanovdb Debug/Release for clang/gcc)
all passed.

Stubs are only useful to wheel consumers — they ship next to the .so in
the installed package layout under SKBUILD. The in-source OpenVDB CI
build never consumes them, so making stub generation default ON only
when SKBUILD is set keeps the wheel build path unchanged and stops the
macOS CI from invoking stubgen under the sanitizer wrapper. The user can
still force generation with -DNANOVDB_BUILD_PYTHON_STUBS=ON for local
dev builds where it's useful.

Verified locally:
  - in-tree config (SKBUILD unset): no nanovdb_python_stub target
    defined; `make nanovdb_python_stub` errors with "no rule". Matches
    desired CI behavior.
  - SKBUILD=ON config: stub target exists, builds, emits nanovdb.pyi
    and py.typed into the install layout (28 kB stub file with all the
    expected GridHandle/GridType/GridClass symbols).

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: Phase 1 — polymorphic Grid, GridMetaData, blind data, PointAccessor (#2210)

* nanovdb python: Phase 1 — polymorphic Grid, GridMetaData, blind data, PointAccessor

Second slice of the Python bindings restructure tracked in #2208 and
laid out in nanovdb-python-plan.md. Phase 1 bundles the three sub-todos
(1a polymorphic API, 1b type-erased introspection + blind data, 1c
PointAccessor + handle utilities) into a single change on top of the
Phase 0 X-macro foundation.

API changes (pre-1.0 breaks called out in the plan):

- Polymorphic accessors. handle.grid(n=0) and handle.deviceGrid(n=0)
  replace the typed handle.floatGrid()/doubleGrid()/int32Grid()/
  vec3fGrid()/rgba8Grid() and their device equivalents. Dispatch is
  driven by gridType(n) through a switch generated from BuildTypes.def;
  unbound BuildTs route to None rather than throwing.

- Grid base class rename. The Python class previously bound as
  nanovdb.GridData is now nanovdb.Grid (matching the C++ user-facing
  class name Grid<TreeT>). All typed grid classes (FloatGrid, ...)
  inherit from Grid.

- Base-class method lift. version/gridSize/gridIndex/gridCount/voxelSize/
  map/gridType/gridClass/checksum/isLevelSet/isFogVolume/.../hasMinMax/
  hasBBox/.../isBreadthFirst/shortGridName move from per-BuildT
  defineNanoGrid<T> up to defineGrid via lambdas that read GridData data
  members directly. defineNanoGrid<T> now only binds getAccessor,
  activeVoxelCount, and isSequential — the BuildT-dependent slice.

Additive surface:

- GridMetaData. Bound as nanovdb.GridMetaData with constructor from a
  Grid and the full read-only accessor surface (gridType, gridClass,
  shortGridName, gridSize/Index/Count, map, worldBBox, indexBBox,
  voxelSize, blindDataCount, activeVoxelCount, activeTileCount(level),
  nodeCount(level), checksum, version, isValid, isLevelSet/...,
  hasMinMax/..., isBreadthFirst, rootTableSize, isEmpty). Type-erased
  introspector — answer "what's in this buffer?" without knowing BuildT.

- Blind data API on Grid. blindDataCount, blindMetaData(n),
  findBlindData(name), findBlindDataForSemantic(sem), getBlindData(n).
  getBlindData returns a zero-copy NumPy view typed by mDataType (Float
  -> 1D float32, Vec3f -> (N, 3) float32, RGBA8 -> (N, 4) uint8, etc.).
  Out-of-range and unknown-type paths return None / fall back to a flat
  uint8 byte view.

- Enums: GridBlindDataClass (Unknown/IndexArray/AttributeArray/GridName/
  ChannelArray/End) and GridBlindDataSemantic (Unknown/PointPosition/
  PointColor/PointNormal/PointRadius/PointVelocity/PointId/WorldCoords/
  GridCoords/VoxelCoords/LevelSet/FogVolume/Staggered/End). Bound as
  nb::enum_ with .export_values() so the names are also top-level
  attributes of the module.

- GridBlindMetaData struct. Read-only fields valueCount/valueSize/
  semantic/dataClass/dataType, name() accessor, isValid(),
  blindDataSize().

- PointAccessor variants. nanovdb.PointIndexAccessor (uint32 indices,
  used by PointIndex grids) and nanovdb.PointDataAccessor (Vec3f
  positions, used by PointData grids). Methods gridPoints(),
  leafPoints(ijk), voxelPoints(ijk) each return a zero-copy NumPy view
  onto the underlying blind-data buffer, anchored to the accessor
  lifetime via keep_alive.

- GridHandle utilities. handle.copy() does a deep copy into a freshly
  allocated buffer of the same buffer type. Module-scope splitGrids(h)
  -> list[GridHandle] and mergeGrids(handles) -> GridHandle are
  registered for both host and device handles via the existing
  defineGridHandleUtilities<BufferT> template (nanobind merges them as
  an overload set).

Mechanical X-macro changes:

- BuildTypes.def gains a GridTypeEnum column on each row so the
  polymorphic dispatch in pyHostGrid/pyDeviceGrid can `case
  nanovdb::GridType::<GridTypeEnum>:` on it. The Point row maps to
  GridType::PointIndex (there is no GridType::Point).
- HandleMethod/DeviceMethod columns dropped — the typed handle.fooGrid()
  accessors no longer exist.

NB_MODULE bind order:

- defineCheckMode + defineChecksum now bind BEFORE defineGrid because
  Grid.checksum() returns Checksum by value (registration must precede
  use).
- defineGridBlindData binds BEFORE defineGrid for the same reason
  (Grid.findBlindDataForSemantic / blindMetaData reference the new enum
  and class in their signatures).

Tests (TestNanoVDB.py): all typed-accessor call sites rewritten to
handle.grid(i)/handle.deviceGrid(i). New test classes cover the new
surface — TestPolymorphicGridAccess, TestGridBase, TestGridMetaData,
TestBlindDataEmpty, TestSplitMergeCopy — 11 new tests; the full suite
is now 48 tests, 39 pass on a minimal CPU build (8 CUDA skip, 1
pre-existing test_read_write_grid BLOSC failure unrelated to this PR).

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: don't expose splitGrids/mergeGrids for DeviceGridHandle

Caught during a real-CUDA verification pass of #2210: calling
nanovdb.mergeGrids([device_h1, device_h2]) raised std::bad_cast on
sm_120 (Blackwell, CUDA 13.2). Both the host and device overloads of
splitGrids/mergeGrids take nb::list, so nanobind's overload resolution
can't disambiguate by element type — it picks the first match and the
inner nb::cast<HostHandle&&>(device_h) fails.

The host-only variant is what the Phase 1 plan calls for. A properly
typed device variant (with its own name, or strongly-typed
std::vector<HandleT> args via nanobind/stl/vector.h) can land later if
it's actually needed. handle.copy() on a DeviceGridHandle continues to
work because copy() is a regular method, no overload resolution
involved.

Full CUDA pytest now reports 46/48 (the 2 failures are the pre-existing
test_read_write_grid BLOSC bug, host + device variants — both call
writeGrid(..., Codec.BLOSC) without try/except, identical to master).

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: address Copilot review on #2210

Three concrete fixes from Copilot's review of the Phase 1 PR
(https://github.com/AcademySoftwareFoundation/openvdb/pull/2210):

1) mergeGrids no longer consumes its input handles.

   The previous implementation built a std::vector<HandleT> via
   nb::cast<HandleT&&>(h), which move-constructs the C++ GridHandle
   out of the Python wrapper — leaving caller's h1/h2 silently
   emptied (gridCount went 1 -> 0, size went non-zero -> 0).
   Reproduced before fix; locked into a regression test
   (TestSplitMergeCopy.test_merge_does_not_consume_inputs).

   Rewrote the binding to read each handle by const reference and
   inline the merge concat directly. The nanovdb::mergeGrids C++
   helper's signature requires a std::vector<GridHandle> (a
   move-only type), so reusing it from Python without moving from
   the inputs would have meant deep-copying each handle twice; the
   inlined version is ~15 lines and does one memcpy per source grid
   with tools::updateGridCount fixing up the per-grid header.

2) getBlindData validates mValueSize against the implied dtype/shape
   before building a typed NumPy view.

   A blind-data channel with mDataType=Float but mValueSize != 4
   (corruption, version mismatch, or an unknown variant of a known
   tag) would previously be exposed as `count` float32 elements —
   i.e. count*4 bytes — even though the underlying region is only
   count*mValueSize bytes. That overruns the channel and returns a
   view onto unrelated bytes.

   Added a `valueSize == sizeof(...)` (or `dim*sizeof(scalar)` for
   vector cases) check on every handled GridType. On mismatch the
   binding falls back to a raw uint8 byte view of mValueCount *
   mValueSize, which is by definition the actual byte extent and
   therefore always safe.

3) GridMetaData ctor + safeCast guard against invalid grids before
   calling into NanoVDB, where NANOVDB_ASSERT(gridData->isValid())
   would abort debug builds and undefined-behave in release.

   nanobind's type system already rejects Python None at the bind-
   site (None can't bind to const GridData*), so the literal
   "GridMetaData(None)" case Copilot called out is a TypeError
   today — but the broader concern (an otherwise-valid Grid object
   wrapping a corrupted buffer) is real.

   __init__ now does an explicit `gd == nullptr || !gd->isValid()`
   check and raises nb::value_error with a descriptive message
   before calling into nanovdb::GridMetaData. safeCast does the
   same and returns False on bad input, matching the spirit of
   "is this safe to cast?".

   New tests: TestGridMetaDataGuards covers the rejection paths and
   the still-works happy path.

Build + test verified locally on both CPU (52 tests, 43 pass, 8 CUDA
skip, 1 pre-existing BLOSC) and full CUDA (52 tests, 50 pass, 2 pre-
existing BLOSC host+device).

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: Phase 2 — broaden BuildT coverage to 24 grid types (#2211)

* nanovdb python: Phase 2 — broaden BuildT coverage to 24 grid types

Third slice of the Python bindings restructure tracked in #2208 and
laid out in nanovdb-python-plan.md. Phase 2 expands the bound BuildT
list from the six surfaced in Phase 0/1 (float, double, int32_t, Vec3f,
Rgba8, Point) to seventeen new types, riding the Phase 0 X-macro so
each addition is a single row in BuildTypes.def plus a polymorphic
dispatch arm.

New BuildTs by category:

- SCALAR (+4): int16_t, int64_t, uint8_t, uint32_t.
  Bound exactly like the existing float/double/int32_t — full
  defineScalarAccessor (with setVoxel) plus defineNodeInfo.
  Class names follow the GridType enum: Int16Grid, Int64Grid,
  UInt8Grid, UInt32Grid.

- VECTOR (+5): Vec3d, Vec4f, Vec4d, Vec3u8, Vec3u16.
  Same shape as the existing Vec3f / Rgba8 — defineVectorAccessor
  with setVoxel, no NodeInfo. Accessor names use the consistent
  "<Suffix>ReadAccessor" form (Vec3dReadAccessor, ...); only the
  legacy Vec3fReadVectorAccessor / RGBA8ReadAccessor names from
  Phase 0 stay as-is.

- READONLY (new category, +8): bool, Fp4, Fp8, Fp16, FpN,
  ValueIndex, ValueOnIndex, ValueMask. These all have
  nanovdb::BuildTraits<T>::is_special == true, which means the C++
  SetVoxel<T> specialization static_asserts and won't compile.
  They get a bare defineAccessor<T> binding — getValue() only,
  no setVoxel, no NodeInfo. Class names: BooleanGrid, Fp4Grid /
  Fp8Grid / Fp16Grid / FpNGrid (quantized — getValue returns
  float), IndexGrid / OnIndexGrid (getValue returns uint64), and
  MaskGrid (getValue returns bool).

The accessor's value type now resolves through
nanovdb::BuildToValueMap<BuildT>::Type rather than
DefaultReadAccessor<BuildT>::ValueType. For ordinary types they're
identical, but for Half / Fp* the accessor decodes to float on read,
for ValueIndex / OnIndex it returns uint64, and for ValueMask / bool
it returns bool — the bound probeValue() out-parameter and the
Python-side return type both want the decoded form. (Without this
change, probeValue<Half>'s instantiation chain mismatches its own
ProbeValue<Half>::ValueT = float.)

nanovdb::Half is intentionally NOT bound. The source declares it as
`class Half{};` (an empty placeholder for IEEE 754 half-precision)
and the C++ ProbeValue<Half> chain is inconsistent — leaf storage
carries Half but ProbeValue expects float, so the template doesn't
instantiate. When the upstream Half implementation lands we can add
it via the same X-macro path.

Polymorphic dispatch in pyHostGrid / pyDeviceGrid gains a fourth
arm (NANOVDB_PY_FOR_EACH_READONLY_BUILDT) covering all eight new
GridType enumerators (Boolean, Fp4/Fp8/Fp16/FpN, Index, OnIndex,
Mask). handle.grid(n) / handle.deviceGrid(n) now return the right
typed subclass for these too.

Tests: a single new TestPhase2BuildTCoverage class with 5 methods
verifies every new BuildT registered, every accessor surface matches
its category (scalars have setVoxel + getNodeInfo; vectors have
setVoxel; read-only have neither), and all the new typed grids
inherit from the polymorphic Grid base. We can't host-construct
Int16Grid / Fp4Grid / IndexGrid / etc. yet because the C++
create*Grid factories for those types land in Phase 5 — but the
registration and the dispatch surface are locked in.

Build + test verified locally:
- CPU (no CUDA, no OpenVDB, no BLOSC): 57 tests, 48 pass, 8 CUDA
  skip, 1 pre-existing test_read_write_grid BLOSC failure unrelated
  to this PR.
- CUDA sm_120 (Blackwell, CUDA 13.2): 57 tests, 55 pass, 2 pre-
  existing BLOSC failures (host + device variants).

No new lines over 100 cols.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: address Copilot review on #2211

Three concrete fixes from Copilot's review of the Phase 2 PR
(https://github.com/AcademySoftwareFoundation/openvdb/pull/2211):

1) Bind GridType.UInt8 in the Python enum.

   Real bug — a Phase 0 oversight that was harmless until Phase 2
   surfaced UInt8Grid. The C++ enumerator nanovdb::GridType::UInt8
   existed (value 26), and the polymorphic dispatch routes it
   correctly internally, but the enum binding was missing the
   `.value("UInt8", GridType::UInt8)` line. Python users therefore
   couldn't write `handle.gridType(n) == nanovdb.GridType.UInt8` to
   discriminate UInt8 grids.

   New regression test TestPhase2BuildTCoverage.
   test_all_grid_type_enums_reachable walks every BuildT we bind
   and confirms its GridType enumerator is reachable from Python,
   so the next oversight gets caught at test time.

2) Update pyHostGrid() docstring in PyGridHandle.h. Was claiming
   "Boolean, Half, Fp16 land in Phase 2" as examples of types that
   weren't yet Python-visible — those examples are now stale (Phase
   2 binds Boolean and Fp16; Half stays unbound but for a different
   reason). Reworded to point at BuildTypes.def as the source of
   truth so the docstring can't go stale again as Phase 5+ adds
   more types.

3) Disambiguate "bool for ValueMask and bool" wording in the
   READONLY macro doc comment in BuildTypes.def. The second "bool"
   referred to the literal BuildT=bool grid; the phrasing read as
   redundant. Now: "bool for ValueMask and for the BuildT=bool
   (Boolean) grid". Same fix also enumerates the quantized types
   explicitly (Fp4/Fp8/Fp16/FpN) instead of writing "Fp*".

Build + test on CUDA sm_120 with BLOSC + ZLIB: 58/58 pass.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: Phase 3 — tree / nodes / NodeManager / leaf_values (#2212)

* nanovdb python: Phase 3 — tree / nodes / NodeManager / leaf_values

Fourth slice of the Python bindings restructure tracked in #2208 and
laid out in nanovdb-python-plan.md. Phase 3 makes the tree itself
walkable from Python: every BuildT now has a bound NanoTree, Root,
Upper / Lower internal node, Leaf, and a host-side NodeManager. Where
the leaf actually carries a contiguous T mValues[512] (regular
scalar BuildTs) we also expose zero-copy NumPy views, including a
high-level grid.leaf_values() bulk extractor.

Per BuildT we now register six new classes:

- <Suffix>Leaf — origin, bbox, dim, voxelCount, memUsage, flags,
  isActive(ijk|n), getValue(offset|ijk), getFirstValue, getLastValue,
  minimum / maximum / average / stdDeviation, valueMask, probeValue,
  and (for arithmetic non-special ValueTs) values() returning a
  zero-copy (512,) NumPy view of the leaf's mValues array.

- <Suffix>Upper, <Suffix>Lower — origin, bbox, dim, memUsage,
  minimum / maximum / average / stdDeviation, valueMask, childMask,
  getValue, getFirstValue, getLastValue, isActive, probeValue. The
  two internal node levels share a single defineInternalNodeBase
  helper since their C++ APIs are identical.

- <Suffix>Root — background, tileCount, getTableSize, isEmpty, bbox,
  minimum / maximum / average / stdDeviation, memUsage, getValue,
  isActive, probeValue.

- <Suffix>Tree — root, background, activeVoxelCount,
  activeTileCount(level), nodeCount(level), totalNodeCount,
  memUsage, getValue, isActive, probeValue, extrema() (returns
  (min, max) tuple), getFirstLeaf / getFirstLower / getFirstUpper.
  Grid.tree() is bound on NanoGrid<T> and returns the typed tree
  as reference_internal.

- <Suffix>NodeManager — isLinear, memUsage, nodeCount(level),
  leafCount, lowerCount, upperCount, leaf(i), lower(i), upper(i)
  returning typed node refs. Constructed via the module-scope
  nanovdb.createNodeManager(grid) which polymorphically picks the
  right BuildT and returns a NodeManagerHandle. Handle exposes
  size(), __bool__(), and mgr() — which itself dispatches by stored
  gridType to return the right typed NodeManager.

- grid.leaf_values() bulk extractor — for arithmetic non-special
  BuildTs (float, double, Int16/32/64, UInt8/UInt32), walks the
  breadth-first leaf array and returns a strided zero-copy
  (N_leaves, 512) NumPy view. Stride between leaves is sizeof(LeafT)
  / sizeof(ValueT), reflecting the leaf header between value blocks.
  Throws ValueError on non-breadth-first grids (createNanoGrid
  produces breadth-first by default).

Mechanical bits:

- All six bindings driven from BuildTypes.def via the existing
  X-macro. New file PyTree.h holds the templated definitions; PyTree.cc
  holds the non-templated NodeManagerHandle + createNodeManager bindings
  (the latter dispatches over every BuildT via the same X-macro).
- Tree / node classes are registered BEFORE defineNanoGrid because
  NanoGrid<T>.tree() returns NanoTree<T>& and nanobind needs the
  return type registered first.

Skipped / deferred:

- LeafT::variance() is NOT bound. NanoVDB.h line 4388 reads
  `Pow2(DataType::getDev())` unqualified, which fails ADL for
  non-float ValueTs (ValueIndex / ValueMask). Same for InternalNode.
  Users can compute variance from stdDeviation() in Python.
- VoxelBlockManager (OnIndexGrid-specific) deferred to a follow-up;
  surface is sizeable enough to merit its own PR.
- Vector leaf values() (Vec3f / Vec3d / Vec4f / Vec4d / Vec3u8 /
  Vec3u16 / Rgba8) deferred — these need a flattened
  (count, dim) component view since nanobind ndarray<Vec3f> isn't
  well-formed. A future PR can add float[N, 512, 3] views.
- Tree iterators (beginValueOn etc.) deferred — the bulk leaf_values
  view + per-leaf valueMask covers the most common use case (mask
  the bulk array and you have your active values).

Verified locally (BLOSC + ZLIB on so the optional-codec tests pass):
- CPU build: 58 tests + 8 new TestPhase3TreeNodes — **all 66 pass**.
- CUDA sm_120 build (RTX PRO 6000 Blackwell, CUDA 13.2):
  **all 66 pass**.
- numpy-backed shape/dtype assertions in the new tests confirm the
  per-leaf values() (512,) float32 and bulk leaf_values()
  (N_leaves, 512) float32 views. NodeManager.leaf(i).values() is
  byte-identical to tree.getFirstLeaf().values() for i==0.

No new lines over 100 cols.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: drop phase numbers + reviewer markers from tests and comments

User-facing strings in tests/comments that reference in-flight project
history (phase numbers, reviewer names) lose their meaning once the
project merges. Drop them and reword the surrounding text so each name
and comment self-describes the feature being tested.

- Renamed TestPhase2BuildTCoverage -> TestBuildTRegistrations.
- Renamed TestPhase3TreeNodes -> TestTreeNodeWalking.
- Reworded docstrings on TestPolymorphicGridAccess, TestGridBase,
  TestGridMetaData, TestBlindDataEmpty, TestSplitMergeCopy,
  TestGridMetaDataGuards to describe the feature instead of the phase.
- Inline comments referencing "Phase 0", "Phase 1a.3", "Copilot review",
  etc. reworded into prose about the actual behavior being asserted or
  the underlying bug being regression-tested.
- Same cleanup on the cuda/PyDeviceGridHandle.cu note about why we don't
  register splitGrids/mergeGrids on DeviceBuffer.

No behavior change. 66/66 tests still pass with BLOSC+ZLIB on.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: fix Clang Tree.nodeCount overload + drop exception-driven createNodeManager dispatch

Two real issues caught in CI / review on #2212:

1) Tree.nodeCount(int) binding doesn't compile on Clang.

   PyTree.h used `nb::overload_cast<int>(&TreeT::nodeCount, nb::const_)`
   to select the non-templated `uint32_t nodeCount(int) const` overload
   on nanovdb::Tree<RootT>. Tree<RootT> also has a templated
   `template<typename NodeT> uint32_t nodeCount() const` overload.
   GCC accepted the overload_cast under SFINAE rules; Clang (used by
   the linux-nanovdb:cxx:clang++-Debug CI leg) rejects it with
   `no matching function for call to object of type
    'const detail::overload_cast_impl<int>'`, repeated once per
   BuildT instantiation.

   Replaced with a direct static_cast to the function pointer type,
   which is unambiguous to both compilers:

       static_cast<uint32_t (TreeT::*)(int) const>(&TreeT::nodeCount)

2) createNodeManager dispatch was exception-driven.

   The previous binding tried nb::cast<NanoGrid<T>&>(py_grid) for every
   BuildT and caught nb::cast_error on each mismatch — so a single call
   to nanovdb.createNodeManager(grid) threw and caught 22 cast_error
   exceptions before landing on the matching BuildT. Replaced with an
   nb::isinstance<GridT>(py_grid) pre-check so the cast is only ever
   attempted on the matching BuildT.

Both linux-nanovdb:cxx:clang++-Debug should now build, and
createNodeManager() no longer pays per-call exception overhead.
Verified locally on CPU and CUDA sm_120 builds: 66/66 tests pass with
BLOSC + ZLIB on.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: bounds-check + lifetime fixes on #2212

Addresses Copilot review notes on PR #2212. Two real classes of bug.

(1) Out-of-range arguments fell through into raw memory access.

Several entry points on Leaf, Tree, and NodeManager rely on
NANOVDB_ASSERT in the underlying C++ to catch invalid indices. That
assertion is a no-op in release builds, so passing an OOB index from
Python would read off the end of mValueMask / mValues / mNodeOffset[]
arrays. Wrapped each with an explicit range check that raises a
Python IndexError or ValueError:

  - Leaf.isActive(n)            n must be < voxelCount()  (512)
  - Leaf.getValue(offset)       offset must be < voxelCount()
  - Tree.activeTileCount(level) level must be 1, 2, or 3
  - Tree.nodeCount(level)       level must be 0, 1, or 2
  - NodeManager.nodeCount(L)    same as Tree
  - NodeManager.leaf(i)         i must be < leafCount()
  - NodeManager.lower(i)        i must be < lowerCount()
  - NodeManager.upper(i)        i must be < upperCount()

(2) Returned pointers / NumPy views did not actually keep their
backing buffers alive.

The pattern `nb::cast(value, nb::rv_policy::reference, parent)` was
used at multiple sites under the assumption that the third argument
established a Python-level keep_alive linkage between the returned
object and `parent`. It doesn't — rv_policy::reference is "no
ownership, no keep_alive" by definition; the parent argument is only
a hint to the cast machinery, not a lifetime guarantee.

As a result, expressions that drop the intermediate handle would
silently free the underlying buffer:

    g = nanovdb.tools.createFogVolumeSphere(name='probe').grid()
    g.gridName()   # SEGFAULT — handle was GC'd

    vals = (nanovdb.tools.createFogVolumeSphere()
            .grid().tree().getFirstLeaf().values())
    vals.sum()     # SEGFAULT

    nm = nanovdb.createNodeManager(
        nanovdb.tools.createFogVolumeSphere().grid()).mgr()
    nm.leaf(0)     # SEGFAULT — NodeManager holds raw ptr to grid

Added explicit `nb::keep_alive<0, 1>()` to the .def for every
affected site so the returned value keeps its parent alive:

  - GridHandle.grid(n)              (PyGridHandle.h)
  - DeviceGridHandle.deviceGrid(n)  (cuda/PyDeviceGridHandle.cu)
  - NodeManagerHandle.mgr()         (PyTree.cc)
  - Grid.getBlindData(n)            (NanoVDBModule.cc)
  - Leaf.values()                   (PyTree.h)
  - Grid.leaf_values()              (PyTree.h)
  - PointAccessor.gridPoints / leafPoints / voxelPoints
                                    (NanoVDBModule.cc)
  - nanovdb.createNodeManager(grid) keep arg 1 (grid) alive as long
    as the returned NodeManagerHandle lives — because the underlying
    NodeManager stores a raw pointer to the grid.

These were pre-existing bugs introduced in Phase 1 (pyHostGrid) and
inherited by every subsequent zero-copy view; Phase 3 surfaced more
of them via the new Tree/Leaf/NodeManager bindings.

Two new test classes lock the fixes in:

  - TestBoundsChecks asserts each guarded entry point raises the
    correct exception type at every boundary and still accepts in-
    range inputs.
  - TestZeroCopyViewLifetimes invokes each fixed binding in the
    chained-temporary form (handle.grid().tree().getFirstLeaf()
    .values(), createNodeManager(temp).mgr().leaf(0).values(), ...),
    runs gc.collect(), then touches the returned value. Pre-fix
    these segfaulted; now they pass cleanly.

CPU + CUDA sm_120 (BLOSC + ZLIB on): 75/75 pass.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: address Copilot follow-up review on #2212

Three further Copilot notes on the bounds-check/lifetime commit
(f6735717), all valid.

(1) PyTree.h relied on transitive includes for std::is_arithmetic_v /
    std::enable_if. Works on GCC + libstdc++ because <type_traits> is
    pulled in by <nanobind/nanobind.h> -> standard headers, but MSVC /
    libc++ may break the chain. Added an explicit
        #include <type_traits>
    near the top.

(2) grid.leaf_values() returned None for empty grids (nLeaves == 0 or
    getFirstLeaf() == nullptr) while its docstring promised an
    (N_leaves, 512) NumPy view. Callers had to special-case the None
    sentinel before iterating. Now returns an empty (0, 512) ndarray
    of the right dtype, so the contract reads cleanly:

        for row in grid.leaf_values(): ...

    works on every grid, empty or not. When nLeaves == 0 we pass a
    dummy non-null aligned pointer (the grid itself) to nb::ndarray so
    nanobind has a valid base for the empty array — no data is read
    since the leading shape is 0. Docstring updated to call out the
    empty-grid behavior explicitly.

(3) The ValueError raised on a non-breadth-first grid said
        "rebuild via tools::createNanoGrid(...)"
    which reads like a C++ symbol. Reworded to the Python-API form
        "rebuild via nanovdb.tools.createNanoGrid(...)"
    so Python users see a Python entry point.

New test method TestTreeNodeWalking.test_bulk_leaf_values_empty_grid_returns_empty_array
constructs a grid with an empty bbox (nLeaves == 0) and asserts
leaf_values() is an (0, 512) float32 NumPy array (not None).

CPU + CUDA sm_120 (BLOSC + ZLIB on): 76/76 pass.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: VoxelBlockManager (host) — Phase 3 follow-up (#2213)

* nanovdb python: VoxelBlockManager (host) — Phase 3 follow-up

Phase 3 deferred the VoxelBlockManager surface; this picks it up before
moving on to Phase 4. Adds host-side bindings for everything under
nanovdb::tools::VoxelBlockManager*, plus a minimal createOnIndexGrid
scaffold needed to build OnIndex grids from Python (the broader
createNanoGrid<SrcGridT, DstBuildT> binding lands in Phase 5).

New module surface, all under nanovdb.tools:

- VoxelBlockManagerHandle (host) — owns the firstLeafID + jumpMap
  metadata buffers; exposes blockCount(), firstOffset(), lastOffset(),
  reset(), __bool__. Buffers exposed as zero-copy NumPy views:
    firstLeafID() -> (blockCount,) uint32
    jumpMap(jump_map_length=1) -> (blockCount, jump_map_length) uint64
  jumpMap takes a jump_map_length argument because the value depends on
  log2_block_width (= 1 << (log2_block_width - 6)) and isn't stored on
  the handle. handle.decodeBlock(grid, i, log2_block_width=6) is a
  convenience method that slices firstLeafID / jumpMap for block i and
  calls decodeInverseMaps internally.

- buildVoxelBlockManager(grid, log2_block_width=6, first_offset=0,
  last_offset=0, n_blocks=0) — runtime switch over Log2BlockWidth ∈
  {6, 7, 8, 9} (BlockWidth 64/128/256/512) dispatching to the right
  template instantiation. Rejects non-OnIndex grids with TypeError;
  rejects out-of-range log2_block_width with ValueError.

- decodeInverseMaps(grid, first_leaf_id, jump_map, block_first_offset,
  log2_block_width=6) — free function. jump_map is a uint64 NumPy
  array of length JumpMapLength (= 1 << (log2_block_width - 6));
  returns (leaf_index, voxel_offset) freshly-allocated NumPy arrays
  (uint32, uint16) of length BlockWidth.

- createOnIndexGrid(src_grid, channels=0, include_stats=True,
  include_tiles=True, verbose=0) — minimal test-scaffold factory
  that binds tools::createNanoGrid<SrcGridT, ValueOnIndex>. Accepts
  FloatGrid, DoubleGrid, Int32Grid, Vec3fGrid sources. Required for
  end-to-end VBM testing since no other path produces an OnIndex
  grid from Python today. The full createNanoGrid<SrcGridT, DstBuildT>
  surface remains scoped to Phase 5.

Defensive checks:

- decodeBlock validates firstLeafID[block_index] is in [0, leafCount)
  before passing it into the C++ decodeInverseMaps. The underlying
  NanoVDB algorithm doesn't always initialize firstLeafID — blocks
  that no leaf's iteration sweep reaches (e.g. on tile-compressed
  OnIndex grids where some sequential offsets correspond to tile
  values rather than leaf voxels) are left with uninitialized memory.
  Without the guard, decodeInverseMaps would read
  tree.getFirstNode<0>()[garbage] and crash; the guard converts that
  into a Python ValueError with a clear message pointing at the
  workaround (build the source grid voxel-by-voxel via build::Grid
  so it stays uncompressed).

- All entry points reject out-of-range indices, levels, and grid
  build types up front (TypeError / ValueError / IndexError).

Tests under TestVoxelBlockManager exercise:
  - createOnIndexGrid produces an OnIndex / IndexGrid / sequential grid
  - Buffer shapes and dtypes (firstLeafID, jumpMap default + reshape)
  - decodeBlock(0) returns (uint32, uint16) arrays of length BlockWidth
  - decodeInverseMaps free function agrees with handle.decodeBlock
  - Out-of-range block_index raises IndexError
  - Out-of-range log2_block_width (5, 10) raises ValueError
  - Non-OnIndex grid argument raises TypeError
  - createOnIndexGrid(None) raises TypeError

End-to-end decode verification across every block is intentionally
deferred until Phase 4's build::Grid bindings land — that's the only
host-side path to construct a tile-free OnIndex grid where every
block's firstLeafID is reliably initialized by the current upstream
algorithm.

Verified locally:
- CPU build: 84 tests, 75 pass + 8 new VBM tests, 1 pre-existing
  test_read_write_grid BLOSC env-dependent failure unrelated to this PR.
- CUDA sm_120 + BLOSC + ZLIB: 84/84 pass.

No new lines over 100 cols.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: skip ndarray tests cleanly when numpy is missing

Windows CI surfaced three test errors on #2213 from
TestZeroCopyViewLifetimes — the test methods invoked
.values() / .leaf_values() directly without an `import numpy` guard,
so on environments without numpy installed (e.g. the Windows runner)
the bindings raised:

    TypeError: could not export nanobind::ndarray:
        ModuleNotFoundError: No module named 'numpy'

The other ndarray-touching tests (test_leaf_values_zero_copy,
test_bulk_leaf_values, test_node_manager_round_trip, the VBM
test_decode_block_zero, etc.) already guard with `import numpy`
and call self.skipTest. The three lifetime tests just skipped
that guard.

Added the same try/except ImportError + skipTest pattern to:
  - TestZeroCopyViewLifetimes.test_handle_grid_tree_leaf_values_chain
  - TestZeroCopyViewLifetimes.test_grid_leaf_values_temporary
  - TestZeroCopyViewLifetimes.test_node_manager_temporary_grid

While I was here, also dropped an unnecessary numpy guard on
TestVoxelBlockManager.test_create_on_index_grid_rejects_unsupported_source
— that test only checks TypeError on a non-grid input and doesn't
touch numpy, so it can run unconditionally.

Verified locally with both a numpy-enabled venv (84/84 pass minus the
pre-existing BLOSC env failure) and a numpy-less venv (84 ran, 17
skipped, no new errors).

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: install numpy on Windows CI so ndarray tests run

The Windows job for the NanoVDB workflow was missing the install_numpy
step that the main openvdb build.yml and weekly.yml workflows already
run after install_windows.ps1. As a result the vcpkg-supplied Python
on the Windows runner had no numpy, so every test that touches
nb::ndarray<nb::numpy, ...> either errored (before #2213's skip
guards) or now skips silently.

Add the install_numpy step using the existing
ci/install_windows_numpy.ps1 helper, matching the pattern already in
build.yml. The Windows runner will then actually execute the
ndarray-touching VoxelBlockManager / Tree / GridHandle tests instead
of skipping them.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: address Copilot review on #2213

Four issues raised by Copilot on the open VBM follow-up PR, all real:

1. VoxelBlockManagerHandle.jumpMap(jump_map_length) accepted any
   caller-supplied length and used it to shape a zero-copy NumPy view
   over hostJumpMap(). Since the underlying buffer was sized as
   blockCount * JumpMapLength (where JumpMapLength is derived from
   the log2_block_width the handle was BUILT with), a caller passing
   a larger value produced an ndarray whose elements lived past the
   end of the allocated buffer — an OOB read on access.

   Fix: wrap VoxelBlockManagerHandle in a small PyVBMHandle struct
   that also stores the log2_block_width. jumpMap() takes no
   arguments and derives JumpMapLength from the stored width, so the
   returned view always matches the buffer exactly. decodeBlock() no
   longer accepts a log2_block_width either, removing the equivalent
   mismatch hazard there. The new PyVBMHandle exposes
   log2_block_width / block_width / jump_map_length as read-only
   properties for introspection.

2. decodeInverseMaps() did not validate first_leaf_id against
   grid.tree().nodeCount(0). VoxelBlockManager::decodeInverseMaps
   indexes tree.getFirstNode<0>()[first_leaf_id] unconditionally, so
   a stray ID produced an OOB read of the leaf array. Validate up
   front and raise IndexError.

3. buildVoxelBlockManager() did not enforce grid.isSequential() (a
   precondition guarded only by NANOVDB_ASSERT, which is a no-op in
   release) nor that first_offset == 1 (mod BlockWidth). Validate
   both at the Python boundary and raise ValueError; the zero
   first_offset default still flows through unchanged because the
   C++ helper normalizes it to 1 itself.

4. The zero-copy shape/dtype test exercised
   vbm.jumpMap(jump_map_length=2) on a handle built with
   log2_block_width=6 — exactly the OOB case (1) was about. Rewrite
   the test to build a second handle with log2_block_width=7 and
   verify its jumpMap shape is (blockCount, 2), confirming the
   shape now follows the handle. Drop the obsolete
   log2_block_width=6 kwarg from decodeBlock. Add two new tests:
   misaligned first_offset is rejected, and an out-of-range
   first_leaf_id on decodeInverseMaps raises IndexError.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: empty-handle guards + accurate ownership comment

Two follow-up items from Copilot on #2213:

1. firstLeafID() and jumpMap() called hostFirstLeafID() / hostJumpMap()
   on the underlying VoxelBlockManagerHandle and fed the result straight
   into nb::ndarray, but both accessors legally return nullptr on a
   default-constructed or reset() handle (blockCount() == 0). Passing
   nullptr into nb::ndarray is unsafe even with a zero leading shape.
   Mirror the pattern PyTree.h uses for the empty-grid leaf_values()
   case: when the buffer is null, substitute a non-null dummy pointer
   (the handle itself) so nanobind has something to base the empty
   ndarray on; nothing is read because the leading shape is 0. Add
   tests for both default-constructed and reset() handles.

2. The pyDecodeInverseMapsImpl comment described nanobind as allocating
   "fresh memory through numpy", which doesn't match the implementation
   (which uses new[] + a capsule with delete[] as deleter). Rewrite the
   comment to describe the actual ownership model so future maintainers
   aren't misled.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: VBM exception-safety + firstLeafID sentinel prefill

Two more items from Copilot on #2213:

1. pyDecodeInverseMapsImpl allocated leafIndex / voxelOffset with raw
   new[] and only wrapped them in nb::capsule after several intervening
   operations (a second new[], the decodeInverseMaps call itself, and
   the first capsule's own construction). If anything in that window
   threw, the half-built state leaked. Hold the raw arrays in
   std::unique_ptr until each capsule has been constructed, then
   release() so ownership transfers cleanly; any throw during that
   sequence now unwinds without leaking.

2. The C++ allocating overload of buildVoxelBlockManager uses
   HostBuffer::create (uninitialized malloc) for firstLeafID, then
   touches only the slots its iteration sweep reaches. Blocks the
   algorithm doesn't visit retain arbitrary values; the existing
   decodeBlock guard (firstLeafID >= nLeaves) catches values past the
   leaf array but cannot tell garbage that happens to be < nLeaves
   from a real leaf id, so a low garbage byte would silently decode
   against the wrong leaf.

   Switch the Python binding to allocate the metadata buffers itself,
   prefill every firstLeafID slot with the sentinel value `nLeaves`,
   then call the in-place buildVoxelBlockManager(grid, handle)
   overload. The in-place builder zeros the jumpMap and only writes
   firstLeafID slots it visits, so every untouched slot keeps the
   sentinel and deterministically trips the decodeBlock guard.

   Add test_untouched_blocks_trip_sentinel_guard, which sweeps every
   block of the cube VBM and asserts each firstLeafID slot is either
   a real leaf id (< nLeaves) or exactly the sentinel — never any
   other value.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: VBM popcount upper-bound + n_blocks validation

Two more items from Copilot on #2213:

1. The decodeBlock guard only checked firstLeafID < nLeaves, but the
   C++ decodeInverseMaps loops leafID = firstLeafID ..
   firstLeafID + nExtraLeaves where nExtraLeaves is the popcount of
   this block's jumpMap (each set bit marks an additional leaf
   boundary crossed within the block). With a corrupt jumpMap or a
   handle paired with a different grid, the loop could read past
   tree.getFirstNode<0>() even with a valid firstLeafID.

   Hoist a popcount-based upper-bound check into
   pyDecodeInverseMapsImpl: compute nExtraLeaves locally and raise
   ValueError if firstLeafID + nExtraLeaves >= grid.tree().nodeCount(0).
   Because both the handle.decodeBlock() and the free-function
   decodeInverseMaps() funnel through this impl, both paths are
   covered without per-caller duplication.

2. buildVoxelBlockManager accepted an explicit n_blocks but didn't
   validate it against the documented precondition
   n_blocks >= ceil((last_offset - first_offset + 1) / BlockWidth).
   A smaller value produced a handle whose blockCount() < the
   coverage implied by lastOffset, silently truncating later
   decodeBlock sweeps. Validate when nonzero and raise ValueError
   with the minimum required value in the message.

   New test_build_voxel_block_manager_rejects_undersized_n_blocks
   covers the n_blocks=1 case on the cube VBM.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: explicit std headers in PyVoxelBlockManager.cc

Copilot noted PyVoxelBlockManager.cc uses std::integral_constant,
std::string/std::to_string, and std::move but relied on transitive
includes from nanobind / NanoVDB headers to bring those in. That works
on the toolchains we currently test but is fragile against stricter
ones.

Add explicit <string>, <type_traits>, and <utility> includes; drop
<cstring> and <stdexcept>, neither of which the translation unit
actually uses now.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: Phase 4a — tools.build.Grid<T> mutable CPU builder (#2214)

* nanovdb python: Phase 4a — tools.build.Grid<T> mutable CPU builder

Bind nanovdb::tools::build::Grid<BuildT>, its ValueAccessor<BuildT>, and
Tree<BuildT>::WriteAccessor under a new nanovdb.tools.build submodule.
One set of classes per writable BuildT in BuildTypes.def — every scalar
(float, double, int16, int32, int64, uint8, uint32) and every vector
(Vec3f, Vec3d, Vec4f, Vec4d, Vec3u8, Vec3u16, Rgba8). Naming mirrors
the C++ namespace: nanovdb.tools.build.FloatGrid is the mutable
counterpart of the read-only nanovdb.FloatGrid.

The binding exposes:

- Grid<T>(background, name='', gridClass=Unknown) — constructor
- getValue / setValue / setValueOn / isActive (the last two convenience-
  wrap a fresh ValueAccessor under the hood, since C++ has no
  setValueOn/isActive on Grid itself)
- nodeCount, gridType, gridClass, getName/setName, setTransform,
  .background property
- getAccessor() / getWriteAccessor() returning the typed Value /
  WriteAccessor proxies
- .to_nanovdb(sMode, cMode, verbose) — bakes the build grid into a
  host NanoGrid<BuildT> handle by calling tools::createNanoGrid

ValueAccessor exposes getValue/setValue/setValueOn/isActive/isValueOn.
WriteAccessor exposes setValue/setValueOn/merge. Both are wired up so
the parent grid is kept alive by Python while the accessor lives.

Implementation notes:

- WriteAccessor's defaulted move constructor leaves its internal
  ValueAccessor::mRoot reference dangling (the reference points into
  the moved-from WriteAccessor's own mRoot field, which is per-object
  state — not the parent Tree's mRoot). The Python binding bypasses
  the move path by heap-allocating via nb::rv_policy::take_ownership
  so the C++ object's address is stable for its entire lifetime.
- ValueAccessor doesn't have this hazard because its mRoot reference
  points at the parent Tree's mRoot (a stable address external to the
  accessor), so move construction is safe.
- Read-only special BuildTs (Boolean, Fp4/8/16/N, ValueIndex,
  ValueOnIndex, ValueMask) and Point are deliberately excluded — they
  have no SetValue<T> specialization and can't be built voxel-by-voxel.

Test coverage in new TestBuildGrid: constructor defaults, setValue
marks active, setValueOn preserves background, accessor parity with
grid, WriteAccessor merge-on-destruction, .to_nanovdb() round-trip
with metadata preserved, .to_nanovdb() doesn't consume the source,
Int32Grid + Vec3fGrid spot-checks, and setTransform propagation to
the baked grid's voxelSize / map.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: address Copilot review on #2214

Four items from the Phase 4a review, all valid:

1. Grid<T>.background property read self.mRoot.mBackground directly,
   touching an internal field even though RootNode exposes a
   background() accessor. Switch to self.mRoot.background() so the
   binding doesn't depend on the underlying field name staying put.

2. .to_nanovdb() can be an expensive bake for large grids but held
   the GIL the whole time. Add nb::call_guard<nb::gil_scoped_release>()
   so other Python threads can run during the conversion (the lambda
   only touches C++ state, no Python object handling).

3. nodeCount()'s docstring said the tuple was "internal node counts",
   but the first element is the leaf (level-0) count — leaves are not
   internal nodes. Reword to just "(leaf_count, lower_count,
   upper_count)" and drop the "internal" mislabel.

4. The WriteAccessor merge test was named "merges_on_destruction" but
   actually called wa.merge() explicitly and never forced the
   destructor to run. Split into two cases:
   - test_write_accessor_explicit_merge — calls .merge() explicitly,
     matching what the original test actually checked
   - test_write_accessor_merges_on_destruction — drops the only
     reference (del wa) and runs gc.collect() so the C++ destructor
     fires, then asserts the change is visible

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: use Vec3f.__eq__ in build::Vec3fGrid test

Copilot noted the component-by-component comparison in
test_vec3f_build_grid was justified by an out-of-date claim that
Vec3f equality isn't bound — it is (PyMath.cc defineVec3 wires
nb::self == nb::self). Use self.assertEqual(got, v) directly.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: Phase 4b + 4c — stats, validation, checksum (#2215)

* nanovdb python: Phase 4b + 4c — stats, validation, checksum

Round out Phase 4 by binding the GridStats, GridValidator, and
GridChecksum surfaces that didn't ship with Phase 4a.

Phase 4b — Stats
================

* Per-BuildT `tools.<Suffix>Extrema` and `tools.<Suffix>Stats` classes
  for every scalar and vector BuildT in `BuildTypes.def`. Extrema
  exposes `min` / `max` / `add(value)` and a truthy `bool()` for "has
  at least one sample"; Stats inherits from Extrema and adds `size`,
  `avg` / `mean`, `var` / `variance`, `std` / `stdDev`. Static
  predicates `hasMinMax` / `hasAverage` / `hasStdDeviation` /
  `hasStats` mirror the C++ trait queries.

* `tools.updateGridStats(grid, mode=Default)` — polymorphic dispatch
  via `callNanoGrid` over an `UpdateGridStatsOp`. Scalar and vector
  BuildTs route to `tools::updateGridStats<BuildT>`; the special /
  quantized / index / mask types (`Fp4/8/16/N`, `ValueIndex`,
  `ValueOnIndex`, `ValueMask`, `Point`) raise `ValueError` because
  `Stats<ValueT>` isn't meaningful for them. `bool` falls through to
  the C++ `NoopStats` arm.

* Per-BuildT `tools.getExtrema(grid, bbox)` returning the matching
  `Extrema`. Restricted to scalar + vector BuildTs (the only ones
  with an arithmetic ValueType).

Both `updateGridStats` and `getExtrema` release the GIL during the
traversal.

Phase 4c — Validation & checksum
================================

* `tools.validateGrid(handle, gridID, mode=Default, verbose=False)`
  for `GridHandle<HostBuffer>` — single-grid complement of the
  existing `validateGrids`. Returns `False` (without raising) when
  the gridID is out of range.

* `tools.checkGrid(grid, mode=Full)` — polymorphic via `callNanoGrid`.
  Returns `(ok, error_message)`. The 256-byte char buffer the C++
  helper writes into is hidden inside the binding so Python callers
  see a `(bool, str)` tuple.

* `tools.isValid(grid, mode=Default, verbose=False)` — polymorphic via
  `callNanoGrid<IsValidOp>`, equivalent to `checkGrid` + checksum
  verification rolled into a single bool.

* `tools.evalChecksum(grid, mode=Default)` and
  `tools.validateChecksum(grid, mode=Default)` — accept any bound
  NanoGrid via the existing `GridData` Python upcast (every
  `NanoGrid<T>` Python class is registered with `GridData` as its
  base, so nanobind handles the dispatch transparently). All three
  release the GIL.

Test coverage in new `TestGridStats`, `TestGridValidate`, and
`TestGridChecksum` (11 cases total): Extrema/Stats default-and-add,
polymorphic `updateGridStats` on a float grid, `updateGridStats`
rejection on an OnIndex grid, `getExtrema` over a sub-bbox,
`checkGrid` / `isValid` / `validateGrid` happy paths plus
out-of-range `gridID` and `CheckMode.Disable` short-circuit, and
`evalChecksum` → `updateChecksum` → `validateChecksum` round-trip.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: address Copilot review on #2215

Four items from the Phase 4b/4c review, all valid:

1. UpdateGridStatsOp rejected every BuildTraits<BuildT>::is_special
   type unconditionally (except bool), but tools::updateGridStats
   actually supports StatsMode::BBox on any ValueT via the NoopStats
   path. Drop directly into NoopStats for special BuildTs when mode
   is Disable or BBox; only MinMax / All raise (because those would
   instantiate Stats / Extrema over a non-arithmetic ValueT and the
   semantics are ill-defined). Update the binding docstring to
   describe the actual matrix.

2. The test_update_grid_stats_rejects_index_grid case was renamed to
   test_update_grid_stats_on_index_grid and extended to cover all
   four StatsMode arms on an OnIndexGrid: MinMax and All raise,
   BBox and Disable now succeed.

3. validateGrid's docstring didn't mention the CheckMode.Disable
   short-circuit (which returns True without inspecting the handle
   or gridID). The Python tests already exercised the short-circuit
   via test_validateGrid_disable_mode_always_true, so the behavior
   was correct — just the docstring was missing it.

4. IsValidOp::unknown ignored verbose=True and silently returned
   false, but the C++ callNanoGrid::unknown arm writes an
   "Unsupported GridType" message to std::cerr when verbose is set.
   Mirror that — pull in <iostream> in the binding TU and emit the
   same diagnostic from C++.

5. test_get_extrema_over_active_bbox used a bbox that exactly equals
   the root's active bbox, which triggers C++ getExtrema's
   "bbox contains root.bbox()" short-circuit that unconditionally
   folds the grid background into the extrema — so the min came
   back as 0.0 (background), not 1.0 (the smallest active voxel).
   The test passed but the semantics were muddy: it was really
   asserting "background gets added in this branch" rather than
   anything about getExtrema's bbox restriction. Replace with
   test_get_extrema_strictly_inside_active_region, which uses a
   bbox strictly inside the active region (so the recursive branch
   runs) and asserts min/max are exactly the smallest/largest
   sampled active values.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: bind validateGrid for device handles too

Copilot noted tools.validateGrids was registered for both
GridHandle<HostBuffer> and GridHandle<cuda::DeviceBuffer> (the
latter behind NANOVDB_USE_CUDA), but my Phase 4c addition of the
single-grid tools.validateGrid only covered HostBuffer — leaving
device handles able to validate the whole bundle but not an
individual grid.

Add the matching #ifdef NANOVDB_USE_CUDA overload binding
tools::validateGrid<GridHandle<cuda::DeviceBuffer>>. The C++
helper does host-side dispatch via callNanoGrid on the
host-resident gridData() pointer that DeviceGridHandle exposes, so
the same Python overload pair is appropriate.

New test_validateGrid_on_device_handle exercises the device path
end-to-end (build a CUDA level-set sphere, validate it, confirm
the same out-of-range and Disable-mode short-circuits as the host
overload). The test is gated on cuda module availability so it's
skipped cleanly on CPU-only builds.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: address more Copilot review on #2215

Two more items from the review, both valid:

1. CheckGridOp wrote tools::checkGrid's error message into a 256-byte
   stack buffer. tools::checkGrid (and its util::sprint / util::strcpy
   helpers) trust the caller's buffer is large enough — there is no
   bounds-checked variant. The current error messages are at most ~80
   characters once GridType and GridClass enumerator names are
   stringified, so 256 wasn't actually overflowing today, but the
   margin is uncomfortable and a future error string addition could
   push past it. Bump to a 4096-byte buffer (named via a constexpr
   kErrorBufSize) and zero-init the first byte before the call so the
   ok-detection still works if the helper bails out before writing
   anything.

2. updateGridStats's docstring claimed special (quantized / index /
   mask) BuildTs only accept Disable / BBox, but Boolean grids are
   special yet fall through the if-constexpr filter to the regular
   tools::updateGridStats path (which routes any mode to NoopStats
   for ValueT=bool inside the C++ helper). Reword the docstring to
   call out Boolean as the exception that accepts every StatsMode
   via the NoopStats internal path.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: Phase 5 — primitives + quantized/index createNanoGrid (#2216)

* nanovdb python: Phase 5 — primitives + quantized/index createNanoGrid

Closes out Phase 5 of the NanoVDB Python bindings restructure (#2208).
Lands all three sub-phases (5a primitives, 5b quantized createNanoGrid
overloads, 5c generic createNanoGrid from build::Grid) in one PR.

Phase 5a — Host primitives
==========================

Bind the nine primitives that didn't ship with Phase 0:

* tools.createLevelSetBox(gridType, width, height, depth, ...) — narrow-
  band level set of a solid axis-aligned box.
* tools.createLevelSetBBox(gridType, width, height, depth, thickness, ...) —
  narrow-band level set of a hollow box wireframe.
* tools.createLevelSetOctahedron(gridType, scale, ...) — narrow-band
  level set of an octahedron.
* tools.createFogVolumeBox(...) and tools.createFogVolumeOctahedron(...) —
  the fog-volume counterparts of the above.
* tools.createPointSphere / createPointTorus / createPointBox(gridType,
  pointsPerVoxel, ...) — PointDataGrids scattered on the surface of each
  primitive shape.
* tools.createPointScatter(srcGrid, pointsPerVoxel, ...) — scatter a
  PointDataGrid into the active voxels of a NanoGrid<float> level set or
  fog volume. The C++ template also accepts double sources; the binding
  is float-only for simplicity (the runtime grid pointer carries the
  source BuildT and adding a per-type dispatch is mechanical follow-up).

Each non-point primitive is instantiated for float and double via the
same runtime-GridType switch the existing createLevelSetSphere et al.
already use. The FpN overloads of these primitives are deliberately
not bound here — quantization is reachable via Phase 5b's generic
createNanoGrid* path with explicit oracle and dither parameters.

Phase 5b — Quantized createNanoGrid overloads
=============================================

* tools.AbsDiff(tolerance=-1.0) and tools.RelDiff(tolerance=-1.0) —
  compression-oracle classes used by FpN. Both expose getTolerance /
  setTolerance and a truthy __bool__ that returns True iff the
  tolerance has been initialized (>= 0). The default tolerance of -1
  matches the C++ "uninitialized — fill in via init()" sentinel.

* tools.createNanoGridFp4 / Fp8 / Fp16(src, sMode, cMode, ditherOn,
  verbose) — quantize a float source into a fixed-bit-width grid.
  ditherOn adds sub-quantum noise to break up banding.

* tools.createNanoGridFpN(src, oracle, sMode, cMode, ditherOn, verbose) —
  variable-bit-width quantization. Two overloads: one accepting an
  AbsDiff oracle (the default), one accepting a RelDiff oracle. Python
  picks the right overload from the oracle argument's type.

The C++ Fp{4,8,16,N} preProcess templates static_assert SrcValueT ==
float, so the binding rejects double sources with a TypeError instead
of letting the compile-time assertion trip a hard abort.

Phase 5c — Generic createNanoGrid from build::Grid
==================================================

Each conversion entry accepts both NanoGrid<SrcBuildT> and
tools::build::Grid<SrcBuildT> as its source. Internally a small
template helper tries each source-side BuildT in turn (matching the
existing tryCreateOnIndexGrid pattern from the Phase 3 follow-up) and
dispatches via nb::isinstance.

* tools.createNanoGridIndex(src, channels=0, includeStats=True,
  includeTiles=True, verbose=0) — NEW. Bake any supported source into
  a NanoGrid<ValueIndex> with all voxels (active and inactive) given a
  uint64 sequential index. Original values can be carried as blind
  data when channels > 0.

* tools.createNanoGridOnIndex(src, ...) — same as Index but only the
  active voxels get a sequential index. Supersedes the Phase 3
  follow-up's tools.createOnIndexGrid test scaffold (which is kept
  alive in PyVoxelBlockManager.cc for backwards compatibility with
  the VBM tests; new code should prefer createNanoGridOnIndex).

Source types accepted by the index path are NanoGrid<float | double |
int32 | Vec3f> and tools::build::Grid<float | double | int32 | Vec3f>.
The same-type bake of build::Grid<T> -> NanoGrid<T> remains served by
the Phase 4a .to_nanovdb() method.

Test plan
=========

Three new TestCase classes covering: every primitive (TestNewPrimitives,
11 cases), every quantization path including double-source rejection
and oracle defaults (TestCreateNanoGridQuantized, 8 cases), and every
index/onindex source type including the build::Grid path
(TestCreateNanoGridIndex, 6 cases). All 25 new cases pass locally; the
full pytest_nanovdb suite stays green except for the two pre-existing
BLOSC-disabled errors in my local build.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: address Copilot review on #2216

Four items from the Phase 5 review, plus a follow-on segfault fix
caught while addressing the third item:

1. openToNanoVDB binding accidentally dropped the sMode argument and
   gave `base` a default of tools::StatsMode::Default — nonsense both
   semantically (base is an OpenVDB GridBase::Ptr) and structurally
   (the C++ template expects 4 args, the binding declared 3 keyword
   args). The CI build broke for openvdb-enabled configs with a
   "number of nb::arg annotations must match the argument count"
   static_assert from nanobind. Restore the correct signature: base
   has no default, sMode/cMode/verbose carry their defaults.

2. Octahedron primitive default name strings carried the upstream C++
   typo "octadedron" (sic). The C++ side keeps the misspelling for
   binary compatibility with old grids; correct it on the Python
   side since the default propagates into help() output and grid
   metadata where end-users see it.

3. The point primitives took a `gridType` argument that was
   misleading — it controls the intermediate level-set's precision
   the scatter starts from, not the returned PointDataGrid's type
   (which is always UInt32). While investigating the rename, I found
   that the createPointSphere<double> / createPointTorus<double> /
   createPointBox<double> code paths actually segfault during scatter
   with the current C++ implementation (only the float path is
   exercised by the C++ unit tests). Take Copilot's "remove it and
   always use float" alternative: drop the argument entirely. The
   binding now always uses the float intermediate level-set.
   createPointSphere / Torus / Box no longer have the parameter;
   their docstrings explicitly note "always returns a UInt32
   PointDataGrid".

4. The defineCreateNanoGridConversions doc-comment claimed sources
   were accepted for "every scalar/vector BuildT in BuildTypes.def
   that tools::createNanoGrid supports", which was wishful — the
   implementation actually tries a narrower set per destination kind.
   Spell out the actual matrix: quantized Fp{4,8,16,N} paths accept
   float only (the C++ preProcess static-asserts SrcValueT == float);
   the createNanoGridIndex / OnIndex paths accept float / double /
   int32 / Vec3f. Adding more source types is a one-line extension
   of the explicit try-each-SrcBuildT chains.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: address more Copilot review on #2216 + CI GPU gating

Four items in this round, three from Copilot plus a CI failure caught
on the linux-clang++ runner.

1. test_validateGrid_on_device_handle was gated only on the cuda
   submodule being importable, but the linux-clang++ CI runner has a
   CUDA toolkit installed (so the submodule loads) but no GPU
   driver. The test then crashed inside the C++ helper with
   "CUDA error 35: CUDA driver version is insufficient for CUDA
   runtime version". Switch the gate to the project's existing pair
   of helpers — nanovdb.isCudaAvailable() (build-time CUDA support)
   AND nanovdb.isGpuAvailable() (runtime device probe) — matching
   how TestPointsToGrid / TestSignedFloodFill / TestSampleFromPoints
   already gate. The test skips cleanly on CPU-only runners and
   driverless CUDA runners alike.

2. The Phase 5b/5c conversion helpers (tryQuantizeFpX, tryQuantizeFpN,
   tryIndexify) ran the heavy tools::createNanoGrid traversal while
   holding the Python GIL. Restructure each helper so the GIL is
   held only for the isinstance / cast dispatch, then released
   around the conversion itself (the source data lives in stable
   C++ storage anchored by the Python wrapper passed in via py_src,
   so it's safe to read without the GIL). Other Python threads can
   now make progress during large-grid quantization / indexing.

3. AbsDiff's class docstring said "pass an explicit positive value"
   for the tolerance, but the C++ operator bool() actually treats
   any non-negative value (including 0.0) as initialized. Reword to
   match what the API actually does.

4. The createNanoGridIndex/OnIndex source-rejection test was named
   test_index_rejects_unsupported_source with a comment about
   "bool / Boolean grids" but really only exercised the None case.
   Split into two cases with single, accurate purposes:
   - test_index_rejects_none — passes None; matches neither the
     NanoGrid nor the build::Grid isinstance arms.
   - test_index_rejects_unsupported_buildt — builds a
     tools.build.Vec3dGrid (structurally valid but a BuildT outside
     the float/double/int32/Vec3f source set) and confirms the
     try-each-SrcBuildT chain falls through to a TypeError.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: correct createPointScatter docs + add fog-rejection test

Copilot noted the createPointScatter binding docstring claimed the
source could be a "level set or fog volume", but the C++ implementation
explicitly checks srcGrid.isLevelSet() at line 1679 of
tools/CreatePrimitives.h and throws std::runtime_error("Expected a
level set grid") otherwise. Match the actual behavior: the docstring
now says the source must satisfy srcGrid.isLevelSet() and that
non-level-set sources (e.g. fog volumes) raise RuntimeError.

Add test_create_point_scatter_rejects_fog_volume to lock in the
behavior (build a fog volume sphere, confirm createPointScatter raises
RuntimeError).

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: fully-qualify nanovdb.tools.build.* in 5b/5c docs

Copilot noted the Phase 5b/5c TypeError messages and per-function
docstrings referred to the mutable build grids as "tools.build.FloatGrid",
but the actual Python import path is "nanovdb.tools.build.FloatGrid".
Replace every occurrence so help() / autocomplete / error messages
point at a path users can actually import.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: examples + docstring coverage sweep (#2218)

* nanovdb python: Phase 6 — docs, migration guide, examples

Closes Phase 6 of the NanoVDB Python bindings restructure (#2208).
Ships:

* doc/nanovdb/PythonMigration.md — porting guide for users on the
  pre-Phase-1 typed-accessor API. Covers the polymorphic
  handle.grid(n) replacement of floatGrid() / doubleGrid() / etc.,
  the removal of the nanovdb.math.cuda submodule (sampleFromVoxels
  is now in nanovdb.tools.cuda), the GridHandle.__bool__ + enum
  __repr__ behavior changes, and a survey of every new surface that
  used to require dropping to C++ (GridMetaData, blind data,
  PointAccessor, tree/node walking, NodeManager, leaf_values,
  VoxelBlockManager, tools.build.Grid, stats, validation,
  primitives, quantized createNanoGrid). Closes with a mechanical
  before/after replacement table.

* doc/nanovdb/PythonAPI.md — narrative API reference for the final
  surface. One section per submodule (nanovdb root, math, io,
  tools, tools.build, tools.cuda, cuda) listing the bound classes
  and functions with one-line descriptions. Points readers at
  help(x) for full signatures.

* nanovdb/nanovdb/python/examples/ — five runnable .py scripts:
  - load_inspect.py: polymorphic handle.grid(n), GridMetaData
    introspection, mixed-type handle via mergeGrids.
  - build_grid.py: tools.build.FloatGrid setValue / ValueAccessor /
    WriteAccessor / .to_nanovdb() round-trip.
  - bulk_leaf_numpy.py: zero-copy (N_leaves, 512) NumPy view via
    grid.leaf_values(), with global-stats reduction and in-place
    mutation demonstrating the no-copy semantics.
  - quantize.py: createNanoGridFp{4,8,16} fixed-width + createNanoGridFpN
    with AbsDiff and RelDiff oracles. Prints the per-format size
    so users see the compression tradeoff at a glance.
  - validate.py: validateGrid / validateGrids / checkGrid / isValid
    plus evalChecksum / updateChecksum / validateChecksum.

* nanovdb/nanovdb/python/examples/README.md — index of the above
  with one-line summaries.

* nanovdb/nanovdb/Readme.md — added a "Python bindings" section
  linking the API reference, migration guide, and examples.

Each example is self-contained (builds its own input data,
prints a small stdout summary) and was smoke-tested locally
against the post-Phase-5 binding. The bulk_leaf_numpy example is
the only one requiring NumPy; it prints a friendly skip message
otherwise.

API reference docs via Sphinx / mkdocs are deferred to a follow-up;
the existing docstrings already make help() useful and the .pyi
type stubs (from Phase 0) cover IDE / type-checker integration.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: drop end-user docs, scrub refactor framing from examples

Two changes in response to review feedback:

* Remove doc/nanovdb/PythonAPI.md and doc/nanovdb/PythonMigration.md.
  End users don't need a separate narrative reference (help() and
  the .pyi stubs cover the same ground) and don't need a migration
  guide framed around the multi-phase refactor history.

* Rewrite the docstring blurb at the top of each example
  (load_inspect.py, build_grid.py, bulk_leaf_numpy.py, quantize.py,
  validate.py) so the prose describes what the example demonstrates
  about the current API, with no mention of which phase of the
  refactor added the feature. Same scrub on
  python/examples/README.md (drop the "bindings restructure" framing
  and the now-dead links to the deleted docs) and on
  nanovdb/nanovdb/Readme.md (drop the new "Python bindings" section
  header — just leave the single examples link alongside the existing
  Examples link).

Examples themselves remain unchanged in behavior; all five still
run cleanly against the current binding.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: docstring coverage sweep across the binding surface

Add a short prose docstring to every nanobind .def() and nb::class_
call that didn't already carry one. The audit dropped from 374
distinct undocumented call sites (3278 raw, counting per-BuildT
template duplicates) to 0.

Style:
* One short imperative sentence per method, focused on what it does
  in Python terms.
* For methods that exactly mirror a C++ member of the same name, a
  "See nanovdb::<Class>::<method> in NanoVDB.h." tail so users can
  find the canonical reference without us re-stating it.
* Class-level docstrings on every bound class (Grid, GridHandle,
  GridMetaData, Tree, Root, Upper, Lower, Leaf, NodeManager, the
  per-BuildT accessor subclasses, Map, Coord, BBox*, samplers,
  build::Grid + ValueAccessor + WriteAccessor, Extrema / Stats,
  oracle classes, Checksum, etc.).
* Two-to-three sentence blurbs on the entry-point classes that
  genuinely need orientation.

Files touched: every Py*.cc / Py*.h binding file under
nanovdb/nanovdb/python/ plus the three cuda/ binding files. No code
changes — only the trailing const char* docstring argument on .def
calls and the third arg of nb::class_. The auto-generated .pyi stub
output picks the new prose up automatically; help() shows the same
text at runtime.

Also drop the few remaining "Phase N" / "from Phase N follow-up"
references that survived in internal C++ comments in
PyCreateNanoGrid.cc, PyPrimitives.cc, and PyVoxelBlockManager.cc,
keeping the source consistent with the no-refactor-history policy
already applied to the public docstrings, tests, and examples.

Test plan: full pytest_nanovdb green locally (138/140; the two
errors are pre-existing BLOSC-disabled errors). Module compiles
cleanly with CUDA + nanobind stub generation enabled.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: address Copilot review on #2218

Two items from the review:

1. The Readme link to the Python examples directory used the wrong
   relative path. From nanovdb/nanovdb/Readme.md, the examples live
   at python/examples/ (sibling), not nanovdb/python/examples/
   (which would resolve to nanovdb/nanovdb/nanovdb/python/examples/).

2. The Map.applyMap / applyJacobian / applyInverseMap /
   applyInverseJacobian docstrings used the words "double precision"
   and "single precision" to describe the variant suffix. That
   wording is misleading: the F-suffixed variants use 32-bit math
   internally, the unsuffixed variants use 64-bit math, but BOTH
   return a vector whose dtype matches the input (Vec3f -> Vec3f,
   Vec3d -> Vec3d). Switching to "uses 64-bit math" / "uses 32-bit
   math" with an explicit "returns a vector of the same dtype as
   the input" tail makes the semantics unambiguous. Same fix on the
   Jacobian variants (which previously didn't mention precision at
   all on the 64-bit overloads, only on the 32-bit ones — also
   confusing).

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: clarify Grid.gridName docstring

Copilot caught that the Grid.gridName docstring described it as "the
in-header buffer; truncated if very long" — which is actually the
semantics of shortGridName(). gridName() reads the LONG-form name
from blind data when the HasLongGridName flag is set, falling back
to the in-header buffer otherwise. Reword the docstring to match
and explicitly point at shortGridName() for the truncated form.

(The other comment in the same review pass flagged the Examples
table in python/examples/README.md as having "double leading pipes"
but the actual file uses single-pipe GitHub-flavored markdown
syntax — verified via per-character inspection. The table renders
correctly on GitHub; no change needed there.)

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: clarify VBM offset and Root.bbox docstrings

Two more Copilot review items:

* VoxelBlockManagerHandle.firstOffset / lastOffset docstrings said
  "Linear leaf offset of the first/last block..." but these are
  sequential VOXEL indices, not leaf IDs. Switch the wording to
  "Sequential voxel index of the first/last active voxel covered
  by this handle" so users aren't confused into thinking the value
  is a leaf number.

* RootT.bbox docstring said "Index-space bounding box of every
  active tile" but RootNode::bbox() returns the bounding box of
  every active VALUE in the tree, not just the tile entries in the
  root table. Drop the misleading "tile" wording.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: remove dead code in bulk_leaf_numpy example

Copilot caught that bulk_leaf_numpy.py computed n_active_after via a
per-voxel sum over leaf.isActive() but never used the result — dead
code that linters would flag. Replace with leaf.getFirstValue(),
which is actually informative for what the surrounding comment is
trying to show (the values changed in place via the zero-copy
NumPy write) and prints in the same line.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: bounds-check GridHandle grid accessors; fix stale docstring

Addresses review feedback on PR #2219.

GridHandle::gridSize(n) and gridType(n) index mMetaData[n] without a
bounds check (the C++ API documents "assumed to be less than
gridCount()"), so calling handle.gridSize()/gridType()/gridData() with
an out-of-range n — including any n on an empty handle — was undefined
behaviour reachable straight from Python. Wrap all three in
bounds-checked lambdas that raise IndexError. gridData() is guarded too:
gridData(n) itself returns nullptr for bad n, but the binding passes
gridSize(n) alongside it, and that call is the one that reads
mMetaData[n] out of bounds.

Also refresh the createOnIndexGrid docstring: it claimed the broader
createNanoGrid<SrcGridT, DstBuildT> surface "lands in a later phase",
but tools.createNanoGridOnIndex already ships in this PR
(PyCreateNanoGrid.cc). Point users at the canonical binding instead.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: harden mergeGrids for empty input and use gridData(n)

Addresses review feedback on PR #2219.

Empty input: mergeGrids([]) — or a sequence of only-empty handles —
produced totalGrids == 0 and called BufferT::create(0). For HostBuffer
that yields a buffer whose data() is non-null over a zero-byte region,
so the GridHandle(buffer&&) ctor then reads a full GridData header out
of it (heap-overflow read; in practice an opaque "invalid host buffer"
throw). Return an empty handle up front when there's nothing to merge.

Per-grid source pointer: copy from h->gridData(n) — the authoritative
start pointer that applies mMetaData[n].offset — instead of walking a
raw data() pointer advanced by gridSize(n). The two are equivalent for
the current tightly-packed layout (offsets are a running sum of grid
sizes), but the accessor form doesn't bake in that assumption and drops
the manual pointer arithmetic.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: release the GIL around VoxelBlockManager compute kernels

Addresses review feedback on PR #2219.

buildVoxelBlockManager, decodeBlock, and decodeInverseMaps all run
non-trivial C++ (the build may parallelize internally via
util::forEach; the decode sweeps multiple leaves) while holding the
GIL, blocking unrelated Python threads.

Release the GIL around the pure-C++ kernels only, matching the
established pattern in PyCreateNanoGrid.cc (tryIndexify / tryQuantizeFpX):

- pyDecodeInverseMapsImpl (shared by decodeBlock and the free
  decodeInverseMaps): scope a gil_scoped_release around the
  VBM::decodeInverseMaps call. The surrounding grid cast, bounds checks
  (which throw Python exceptions), and the NumPy array / capsule / tuple
  construction stay under the GIL.
- buildVoxelBlockManager: scope a gil_scoped_release around the
  buildVoxelBlockManager<LBW> call only.

Deliberately not a blanket nb::call_guard<nb::gil_scoped_release>() as
suggested: these entry points take an nb::handle and call
castOnIndexGrid (isinstance/cast) plus allocate NumPy arrays inside the
function body, so dropping the GIL across the whole call would touch the
Python C API without the GIL. The scoped release covers exactly the
GIL-free compute.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: index-grid completeness, transform aliases, sampler gradients

Close the residual gaps between the Python bindings and the C++ host API:

- Bind Grid.valueCount() on Index/OnIndex grids and Grid.pointCount() on
  PointGrid, gated per BuildT like the C++ SFINAE.
- Add tools.CreateNanoGrid mirroring the C++ converter class, exposing
  addBlindData() so blind-data channels can be authored from Python and
  filled through the writable getBlindData() NumPy view. Authored
  channels are zero-filled (the C++ path leaves them uninitialized).
- Bind ChannelAccessor<ChannelT, IndexT> for Index/OnIndex x
  float/double/int32/Vec3f, plus a polymorphic createChannelAccessor()
  dispatching on the channel's recorded dataType.
- Add the worldToIndex/indexToWorld convenience names (Dir/Grad/F
  variants included) as aliases on the type-erased Grid base.
- Bind gradient() and zeroCrossing() on the host samplers for the
  orders/BuildTs where the C++ templates compile (trilinear gradient,
  trilinear+triquadratic zeroCrossing, floating-point only).
- Fix a pre-existing bug: getBlindData() and the PointAccessor views
  built ndarrays without the nb::numpy framework tag, so the def-site
  keep_alive raised 'could not create a weak reference' whenever a
  non-empty view was returned.
- Paper cuts: restore the empty error messages in the sphere/torus
  primitive dispatchers, drop the unused baseName parameter from
  defineStats, and bind Checksum.isEmpty/isHalf/isFull/mode.

TestNanoVDB.py grows 139 -> 161 cases, covering the new surface plus the
previously untested populated blind-data and channel-accessor paths.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* nanovdb python: port host C++ examples to Python, smoke-test all examples

Nine new scripts under python/examples/, each a Python equivalent of a
host-capable C++ example (or its host code path):

- io_roundtrip.py: ex_write_nanovdb_grids + ex_read_nanovdb_sphere(_accessor)
  as a self-contained write/read round trip, plus splitGrids and zero-copy
  point positions via getBlindData.
- make_funny_nanovdb.py: ex_make_funny_nanovdb via the functor-based
  createFloatGrid factory (reduced domain — one Python call per voxel).
- make_typed_grids.py: ex_make_typed_grids across seven tools.build grid
  types with polymorphic re-read.
- raytrace_level_set.py / raytrace_fog_volume.py: the host render paths,
  re-expressed with the bound samplers (sphere tracing + zeroCrossing +
  gradient shading) and accessor marching respectively; PGM output.
- collide_level_set.py: the host particle-collision path using
  worldToIndexF, narrow-band isActive, and sampler.gradient normals.
- index_grid_channels.py: host half of ex_index_grid_cuda extended with
  ChannelAccessor read-back and CreateNanoGrid blind-data authoring.
- node_manager.py: host half of ex_nodemanager_cuda.
- openvdb_interop.py: ex_openvdb_to_nanovdb(_accessor); self-skips unless
  built with NANOVDB_USE_OPENVDB and openvdb imports.

Not ported: the pool-buffer examples (HostBuffer pool API unbound), the
MagicaVoxel converter (external parser/asset), device-only examples, and
a dedicated PointAccessor example (host point primitives bake UInt32
PointData grids; Point{Index,Data}Accessor require GridType.PointIndex).

test/TestExamples.py smoke-runs all 14 example scripts in subprocesses;
wired as ctest pytest_nanovdb_examples (~5 s) next to pytest_nanovdb,
gated on NANOVDB_BUILD_PYTHON_UNITTESTS.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* fix example DLL lookup on Windows

  Run example smoke tests through a Windows-specific child launcher that
  registers dependent DLL directories before importing nanovdb. Keep the
  DLL directory handles alive while preserving subprocess isolation and
  normal script execution behavior.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* fix Windows example test startup

Register dependent DLL directories through a test-only sitecustomize module so example smoke tests can run as normal Python scripts. This avoids the native access violations caused by executing them through runpy while preserving subprocess isolation.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* diagnose Windows example crashes

Enable Python's fault handler and unbuffered output for example subprocesses so Windows access violations report the active Python frame and preserve output leading up to the crash.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* fix Windows example DLL search

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* add CUDA DLL path to Windows examples

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* Rename to_nanovdb->toNanoVDB to match convention

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* Added comments on nb::object returned sentinel return in `try*` functions

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* Fix `toNanoVDB` renames that were not caught.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* NanoVDB: add non-owning mergeGrids overload and use it from Python

Address review feedback on the Python bindings, which had reimplemented
the grid-merge logic instead of reusing nanovdb::mergeGrids. The
existing overload takes a const std::vector<GridHandle>&, which cannot
be built from Python-owned handles without moving from them (GridHandle
is move-only, and moving would silently empty the caller's objects) or
deep-copying every input buffer.

- Add mergeGrids(const GridHandle<BufferT>* const* handles, size_t
  count, pool) to GridHandle.h, which borrows the inputs; the vector
  overload now forwards to it, so there is a single implementation.
- While consolidating, fold in two fixes the Python binding had
  accumulated: empty input returns an empty handle instead of
  constructing from BufferT::create(0) (whose zero-byte region the
  GridHandle constructor would read a header out of), and the source
  walk uses gridData(n) — which applies the per-grid offset — instead
  of assuming grids are contiguous from data(), so padded handles
  merge correctly.
- Shrink the Python mergeGrids binding to collecting pointers and
  calling the new overload; drop the now-unused <cstring> and
  GridChecksum.h includes.

Verified with a standalone C++ test of both overloads (inputs left
intact, grid index/count rewritten, empty input, split round-trip) and
by running TestNanoVDB.py before/after: identical results, with all
merge/split tests passing.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-08-18 10:33:20 -07:00
Mark HarrisandClaude Fable 5 0377b2202d NanoVDB: fix nvcc warnings and treat NVCC diagnostics as errors by default (#2280)
* NanoVDB: use constructor-free shared-memory storage in GridStats kernels

CUDA does not support dynamic initialization of function-scope __shared__
variables, so nvcc skips the StatsT/CoordBBox constructors in processLeaf
and processInternal and emits warning #20054-D -- twelve copies in every
TU that instantiates the kernels, propagated to downstream builds since
GridStats.cuh is a header. The skipped initialization was harmless
(every shared slot is fully assigned before it is read), but the noise
is not.

Wrap the scratch arrays in cub::Uninitialized, whose backing store is a
trivially-constructible word array, and bind array references to the
aliased element type. The reduction code is unchanged.

Verified warning-free (0 vs 12) and performance-neutral: per-kernel SASS
comparison on sm_89 shows identical instruction counts, registers,
shared-memory bytes, and zero spills for all 14 kernels; timing 200
iterations of updateGridStats on an 8M-voxel grid shows matched-round
deltas within +/-0.1% with alternating sign.

Closes #2279

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: make GridChecksum's header-defined CRC32 kernels static

nvcc ignores the inline qualifier on __global__ functions and emits
warning #20050-D for crc32SlicedKernel and crc32CombineKernel. The
inline was doing ODR duty for a non-template kernel defined in a
header, so removing it outright would invite multiple-definition link
errors; static provides internal linkage per TU instead, matching the
effect of the anonymous namespace used by GridStats.cuh. Both launch
sites live in the same header, so nothing needs external linkage.

Note these warnings are invisible in CMake builds: CMake passes the
CUDA toolkit include directory via -isystem, and the diagnostic is
attributed through the __global__ macro machinery in those system
headers, so it is suppressed. Plain nvcc consumers of the headers see
it. With this change, TestNanoVDB.cu -- which includes essentially
every CUDA tool header -- compiles warning-free even in the
warning-visible (non -isystem) configuration.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: treat NVCC diagnostics as errors by default

Add the CMake option NANOVDB_CUDA_WERROR (default ON, also implied by
OPENVDB_CXX_STRICT), which prepends --Werror=all-warnings to
CMAKE_CUDA_FLAGS so every nvcc front-end diagnostic fails the build of
the NanoVDB tests, tools and examples. This locks in the warning-free
state: the #177-D, #20050-D and #20054-D classes fixed recently cannot
silently reappear. The option only affects NanoVDB's own build tree,
not projects that merely include the headers, and can be disabled if a
newer CUDA toolkit introduces new diagnostics.

Verified locally at CMAKE_CUDA_ARCHITECTURES=80 (matching CI) in both
Release and Debug with unit tests, tools and examples enabled: zero
diagnostics, full builds succeed, 7/7 ctests pass on a GPU.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: fix Windows fallout from NVCC warnings-as-errors

The first Windows CI run under --Werror=all-warnings surfaced two
issues:

Remove an unreferenced local in DistributedPointsToGrid's stripe
setup. deviceCoords became dead when the cudaMemAdvise call on the
external coords was removed; only the MSVC-host front end reports it
(#177-D), but the variable is dead on every platform.

Suppress the EDG dll-interface diagnostics (#1394, #1388) for CUDA
sources on Windows. This is the NVCC analog of the /wd4251 and /wd4275
suppressions in OpenVDBCXX.cmake: it's not possible to use STL types
in DLL interfaces in a portable and reliable way, so these fire on
every include of the OpenVDB core headers from a .cu file (404 + 14
instances in the CI log). Uses the top-level --diag-suppress option;
the -Xcudafe --diag_suppress spelling does not reach the CUDA
front-end phase that emits these.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: fix remaining Windows warnings-as-errors fallout

Clearing the dll-interface diagnostics unblocked the Windows projects
to compile further, exposing two more pre-existing warning classes that
NANOVDB_CUDA_WERROR now promotes to errors:

Guard the _USE_MATH_DEFINES definition in the four examples that
define it. The Windows build also passes -D_USE_MATH_DEFINES on the
command line (as 1), so the bare #define (empty) triggered MSVC C4005
macro-redefinition warnings, which the flag turns into C2220 errors.

Suppress EDG #177 for the CUDA gtest targets on Windows. gtest's TEST
macro declares each test's static test_info_ member with an
unused-attribute on GCC/Clang but not under MSVC, so for tests defined
inside an anonymous namespace (TestBuffer.cu, TestMemoryResource.cu,
TestUtilCuda.cu) the front end proves it unreferenced and reports #177
-- 76 errors, all from the macro machinery, none actionable in our
code. TestNanoVDB.cu is unaffected because its tests are declared at
namespace scope. The suppression is per-target and Windows-only, so
#177 stays enforced for all library headers, tools and examples on
every platform, and for everything on Linux.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: guard _USE_MATH_DEFINES in the example headers and CXX sources

The previous commit guarded only the nanovdb.cu files that the first
Windows log reported; each of these examples defines the macro in up to
three files, and common.h is included by the .cu sources, so the C4005
redefinition warnings persisted. Every definition site in the examples
is now guarded, verified by a tree-wide sweep for unguarded instances.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

---------

Signed-off-by: Mark Harris <mharris@nvidia.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 20:40:24 +12:00
Nick Avramoussis 5eb1ec0c4d Updated pendingchanges
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-08-18 20:18:52 +12:00
Nick Avramoussis 157c413b73 Avoid hadds in pca stamp kernels with intermediate buffers
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-08-18 20:18:45 +12:00
Nick Avramoussis 20615f1b31 Added ostream methods for vcl types and scalar/simd trait selector
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-08-18 20:16:32 +12:00
Nick Avramoussis e88f2f832e Added pca code example to ellipsoid raster
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-08-18 20:00:09 +12:00
Jonathan Swartz 63d1878f30 NanoVDB: expose ResourceT on the five TopologyBuilder consumers (CUDA) (#2273)
Part of #2232 (B5), following #2268 which gave
tools::cuda::TopologyBuilder an injectable-resource seam and #2269 which
gave one to MeshToGrid.

The five classes that instantiate TopologyBuilder -- DilateGrid,
MergeGrids, PruneGrid, RefineGrid and CoarsenGrid, all in
nanovdb/tools/cuda/ -- were left behind as unaffected callers: each held
a TopologyBuilder<BuildT> constructed as mBuilder(stream), binding
default_resource<DeviceResource>() with no injection path. Downstream,
fvdb-core needs to route these operators' scratch through PyTorch's
c10::cuda::CUDACachingAllocator, and cannot delete its forked headers
until the seam exists.

Each of the five headers receives the conversion established by
MeshToGrid:

  - the class template gains typename ResourceT =
    nanovdb::cuda::DeviceResource, with an is_async_resource guard
    static_assert first in the class body;
  - the builder member becomes TopologyBuilder<BuildT, ResourceT>
    mBuilder;
  - the constructor(s) gain a trailing defaulted ResourceT& resource
    argument, forwarded as mBuilder(stream, resource). Trailing position
    keeps every existing call source-compatible. MergeGrids takes the
    argument on both its N-ary and its binary-convenience constructor,
    the delegating one forwarding;
  - every out-of-class member definition moves to the two-parameter
    form, including the dual-template getHandle.

No nested-type hoisting is needed: TopologyBuilder::Data was hoisted to
TopologyBuilderData in #2268, and none of the five classes declares its
own nested struct. The change is additive in behavior -- ResourceT
defaults everywhere, so existing callers compile unchanged with
identical allocation behavior.

Left out of scope: each operator's mBuilder.mProcessedRoot and
TopologyBuilder's internal mData are still host+device dual-space
nanovdb::cuda::DeviceBuffer, and the grid handle's output buffer still
goes through BufferT::create. None of these is observed by the injected
resource, which is expected and is noted in the new tests' comments; the
dual-space buffers are Step 3's problem.

Adds one injected-resource test per operator to TestMemoryResource.cu
(DilateGrid_InjectedResourceSeam, MergeGrids_InjectedResourceSeam,
PruneGrid_InjectedResourceSeam, RefineGrid_InjectedResourceSeam,
CoarsenGrid_InjectedResourceSeam), mirroring the existing PointsToGrid
seam tests: build a small ValueOnIndex source grid, run the operator
with a CountingResource passed as the new trailing constructor argument,
synchronize, and assert allocs > 0 && allocs == deallocs. MergeGrids
merges two disjoint grids, PruneGrid supplies a single all-on Mask<3>
sidecar over a one-leaf grid, and CoarsenGrid spreads voxels over a
2x2x2 leaf block so coarsening is non-degenerate.

---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-08-18 18:13:22 +12:00
Mark HarrisandClaude Fable 5 d422d856d8 NanoVDB: own PointsToGrid's device arrays with cuda::Buffer (CUDA) (#2270)
* NanoVDB: align cuda::Buffer member names with cuda::buffer

Name the free operation destroy, as cuda::buffer does, and add the
stream-taking overload it also provides. clear stays but only as a
transitional delegate, marked as such: it exists because
GridHandle::reset still calls it, and goes away with the legacy dual
buffers that cuda::Buffer replaces.

Rename setStream to set_stream. Member names cannot be aliased, so
matching the standard spelling is the whole reason the resource concept
kept allocate_async; the same argument applies here. Note in passing that
ours deliberately does not synchronize, matching cuda::buffer's
set_stream_unsynchronized rather than its set_stream, whose own
documentation and implementation disagree (NVIDIA/cccl#10649).

Add swap. The generic std::swap already does the right thing through the
move operations, but both std::vector and rmm::device_buffer provide one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: allocate TopologyBuilder scratch from an injected resource

Eleven of the builder's buffers are device-only -- nothing reads them on
the host -- yet they were cuda::DeviceBuffer, whose host pointer and
per-device array they never use. Move them to the single-space
cuda::Buffer and give the builder a resource parameter, so its scratch is
injectable like PointsToGrid's already is, and freed by scope rather than
by hand. mProcessedRoot and mData are read on the host and stay dual.

This is not a speedup: DeviceBuffer::init allocates host or device memory
but never both, and these buffers always passed a real device id, so no
cudaMallocHost was on this path to begin with. Measured dilate on 1k/20k/
200k points, and the difference is within run-to-run noise.

Hoist the Data struct out of the class. It does not depend on the
resource, and leaving it nested would give every ResourceT its own
incompatible type for the device functors to name.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: add SyncFromAsync, and give MeshToGrid a resource seam

A stream-ordered resource must also model the synchronous concept, which
means writing four methods where two would do. The synchronous pair is
not a bare delegate -- memory from allocate must be usable on any stream
when it returns, so the null-stream allocation has to be synchronized
first -- and omitting that yields memory which satisfies the concept but
is not actually synchronous. Put it in one place rather than leaving each
author to rediscover it.

The two resources in TestMemoryResource are the first users, and were
already wrong in exactly that way: they provide only the async pair, so
they never modelled is_async_resource. TempPool duck-typed and never
checked, so nothing caught it.

MeshToGrid was the last builder allocating from a hard-wired
DeviceResource, through TempDevicePool. Give it a ResourceT parameter and
thread it into both its TopologyBuilder and its pool. As with Data in the
builder, BoxTrianglePair is hoisted out of the class: it does not depend
on the resource, and leaving it nested would give every ResourceT its own
incompatible type for the device functors to name.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: add ResourceRef and route TempPool's scratch through cuda::Buffer

Buffer holds its resource by value, matching cuda::buffer -- whose model
this completes: in CCCL the ownership semantics are selected by what is
placed in the by-value slot, an owning any_resource or a borrowing
resource_ref. We adopted the slot without the borrowing type, so a
container like TempPool, whose contract is a non-owning pointer to a
possibly stateful resource, had no way to hold a Buffer without copying
that resource and stranding its state. ResourceRef is the missing piece:
a non-owning reference that is itself a resource, so copying the ref
shares the underlying instance. Its async methods exist only when R
models AsyncResource, so a ref over a synchronous resource does not
misreport its tier, and two refs compare equal exactly when they
reference the same resource.

TempPool now keeps its bytes in a Buffer<std::byte, ResourceRef<R>>:
same resource contract, same stream retention, same discard-on-growth
reallocation, but the block is freed by ownership rather than by hand.
The TempPool unit tests, which assert traffic against the caller's own
resource instance, pass unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: note cuda::Buffer and cuda::BufferView in pendingchanges

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: express PointsToGrid's density search as a loop

The bisection search over voxel size was written as a backward goto,
which made the lifetimes of the buffers it retries over non-lexical.
Rewrite it as while(true) with continue on retry and break on
convergence; the six hand-written frees before the jump are unchanged.
The change is easiest to review with whitespace ignored, since the loop
body re-indents: git diff -w shows 27 changed lines.

d_keys and d_node_count carry results past the loop, so their
declarations move above it, as does the copy event, which was created
inside the retried region on every iteration but destroyed only once at
the end -- each retry leaked the previous handle.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: own PointsToGrid's device arrays with cuda::Buffer

Every device array PointsToGrid allocates is now owned by a
Buffer<T, ResourceRef<ResourceT>> borrowing the injected resource --
members where the pipeline frees them in a later member function than
the one that allocated them (countNodes allocates; processUpperNodes,
processLeafNodes, processPoints and processBBox release), locals where
the lifetime is contained. The raw pointers survive only as views: the
device-visible fields inside mData, and the working pointers the cub
and kernel calls take. Every owner event -- assignment, swap, destroy
-- immediately refreshes its view, and released views are nulled so a
stale use faults instead of reading a freed block. The index ping-pong
becomes a swap of owners across the member/local boundary, replacing
the bare pointer swap whose safety depended on nothing reading the
device copy of d_indx between the two uploads.

The density-search retry keeps its free-before-reallocate order via
explicit destroy calls, so peak device memory is unchanged. The
hand-matched byte sizes at every free site disappear, and the arrays
released one line before scope exit now just leave scope. One behavior
change worth naming: the too-many-points-per-leaf throw previously
leaked the reduction scratch; ownership now releases it during unwind.

Verified against the previous commit with a counting resource over
three shapes (bulk segmented-sort branch, serial per-tile branch, and
the bisection retry engaged): allocation count, free count, and total
bytes are identical. Full CUDA and memory-resource suites unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: free TopologyBuilder scratch on the caller's stream

Each release site sits in a function that receives the stream, so pass
it to destroy rather than relying on the retained stream matching --
they are the same on every current path, but the explicit form does not
depend on that staying true. Also drop the cudaGetDevice calls whose
result the Buffer conversion left unused.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: borrow TopologyBuilder scratch through ResourceRef

The scratch buffers held their resource by value, so each of the eight
carried its own copy -- fine for the stateless default, wrong for a
stateful resource, whose accounting would be split across copies while
the caller's instance saw nothing. Borrow through ResourceRef instead,
the same reconciliation TempPool uses.

Assert the stream-ordered requirement directly in TopologyBuilder and
MeshToGrid so a synchronous-only resource fails with a diagnostic that
names the builder, not just the pool inside it. Note SyncFromAsync's
synchronize cost on its allocate.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: guard PointsToGrid's copy event with a scope owner

The too-many-points-per-leaf throw unwinds past the event's manual
destroy, leaking the handle. Own it with a small guard so unwinding
releases it, consistent with the buffer ownership in this function.
Also assert the stream-ordered resource requirement on the class, so a
synchronous-only resource fails naming PointsToGrid rather than the
pool inside it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: assert the scratch alignment TopologyBuilder relies on

The byte scratch is reinterpreted as word-sized types, which is valid
for every resource whose DEFAULT_ALIGNMENT is at least word alignment --
all CUDA allocation paths give 256 -- but nothing said so. Assert it, so
a custom resource with a weaker guarantee fails at compile time instead
of misaligning on the device.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: terminate a bare cudaCheckError with a semicolon

Legal without one -- the macro expands to a braced block -- but every
other use in the file spells it as a statement.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: set_stream matches cuda::buffer's contract, not a divergence

cuda::buffer's set_stream is deliberately non-synchronizing -- its
documented synchronization is a stale note left behind when the
synchronization was removed -- so our non-synchronizing set_stream
matches it in both name and contract, and the comment claiming a
divergence was wrong.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: mark cuda::Buffer::clear deprecated in the documentation

Documentation-level only: the [[deprecated]] attribute would warn from
GridHandle::reset and NodeManager::reset, template members in our own
headers that must keep calling clear() until every buffer type provides
destroy() -- an unactionable diagnostic for callers of reset(), and a
build break under -Werror. The attribute lands when those callers
migrate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: exercise the concept-required members of the test resources

The trait checks detect allocate/deallocate through unevaluated contexts,
which never odr-use them, so nvcc warned that every synchronous pair and
stub member was declared but never referenced (#177-D). The attribute
route is closed -- nvcc's front end ignores [[maybe_unused]] for this
diagnostic -- so reference them the honest way: a test that verifies the
synchronous halves of the counting and stream-recording doubles behave
like their stream-ordered halves, and one that pins the trait probes'
stub behavior. The TU now builds with no warnings at all.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

---------

Signed-off-by: Mark Harris <mharris@nvidia.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-17 10:32:20 -07:00
Nick Avramoussis 25715e5c18 Vectorized weights and covariance transfers in points::pca methods
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-08-15 18:33:27 +12:00
Nick Avramoussis 6b05f50a67 Merge pull request #2254 from mmalecki/include-tbb-version
Fix builds with newer TBB versions
2026-08-15 18:29:40 +12:00
Mark HarrisandClaude Fable 5 ba9a2c0974 NanoVDB: SyncFromAsync, ResourceRef, and resource seams for MeshToGrid and TempPool (CUDA) (#2269)
* NanoVDB: align cuda::Buffer member names with cuda::buffer

Name the free operation destroy, as cuda::buffer does, and add the
stream-taking overload it also provides. clear stays but only as a
transitional delegate, marked as such: it exists because
GridHandle::reset still calls it, and goes away with the legacy dual
buffers that cuda::Buffer replaces.

Rename setStream to set_stream. Member names cannot be aliased, so
matching the standard spelling is the whole reason the resource concept
kept allocate_async; the same argument applies here. Note in passing that
ours deliberately does not synchronize, matching cuda::buffer's
set_stream_unsynchronized rather than its set_stream, whose own
documentation and implementation disagree (NVIDIA/cccl#10649).

Add swap. The generic std::swap already does the right thing through the
move operations, but both std::vector and rmm::device_buffer provide one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: allocate TopologyBuilder scratch from an injected resource

Eleven of the builder's buffers are device-only -- nothing reads them on
the host -- yet they were cuda::DeviceBuffer, whose host pointer and
per-device array they never use. Move them to the single-space
cuda::Buffer and give the builder a resource parameter, so its scratch is
injectable like PointsToGrid's already is, and freed by scope rather than
by hand. mProcessedRoot and mData are read on the host and stay dual.

This is not a speedup: DeviceBuffer::init allocates host or device memory
but never both, and these buffers always passed a real device id, so no
cudaMallocHost was on this path to begin with. Measured dilate on 1k/20k/
200k points, and the difference is within run-to-run noise.

Hoist the Data struct out of the class. It does not depend on the
resource, and leaving it nested would give every ResourceT its own
incompatible type for the device functors to name.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: add SyncFromAsync, and give MeshToGrid a resource seam

A stream-ordered resource must also model the synchronous concept, which
means writing four methods where two would do. The synchronous pair is
not a bare delegate -- memory from allocate must be usable on any stream
when it returns, so the null-stream allocation has to be synchronized
first -- and omitting that yields memory which satisfies the concept but
is not actually synchronous. Put it in one place rather than leaving each
author to rediscover it.

The two resources in TestMemoryResource are the first users, and were
already wrong in exactly that way: they provide only the async pair, so
they never modelled is_async_resource. TempPool duck-typed and never
checked, so nothing caught it.

MeshToGrid was the last builder allocating from a hard-wired
DeviceResource, through TempDevicePool. Give it a ResourceT parameter and
thread it into both its TopologyBuilder and its pool. As with Data in the
builder, BoxTrianglePair is hoisted out of the class: it does not depend
on the resource, and leaving it nested would give every ResourceT its own
incompatible type for the device functors to name.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: add ResourceRef and route TempPool's scratch through cuda::Buffer

Buffer holds its resource by value, matching cuda::buffer -- whose model
this completes: in CCCL the ownership semantics are selected by what is
placed in the by-value slot, an owning any_resource or a borrowing
resource_ref. We adopted the slot without the borrowing type, so a
container like TempPool, whose contract is a non-owning pointer to a
possibly stateful resource, had no way to hold a Buffer without copying
that resource and stranding its state. ResourceRef is the missing piece:
a non-owning reference that is itself a resource, so copying the ref
shares the underlying instance. Its async methods exist only when R
models AsyncResource, so a ref over a synchronous resource does not
misreport its tier, and two refs compare equal exactly when they
reference the same resource.

TempPool now keeps its bytes in a Buffer<std::byte, ResourceRef<R>>:
same resource contract, same stream retention, same discard-on-growth
reallocation, but the block is freed by ownership rather than by hand.
The TempPool unit tests, which assert traffic against the caller's own
resource instance, pass unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: note cuda::Buffer and cuda::BufferView in pendingchanges

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: free TopologyBuilder scratch on the caller's stream

Each release site sits in a function that receives the stream, so pass
it to destroy rather than relying on the retained stream matching --
they are the same on every current path, but the explicit form does not
depend on that staying true. Also drop the cudaGetDevice calls whose
result the Buffer conversion left unused.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: borrow TopologyBuilder scratch through ResourceRef

The scratch buffers held their resource by value, so each of the eight
carried its own copy -- fine for the stateless default, wrong for a
stateful resource, whose accounting would be split across copies while
the caller's instance saw nothing. Borrow through ResourceRef instead,
the same reconciliation TempPool uses.

Assert the stream-ordered requirement directly in TopologyBuilder and
MeshToGrid so a synchronous-only resource fails with a diagnostic that
names the builder, not just the pool inside it. Note SyncFromAsync's
synchronize cost on its allocate.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: assert the scratch alignment TopologyBuilder relies on

The byte scratch is reinterpreted as word-sized types, which is valid
for every resource whose DEFAULT_ALIGNMENT is at least word alignment --
all CUDA allocation paths give 256 -- but nothing said so. Assert it, so
a custom resource with a weaker guarantee fails at compile time instead
of misaligning on the device.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: set_stream matches cuda::buffer's contract, not a divergence

cuda::buffer's set_stream is deliberately non-synchronizing -- its
documented synchronization is a stale note left behind when the
synchronization was removed -- so our non-synchronizing set_stream
matches it in both name and contract, and the comment claiming a
divergence was wrong.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: mark cuda::Buffer::clear deprecated in the documentation

Documentation-level only: the [[deprecated]] attribute would warn from
GridHandle::reset and NodeManager::reset, template members in our own
headers that must keep calling clear() until every buffer type provides
destroy() -- an unactionable diagnostic for callers of reset(), and a
build break under -Werror. The attribute lands when those callers
migrate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: exercise the concept-required members of the test resources

The trait checks detect allocate/deallocate through unevaluated contexts,
which never odr-use them, so nvcc warned that every synchronous pair and
stub member was declared but never referenced (#177-D). The attribute
route is closed -- nvcc's front end ignores [[maybe_unused]] for this
diagnostic -- so reference them the honest way: a test that verifies the
synchronous halves of the counting and stream-recording doubles behave
like their stream-ordered halves, and one that pins the trait probes'
stub behavior. The TU now builds with no warnings at all.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

---------

Signed-off-by: Mark Harris <mharris@nvidia.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:31:12 -07:00
Matthew Cong 6717cca14a Improve load balancing in DistributedPointsToGrid (#2276)
* Balance the multi-GPU merge tree across every device

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Generalize merge to non power-of-two GPU counts

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Remove prefetches causing performance regressions

Signed-off-by: Matthew Cong <mcong@nvidia.com>

---------

Signed-off-by: Matthew Cong <mcong@nvidia.com>
2026-08-12 14:46:03 -07:00
Mark HarrisandClaude Opus 4.8 e538a0646b NanoVDB: handle empty partitions in the distributed merge path search (#2248)
* NanoVDB: handle empty partitions in the distributed merge path search

mergePath's bounds checks compare against (keys1Count - 1) and
(keys2Count - 1) on size_t counts, so a zero count underflows to
SIZE_MAX and the guards never fire; the binary search then reads the
empty array (and past either array) and produces wrong or garbage
intervals. An empty partition is reachable from radixSortAsync's
ceil-split whenever a device receives no items, e.g. sorting a single
element across two devices.

Return the trivial split before the search: with an empty side, every
element up to the diagonal comes from the non-empty side.

New single-GPU test MergePathEmptyPartition covers the empty-right,
empty-left, both-empty, and non-empty control cases; the empty cases
fail deterministically without the fix (inverted split / underflow
garbage) and run clean under compute-sanitizer with it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: compute the empty-partition merge split on the host

An empty side needs no merge path search, so skip the kernel launch:
the trivial split (everything up to the diagonal comes from the
non-empty side) is computed on the host by mergePathTrivial at the
launch site. mergePath reverts to the unguarded search and documents
that both inputs must be non-empty.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

---------

Signed-off-by: Mark Harris <mharris@nvidia.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-11 10:32:02 -07:00
Mark HarrisandClaude Fable 5 586dde77a0 NanoVDB: inject a resource into TopologyBuilder scratch, and align cuda::Buffer with cuda::buffer (CUDA) (#2268)
* NanoVDB: align cuda::Buffer member names with cuda::buffer

Name the free operation destroy, as cuda::buffer does, and add the
stream-taking overload it also provides. clear stays but only as a
transitional delegate, marked as such: it exists because
GridHandle::reset still calls it, and goes away with the legacy dual
buffers that cuda::Buffer replaces.

Rename setStream to set_stream. Member names cannot be aliased, so
matching the standard spelling is the whole reason the resource concept
kept allocate_async; the same argument applies here. Note in passing that
ours deliberately does not synchronize, matching cuda::buffer's
set_stream_unsynchronized rather than its set_stream, whose own
documentation and implementation disagree (NVIDIA/cccl#10649).

Add swap. The generic std::swap already does the right thing through the
move operations, but both std::vector and rmm::device_buffer provide one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: allocate TopologyBuilder scratch from an injected resource

Eleven of the builder's buffers are device-only -- nothing reads them on
the host -- yet they were cuda::DeviceBuffer, whose host pointer and
per-device array they never use. Move them to the single-space
cuda::Buffer and give the builder a resource parameter, so its scratch is
injectable like PointsToGrid's already is, and freed by scope rather than
by hand. mProcessedRoot and mData are read on the host and stay dual.

This is not a speedup: DeviceBuffer::init allocates host or device memory
but never both, and these buffers always passed a real device id, so no
cudaMallocHost was on this path to begin with. Measured dilate on 1k/20k/
200k points, and the difference is within run-to-run noise.

Hoist the Data struct out of the class. It does not depend on the
resource, and leaving it nested would give every ResourceT its own
incompatible type for the device functors to name.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: note cuda::Buffer and cuda::BufferView in pendingchanges

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: free TopologyBuilder scratch on the caller's stream

Each release site sits in a function that receives the stream, so pass
it to destroy rather than relying on the retained stream matching --
they are the same on every current path, but the explicit form does not
depend on that staying true. Also drop the cudaGetDevice calls whose
result the Buffer conversion left unused.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: set_stream matches cuda::buffer's contract, not a divergence

cuda::buffer's set_stream is deliberately non-synchronizing -- its
documented synchronization is a stale note left behind when the
synchronization was removed -- so our non-synchronizing set_stream
matches it in both name and contract, and the comment claiming a
divergence was wrong.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: mark cuda::Buffer::clear deprecated in the documentation

Documentation-level only: the [[deprecated]] attribute would warn from
GridHandle::reset and NodeManager::reset, template members in our own
headers that must keep calling clear() until every buffer type provides
destroy() -- an unactionable diagnostic for callers of reset(), and a
build break under -Werror. The attribute lands when those callers
migrate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: exercise the concept-required members of the test resources

The trait checks detect allocate/deallocate through unevaluated contexts,
which never odr-use them, so nvcc warned that every synchronous pair and
stub member was declared but never referenced (#177-D). The attribute
route is closed -- nvcc's front end ignores [[maybe_unused]] for this
diagnostic -- so reference them the honest way: a test that verifies the
synchronous halves of the counting and stream-recording doubles behave
like their stream-ordered halves, and one that pins the trait probes'
stub behavior. The TU now builds with no warnings at all.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

---------

Signed-off-by: Mark Harris <mharris@nvidia.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-11 10:27:40 -07:00
Jonathan Swartz bb597a2109 Merge pull request #2250 from swahtz/tranche-2-maintenance-monoids
NanoVDB: parallel checksum, cooperative GridStats, coalesced IndexToGrid optimizations
2026-08-12 05:04:11 +12:00
Jonathan Swartz b795681895 Merge pull request #2277 from matthewdcong/cu128_cccl_fix
Fix CUDA 12.8 build with bundled CCCL
2026-08-11 14:50:40 +12:00
Matthew Cong 230d640768 Fix CUDA 12.8 build with bundled CCCL
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2026-08-10 12:02:55 -07:00
Matthew Cong 2ad18b6aeb Fix race conditions and empty launches in DistributedPointsToGrid (#2275)
* Fix empty chunks in the multi-GPU points-to-grid pipeline

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Fix race condition with prefix update and incorrect stream in process root

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Remove unsupported cudaMemAdvise call on memory pool allocations

Signed-off-by: Matthew Cong <mcong@nvidia.com>

---------

Signed-off-by: Matthew Cong <mcong@nvidia.com>
2026-08-10 08:31:58 -07:00
Jonathan Swartz b082b5ec7e Merge remote-tracking branch 'upstream/master' into tranche-2-maintenance-monoids 2026-08-08 00:47:40 +00:00
Jonathan Swartz 8a91e1e096 Merge pull request #2249 from swahtz/tranche-1-correctness-determinism
NanoVDB: correctness and determinism fixes
2026-08-08 12:38:49 +12:00
Jonathan Swartz 457b671c34 NanoVDB: public DeviceBuffer::recordUse, per-device frees, and stronger stream tests
Review follow-ups from the Copilot pass on this PR.

The lifetime event only covers uses issued through deviceUpload/deviceDownload; work enqueued
against the raw pointer from deviceData() is invisible to it, so on a non-blocking stream such
work could still outlive the buffer (as on master, where no API could express the dependency).
Make recordUse public so raw-pointer callers can register their stream, and document the
contract on deviceData().

freeDeviceBuffers issued every device's free on one stream, but a stream belongs to a single
device; free each allocation on its own device instead (caller's stream for the current device,
the owning device's default stream otherwise, switching devices as needed). Same pre-existing
shape as master's loop; correctness on multi-GPU is by inspection - this machine has one GPU.

Split the free-ordering regression test into the two scenarios that discriminate the two
historical bugs: a blocking stream with an unregistered write (fails if frees move off the
default stream: the reviewed revision) and a non-blocking stream with a recordUse-registered
write (fails without the event: master). Verified per revision: current passes both, the
reviewed revision fails both, master fails the non-blocking one.

Add NonBlockingStreamSignedFloodFill, mirroring the dilation regression: identical output on
the default stream and on a non-blocking stream while the default stream is occupied, with the
readback on the producing stream. This locks the cross-stream contract; it cannot discriminate
processRoot's internal ordering on constructible inputs (verified: the pre-fix header passes
it) because that path only does work when interior root-level tiles exist and pre-fix code was
accidentally host-synchronous otherwise - noted in the test.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-08-07 23:35:23 +00:00
Jonathan Swartz 111b12f9c1 NanoVDB: guard DeviceBuffer self-move and document clear()'s stream argument
Two non-blocking review points from harrism.

Self-move assignment freed the buffers and then read its own (now dangling) members. Verified:
without the guard 'buf = std::move(buf)' aborts on the deviceData assertion because mDeviceCount
has been zeroed; with it the buffer is left intact. Note UnifiedBuffer::operator=(&&) has the
same flaw and is left for a separate change.

Also document clear()'s stream argument. The review noted it had become dead, which was true of
the revision reviewed - the per-device stream overrode it. With frees now ordered by the tracking
event the argument is honoured again and simply selects where the free is enqueued, so any stream
is safe to pass regardless of where the buffer was used.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-08-07 22:31:52 +00:00
Jonathan Swartz f95115304e NanoVDB: add a regression test for DeviceBuffer multi-stream free ordering
The existing DeviceBufferNonBlockingStreamLifetime test only asserts that repeated
allocate/use/free returns cudaSuccess, so it passes with or without a correctly ordered free.
Its comment also described the superseded 'free on the stream it was allocated on' mechanism.
Reword it as the smoke test it is, and add a test that actually discriminates.

DeviceBufferMultiStreamFreeOrdering uses a device-only buffer on purpose - it owns no pinned
host memory, so clear()'s cudaFreeHost (which implicitly synchronizes) cannot mask the problem.
A second stream is parked behind a busy-wait with a write to the buffer queued behind it, the
buffer is destroyed, and the next allocation is checked for corruption. Verified to fail against
the pre-fix DeviceBuffer (64 MB clobbered) and pass with the fix.

A warm-up pass is required: on a cold context the first launches serialize and the race never
forms. The recycled/still-pending state is reported in the failure message but deliberately not
used as a preconditon - with a correctly ordered free the allocator cannot hand the block out
again until the other stream drains, so those observations are the fix working rather than a
reason to skip.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-08-07 22:20:16 +00:00
Jonathan Swartz 5b5e936723 NanoVDB: update the DeviceBuffer entry in pending changes
The entry described the mechanism as freeing on the stream the buffer was last used on,
which was superseded: frees are now ordered after every stream the buffer was used on via a
per-device event.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-08-07 22:04:07 +00:00
Jonathan Swartz e3351803dc NanoVDB: order DeviceBuffer device frees after every stream that used the buffer
Tracking only the stream a device buffer was LAST used on is not sufficient: two streams can
both have work in flight, and freeing on the later one leaves the earlier one's work running
against memory the allocator has already recycled. Reported in review by matthewdcong.

Reproduced: a device-only DeviceBuffer plus a user kernel on a second blocking stream, with a
warm-up pass so the launches actually overlap. The freed block is recycled and all 64 MB of the
next allocation are overwritten by the late kernel. Freeing on the default stream (the previous
behaviour) passes, because the legacy stream is implicitly ordered after every blocking stream;
freeing on the last-used stream fails.

Replace the per-device stream with a per-device event. Each use waits on the event before
issuing work and re-records it afterwards, so one event transitively covers every stream the
buffer has been used on, and the frees wait on it. This is correct for any mix of blocking and
non-blocking streams and for any number of them, and it removes the requirement that callers
keep their streams alive until the buffer is destroyed, since the event is owned by the buffer.

Verified: both the multi-blocking-stream case and the non-blocking case pass, and the VBM,
topology and maintenance goldens are unchanged (46/46 on dragon and emu).

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-08-07 21:55:45 +00:00
Mark HarrisandClaude Opus 5 d980ad9206 NanoVDB: encode points for any resource in PointsToGrid (CUDA) (#2244)
* NanoVDB: encode points for any resource in PointsToGrid (CUDA)

The point-encode step in tools::cuda::PointsToGrid was only reachable for
the default DeviceResource, because it lived in the BuildT=Point full
specialization of processPoints (i.e. <Point, DeviceResource>). A Point
grid built with a custom resource fell through to the generic no-op and
was silently left with unencoded point data.

Fold the encode into the generic processPoints and gate it with
if constexpr(is_same<BuildT, Point>). The encode kernels run on device
data and are independent of the resource; only the trailing d_indx
deallocation routes through ResourceT. Non-Point builds and default-
resource Point builds are unchanged.

Add a regression test that builds a NanoGrid<Point> through a custom
resource and asserts every input point is recoverable from the encoded
per-voxel data.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: move the point-encode kernels out of the if-constexpr block

nvcc rejects an extended lambda defined directly inside the block of an
if constexpr statement on some host compilers, so the nine encode
launches failed to compile against MSVC while building fine with gcc and
clang. Give them their own member function and have the branch call it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

---------

Signed-off-by: Mark Harris <mharris@nvidia.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-04 15:07:55 -07:00
20f904e7cd NanoVDB: fail with an actionable diagnostic when CUDA memory pools are unavailable (#2256)
* NanoVDB: fail loudly when CUDA memory pools are unavailable

Fractional vGPU configurations commonly expose no stream-ordered memory
pools (cudaDevAttrMemoryPoolsSupported == 0), so the first cudaMallocAsync
fails with cudaErrorNotSupported. Rather than silently substituting
synchronous cudaMalloc -- which would make an async resource misrepresent
its own semantics, since the choice of a synchronous backend belongs to
the caller -- the util::cuda::mallocAsync wrapper now detects the missing
capability and emits an actionable diagnostic naming
NANOVDB_USE_SYNC_CUDA_MALLOC before returning cudaErrorNotSupported, which
every caller already surfaces via cudaCheck. freeAsync mirrors the check.

The NANOVDB_USE_SYNC_CUDA_MALLOC macro remains the caller's explicit
opt-in to synchronous allocation, and must be defined identically in every
translation unit (the wrappers are inline). memoryPoolsSupported() exposes
the cached per-device capability query, and mallocSync/freeSync name the
synchronous pair the macro path maps to.

TestUtilCuda.cu is compiled into two binaries -- default and
macro-defined -- covering both modes; its async-path tests skip on a device
without memory pools, where those wrappers fail by design.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: drop redundant grid-build test from TestUtilCuda

GridBuildThroughWrappers built a device grid through the wrappers, but
PointsToGrid device builds are already covered by TestMemoryResource,
TestNanoVDB, and TestMultiGPU. Its only unique coverage was the
macro-forced-synchronous build, which is better established by the
MallocAsyncRoundTrip test running in the NANOVDB_USE_SYNC_CUDA_MALLOC
binary plus validation on pool-less hardware -- and it pulled the
PointsToGrid builder header into a util-wrapper unit test. Remove it and
the now-unused include.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: inline cudaMalloc/cudaFree instead of mallocSync/freeSync helpers

mallocSync/freeSync were the shared synchronous implementation for two
callers: the macro tier and a runtime fallback. With the fallback removed
in favor of failing loudly, only the macro tier remains, so the helpers
are one-line pass-throughs with a single caller each. Inline cudaMalloc /
cudaFree directly, restoring the macro-tier wrappers to their prior form
and leaving memoryPoolsSupported as the only added function.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: clarify the memory-pool diagnostic names a build-time macro

Say "Define NANOVDB_USE_SYNC_CUDA_MALLOC when building" so the message
reads as a compile-time option rather than a runtime environment variable
that would be respected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: hoist the device query out of its if-statement condition

Declaring the error code in the if-init clause packed a query, a test
and an early return onto one line. Split them so each reads on its own.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

---------

Signed-off-by: Mark Harris <mharris@nvidia.com>
Signed-off-by: Ken Museth <1495380+kmuseth@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Ken Museth <1495380+kmuseth@users.noreply.github.com>
2026-08-03 18:52:01 -07:00
Mark HarrisandClaude Opus 5 7be8164055 NanoVDB: add cuda::Buffer, cuda::BufferView, and the synchronous resource concept (CUDA) (#2251)
* NanoVDB: add cuda::Buffer / cuda::BufferView and the synchronous resource trait (CUDA)

Adds nanovdb/cuda/Buffer.h with two typed containers:

- cuda::Buffer<T, R>: owning, move-only container of T elements allocated
  from a memory resource R held by value. With a stream-ordered resource
  (is_async_resource) it retains the stream of the most recent allocation
  and orders deallocation, resize, and copy on it; with a synchronous
  resource (is_resource) it carries no stream state and exposes no stream
  API, enforced via an empty-base StreamHolder and enable_if-gated
  overloads. Constructors value-initialize elements to zero unless the
  NoInit tag is passed. Element counts whose byte size would overflow
  size_t are rejected with an exception.

- cuda::BufferView<T>: non-owning, trivially copyable view with span
  semantics plus a detaching clear(), which is what the GridHandle buffer
  static interface requires, enabling zero-copy
  GridHandle<cuda::BufferView<std::byte>> over externally owned grids.

Also adds the is_resource detection trait (synchronous allocate/deallocate)
to nanovdb/cuda/DeviceResource.h alongside is_async_resource, and a new
unit-test suite (TestBuffer.cu, ctest name nanovdb_cuda_buffer_unit_test)
covering traits, counting and stream-recording resources, stream
retention, resize, move semantics, deep copy, pinned-host buffers, and a
zero-copy GridHandle round trip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: free the new block when a synchronous Buffer resize fails

The stream-ordered resize guarded its prefix copy so a failure frees the
new allocation and leaves the buffer untouched; the synchronous overload
had no such guard. Mirror it so both overloads share one invariant.

Also document parameters with @param rather than describing them in
@brief, split the stream-ordered c-tor's initializer list onto one
member per line, and note that copy construction and assignment are
explicitly disallowed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

---------

Signed-off-by: Mark Harris <mharris@nvidia.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-31 10:01:23 -07:00
Jonathan Swartz 75ed0cd57a Merge pull request #2217 from swahtz/docs_qol_improvements
Add docs quality CI gates and clear the doxygen warning backlog
2026-07-30 09:44:39 +12:00
Nick Avramoussis 92a4f48f8f Use __has_include to decide on tbb/version.h
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-07-30 09:19:36 +12:00
Jonathan SwartzandClaude Opus 5 1f885014b8 Restore full historical signatures in changes.txt release notes
Per review feedback, the converted release-note entries now spell out the
complete historical signature (including parameters) rather than a bare
name, so readers still see exactly what each change referred to.

Uses <TT> rather than @c for these, since @c only formats the next
whitespace-delimited word and cannot span a signature with arguments.
Follows the existing <TT> precedent in this file.

Note that argument-qualified @vdblink/@link targets do not resolve under
the versioned inline namespace even when the API still exists, so plain
text is required here regardless of whether the symbol was removed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-29 23:04:37 +12:00
Ken MusethandAndre Pradhana b7fc4fc7af Fix read accessor (#2260)
* addressed bug in nanovdb::ReadAccesor<0,1,2>

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* fixed build of vdb_tool with OpenEXR on OSX

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* changed default to off

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* updated nanovdb.txt

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* improved openvdb_cmd/vdb_tool/CMakeLists.txt

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* Clean up vdb_tool OpenEXR/Imath CMake logic.

Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>

* Simplify Old ReadAccessor CMake option and ensures users who include NanoVDB.h directly get the new ReadAccessor behavior by default.

Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>

* reviewer feedback

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* improved writing

Signed-off-by: Ken Museth <ken.museth@gmail.com>

---------

Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
Co-authored-by: Andre Pradhana <andre.pradhana@gmail.com>
2026-07-27 16:43:55 -07:00
Jonathan Swartz 56287f697a Fix typo of quads/quad parameter
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-25 13:40:41 +12:00
Jonathan Swartz 32dac53ce1 Merge branch 'master' into docs_qol_improvements 2026-07-25 13:38:23 +12:00
Jonathan Swartz 8e5b1bc07e Updated all 26 affected historical references in doc/changes.txt.
- Removed APIs now use @c with fully qualified historical names, such as @c
    openvdb::Grid::signedFloodFill().

  - Restored names omitted entirely by the PR, including the Transform methods and
    Filter::laplacian().

  - Kept createLevelSetSphere() as a corrected @vdblink because it still exists.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-24 16:56:17 +12:00
apradhana 332a57d9d6 Merge pull request #2221 from apradhana/ci/skip-drafts-pr
Skip build CI if a PR is a draft.
2026-07-22 21:30:26 -07:00
Jonathan Swartz b0b99d6ce7 Merge branch 'master' into tranche-2-maintenance-monoids 2026-07-23 03:34:37 +00:00
Maciej Małecki 1ca9bb066e Include file containing TBB version information
Such as `TBB_INTERFACE_VERSION`.
Without it, the `#else` statement always triggers, breaking build for
newer TBB version (albeit rare at this point).

Signed-off-by: Maciej Małecki <me@mmalecki.com>
2026-07-21 22:44:55 +02:00
mmustafasenoglu 50e1563078 fix: add else to constexpr-if chain in evalFirstCached to eliminate MSVC C4702 warning (#2252)
When either constexpr-if condition in the evalFirstCached lambda
evaluates to true, the remaining code including the return statement
is unreachable. MSVC emits warning C4702 (unreachable code) in this
case.

Add else keywords to form a proper constexpr-if / else-if / else
chain so that the unreachable code path is excluded from the
instantiated function body.

Fixes #2239

Signed-off-by: Mustafa Senoglu <mmustafasenoglu0@gmail.com>
2026-07-20 20:28:43 -07:00
Jonathan Swartz 59fcab450a Comment fix
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-20 00:43:38 +00:00
Jonathan Swartz 65c9d4884c Update pendingchanges
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-20 00:38:44 +00:00
Jonathan Swartz ad251341d0 Comment cleanup and swap some constants for semantically defined values
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-20 00:28:00 +00:00
Jonathan Swartz 06ad21bf70 Improve comments for processInternal/Leaf
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-19 03:53:42 +00:00
Jonathan SwartzandClaude Opus 4.8 2e30d61283 NanoVDB CUDA: precompute GridChecksum combine operators on the host
crc32CombineKernel rebuilt its two GF(2) shift operators by binary
exponentiation on a single device thread every call - a fixed ~480 us that
dominated the checksum for small and medium grids (profiling showed it as large
as the entire tail-streaming pass). The operators depend only on the chunk
length, so they are now built on the host in microseconds and uploaded, and the
device kernel is reduced to the O(chunkCount) fold.

Bit-identical: all checksum goldens pass on dragon/emu/crawler/wdas_cloud.

A/B vs the parallel-checksum base (RTX PRO 6000, 3 rounds):
  dragon +40.7% (1.69x)  emu +15.3%  crawler +9.8%  wdas_cloud +1.9%
The gain shrinks with grid size because it removes a fixed cost; transient
memory unchanged.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 01:53:03 +00:00
Ken Museth 4775fa6079 Changed cmake for vdb_tool to use OpenEXR v3 vs v2 (#2253)
* fixed cmake for vdb_tool to use OpenEXR v3

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* added min version to cmake for imath

Signed-off-by: Ken Museth <ken.museth@gmail.com>

---------

Signed-off-by: Ken Museth <ken.museth@gmail.com>
2026-07-17 23:32:36 -07:00
Jonathan SwartzandClaude Opus 4.8 f20dd2a50e NanoVDB: add pending CHANGES entries for the CUDA correctness fixes
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-16 23:00:35 +00:00
Ken Museth fb4516e3e9 Squash NanoVDB and vdb_tool contributions (#2241)
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2026-07-15 15:45:42 -07:00
Jonathan SwartzandClaude Opus 4.8 72a4bfe64e NanoVDB CUDA: GridStats review fixes - guard leaf launch + unique per-node stats slot
Addresses PR review on the cooperative GridStats:
- processLeaf is now launched only when nodeCount[0] > 0, matching the guards on
  the internal-node launches (a leaf-less grid would otherwise be a <<<0,...>>>
  launch).
- The average path now gives each node its own d_stats slot instead of reusing
  one of its children's. A fully-tiled internal node (active value tiles, no
  children) never claimed a child slot, so the old code wrote d_stats[-1] (out
  of bounds) and propagated an invalid slot to its parent. d_stats is now sized
  for all nodes (leaves, then lower, then upper) and each node writes slot
  leafCount + levelOffset + nodeID; the sSlot/atomicMax machinery is removed.

stats_minmax is unaffected (it never touches d_stats) and stays byte-exact;
stats_all output is unchanged for grids without childless internal nodes and
correct for those that have them. compute-sanitizer memcheck clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-15 00:02:52 +00:00
Jonathan SwartzandClaude Fable 5 5fcaa5a347 NanoVDB CUDA: coalesced IndexToGrid node/leaf remap
Port of Agent A's exp/20. Consecutive threads now process consecutive table
entries and leaf values - the former mapping gave each thread a consecutive RUN
(a 32-entry stride across the warp for internal nodes, 8 for leaves) on every
iteration. The 4 KB upper-node value/child masks are copied cooperatively across
the block instead of member-wise by thread 0 while the rest idled.

Combines with the Tranche-1 scoped zero-init already on this file: the leaf
kernel's stats/padding-gap zeroing is preserved inside the thread-0 block, and
the coalesced value loop still writes every mValues[i], so output stays
bit-identical - all indextogrid goldens pass on dragon/emu/crawler/wdas_cloud.

A/B vs the Tranche-1 base (RTX PRO 6000, 3 rounds): dragon +23%, emu +21%,
crawler +18%, wdas_cloud +14%; transient memory unchanged. The remap gain is on
top of Tranche 1's scoped init, so absolute indextogrid is now faster than both
master and A's exp/20.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-15 00:02:52 +00:00
Jonathan SwartzandClaude Fable 5 44d5e657a7 NanoVDB CUDA: cooperative GridStats reductions (warp-per-leaf, block-per-node)
Port of Agent A's exp/13. Replaces the thread-per-node serial reductions:
- processLeaf: one warp per leaf - lanes stride the 512 voxel slots (mask-gated)
  and merge partial statistics through shared memory; lane 0 keeps the bbox
  update and the final store.
- processInternal: one 128-thread block per internal node striding the
  4,096/32,768-entry child table with a shared-memory tree reduction of Stats +
  bbox. The former kernel gave each thread up to 32,768 serial child visits and
  ran an entire lower level of a 181M-voxel grid on ~9 warps of a 188-SM GPU.

min/max are order-independent, so stats_minmax output is bit-identical - all
stats_minmax goldens pass on dragon/emu/crawler/wdas_cloud. avg/stddev
(stats_all) use a Welford-correct parallel merge but are NOT bit-identical to
the serial result (floating-point reduction order differs); stats_all stays a
bench-only measurement, never a byte-exact claim.

A/B vs the Tranche-1 base (RTX PRO 6000, 3 rounds):
  stats_minmax  dragon +87.3%  emu +82.5%  crawler +80.3%  wdas +83.5%  (5-8x)
  stats_all     dragon +71.9%  emu +51.7%  crawler +29.8%  wdas +35.1%
transient memory unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-15 00:02:52 +00:00
Jonathan SwartzandClaude Fable 5 9e6d47cb88 NanoVDB CUDA: parallel bit-identical GridChecksum (slicing-by-4 + GF(2) combine)
Port of Agent A's exp/14. Replaces the two serial anti-patterns in blockedCRC32
with parallel equivalents:
- Per-block CRC via slicing-by-4: the 256-entry base LUT is staged into shared
  memory and three derived slice tables are built in place, so the dependent CRC
  chain advances four bytes per step with four shared-memory lookups instead of
  one byte per L2 lookup. (Not __constant__: divergent indices serialize there.)
- The final fold (a single thread CRCing the whole block-CRC array - megabytes
  for multi-GB grids) becomes parallel per-chunk CRCs plus a GF(2) crc32_combine
  (zlib construction: one shift operator per fixed chunk length, applied per
  fold). Small inputs keep the single-thread path.

Checksum VALUES are bit-identical (slicing-by-4 and the GF(2) combine are both
value-preserving); all checksum_full goldens pass on dragon/emu/crawler/
wdas_cloud. The pre-v32.6.0 crc32TailOld path is untouched.

A/B vs the Tranche-1 base (RTX PRO 6000, 3 rounds): dragon +84.7%, emu +92.0%,
crawler +93.2%, wdas_cloud +94.1% (~6.5x / 12.5x / 15x / 17x); transient memory
unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-15 00:02:52 +00:00
Jonathan SwartzandClaude Opus 4.8 bbb19a9c27 NanoVDB CUDA: include <algorithm> for std::min; fix DeviceBuffer stream comments
Addresses PR review:
- PointsToGrid/MeshToGrid/DistributedPointsToGrid use std::min in the grid-name
  copy but did not include <algorithm> (it compiled only via transitive
  includes). Add the include so each header is self-sufficient.
- DeviceBuffer comments still described mStreams as the "allocation stream", but
  it is now updated on every deviceUpload/deviceDownload; reword them to
  "last-used stream" to match the actual behavior.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-15 00:02:23 +00:00
Jonathan SwartzandClaude Opus 4.8 04c16f94ad NanoVDB CUDA: update DeviceBuffer free-stream on every up/download
Addresses PR review: mStreams[device] was set only when the device allocation
was first created. If the buffer is later re-uploaded (or downloaded) on a
different stream, the destructor/move-assign/clear would still free on the old
stream, which does not necessarily order after the most recent work on the new
stream (notably for cudaStreamNonBlocking). Update mStreams[device] to the
current stream on every host<->device copy in deviceUpload/deviceDownload, not
just on first allocation. Guarded on mStreams (null for externally-managed
buffers, which are never freed here).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-14 22:54:59 +00:00
Jonathan SwartzandClaude Opus 4.8 3cdaa03ba8 NanoVDB CUDA: drain default stream after NonBlockingStreamDilate busy-wait (test)
Addresses PR review: the test launches streamBusyWaitKernel on the default
stream to occupy it during the candidate dilation, but only synchronized the
non-blocking stream afterward. The busy-wait could remain queued on stream 0
and leak into subsequent tests, causing timing-dependent flakes. Drain it with
a cudaDeviceSynchronize() after the candidate run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-14 05:52:51 +00:00
Jonathan SwartzandClaude Opus 4.8 5bb2eba69d NanoVDB CUDA: track DeviceBuffer free stream per device (multi-GPU fix)
Addresses PR review: the Tranche-1 stream-ordered-free change stored a single
mStream, overwritten by every DeviceBuffer::deviceUpload. A DeviceBuffer can
hold an allocation on each device (mGpuData is per-device), and the multi-GPU
example (ex_make_mgpu_nanovdb) uploads one handle to every device with that
device's own stream. The destructor/move-assign then freed *every* device's
allocation on the last device's stream - a cross-device cudaFreeAsync(ptr@devA,
stream@devB), which is invalid (the free stream must belong to the allocation's
device). Pre-Tranche-1 code freed on stream 0 uniformly, so this was a
regression for the multi-GPU path.

Track the allocation stream per device in a cudaStream_t array parallel to
mGpuData, set in init()/deviceUpload() at mStreams[device], and free each
mGpuData[i] on its own mStreams[i] in clear()/move-assignment. The single-GPU
path is unchanged (one device, one stream); the multi-GPU path now frees each
device's allocation on its own device-bound stream.

Single-GPU verified (DeviceBuffer lifetime gtest + byte-exact validation); the
multi-GPU free path is correct by construction but not runtime-tested here
(single-GPU environment).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-14 04:44:24 +00:00
Jonathan SwartzandClaude Opus 4.8 0e5fbf3c19 NanoVDB CUDA: only sync SignedFloodFill root pass on a non-default stream
The Tranche-1 stream-correctness fix added an unconditional
cudaStreamSynchronize(stream) before processRoot's synchronous default-stream
cudaMemcpy of the tree. That sync is only needed when the caller's node passes
ran on a non-default stream; on the default stream (0) the blocking copy already
orders after prior stream-0 work, so the extra sync there was pure overhead - a
measured ~4-11% regression on floodfill/dragon vs master. Guard it with
`if (stream != 0)`. Correctness for non-blocking-stream callers is unchanged.

floodfill is now NEUTRAL vs master on dragon/emu/crawler (0 regressions), and
byte-exact validation is unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-14 04:23:13 +00:00
Jonathan SwartzandClaude Opus 4.8 465599ddab NanoVDB CUDA: null-terminate over-long grid names; query current device in test
Addresses PR review:
- The grid-name copy could leave GridData::mGridName without a null terminator
  when the name length >= MaxNameSize: min(size+1, MaxNameSize) == MaxNameSize
  overwrote the entire zeroed field, and gridName() (a C-string accessor) would
  then read past it. Copy at most MaxNameSize-1 bytes and rely on the preceding
  memset for termination, truncating over-long names instead. Fixed in
  PointsToGrid, MeshToGrid and DistributedPointsToGrid.
- GridName_CudaPointsToGrid gains an over-long (>= MaxNameSize) case asserting
  the result is truncated to MaxNameSize-1 chars and stays null-terminated.
- NonBlockingStreamDilate_ValueOnIndex queried device 0 for the clock rate;
  query the current device via cudaGetDevice() instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-14 04:23:13 +00:00
Jonathan SwartzandClaude Opus 4.8 992aace6cf NanoVDB CUDA: scope IndexToGrid zero-init to the output it actually needs
The Tranche-1 determinism fix zero-initialized the *entire* IndexToGrid output
buffer so that bytes the build kernels never write - stats fields absent from
the source grid, and struct alignment padding - are deterministic instead of
carrying recycled pool bytes (which otherwise leak into written .nvdb files).
Measured against master this cost 10-22% on indextogrid across dragon/emu/
crawler/wdas_cloud: the leaf array dominates the buffer and was memset to zero
and then immediately overwritten value-by-value - a redundant multi-GB pass.

Scope the initialization to the bytes that are genuinely left unwritten:

  * getBuffer() memsets only the non-leaf region [0, node[0]) - grid, tree,
    root, root tiles and the internal nodes - a small fraction of the buffer.
  * processLeafsKernel zeroes each leaf's own gap [&mMinimum, mValues): the
    stats fields (skipped when the source has no stats) and any padding before
    the 32-aligned mValues array. Every mValues[i] is written anyway, so this
    reproduces the former full zero-init byte-for-byte.

Output is bit-identical to the full zero-init - all indextogrid goldens pass on
dragon/emu/crawler/wdas_cloud, compute-sanitizer memcheck is clean and initcheck
shows no new reports - and the regression vs master is gone (NEUTRAL on all four
datasets, RTX PRO 6000 / sm_120).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-14 04:08:04 +00:00
Jonathan Swartz fb1c692d05 comment fix
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-14 03:18:17 +00:00
Jonathan Swartz 42afea5d40 Fix up comments
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-14 03:02:43 +00:00
Jonathan SwartzandClaude Opus 4.8 c3cde0fea6 NanoVDB CUDA: correctness and determinism fixes
Five correctness/determinism fixes to the NanoVDB CUDA tools:

* GridChecksum: evalChecksum copied sizeof(GridData)+sizeof(TreeData) (736 B)
  from a device buffer holding a single uint32 CRC into the 4-byte head/tail of
  a stack Checksum -- an out-of-bounds device read plus host stack corruption
  (compute-sanitizer visible; a hard CUDA "invalid argument" on some configs).
  Copy sizeof(uint32_t) at all four sites, matching validateChecksum.

* Stream propagation: the NN_FACE_EDGE_VERTEX leaf-dilation kernel and
  SignedFloodFill's root pass ran on the default stream instead of the caller's
  stream, silently corrupting output for callers using a non-blocking stream.
  Launch and synchronize on the operation's stream.

* Bounded grid-name copy: the grid-name copy read a fixed MaxNameSize bytes from
  a possibly shorter std::string (whose .data() is never null, making the memset
  branch dead), over-reading up to 255 bytes of host heap into the grid and any
  written .nvdb file. Zero the field, then copy only min(name.size()+1,
  MaxNameSize) bytes. Applied to PointsToGrid, DistributedPointsToGrid, MeshToGrid.

* Deterministic output initialization: PointsToGrid and IndexToGrid left
  alignment padding and stats fields carrying recycled pool bytes, making output
  nondeterministic and leaking host heap into files. Zero the whole grid buffer
  once after allocation. For PointsToGrid this makes the three dense
  background-fill passes (upper/lower value tables, and the inactive-leaf-values
  pass for all but the Point build type) redundant, so they are dropped.

* DeviceBuffer stream-ordered lifetime: the destructor, move-assignment and
  clear() freed device allocations on the default stream regardless of the
  stream the buffer was last used on -- a latent use-after-free for
  non-blocking-stream callers, masked today by legacy-stream semantics. Track the
  allocation stream and free on it, matching the stream-ordered free TempPool
  now performs.

Adds gtest coverage in unittest/TestNanoVDB.cu: cross-stream dilation
determinism, grid-name round-trip (empty/short/max-length), PointsToGrid output
determinism, and DeviceBuffer non-blocking-stream lifetime. No performance claims.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 02:42:23 +00:00
Jonathan Swartz a532de5526 Fix vdb_view Windows build: include windows.h before GL/glu.h (#2247)
GL/glu.h uses APIENTRY without defining it. This previously compiled because
oneTBB (<= 2022.3) transitively included windows.h from its public headers;
oneTBB 2023.0 removed that include, so APIENTRY is no longer defined when
RenderModules.cc includes GL/glu.h. GL/glew.h cannot provide it either: it
undefines APIENTRY at the end of the header when it was the one defining it
(and the vcpkg glew package additionally patches out glew.h's internal
GL/glu.h include). Include windows.h explicitly before GL/glu.h instead of
relying on a transitive include.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-07-09 14:54:49 -07:00
Andrew acca53b4f8 Adding semantics for VoxelBVH. (#2227)
* Adding semantics for VoxelBVH.

Signed-off-by: Andrew Reidmeyer <areidmeyer@nvidia.com>

* Adding range semantic.

Signed-off-by: Andrew Reidmeyer <areidmeyer@nvidia.com>

* Support voxelbvh value sidecar.

Signed-off-by: Andrew Reidmeyer <areidmeyer@nvidia.com>

---------

Signed-off-by: Andrew Reidmeyer <areidmeyer@nvidia.com>
2026-07-07 09:10:12 -07:00
Mark HarrisandClaude Opus 4.8 ca21615c13 NanoVDB: add stream-ordered async memory-resource seam (CUDA) (#2231)
* NanoVDB: add stream-ordered async memory-resource seam (CUDA)

Introduce an instance-based async memory-resource concept on NanoVDB's CUDA
path so downstream code can inject its own allocator without forking headers,
with zero change to existing call sites at the default.

- cuda::DeviceResource: add instance allocate_async/deallocate_async alongside
  the existing static methods; add default_resource<R>() (a program-lifetime
  singleton) and the is_async_resource<R> trait.
- cuda::PinnedResource: new host-pinned resource modelling the same concept
  (default impl wraps cudaMallocHost/cudaFreeHost).
- cuda::TempPool: route allocations through a resource instance and free on the
  stream of the most recent reallocate() at destruction, not the null stream.
- tools::cuda::PointsToGrid: route internal scratch and mDeviceData through an
  injected resource instance via a defaulted ResourceT& constructor argument.
- unittest: add TestMemoryResource.cu (TestMemoryResource suite) with
  resource-concept, pinned page-lock, stream-retained-free, no-leak, and
  PointsToGrid instance-injection tests.

TopologyBuilder/DistributedPointsToGrid routing and the dual-buffer pinned-host
fix allocate via cuda::DeviceBuffer and are deferred to a follow-up that
introduces a resource-parameterized buffer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

* NanoVDB: make cuda::PinnedResource synchronous; document is_async_resource

cudaMallocHost / cudaFreeHost are synchronous, so PinnedResource now
models the synchronous Resource concept -- allocate(bytes, alignment) /
deallocate(ptr, bytes, alignment), no stream -- instead of carrying the
stream-ordered AsyncResource shape with an ignored stream argument. The
static allocateAsync / deallocateAsync helpers are removed; the type is
allocator-stateless, so the instance methods call CUDA directly.

is_async_resource<PinnedResource> is now false; the unit test asserts
that and exercises the synchronous allocate / deallocate API.

Add a @code example to is_async_resource documenting the if-constexpr
dispatch between a stream-ordered allocate_async and a synchronous
allocate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>

---------

Signed-off-by: Mark Harris <mharris@nvidia.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 21:06:33 -07:00
Jonathan Swartz cf2f1493b9 Merge pull request #2238 from swahtz/nanovdb_n-ary_mergegrids
NanoVDB: generalize `tools::cuda::MergeGrids` to an N-ary union
2026-06-26 10:26:42 +12:00
Jonathan Swartz b94efdd07d Merge pull request #2198 from swahtz/fix/nanovdb_python_write_grids_drop
nanovdb/python: fix writeGrids dropping all but the last grid
2026-06-25 08:30:02 +12:00
Jonathan Swartz e332cc54d6 Merge branch 'master' into docs_qol_improvements 2026-06-24 14:13:02 +12:00
AndrewandJonathan Swartz 90c02c309d Bugfix for GridHandle::read(). (#2237)
* Bugfix for GridHandle::read().

Signed-off-by: Andrew Reidmeyer <areidmeyer@nvidia.com>

* Simplify.

Signed-off-by: Andrew Reidmeyer <areidmeyer@nvidia.com>

* Adding pendingchanges file.

Signed-off-by: Andrew Reidmeyer <areidmeyer@nvidia.com>

* Tweak wording.

Signed-off-by: Andrew Reidmeyer <areidmeyer@nvidia.com>

* Add a test

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* Requested change.

Signed-off-by: Andrew Reidmeyer <areidmeyer@nvidia.com>

---------

Signed-off-by: Andrew Reidmeyer <areidmeyer@nvidia.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Co-authored-by: Jonathan Swartz <jonathan@jswartz.info>
2026-06-23 18:18:56 -07:00
Dan Bailey 63a052f4b4 Merge pull request #2222 from Idclip/ax_ast_doxy
Suppress some doxygen warings in AST.h
2026-06-17 21:17:29 -07:00
Dan Bailey c1b7dd251a Merge pull request #2234 from AcademySoftwareFoundation/feature/fix_windows_static_ci
Fix Windows Static CI
2026-06-17 21:15:32 -07:00
Dan Bailey 0dda5483b5 Add changes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-06-17 21:14:23 -07:00
jmlait 4ed2573179 Merge pull request #2233 from sideeffects/sendupstream_h22sync
Houdini 22 Sync
2026-06-17 16:33:23 -04:00
jmlait a6a9dcca29 Merge pull request #2235 from sideeffects/sendupstream_221support
Fix missing 221 file support
2026-06-17 16:05:17 -04:00
Jonathan Swartz d8c9ee5c5a nanovdb: generalize cuda MergeGrids to an N-ary union
tools::cuda::MergeGrids merged exactly two device OnIndex grids, but its
algorithm is already an accumulate-into-shared-masks union, so it extends
to any number of inputs without changing the kernels.

- Add an N-ary constructor taking std::vector<const GridT*>; the binary
  (grid1, grid2) constructor now delegates to it, leaving current callers
  unchanged. Loop over the inputs in mergeRoot / mergeInternalNodes /
  mergeLeafNodes instead of handling two grids explicitly; guard the
  empty list.
- A single N-ary pass uses one accumulator and reads each input once,
  versus materializing log(N) intermediate grids when chaining binaries.

Add TestNanoVDBCUDA.MergeGridsNary_ValueOnIndex: verify a 3-grid merge
matches chaining the binary form (and edge cases: single-element copy,
empty throws).

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-06-16 23:12:24 +00:00
Andre Pradhana ff3709c618 Run CI in nanovdb if it is push OR non-draft PR or matching manual run.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2026-06-15 20:55:46 -07:00
Jeff Lait c58736a68b Pending change for 221 fix.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2026-06-12 14:11:55 -04:00
Jeff Lait 31a6a29a6f Must use getFormatVersion as readGridCompression is static.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2026-06-12 14:11:03 -04:00
Jeff Lait defd4de2cf Fix the missing NODE_MASK_COMPRESSION tests in Archive.cc, restoring
the code from the earlier versions

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2026-06-12 14:10:50 -04:00
Jeff Lait ecd3f084d6 Add pending changes.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2026-06-11 15:35:34 -04:00
Jeff Lait d257946b18 Synchnronization with Houdini 22.
- UT_CameraParms changes
- Assume Uniform option in Filter to prevent any anistropy being
  introduced.
- format override to pretty print ut types
- Sync of the reference files

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2026-06-11 15:31:13 -04:00
Dan Bailey bce1c3aaa1 Fix an issue with blosc zlib on Windows static lib (use zlib that OpenVDB links against directly)
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-06-10 22:41:46 -07:00
Jonathan Swartz 0130f7a20b Comment update
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-06-01 21:30:10 +00:00
Jonathan Swartz 6d65d9e840 Gate docs CI on Doxygen's native WARN_AS_ERROR; drop the warning filter
With the changes.txt, Half.h and ComputePrimitives.h warnings fixed, the
per-pattern suppression layer has served its purpose. Switch the CI docs build
to Doxygen's native FAIL_ON_WARNINGS so any net-new warning fails the PR
directly, and remove the filter scaffolding:

* .github/workflows/docs.yml passes -DOPENVDB_DOXYGEN_WARN_AS_ERROR=ON and
  drops the check_doxygen_warnings step. The warning log is still uploaded as
  an artifact (FAIL_ON_WARNINGS writes it before exiting non-zero).
* ci/check_doxygen_warnings.py and doc/.doxygen_warning_suppress.txt removed.
* doc/CMakeLists.txt option comment updated to note CI now uses the gate.

NOTE: the docs job stays red until the remaining openvdb_ax/ast/AST.h
INLINE_INHERITED_MEMB warning (handled separately) is merged into this branch
-- it is the only warning the build still emits.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-06-01 21:28:22 +00:00
Jonathan Swartz c157c94c14 Replace cxx14::make_index_sequence shim with std:: in ComputePrimitives.h
The cxx14 namespace was a C++11 forward-compat reimplementation of
std::index_sequence / std::make_index_sequence. NanoVDB requires C++17
(MINIMUM_CXX_STANDARD 17), so the standard versions in <utility> (already
included) are guaranteed present, and openvdb/Types.h already uses them.

Switching to std:: deletes the recursive-inheritance template
(make_index_sequence<N> : make_index_sequence<N-1, ...>) that Doxygen's
class-relation analyser flagged as a "potential recursive class relation".
Doxygen documents template entities rather than instantiations, so the
recursive base resolves back to the same class and looks like a self-loop;
it can't see that the <0, Is...> specialization terminates the recursion.
Removing the shim eliminates the warning at the source for every compiler,
not just the CI Doxygen, so its suppression entry is dropped too. The only
remaining backlog entry is the AST.h INLINE_INHERITED_MEMB interaction.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-06-01 21:19:48 +00:00
Nick Avramoussis f9754140ba Merge pull request #2205 from Idclip/ax_unit_test_fixes
Minor AX unit test fix
2026-05-29 18:04:12 +12:00
Jonathan Swartz 2ea583eafd Clear the changes.txt and Half.h doxygen warning suppressions
Whittles two more entries off doc/.doxygen_warning_suppress.txt by fixing
the underlying warnings instead of suppressing them.

doc/changes.txt (26 unresolved-link warnings -> 0):
* Historical Release Notes \link references to APIs that were since renamed
  or removed are delinked to @c <name> (the file's existing inline-code
  style), or dropped to plain prose where the link text was an English word
  woven into a sentence. createLevelSetSphere() is requalified tools:: (it
  only lacked the namespace, matching the working link elsewhere in the file).

doc/CMakeLists.txt:
* EXCLUDE_SYMBOLS no longer carries a capital-I "*Internal*" glob: it also
  matched the public tree::InternalNode / nanovdb::InternalNode classes,
  silently dropping them from the docs and breaking InternalNode::childCount
  in changes.txt while its RootNode/LeafNode siblings resolved. Both classes
  are now documented and the link resolves.
* OPENVDB_API is predefined empty so Doxygen stops folding the export macro
  into the name of `enum OPENVDB_API FromBitsTag` in the vendored Half.h.

ext/imath/openvdb/math/Half.h (vendored, OpenVDB-adapted Imath fork):
* @file half.h -> @file Half.h (the file was renamed during vendoring).
* The internal half-float limit/config macros are wrapped in @cond/@endcond:
  Doxygen auto-links the literal `#define` token on documented active macros,
  and these are implementation details (the half type lives in the excluded
  internal namespace).
* The file-level description now renders cleanly: its ASCII bit-layout
  diagrams, formulas and example tables are wrapped in <pre>, and its
  double-backtick code spans are reduced to single backticks (the double
  form broke Doxygen 1.14's markdown paragraphing and collapsed the prose).

doc/.doxygen_warning_suppress.txt:
* Drop the changes.txt and Half.h entries; both are now warning-clean.
  Remaining backlog: the ComputePrimitives.h recursive-template false
  positive and the AST.h INLINE_INHERITED_MEMB interaction.

Verified against Doxygen 1.14 (the CI version): 0 surviving warnings.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-05-29 06:03:06 +00:00
Nick Avramoussis c7fee6b08a Suppress some doxygen warings in AST.h
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-05-28 11:55:42 +01:00
Andre Pradhana 83c29033f2 Skip build CI if a PR is a draft.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2026-05-27 12:07:01 -07:00
Eftychios SifakisandClaude Sonnet 4.6 153c7ce5b1 Add MeshToGrid: CUDA triangle mesh to NanoVDB UDF/IndexGrid converter (#2178)
* Add MeshToGrid: CUDA triangle mesh to NanoVDB IndexGrid/UDF converter

Introduces nanovdb::tools::cuda::MeshToGrid<BuildT>, a GPU-accelerated
rasterizer that converts a triangle soup (vertex list + index list) into
a sparse NanoVDB grid on the device. Two output modes are implemented:

  - getHandle()         — produces a ValueOnIndex (topology-only) grid
  - getHandleAndUDF()   — produces the same grid plus a device sidecar
                          buffer of per-active-voxel unsigned distances
                          (world-space UDF, ordered by active voxel index)

SDF (signed distance field) output is planned future work.

The pipeline uses a hierarchical top-down subdivision approach:
1. transformTriangles()       — vertices transformed to NanoVDB index space
                                via nanovdb::Map::applyInverseMap()
2. processRootTrianglePairs() — enumerates (root tile, triangle) pairs whose
                                padded AABBs overlap, via CUB prefix-sum +
                                scatter (no atomics)
3. processLeafTrianglePairs() — 3-level 8x subdivision (4096→512→64→8),
                                refining the pair list at each level using
                                triangle-AABB / SAT intersection tests
                                (evaluateAndCountSubBoxesKernel: 1 CTA per
                                pair, 512 threads, warp ballot + CUB reduce)
4. Topology assembly          — unique leaf origins extracted, NanoVDB
                                ValueOnIndex tree built via TopologyBuilder,
                                empty leaves pruned via PruneGrid
5. UDF computation (optional) — ComputeUDFFunctor computes per-voxel
                                point-to-triangle distances via atomic-min,
                                finalized to world-space in a second pass

The example driver (ex_mesh_to_grid_cuda) reads an OBJ file, builds an
OpenVDB UDF as reference, and runs a thorough correctness validation:
  - Active voxel set comparison (false negatives, false positive rate)
  - Per-voxel UDF error histogram vs. OpenVDB reference (in voxel units)
  - CPU brute-force ground-truth check on the worst-error voxels

New files:
  nanovdb/nanovdb/tools/cuda/MeshToGrid.cuh
  nanovdb/nanovdb/math/Proximity.h         — point/triangle proximity utils
  nanovdb/nanovdb/util/cuda/Rasterization.cuh — ComputeUDFFunctor and helpers

Modified files:
  nanovdb/nanovdb/tools/cuda/TopologyBuilder.cuh — adds InitGridTreeRootFunctor
    for constructing grids from scratch (no source grid to copy metadata from)
  nanovdb/nanovdb/util/cuda/Util.h — adds operatorKernelInstance for launching
    pre-constructed device functors carrying data members
  nanovdb/nanovdb/examples/CMakeLists.txt — registers ex_mesh_to_grid_cuda

Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

* Formatting changes

Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

* Remove trailing whitespace in MeshToGrid.cuh and mesh_to_grid_cuda.cpp

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

* Formatting changes in Rasterization.cuh

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

* Handle empty triangle list gracefully in MeshToGrid

Replace throws-on-zero with early returns throughout the pipeline so
that getHandle() and getHandleAndUDF() return a valid empty grid when
triangleCount == 0. Kernel launches over null sets are explicitly
guarded before any buffer pointer is dereferenced.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

* Add unit tests for MeshToGrid: empty mesh and unit tetrahedron

MeshToGrid_EmptyMesh: verifies that getHandle() returns a valid grid
with zero active voxels when the triangle list is empty.

MeshToGrid_UnitTetrahedron: constructs a unit tetrahedron (4 vertices,
4 faces) with voxel size 0.1. Tests both getHandle() (topology-only)
and getHandleAndUDF() (with sidecar). Checks:
  - Topology: checksum from getHandle() equals that from getHandleAndUDF(),
    confirming both paths produce identical grids.
  - Per-voxel UDF: sidecar values match CPU brute-force (index-space
    pointToTriangleDistSqr * voxelSize) within 1e-3 voxels.
  - No false positives: every active voxel lies within the narrow band.
  - No false negatives: every voxel with CPU UDF strictly inside the band
    is active (checked via leaf-iteration active set).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

* Slim down example driver: cleanup and leaner OpenVDB comparison

mesh_to_grid_cuda.cpp:
  - Remove unused #include <openvdb/tools/Morphology.h>
  - Fix cout label "openvdb_triangles" -> "triangles"
  - Replace atof(argv[3]) with std::stof
  - Remove spurious blank lines

mesh_to_grid_cuda_kernels.cu:
  - Remove unused #include <array> (leftover from std::array<Vec3f,3> era)
  - Collapse triple blank line after getHandleAndUDF() to single
  - Replace the detailed per-voxel histogram, top-N worst-voxel heap,
    and inline Ericson brute-force with a compact summary: active voxel
    counts, false negative/positive counts, and a single UDF quality
    line (max error + count exceeding 0.1 voxels vs OpenVDB reference)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

* MeshToGrid: remove verbose>=2 diagnostic prints

All mVerbose>=2 guarded timer restarts and printf diagnostics have been
removed. Verbosity level 1 (function-scale start/stop timing) is retained.

Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

* MeshToGrid: rename pool/gridPool params to buffer; remove diagnostic accessors

- getHandle: parameter renamed from pool to buffer, matching the
  convention used throughout NanoVDB tools (PointsToGrid, DilateGrid, etc.)
- getHandleAndUDF: parameters renamed from gridPool/sidecarPool to
  buffer/sidecarBuffer for the same reason
- Local raw-buffer variables renamed to gridBuffer to avoid shadowing
  the (now renamed) buffer parameter
- Remove getPairCount(), getDevicePairs(), getRootTileCount(), and
  getDeviceRootOrigins() — unused diagnostic-only accessors

Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

* ci: trigger CI

Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

* MeshToGrid: fix leaf-local X↔Z swap in CUDA rasterization kernels

Four kernels were decoding the per-thread leaf offset with the wrong bit
ordering (lx = vi & 7, lz = vi >> 6), transposing X and Z relative to
NanoVDB's Mask<3> convention. The kernels were self-consistent, so the
generated grid was a topologically valid X↔Z mirror of the input mesh's
UDF rather than a crash. Replace all four inline decodes with
NanoLeaf<BuildT>::OffsetToLocalCoord:

  - Rasterization.cuh: RasterizeLeafNodesFunctor, ComputeUDFFunctor
  - MeshToGrid.cuh:    evaluateAndCountSubBoxesKernel, ScatterChildPairsFunctor

Also fix the matching inline decodes in the unit test and example
verifiers, which were silently cancelling the bug on the consumer side.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

* Rasterization.cuh: qualify ::atomicOr to bypass namespace collision

The RasterizeLeafNodesFunctor lives in nanovdb::util::rasterization::cuda.
Unqualified atomicOr lookup from inside an innermost namespace named cuda
confuses nvcc's name resolution on CUDA 12.6 (clang/gcc on Linux): it
picks up an atomicOr(uint64_t*, uint64_t) overload from libcu++/cuda::
and then rejects the reinterpret_cast<unsigned long long*> argument with
"argument of type unsigned long long * is incompatible with parameter
of type uint64_t * (aka unsigned long *)". Qualifying as ::atomicOr
forces global-namespace lookup and resolves to the canonical CUDA
builtin atomicOr(unsigned long long*, unsigned long long).

Also pull the reinterpret_cast onto its own line into a typed pointer
variable, matching the pattern used by Morphology.cuh.

Mask::setOnAtomic in NanoVDB.h is unaffected because it lives directly
in nanovdb, not in a nested cuda namespace.

Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

---------

Signed-off-by: Efty Sifakis <esifakis@nvidia.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 08:41:00 -07:00
Jonathan Swartz 0e9bccd205 Add docs quality CI gates and clear the doxygen warning backlog
Motivated by issue #2161 (docs drift away from code), this change wires
in a layered set of gates so the same class of rot fails on the PR that
introduces it.

CI gates (new files):

* ci/validate_docs_references.py runs on every PR via a new validate_docs
  job. It scans doc/**/*.md and doc/**/*.txt and verifies that every
  #include <...> inside a fenced code block (Markdown or Doxygen @code)
  resolves to a real header in this checkout, and that every
  github.com/AcademySoftwareFoundation/openvdb/blob/<ref>/<path> URL
  points at a file on disk. Catches the exact pattern from #2161 (e.g.
  nanovdb/util/CudaDeviceBuffer.h -> nanovdb/cuda/DeviceBuffer.h).

* ci/check_doxygen_warnings.py filters the Doxygen warning log against
  doc/.doxygen_warning_suppress.txt and fails the build on any surviving
  warning. Replaces Doxygen's all-or-nothing WARN_AS_ERROR with a
  per-pattern gate that honours a documented backlog without blocking
  new regressions. Reports suppression hit counts so dead patterns are
  flagged automatically.

* doc/.doxygen_warning_suppress.txt is the explicit triage backlog: four
  narrowly-scoped, heavily-commented regex patterns (doc/changes.txt
  historical \link rot, vendored ext/imath/Half.h, a Doxygen recursive
  variadic template false positive in ex_util/ComputePrimitives.h, and
  the INLINE_INHERITED_MEMB + unnamed-override-param interaction in
  openvdb_ax/ast/AST.h).

* .github/workflows/docs.yml runs the validator first, then doxygen,
  then the warning check (which fails the job on any unsuppressed
  warning), and always uploads the doxygen.warnings.log as an artifact.
  Drops '**.md' from paths-ignore so doc-only PRs are still gated.

Single-source-of-truth fix for the bug in #2161:

* doc/nanovdb/HelloWorld.md and four backing example sources
  (ex_openvdb_to_nanovdb_accessor, ex_read_nanovdb_sphere_accessor,
  ex_read_nanovdb_sphere_accessor_cuda) now use Doxygen's \snippet
  mechanism instead of duplicating code into markdown. The Hello World
  rendered on openvdb.org will always match what is built and tested in
  CI. The exact namespace drift from #2161 is now structurally
  impossible to reintroduce.

* doc/CMakeLists.txt sets DOXYGEN_EXAMPLE_PATH/EXAMPLE_RECURSIVE so
  \snippet paths resolve, captures DOXYGEN_WARN_LOGFILE, and adds an
  OPENVDB_DOXYGEN_WARN_AS_ERROR option for local opt-in to Doxygen's
  native all-or-nothing gate.

Doxygen warning backlog (44 of 45 surviving warnings fixed in this PR):

* nanovdb/GridHandle.h - bogus @param verbose removed; 3x
  @param filename -> @param fileName; @param pool -> @param other.
* nanovdb/NanoVDB.h - 3x @param ijk -> @param xyz on
  Map::apply*Jacobian* methods; fixed @node -> @note typo.
* nanovdb/util/PrefixSum.h - added missing @param op documentation.
* openvdb/TypeList.h - backtick-wrapped 'std::get<I>(mTuple)' so
  Doxygen stops parsing <I> as an unterminated HTML italics tag.
* openvdb/tools/RayTracer.h - added explicit @brief docs to seven
  shader-subclass operator() overrides so the inherited @param nml/dir
  no longer conflict with the override signatures.
* openvdb/version.h.in - @file path now matches the actual filename.
* openvdb_houdini/ParmFactory.h - 2x \link references qualified with
  the houdini_utils:: namespace so they resolve from class scope.
* doc/ax/doc.txt - deleted orphan </div> with no matching <div>.
* doc/nanovdb/SourceTree.md - closed the missing code fence; replaced
  'foo@bar:~$' bash prompt (Doxygen parses @bar as a command) with
  the unlabeled '$' style used elsewhere in doc/nanovdb/.
* doc/nanovdb/FAQ.md - corrected link to nanovdb/cuda/DeviceBuffer.h
  (was util/CudaDeviceBuffer.h, a sibling of #2161).

LaTeX -> MathJax migration:

* DOXYGEN_USE_MATHJAX YES + MATHJAX_VERSION MathJax_3 in
  doc/CMakeLists.txt switches formula rendering from latex/dvips/PNG
  to MathJax. Removes the install_latex step from docs.yml and lets
  contributors build the docs locally without any TeX install (the
  conda-forge texlive-core package on osx-arm64 is incomplete and
  has no working alternative on that channel). AX docs use @f$/@f[
  math; output is now browser-rendered, selectable, and crisper.

Result: 73 raw Doxygen warnings, 73 suppressed by documented patterns,
0 surviving. The strict gate is live and enforces 'no new warnings'
from the next PR onward.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-05-21 18:11:11 +12:00
Nick Avramoussis fdca38c531 Added an assert to check that function group symbols are unique
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-05-18 20:13:11 +03:00
Nick Avramoussis bd6f6dafdf Fixed a few strict CXX build issues on clang macos
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-05-18 20:12:39 +03:00
Nick Avramoussis 5b8d2a1532 Fixed a mistake in a AX unit test causing bad IR generation
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-05-18 20:11:35 +03:00
Nick Avramoussis 1f46b91f30 Merge pull request #2190 from Idclip/vcl_simd
Introduce VCL, SIMD wrappers, and Vectorized RasterizeSDF(Spheres)
2026-05-16 17:20:20 +12:00
Dan Bailey 0ae36dd0a8 Merge pull request #2202 from danrbailey/mask_iterator
Fix bug in value mask iterator
2026-05-15 09:44:01 -07:00
Nick Avramoussis 54b8bf219a PR feedback - typos, tests and fixes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-05-15 13:29:57 +03:00
Dan Bailey bbd6924f77 Add pending notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-05-14 12:25:20 -07:00
Dan Bailey 546347cad4 Add unit test for mask leaf iterator
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-05-14 12:25:20 -07:00
Dan Bailey 04cbd98322 Update to Tree Iterator to work with Mask Grids
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-05-14 11:19:53 -07:00
Nick Avramoussis da8a5ccaa4 Added pendingchanges
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-05-14 14:54:57 +03:00
Nick Avramoussis a9079f5b2d Converted Rasterize over to new operators away from explicit methods
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-05-14 13:03:32 +03:00
Nick Avramoussis a5c231cd55 Added component wise operators to Tuple, including comparison operators that return Tuples of bools
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-05-14 13:03:32 +03:00
Nick Avramoussis a46e808da1 Re-introduce Vec relational ops as deprecated (but note that these deprecation warning will not fire when used in std containers/system headers) and guarded by a define
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-05-14 13:03:32 +03:00
Nick Avramoussis 33401147f2 Removed Tuple < and > operators - added explicit overloads for cwiseLessThan and cwiseGreaterThan
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-05-14 13:03:32 +03:00
Nick Avramoussis 90729a6445 Minor fixes for AVX512F/AVX512+
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-05-14 12:58:39 +03:00
Nick Avramoussis d43b5583ac Added weekly CI for VCL=ON (OFF by default)
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-05-14 12:58:39 +03:00
Nick Avramoussis 8159467dd5 Initial manual vectorization/matching of SphericalTransfer scheme i.e. RasterizeSDF with spheres
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-05-14 12:58:39 +03:00
Nick Avramoussis 60fa1b861d Added VCL SIMD header wrapper for aliasing between simd, tuple and scalar arithmetic
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-05-14 12:58:39 +03:00
jmlait cac4e20dcd Merge pull request #2187 from sideeffects/send_upstream_fixcannovdbsize
CNanoVDB sync with Houdini
2026-05-13 14:36:08 -04:00
Dan Bailey 84fc1e6ec4 Merge pull request #2193 from danrbailey/io_float_frustum_bbox
Add support for reading file version 221 (FLOAT_FRUSTUM_BBOX)
2026-05-06 15:46:47 -07:00
Dan Bailey 226ac86da2 Add support for reading file version 221 (FLOAT_FRUSTUM_BBOX)
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-05-06 14:44:00 -07:00
Dan Bailey 85bd0e52cd Merge pull request #2200 from danrbailey/tbb2023
Update for TBB 2023
2026-05-06 13:48:18 -07:00
Dan Bailey d68d0914fc Switch from tbb/blocked_range.h to tbb/task_arena.h to pull in TBB version macro
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-05-06 10:43:33 -07:00
Jeff Lait c0afc0bf56 When syncing accidentally reset the magic number test to the old
version.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2026-05-03 20:23:27 -04:00
Jeff Lait c372647a36 Add the static to the cnanovdb_readaccessor_init to match the other
cnanovdb_readaccessor linkage settings.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2026-04-30 15:33:58 -04:00
Dan Bailey 32dcb29a25 Merge pull request #2191 from danrbailey/notes_0804
Meeting Notes
2026-04-29 10:57:24 -07:00
Jeff Lait cbfcd732e7 Fix pending change spelling
Fix int/uint mismatch with nanovdb
Fix mFlags mismatch with nanovdb.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2026-04-29 13:51:47 -04:00
Jonathan Swartz 716b3574a7 nanovdb/python: fix writeGrids dropping all but the last grid
The Python binding for nanovdb.io.writeGrids iterated the handle list
and called io::writeGrid(fileName, ...) per element. That file-level
overload opens the path with std::ios::trunc, so every iteration wiped
the previously written grid and the resulting .nvdb only ever contained
the last handle in the list (same story for deviceWriteGrids on the
CUDA side).

Mirror io::writeGrids(fileName, handles, codec, verbose) from
nanovdb/io/IO.h directly in the wrapper: open the output stream once
with trunc, then call the ostream overload of writeGrid for each handle
cast from the nb::list. We can't simply forward to io::writeGrids
because GridHandle<BufferT> is move-only (see GridHandle.h) and the
nb::list holds references we must not invalidate.

Tests (nanovdb/python/test/TestNanoVDB.py):
- TestGridHandleExchange.test_list_to_vector now reads the written
  file back via readGridMetaData and readGrids and asserts the full
  handle count is preserved.
- Added TestDeviceReadWriteGrids.test_device_write_grids_multi as a
  CUDA-guarded regression for deviceWriteGrids with multiple handles.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-04-24 21:31:42 +12:00
Dan Bailey f4d870243d Merge pull request #2195 from danrbailey/texlive_mirror
Fix Doxygen CI
2026-04-21 22:32:20 -07:00
Dan Bailey ffa10203b0 Use a specific texlive mirror to try and improve stability
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-04-21 21:25:53 -07:00
Dan Bailey 7191b429e6 Merge pull request #2194 from danrbailey/fix_texlive_download
Fix Doxygen CI
2026-04-21 15:17:32 -07:00
Dan Bailey bf87a9c112 Pass texlive repository argument explicitly to match tlnet version
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-04-21 10:33:09 -07:00
Nick Avramoussis d6b69a0ecd Removed compiled parts of VCL used for examples and runtime instruction checking - we don't currently need or use this
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-04-15 09:12:29 +12:00
Nick Avramoussis e7d62d92e8 Added copy of VCL (version2) v2.02.03 at dc6cb6cea60bb983314c33386f5f4a7fae5b7efb
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-04-15 09:10:43 +12:00
Dan Bailey 31b11b0a02 Meeting Notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-04-09 16:05:22 -07:00
Dan Bailey 61c21ccd4a Merge pull request #2188 from danrbailey/stale_pr_policy
PR Policy Related to CLA and DCO
2026-04-06 09:47:28 -07:00
Eftychios SifakisandClaude Sonnet 4.6 1839dbdd82 NanoVDB: add CPU port of VoxelBlockManager and supporting utilities (#2189)
* NanoVDB: add CPU port of VoxelBlockManager and supporting utilities

- util/MaskPrefixSum.h (new): bit-parallel prefix sum over NanoVDB leaf
  masks via a three-pass (X/Y/Z) algorithm using SIMD-friendly byte
  transpose and in-place shuffle-down scan

- tools/VoxelBlockManager.h (new): CPU port of VoxelBlockManager, sharing
  VoxelBlockManagerBase with the CUDA implementation; buildVoxelBlockManager
  uses nanovdb::util::forEach for portable multi-threaded execution
  (TBB or std::thread fallback, no OpenMP runtime dependency)

- tools/cuda/VoxelBlockManager.cuh: refactor to inherit VoxelBlockManagerBase;
  simplify buildVoxelBlockManager to a single-call API; rename template
  parameter to Log2BlockWidth

- util/Util.h: add NANOVDB_RESTRICT macro and portable __hostdev__
  util::atomicOr / util::atomicAnd, dispatching to CUDA intrinsics,
  std::atomic_ref (C++20), __atomic_fetch_* (GCC/Clang), or
  _Interlocked*64 (MSVC)

- NanoVDB.h: promote Mask::setOnAtomic/setOffAtomic/setAtomic from
  __device__-only to __hostdev__ using util::atomicOr/util::atomicAnd;
  bump patch version to 1

- util/MorphologyHelpers.h, util/cuda/Morphology.cuh: portability fixes

- unittest/TestNanoVDB.cc: add CPU VoxelBlockManager test
- unittest/TestNanoVDB.cu: simplify and improve CUDA VoxelBlockManager test

Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

* VoxelBlockManager: use initializer list in move constructor

Replace std::exchange calls in the move constructor body with proper
member initialization in the initializer list, zeroing out the source
members in the body.

The move assignment operator retains std::exchange, which remains the
right idiom there since assignment operators have no initializer list.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

* VoxelBlockManager: document decodeInverseMaps arguments

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

* VoxelBlockManager: document VoxelBlockManagerHandle constructor arguments

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

* MaskPrefixSum: introduce zRow reference in Z-pass prefix sum loop

Signed-off-by: Efty Sifakis <esifakis@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

---------

Signed-off-by: Efty Sifakis <esifakis@nvidia.com>
Signed-off-by: Efty Sifakis <esifakis@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 13:50:16 -07:00
Jeff Lait b575a4250d Remove trailing whitespace.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2026-03-28 12:59:50 -04:00
Dan Bailey 03d071df7a Update CONTRIBUTING.md to include new policy about closing PRs that do not have signed CLA or DCO sign-off.
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-03-27 13:52:47 -07:00
Dan Bailey e1cd518163 Merge pull request #2163 from apradhana/TSC-Jan142026
Add meeting notes Jan 14 2026.
2026-03-27 13:25:16 -07:00
Dan Bailey d5da5b0864 Merge pull request #2182 from danrbailey/suppress_unittest_warning
Suppress unit test warning
2026-03-27 13:12:03 -07:00
Dan Bailey bab28c6ad5 Merge pull request #2181 from danrbailey/fix_openvdb_tests
Fix CMake OPENVDB_TESTS
2026-03-27 13:11:53 -07:00
Jeff Lait e79508c7c8 NanoVDB:
Improvements:
  - CNanoVDB supports integer (I) grids
  - CNanoVDB has setValue methods to write to voxels
  - CNanoVDB has getLeaf methods to acquire raw leaf pointers

Bug Fixes:
  - static used for local kernel methods in CNanoVDB
  - Remove auto-computed reserved sizes in favour of hard coded sizes
    in CNanoVDB.  While less maintainble, C99 forbids zero sized
    arrays so some compilers crashed when encountering this.
  - Initialize key value when constructing an accessor, some compilers
    entered bad states with this undefined.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2026-03-27 13:26:33 -04:00
Dan Bailey 48395b2b5c Suppress warning - "WARNING: testGridNaming.vdb2 has more than one grid named "grid"
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-03-20 12:59:33 -07:00
Dan Bailey 41c0f7a224 Fix OPENVDB_TESTS
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-03-20 12:19:50 -07:00
Jonathan Swartz d23549f24a Merge pull request #2149 from swahtz/enable_nanovdb_pytests
CI: Enable NanoVDB Python Tests
Enable build of nanovdb python module and running python tests in NanoVDB CI action to make sure we catch any regressions.
2026-03-12 12:57:20 +13:00
Dan Bailey 2f93980ad2 Merge pull request #2176 from danrbailey/doxygen_fix
Fix Doxygen CI
2026-03-11 16:57:19 -07:00
Dan Bailey 3976c554be Texlive was upgraded from 2025 to 2026, use whichever version is installed
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-03-11 12:53:27 -07:00
Jonathan Swartz fec59777b7 NanoVDB PointsToGrid::countNodes: Use segmented radix sort for higher tile counts (#2170)
* Using segmented radix sort for higher tile counts for optimized voxel key computation.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* Switch handrolled binary search to thrust::upper_bound

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* Implemented segmented radix sort in DistributedPointsToGrid

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* Add tests for FewTiles and ManyTiles scenarios in PointsToGrid

- Implemented unit tests for the serial per-tile sort path with fewer than 32 tiles.
- Added tests for the segmented sort path handling 32 or more tiles.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* patch version update

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* pnano version bump

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-03-03 16:10:59 -08:00
Nick Avramoussis 402b91251c Merge pull request #2171 from Idclip/unit_test_fix
Fixed a unit test failure on non 64bit architectures
2026-02-27 07:08:46 +13:00
Jonathan Swartz a04cae04ce test fixes
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-02-26 17:58:50 +13:00
Jonathan Swartz 0a1d7e5030 windows paths
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-02-26 16:59:22 +13:00
Jonathan Swartz 8e595b7dae windows python: fix for required dll directories
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-02-26 16:04:58 +13:00
Jonathan Swartz 6eebb573d5 python path on windows fix
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-02-26 15:08:10 +13:00
Jonathan Swartz bc6b33366a release test executables
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-02-26 14:14:37 +13:00
Jonathan Swartz b6db81bf06 Add isGpuAvailable function to check for CUDA-capable GPU availability
- Implemented isGpuAvailable function in NanoVDBModule.cc to determine if a CUDA-capable GPU is available at runtime.
- Updated TestNanoVDB.py to include tests that skip if no CUDA-capable GPU is detected.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-02-26 13:17:35 +13:00
Jonathan Swartz 226be9fa5d signature fixes
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-02-26 12:22:23 +13:00
Jonathan Swartz 7ece1dae7a fix nanobind install
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2026-02-26 12:21:34 +13:00
Nick Avramoussis 39a284988e Fixed a unit test failure on non 64bit architectures
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2026-02-25 09:43:28 +13:00
Dan Bailey cfba6dff78 Merge pull request #2167 from danrbailey/docs_ci
Use ASWF image for Docs CI Jobs
2026-02-13 12:00:08 -08:00
Dan Bailey 297be1c341 Use ASWF images for docs
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-02-12 22:41:02 -08:00
Andre Pradhana 482a795d6a Add TSC Meeting Notes 2026-02-22.md.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2026-02-11 15:04:04 -08:00
Dan Bailey a780ec029d Merge pull request #2152 from danrbailey/fix_point_index_io_bug
Fix Point Index I/O Bug
2026-01-30 15:36:41 -08:00
apradhana a952846eab Add meeting notes Jan 14 2026.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2026-01-28 12:57:30 -08:00
Dan Bailey ec70b677da Discard any auxiliary data in non-CoordBBox variant of readBuffers()
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-01-16 17:38:10 -08:00
Dan Bailey 4a4d6730e3 Merge pull request #2154 from danrbailey/node_visitor_bottom_up
Extend visitNodesDepthFirst() to offer bottom-up traversal
2026-01-16 17:34:30 -08:00
Dan Bailey 522cecab27 Merge pull request #2156 from danrbailey/asserts_ci
Disable CI scheduled builds
2026-01-14 21:08:47 -08:00
Jonathan Swartz a0a789ef8f Merge pull request #2148 from swahtz/fix/nanoToOpenVDB_python
Fix python nanoToOpenVDB bindings
2026-01-15 10:42:36 +13:00
Alex Fuller f18950db05 NanoVDB : Rename padding to blindDataCount (#2138)
Signed-off-by: Alex Fuller <boberfly@gmail.com>
2026-01-14 13:36:39 -08:00
Dan Bailey 05a658f5d9 Disable CI daily scheduled builds
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-01-09 20:30:11 -08:00
Dan Bailey 55b94e2a79 Add changes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-01-09 16:56:02 -08:00
Dan Bailey 3fa663d8d3 Extend visitNodesDepthFirst() to be able to visit nodes bottom-up during traversal
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-01-09 16:51:52 -08:00
Dan Bailey 7f4a717e85 Add changes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-01-07 12:02:16 -08:00
Dan Bailey 828641c552 Fix a bug in PointIndexGrid when reading without a CoordBBox
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2026-01-07 11:58:39 -08:00
Jonathan Swartz 3de00254b8 Enable build of nanovdb python module and running python tests in nano CI action
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2025-12-23 16:57:25 +13:00
Jonathan Swartz 9fc4b8e0fe Fix python nanoToOpenVDB bindings
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2025-12-22 18:56:36 +13:00
Nick Avramoussis 19013e3358 Merge pull request #2140 from Idclip/m2v_interrupt
Improved the interruptibility of tools::meshToVolume
2025-11-30 13:39:21 +13:00
apradhana 8ca4ac8a7f Merge pull request #2053 from apradhana/TSC_June4_2025
Add TSC Metting Notes June 4th 2025.
2025-11-21 13:50:31 -08:00
apradhana ae28d3ce14 Merge pull request #2141 from apradhana/TSC-Oct-15-2025
Add TSC Meeting from Oct 15 and Nov 5, 2025
2025-11-21 13:49:54 -08:00
Nick Avramoussis 0b3ce20f74 Merge pull request #2142 from Idclip/header_install_fix
Fixed missing installs for some OpenVDB Points header files
2025-11-22 10:33:25 +13:00
Nick Avramoussis 7fc793078c Fixed missing installs for some OpenVDB Points header files
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-11-20 20:38:16 +13:00
Nick Avramoussis 3733f2c372 Improved the interruptibility of tools::meshToVolume
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-11-20 20:30:47 +13:00
apradhana 0bb18adef6 Add meeting notes from 2025-11-05.md.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2025-11-19 13:41:59 -08:00
apradhana 41adf1baab Add meeting notes October 15, 2025.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2025-11-19 13:41:31 -08:00
apradhana 0e29a1ff94 Get rid of line counting character length.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2025-11-19 13:37:54 -08:00
Nick Avramoussis 604ed38280 Merge pull request #2136 from Idclip/stream_test_fix
Fixed a crash in TestStreamCompression
2025-11-09 19:07:58 +13:00
Nick Avramoussis 5a6714b67c Merge pull request #2137 from Idclip/doxygen_ver
Bumped doxygen version used to deploy the docs to the openvdb-website
2025-11-07 10:23:18 +13:00
Nick Avramoussis c9293ed87c Bumped doxygen version used to deploy the docs to the openvdb-website
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-11-07 09:58:40 +13:00
Nick Avramoussis 778e1efcb1 Merge pull request #2135 from Idclip/docs
Documentation and external code changes
2025-11-06 23:21:49 +13:00
Nick Avramoussis 37c0c47bc4 Fixed doxygen css for latex formulas in tables in dark theme
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-11-06 22:18:31 +13:00
Nick Avramoussis 2433964511 Documentation and external code changes:
- Added a new root directory, ext/ to house imported third-party code
 - Moved Imath Half.h into ext/ such that it's clear it is third party.
 - Added doxygen-awesome css/js extensions
 - Fixes and improvements to doxygen generation. Leverage new doxygen-awesome styles
 - Add a THIRD-PARTY.md license document to ext/ to detail all imported licenses (copied from OSL)

Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-11-06 19:00:37 +13:00
Nick Avramoussis 78b9cd84cf Fixed a crash in TestStreamCompression - this was only due to an incorrect unit test assumption since ABI=13
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-11-06 18:59:18 +13:00
Dan Bailey b8dd348aa5 Merge pull request #2132 from AcademySoftwareFoundation/v13.0.0_rc
Merging v13.0.0 RC back to master
2025-11-04 22:30:15 -08:00
Dan Bailey 6da1f9530a Updates for next release
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-11-03 16:14:49 -08:00
Dan Bailey 7c03e1f084 Minor docs fixes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-11-03 15:04:25 -08:00
Dan Bailey e9a1f1a3d2 Merge pull request #2131 from danrbailey/v13.0.0_rc
13.0.0 Release
2025-11-03 10:48:13 -08:00
Dan Bailey f5a735a2af Add highlights section to change notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-11-03 10:46:57 -08:00
Dan Bailey 10da55d5c1 Add doc changes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-11-02 09:36:33 -08:00
Dan Bailey 2901256875 Remove pending changes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-11-02 09:36:29 -08:00
Dan Bailey a0df7e82fe Update release date
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-11-02 09:31:32 -08:00
Dan Bailey c8ad233db1 Update change notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-11-02 09:14:33 -08:00
Dan Bailey 687e6c405e Bump file format version to reflect adding half grid support
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-11-02 09:10:24 -08:00
Dan Bailey 7ba5bb1889 Update the ABI deprecation warnings
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-11-02 09:10:21 -08:00
Dan Bailey db301eb962 Update changes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-11-02 09:10:12 -08:00
Dan Bailey 10aae7e90b VDB 13.0.0 updates
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-11-02 09:10:04 -08:00
Dan Bailey 5462395ae8 Merge pull request #2130 from AcademySoftwareFoundation/feature/nanovdb_weekly_ci
Disable NanoVDB mgpu tests on Windows in weekly CI
2025-11-02 09:05:48 -08:00
Dan Bailey 3fe53838b4 Merge pull request #2129 from danrbailey/unit_test_assertions
Fix unit test assertions
2025-11-02 08:48:52 -08:00
Dan Bailey cd524c73ca Disable mgpu tests on Windows in weekly CI
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-11-02 00:40:31 -07:00
Dan Bailey ec28bf7d86 Fix unit test assertions
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-11-01 15:44:33 -07:00
Dan Bailey b8b2d78ba3 Merge pull request #2127 from AcademySoftwareFoundation/feature/windows_ci
Fix NumPy issue on Windows CI
2025-11-01 13:27:01 -07:00
Dan Bailey 8884fd3e97 Remove numpy installation from Windows static CI and python components
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-31 15:21:21 -07:00
Dan Bailey 2892db60f8 Disable python from macos houdini
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-31 15:17:36 -07:00
Dan Bailey ce6d2b5675 Fix thread-safety issue in use of std::atomic in unit tests
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-31 15:17:34 -07:00
Dan Bailey dfe40d98e8 Run debug unit tests on workflow dispatch
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-31 15:17:31 -07:00
Dan Bailey 763c09c57e Merge pull request #2126 from apradhana/bugfix/nanovdb_unittest_windows
Fix unittest build issue in
2025-10-31 12:38:44 -07:00
apradhana 154828954f Fix the global scope has no aligned_alloc issue.
Signed-off-by: apradhana <apradhana@nvidia.com>
2025-10-30 17:36:37 -07:00
apradhana 3269bf764c Extract type alias outside lambda to work around MSVC typename + lambda issue.
Signed-off-by: apradhana <apradhana@nvidia.com>
2025-10-30 17:33:36 -07:00
Nick Avramoussis 22bb394214 Merge pull request #2125 from AcademySoftwareFoundation/feature/asan_ubsan_image
Update asan/ubsan to latest 2026 image
2025-10-31 08:09:02 +13:00
Dan Bailey b777c47370 Update asan/ubsan to latest 2026 image
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-30 09:58:36 -07:00
apradhana 1b9ca6408f Merge pull request #2124 from apradhana/bugfix/test_levelset_ray_intersector
Bug fix: Use unit vector for Ray in TestLevelSetRayIntersector.
2025-10-30 08:07:47 -07:00
apradhana df578c6bbc Use unit vector for Ray in TestLevelSetRayIntersector: testMissedIntersections.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2025-10-29 23:13:15 -07:00
apradhana c69404e432 Minimum Viable Product for Half Grid Support (#2106)
Make HalfGrid a first-class-citizen in OpenVDB.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2025-10-29 21:44:46 -07:00
Dan Bailey cf5ddffbfb Merge pull request #2123 from danrbailey/fix_value_mask_test
Fix assertion in internal node unit test
2025-10-29 17:49:10 -07:00
Dan Bailey 2086e3c932 Merge pull request #2119 from danrbailey/outofcore
Refactor out-of-core logic into a public method on LeafBuffer
2025-10-29 17:37:41 -07:00
Dan Bailey c78b9efb87 Merge remote-tracking branch 'upstream/master' into outofcore 2025-10-29 15:14:32 -07:00
Dan Bailey 9aa8050c3c Merge remote-tracking branch 'upstream/master' into value_mask_unsafe 2025-10-29 15:09:17 -07:00
Dan Bailey 2072e1d82c Merge pull request #2122 from Idclip/weeklyci
Weekly CI Fixes
2025-10-29 12:19:30 -07:00
Dan Bailey 75c1985ec9 Merge pull request #2121 from danrbailey/texlive_direct
Use direct download instead of yum repos to install texlive
2025-10-29 12:16:15 -07:00
Nick Avramoussis 8b64f41042 Weekly CI fixes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-10-29 22:50:21 +13:00
Dan Bailey b44b2b31de Fix assertion in internal node unit test
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-28 23:53:13 -07:00
Dan Bailey 57434bc985 Merge pull request #2118 from danrbailey/value_mask_unsafe
Add InternalNode::setValueMaskUnsafe()
2025-10-25 11:04:36 -07:00
Dan Bailey 84eea021f6 Use direct download instead of yum to install texlive
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-23 16:04:59 -07:00
Nick Avramoussis fae3ee95d1 Merge pull request #2115 from Idclip/vdb_13_deps
Dependency bumps for VDB 13
2025-10-23 21:08:56 +13:00
Nick Avramoussis a0e513862a PR feedback - simplified a number of CI builds and fixes issues with the 2026 containers, added pendingchanges for version bumps
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-10-23 19:58:04 +13:00
Ken MusethandAndrew Reidmeyer a273ab358f Improvements to NanoVDB (#2108)
* major improvements to NanoToOpenVDB

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* fixed CI issues

Signed-off-by: Ken <ken.museth@gmail.com>

* fixed issues in GridBlindMetaData::isValid

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* added improvements to nanovdb_print

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* improved change notes

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* fixed build issues

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* fixed compiler warning on Windows

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* fixed compiler warning on Windows

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* fixed compiler warning on Windows

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* fixed compiler warning on Windows

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* changes to examples

Signed-off-by: Ken <ken.museth@gmail.com>

* improved API in NanoToOpenVDB

Signed-off-by: Ken <ken.museth@gmail.com>

* trying a fix for Windows

Signed-off-by: Ken <ken.museth@gmail.com>

* replaced std::emable_if with util::enable_if

Signed-off-by: Ken <ken.museth@gmail.com>

* snapshot

Signed-off-by: Ken <ken.museth@gmail.com>

* added nanovdb::util::enable_if_t and simplified code

Signed-off-by: Ken <ken.museth@gmail.com>

* cleanup

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* major cleanup

Signed-off-by: Ken <ken.museth@gmail.com>

* removed whitespace

Signed-off-by: Ken <ken.museth@gmail.com>

* minor improvements and new patch version number

Signed-off-by: Ken <ken.museth@gmail.com>

* removed nanovdb::ValueIndexMask and nanovdb::ValueOnIndexMask

Signed-off-by: Ken <ken.museth@gmail.com>

* removed ValueIndexMask in python module

Signed-off-by: Ken <ken.museth@gmail.com>

* addressed review comments

Signed-off-by: Ken <ken.museth@gmail.com>

* PNanoVDB remove indexmask grid types.

Signed-off-by: Andrew Reidmeyer <areidmeyer@nvidia.com>

* fixed spelling

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* updated change notes

Signed-off-by: Ken <ken.museth@gmail.com>

* improved documentation

Signed-off-by: Ken <ken.museth@gmail.com>

* removed whitespace

Signed-off-by: Ken <ken.museth@gmail.com>

* improved pending changes

Signed-off-by: Ken <ken.museth@gmail.com>

* addressed review comment

Signed-off-by: Ken <ken.museth@gmail.com>

---------

Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Andrew Reidmeyer <areidmeyer@nvidia.com>
Co-authored-by: Andrew Reidmeyer <areidmeyer@nvidia.com>
2025-10-22 19:54:34 -07:00
Dan Bailey 8e901cc609 Merge remote-tracking branch 'upstream/master' into value_mask_unsafe 2025-10-22 14:39:50 -07:00
Dan Bailey 8e5972026d Merge pull request #2087 from danrbailey/remove_old_io_modes
Remove Old IO Modes
2025-10-22 14:38:41 -07:00
Dan Bailey 5d9e78992f Refactor out-of-core logic into a public method on LeafBuffer
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-22 14:37:05 -07:00
Dan Bailey ddb4629dec Merge pull request #2114 from danrbailey/texlive_dnf
Fix GHA CI install for Latex
2025-10-22 13:25:36 -07:00
jmlait e5896971a9 Merge pull request #2057 from AcademySoftwareFoundation/jmertic-patch-1
Point to correct Technical Charter
2025-10-22 16:15:31 -04:00
Dan Bailey fc745334da Add InternalNode::setValueMaskUnsafe()
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-22 12:29:31 -07:00
Dan Bailey c98f29afcd Merge pull request #2103 from danrbailey/const_mask_access
Add const mask access to bool LeafBuffer
2025-10-22 11:52:02 -07:00
Dan Bailey a2c60a3a46 Merge pull request #2102 from danrbailey/deprecate_vdb_13
Remove lots of deprecated functionality
2025-10-22 11:51:02 -07:00
Simon A 3cc39c7d25 Fix missing nanovdb install files (#2117) 2025-10-22 05:52:44 -07:00
Nick Avramoussis 92ec8d2c46 GHA runner image updates for VFX26
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-10-22 22:43:32 +13:00
Nick Avramoussis c3f0336f1a Dependency bumps for VDB 13
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-10-22 22:32:50 +13:00
Dan Bailey 4fd1a8cd6c Merge remote-tracking branch 'upstream/master' into remove_old_io_modes 2025-10-21 23:41:49 -07:00
Dan Bailey 40e4129229 Switch from yum to dnf and epel release install
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-21 23:38:50 -07:00
Dan Bailey f2df83c304 More Interrupter cleanup
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-21 22:30:00 -07:00
Dan Bailey bd7a2416d4 Merge remote-tracking branch 'upstream/master' into deprecate_vdb_13 2025-10-21 21:26:53 -07:00
Dan Bailey e269c9a6e0 Merge pull request #2113 from AcademySoftwareFoundation/feature/yum
Fix GHAs failures - remove usage of yum
2025-10-21 20:57:10 -07:00
Dan Bailey 93d0b3cb33 Merge pull request #2112 from danrbailey/fix_spelling_convex
Fix minor spelling issues in Convex tools
2025-10-21 20:13:23 -07:00
Nick Avramoussis 185ecc48ba Merge pull request #2105 from Idclip/nanobind_fixes
Removed unnecessary USE_NUMPY build option
2025-10-22 15:51:55 +13:00
Nick Avramoussis e3beb85592 Merge pull request #2109 from Idclip/anisotropy_as_quaternions
Feature improvements to points::pca and points::rasterizeSdf
2025-10-22 15:51:34 +13:00
Dan Bailey 4027e3d66e Enforce CMake 3.5 minimum for doxygen
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-21 18:01:33 -07:00
Dan Bailey 8897a22033 Upgrade docs to 2026 images
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-21 16:53:44 -07:00
Dan Bailey 893a03bed8 Remove most use of yum in GHAs
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-21 16:53:33 -07:00
Dan Bailey 09b8ab83a0 Remove yum-utils installation
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-21 16:48:54 -07:00
Dan Bailey 91af0f5293 Fix minor spelling issues in Convex tools
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-21 12:39:13 -07:00
Nick Avramoussis 61a30b3e98 Renamed pca setting STRETCH_AND_ROTATION to STRETCH_AND_UNITARY
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-10-22 08:38:41 +13:00
Nick Avramoussis 70b1593a18 Added a UnsafeConstruct constructor to Quat to avoid checking for unitary properties when it's already known
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-10-22 08:38:41 +13:00
Nick Avramoussis bd16782e77 Improved comments and variable naming in pca methods
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-10-22 08:38:39 +13:00
Nick Avramoussis 7f5538fe2c Simplified reflection->rotation logic in pca
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-10-22 08:38:20 +13:00
Nick Avramoussis 352e672e5b Ignore deprecation warnings in user code on simple construction of PCA/raster setting
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-10-22 08:38:19 +13:00
Dan Bailey d3aaf4fe64 Add change notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-21 12:36:31 -07:00
Dan Bailey ae64b3c50c Merge remote-tracking branch 'upstream/master' into deprecate_vdb_13 2025-10-21 12:36:06 -07:00
Dan Bailey 2dbc79024c Add change notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-21 12:35:38 -07:00
Dan Bailey 4bdee3bd47 Add ability to retrieve const access to raw data buffer in LeafBuffer<bool>
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-21 12:06:13 -07:00
Dan Bailey 55258d0da9 Add more detail to the error message on how to read older VDB files.
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-21 11:54:54 -07:00
Dan Bailey e8f1f84f37 Merge remote-tracking branch 'upstream/master' into remove_old_io_modes 2025-10-21 11:49:00 -07:00
Matthew CongandEftychios Sifakis 4e02cba85a Adding coarsen/refine operators to NanoVDB (#2089)
* Adding coarsen/refine operators to NanoVDB

* namespace adjustments, stricter const-correctness

* adding grid coarsening/refinement operators in NanoVDB

* adding unittest for refine/coarsen ops

* ws fix

* better forwarding to emplace_back

* non-tbb version (refine), TBB guards, cleanup

* ws fix

* stricter const-ness for DeviceGridTraits methods

* moving synchronization-sensitive initialization to process methods

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* making helpers private; inlining/cleanup

Signed-off-by: Efty Sifakis <esifakis@nvidia.com>

---------

Signed-off-by: Matthew Cong <mcong@nvidia.com>
Signed-off-by: Efty Sifakis <esifakis@nvidia.com>
Co-authored-by: Eftychios Sifakis <esifakis@nvidia.com>
2025-10-21 11:00:51 -07:00
Dan Bailey ddaf9f42e3 Merge pull request #2110 from danrbailey/notes_081025
Meeting notes 8th October
2025-10-20 16:03:42 -07:00
Nick Avramoussis dd34dc583b Added pendingchanges
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-10-20 09:07:40 +13:00
Jonathan Swartz dc69e26dd5 Switch NanoVDB tests to using macos 14 runners (#2111) 2025-10-16 10:37:16 -07:00
Nick Avramoussis 592df88c88 PR feedback - always import numpy for python unit tests
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-10-16 20:47:35 +13:00
Nick Avramoussis 3780d983a1 Minor changes to silence precision warnings
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-10-15 21:13:20 +13:00
Nick Avramoussis 114db385da Feature improvements to points::pca and points::rasterizeSdf
- Added customization of the output transformation attribute for points::pca. Can be output as a quaternion or as a combined affine transform
 - Added support for quaternions attributes and affine transformations (that include scale) in PointRasterizeSDF for ellipsoidal rasterizations.

Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-10-15 21:13:20 +13:00
Nick Avramoussis 32dfc0e792 Removed unecessary build time USE_NUMPY option from the python module - nanobind always builds in ndarray support. Updated docs and dependency versions.
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-10-15 21:12:18 +13:00
Dan Bailey f564d35dca Merge pull request #2086 from danrbailey/no_leaf_string
Remove LeafNode<std::string> unit test
2025-10-14 23:40:46 -07:00
Dan Bailey 30a08a27c8 Merge remote-tracking branch 'upstream/master' into deprecate_vdb_13 2025-10-14 23:25:33 -07:00
Nick Avramoussis 6f9ca0c05a Merge pull request #2104 from Idclip/axmacos
Move to Apple silicon CI runners for AX
2025-10-15 19:21:46 +13:00
Dan Bailey 747d029abc Meeting notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-14 22:41:52 -07:00
Nick Avramoussis 71a5f289cb Fixes to support LLVM 21
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-10-10 22:09:02 +13:00
Nick Avramoussis 1c5d8d1f57 Remove deprecated macos-13 CI, moved to macos-14/15
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-10-09 21:49:40 +13:00
Nick Avramoussis 0952c900f9 Introduce some small acceptable tolerances for AX function tests on macos due to codegen diffs
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-10-09 19:35:17 +13:00
Dan Bailey 02478bd95f Remove lots of deprecated functionality
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-08 10:36:04 -07:00
Nick Avramoussis dd72d1f137 Merge pull request #2099 from Idclip/version_bump
Bump development to v12.1.2
2025-10-08 08:30:04 +13:00
Dan Bailey 04f4dfba83 Add io::checkFormatVersion() method to consolidate file version compatibility checks
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-06 21:13:26 -07:00
Dan Bailey eab9aaaa7a Update all IO version checks to use 222
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-10-06 15:55:35 -07:00
Dan Bailey e419f1c745 Merge pull request #2097 from danrbailey/write_compression_const
Improve const-correctness in io::writeCompressedValues
2025-10-06 14:05:27 -07:00
Matthew Cong 3b64696777 Fix CUDA 13 deprecation warning (#2100)
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-10-01 13:25:32 -07:00
Nick Avramoussis cf3c1923a5 Bump development to v12.1.2
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-09-30 21:30:37 +13:00
Nick Avramoussis 86aa980c9c Merge pull request #2098 from AcademySoftwareFoundation/v12.1.1_rc
v12.1.1
2025-09-30 21:28:19 +13:00
Dan Bailey d3c8c640ce Merge pull request #2096 from danrbailey/levelsetrayintersectorbug
Fix LevelSetRayIntersector Time Methods
2025-09-29 23:22:51 -07:00
Nick Avramoussis e3a9b1c1d9 Prepare v12.1.1 release
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-09-29 18:49:13 +13:00
Dan Bailey e1944e98e5 Merge remote-tracking branch 'upstream/master' into remove_old_io_modes 2025-09-26 15:45:44 -07:00
Dan Bailey 176a3f3725 Merge remote-tracking branch 'upstream/master' into no_leaf_string 2025-09-26 15:45:26 -07:00
Dan Bailey cb2ebfc840 Merge remote-tracking branch 'upstream/master' into levelsetrayintersectorbug 2025-09-26 15:44:41 -07:00
Dan Bailey 7c108a5d9c Add changes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-09-26 15:42:30 -07:00
Dan Bailey 796a07f3b8 Improve const-correctness in io::writeCompressedValues()
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-09-26 15:38:46 -07:00
Dan Bailey 345b74ef71 Merge pull request #2088 from danrbailey/h21_ci
Fix Houdini CI
2025-09-26 15:36:10 -07:00
Dan Bailey 1c5a3bf382 Only evaluate unit tests for release builds (debug builds are too slow)
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-09-26 10:02:23 -07:00
Dan Bailey d09c9a4f67 Add build suffix to the job name
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-09-26 10:02:03 -07:00
Nick Avramoussis c7f7d6e737 Re-introduce AX tests in the Houdini builds
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-09-26 09:54:59 -07:00
Nick Avramoussis f1c46db025 Prefer the static build of OpenVDB AX when building the AX unittests
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-09-26 09:54:57 -07:00
Nick Avramoussis 1f713afeee Move, don't copy libs when downloading Houdini (otherwise disk space limits can be reached)
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-09-26 09:54:55 -07:00
Dan Bailey aa8dfc4f2a Add changes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-09-25 22:26:58 -07:00
Dan Bailey 037aa886e5 Fix level set ray intersector bugs
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-09-25 22:16:08 -07:00
Dan Bailey ff78199ba9 Disable axtest for H21 GCC build
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-09-24 20:14:46 -07:00
Dan Bailey 29e764bac5 Fix Houdini build using Debug mode
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-09-24 16:43:07 -07:00
Jonathan Swartz 5f0432b338 Merge pull request #2079 from matthewdcong/aswf_master_merge
This adds the latest round of improvements to NanoVDB from the fVDB team, including:

Improvements and bugfixes to PNanoVDB
Add Mat classes and other math types to NanoVDB
Add support for morphology operators in NanoVDB
Improvements to mGPU grid building and introduction of a separate test executable for mGPU tests
Several fixes for compiler warnings
2025-09-24 19:39:32 -04:00
Dan Bailey b96fcf77a6 Reduce threads from 8 -> 6 for GCC
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-09-24 16:27:05 -07:00
Dan Bailey 0cbfa274b2 Move H21.0 to VFX 2026 images (as a result of TBB 2022)
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-09-24 16:26:56 -07:00
Dan Bailey edde9a605c Delete LegacyFrustum
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-09-24 15:07:32 -07:00
Matthew Cong 4675f5b4bc Merge remote-tracking branch 'upstream-aswf/master' into aswf_master_merge 2025-09-24 13:10:27 -07:00
Nick Avramoussis 3d45de107e Merge pull request #2085 from Idclip/hou_21_sop_activate
Fixed a compilation issue with the OpenVDB Activate SOP with Houdini 21
2025-09-24 14:25:17 +12:00
Dan Bailey ddc3d7a754 Delete RootNodeMask
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-09-23 18:32:38 -07:00
Dan Bailey a25d824db4 Remove all the old IO code paths earlier than 222 (OpenVDB 1.0)
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-09-23 18:30:35 -07:00
Dan Bailey 5c1097e362 Remove LeafNode<std::string> unit test
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-09-23 18:06:59 -07:00
Nick Avramoussis a02ae47d06 Fixed a compilation issue with the OpenVDB Activate SOP with Houdini 21
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-09-22 09:24:54 +12:00
Dan Bailey af240d55d4 Merge pull request #2083 from danrbailey/notes_10_09_17
Meeting Notes Sep 10
2025-09-18 18:36:27 -07:00
Nick Avramoussis c3219ccfd6 Merge pull request #2084 from Idclip/houdini_21
Fixed Houdini download scripts with new container images
2025-09-19 11:17:45 +12:00
Nick Avramoussis a948ff318e Fixed Houdini download scripts with new container images
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-09-19 10:46:18 +12:00
Nick Avramoussis 43329bd962 Merge pull request #2081 from Idclip/houdini_21
Bump Houdini CI builds to 20.5/21
2025-09-19 10:00:39 +12:00
Nick Avramoussis f91141ba9d Fixed a AX unit test failure when LLVM is built with LLVM_ENABLE_ABI_BREAKING_CHECKS
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-09-18 22:08:25 +12:00
Dan Bailey 559d7642c8 Add new meeting notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-09-17 16:52:33 -07:00
Petra Hapalova fc3f1d180f Fix warning in NanoVDB header
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-09-17 12:58:19 -07:00
Eftychios Sifakis b3aead3529 Adding unittests for topological operations
* fixing discrepancies between OpenToNano/PointsToGrid constructions

* dilate/inject/prune unittest

* ws fix

* adding MergeGrids unittest

* key test

---------

Co-authored-by: Efty Sifakis <esifakis@nvidia.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-09-15 14:30:19 -07:00
Nick Avramoussis 08931d62b4 Compilation fixes for the OpenVDB AX Houdini SOP when using LLVM >= 16
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-09-15 09:17:11 +12:00
Nick Avramoussis 4fb969759e Bump Houdini CI builds to 20.5/21
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-09-11 20:06:03 +12:00
Eftychios Sifakis 6f3f350daf fixing discrepancies between OpenToNano/PointsToGrid constructions
This PR fixes a few discrepancies between grid construction via (a) PointsToGrid, and (b) OpenToNanoVDB. The discrepancies are not typically inhibiting functionality of either construction, but result in grids that are not bit-identical, when they would otherwise be expected to be. The changes are:

Removal of the PointsToGridData::flags member. The actual functionality of this flag was to allow control of solely the leaf-level flags (interior node, and GridData flags were already set independently), and in that aspect it was even incorrectly setting the IsBreadthFirst bit (which only makes sense for GridData::mFlags, not the leaf node flags). The method includeBBox was having no effect as it was, it was never called in any of the unittests, and its effect was overwritten later in the code.

PointsToGrid has been corrected to flag HasBBox as active in every node (not just the leaf nodes, as was happening prior; the flags were previously being set to zero).

The world space bounding box in OpenToNanoVDB was incrementing the upper bound of the index-space bounding box, prior to applying the transform ( hence, a grid with a single voxel [0,0,0] would have a WS bounding box of [0,0,0]->[1,1,1]). PointsToGrid was not applying this increment, resulting in a smaller WS bounding box.

Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-09-10 16:10:28 -07:00
Eftychios Sifakis 178b816479 restricting scope of CALL_CUBS macro
The CALL_CUBS macro has a slightly different definition in the two similar code files that use it, namely PointsToGrid.cuh and TopologyBuilder.cuh. This fix restricts the scope of each macro definition to just the code file where it is used.

Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-09-10 16:10:28 -07:00
Andrew 37c159260d PNanoVDB. Move StructuredBuffer<uint64_t> to StructuredBuffer<uint2>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-09-10 16:10:28 -07:00
Matthew Cong 5dddfa1fc0 Fix outdated MPL licensing
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-09-10 16:10:28 -07:00
Jonathan Swartz 759f8e59ee NanoVDB Math Mat classes' member function fix
---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2025-09-10 16:10:25 -07:00
Matthew Cong 5bf378f89f Modularize distributed radix sort code
Refactor the distributed radix sort code into a separate function so that it is more modular, testable, reusable. Furthermore, it fixes a small rounding error edge case in the merge code.

Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-09-10 16:10:25 -07:00
Jonathan Swartz 372526723c Cumulative NanoVDB and PNanoVDB updates from feature/fvdb
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2025-09-10 16:10:21 -07:00
Matthew Cong 2e576dbca8 Fix compiler warnings for NanoVDB
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-09-10 16:09:22 -07:00
Matthew Cong 4f6d0803b7 Suppress warning for GCC 13
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-09-10 16:09:22 -07:00
Matthew Cong 4e2546fe0c Spawn kernels from main thread in distributed grid building
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-09-10 16:09:22 -07:00
Matthew Cong 3b13980be2 Decouple prefix sums for distributed grid building
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-09-10 16:09:22 -07:00
Matthew Cong 90e84aa320 Swap inline to static for header file kernels
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-09-10 16:09:22 -07:00
Matthew Cong 39b16cdd6c Remove anonymous namespace and initialize device to invalid value
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-09-10 16:09:22 -07:00
Matthew Cong ac2e876b71 Fix prefix sum buffer overrun in DistributedPointsToGrid
* Fix prefix sum buffer overruns

* Add test

* Revise comment

Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-09-10 16:09:22 -07:00
Nick Avramoussis 29dd88e5d9 Merge pull request #2077 from Idclip/ci_fixes
CI Fixes
2025-09-11 08:18:52 +12:00
Nick Avramoussis ef3f85da9a CI Fixes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-09-02 22:35:56 +12:00
Nick Avramoussis cbe458cd8a Merge pull request #2072 from wetadigital/weta/public/ax_llvm_target_machine
Fixed missing host Target Machine when using LLVM 16+
2025-08-29 22:07:42 +12:00
Nick Avramoussis 166946c036 Merge pull request #2073 from wetadigital/weta/public/start_12.1.1
Bump development to 12.1.1
2025-08-22 04:11:52 +12:00
Nicholas Avramoussis f6b627cb09 Bump development to 12.1.1
Signed-off-by: Nicholas Avramoussis <navramoussis@wetafx.co.nz>
2025-08-13 13:57:08 +12:00
Nicholas Avramoussis 46371bbde9 Fixed missing host Target Machine when building and using the new LLVM PassManager with LLVM 16+
Signed-off-by: Nicholas Avramoussis <navramoussis@wetafx.co.nz>
2025-08-13 13:20:53 +12:00
Nick Avramoussis dd0ac130d0 Merge pull request #2071 from AcademySoftwareFoundation/v12.1.0_rc
V12.1.0
2025-08-08 21:59:46 +12:00
Nick Avramoussis e4621ae7b3 Bumped OpenVDB version to 12.1.0, updated CHANGES
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-08-08 17:24:31 +12:00
Nick Avramoussis 1fceec9c6b Minor build fix for C++20/GCC13 and weekly CI fixes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-08-08 10:19:53 +12:00
Nick Avramoussis 9acc3af646 Merge pull request #2068 from Idclip/ax_gtest
Replace CppUnit with GoogleTest in AX tests
2025-08-08 08:12:52 +12:00
Nick Avramoussis 313af9a72a Merge pull request #2069 from ghurstunither/bugfix/tube_assert_failures
Update LevelSetTubesImpl.h
2025-08-07 14:13:25 +12:00
Nick Avramoussis 93b397cf81 Merge pull request #2067 from Idclip/anisotropic_surfacing
Introduced Anisotropic Surfacing Kernels and PCA methods
2025-08-07 12:51:58 +12:00
Nick Avramoussis cbda14ec8e Merge pull request #2070 from matthewdcong/master_develop_merge
Update NanoVDB with the latest round of changes
2025-08-07 09:49:27 +12:00
Nick Avramoussis 62b95b4115 Merge pull request #2046 from dreamworksanimation/ASWF-257
Remove unnecessary null pointer checks (ASWF issue #257)
2025-08-07 08:43:59 +12:00
Nick Avramoussis c2bc66e16d Improved formatting, spelling and comments
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-08-06 13:57:18 +12:00
Nick Avramoussis 92ea3888c5 Updated CI workflows and release notes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-08-06 09:45:15 +12:00
Nick Avramoussis 691cf1bcd1 Merge branch 'master' into ax_gtest
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-08-06 09:44:56 +12:00
Matthew Cong 556a326c4a Update pendingchanges
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-08-05 11:49:08 -07:00
Matthew Cong 3966b9f991 Add clang build fixes
* Add clang build fixes

* Add/fix comments

Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-08-05 11:49:08 -07:00
Matthew Cong 93549a75f2 Add support for CUDA 13.0
* Add initial support for CUDA 13

* More fixes for CUDA 13

* Fix comment

Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-08-05 11:49:08 -07:00
Matthew Cong 8fc5038ecb Fix race condition in split/mergeGridHandles
* Fix race condition in split/mergeGridHandles

* Fix missing semicolon

Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-08-05 11:49:08 -07:00
Matthew Cong c13dfc379c Add/restore support for custom resources in PointsToGrid
* Separate data from algorithm

* Add custom resource support

* Add docs

* Add support for cudax::async_resource

* Fix default alignment

* Add cleanup

* Split up DeviceResource into separate file

* Fix file

Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-08-05 11:49:08 -07:00
Eftychios Sifakis c391f89af5 Adding kernel launch helpers with dynamic shared memory support to nanovdb::util
* adding launcher helpers for dynamic shared memory

* adding stream parameter

* adding code example in doxygen comments

Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-08-05 11:49:08 -07:00
Ken Museth c4a3cb3643 Device buffer from host buffer
* minor cleanup

Signed-off-by: Ken <ken.museth@gmail.com>

* construct DeviceBuffer from HostBuffer

Signed-off-by: Ken <ken.museth@gmail.com>

* added HostBuffer::data<T>(int i)

Signed-off-by: Ken <ken.museth@gmail.com>

* improved unit-test

Signed-off-by: Ken <ken.museth@gmail.com>

* snapshot

Signed-off-by: Ken <ken.museth@gmail.com>

* removed whitespace

Signed-off-by: Ken <ken.museth@gmail.com>

---------

Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-08-05 11:49:08 -07:00
Ken Museth 3917418d99 Fix leak device buffer
* minor cleanup

Signed-off-by: Ken <ken.museth@gmail.com>

* fixed memory leak in move constructor of DeviceBuffer

Signed-off-by: Ken <ken.museth@gmail.com>

* fixed some typos

Signed-off-by: Ken <ken.museth@gmail.com>

---------

Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-08-05 11:49:08 -07:00
Eftychios SifakisandMatthew Cong c7d1408aa9 Add VoxelBlockManager
* Adding VoxelBlockManager with base functionality

* switching from deprecated CountOn implementation

* Unit test for basic VoxelBlockManager use

* fixing trailing whitespace

* fixing trailing whitespace

* Fixing bug in get() method, that prevents proper operation for other than leaf nodes

* Fix licenses

* Add stream parameter

* Verify linear access

* More cleanup

* Cleanup constants

* Remove header

* Add comment

* Expose NumThreads for VBM build

* Fix up comments

* Avoid reinterpret_cast and use cuda::atomic_ref

* Clean up params and add docs

* replaced or commented on cryptic constants

* Add named constants

* More cleanup

---------

Co-authored-by: Matthew Cong <mcong@nvidia.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-08-05 11:49:08 -07:00
Matthew Cong 8cd9a62f53 Use cudaMallocAsync and cudaMallocFree wrappers to fix vGPU compatibility
* Use cudaMallocAsync and cudaMallocFree wrappers to fix vGPU

* Add missing include

* Fix namespace

Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-08-05 11:49:08 -07:00
Matthew Cong 77fc6d05f7 Fix class-memaccess warning in CreateNanoGrid.h
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-08-05 11:49:08 -07:00
Matthew Cong c5f5777e08 Fixes for signed/unsigned warnings
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-08-05 11:49:08 -07:00
Matthew Cong ed5ad461d8 Templatize buffer type for distributed points to grid
* Templatize buffer type for distributed points to grid

* Add missing template parameter

* Add pool

Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-08-05 11:49:08 -07:00
ghurstunither d3f37e7dfe Update LevelSetTubesImpl.h
Correct ScalarType computations.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2025-08-05 09:55:53 -04:00
ghurstunither 952a86321c Update LevelSetTubesImpl.h
Preprocess level set tapered capsule data to handle negative radii inputs.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2025-08-05 09:38:18 -04:00
Nick Avramoussis 36b6043f93 Minor fixes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-08-05 14:57:26 +12:00
Nicholas Avramoussis 6a43628236 Updated surfacing pending changes
Signed-off-by: Nicholas Avramoussis <navramoussis@wetafx.co.nz>
2025-08-05 14:57:26 +12:00
Nick Avramoussis a7cc7208d2 Various changes:
- Added OPENVDB_HAS_INVOKABLE_MEMBER_FUNCTION and OPENVDB_HAS_MEMBER_FUNCTION
   macros for compile time checking of member functions
 - Updated points::rasterize signature to no longer accept interrupter or
   filters and instead delegate these to the transfer scheme. Added transfer
   modules to support them
 - Added support for transfer schemes to provide a rasterizePoints which takes
   a range of points
 - Updated PCA to support target and source point per voxel counts
 - Remove dependency on PCA in ellips rasterizer
 - Added projected ellips distance and improved axis-aligned ellips calculation kernels
   for better representations of SDF distance calculations.
 - Made the pws value to the ellips rasterizer optional
 - Removed templated interrupter type from all rasterize methods
 - Removed old ABI<=9 support from PCA methods
 - Move to new OPENVDB_ASSERT macro
 - Use #if instead of #ifdefs to ensure they are present

Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-08-05 14:57:26 +12:00
Nick Avramoussis 04a2340d2d Fixed an issue where smoothed/unsorted positions provided to the ellips rasterizer wouldn't be found by point transfer
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-08-03 22:02:09 +12:00
Nick Avramoussis 1dc3f9d206 Moved the old 'sphereScale' rasterizer param to be a uniform scale for non-anisotropic neighbourhoods on the PCA methods
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-08-03 22:02:09 +12:00
Nick Avramoussis fed0143846 Fixed an issue with smooth position rasterization which wouldn't always activate the correct topology if the search radius was larger than the point radius
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-08-03 22:02:09 +12:00
Nick Avramoussis 7885f4704f Switch to include self contribution during PCA
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-08-03 22:02:09 +12:00
Nick Avramoussis d7aea5d1a3 Fixed an issue where the sigma tolerance was being compared to exactly zero
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-08-03 22:02:09 +12:00
Nick Avramoussis 52406bf30f Initial implementation of anisotropic surfacing, including re-work of PointRasterize and other fixes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-08-03 22:02:09 +12:00
Nick Avramoussis aaf0569678 Fixed some precision issues in Matrix methods
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-08-03 22:02:09 +12:00
Nick Avramoussis b341d3cc50 Removed unused AttributeHandle member
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-08-03 22:02:09 +12:00
Nick Avramoussis 8348da235c Merge pull request #2065 from Idclip/ax_backend_upgrade
AX backend restructure for LLVM opaque ptr support (LLVM 16+)
2025-08-03 21:57:37 +12:00
jmlait 7ebe25fe55 Merge pull request #2059 from sideeffects/send_upstream_houdini21sync
Synchronize with Houdini 21.
2025-08-02 10:52:21 -04:00
Nick Avramoussis d008d49eb3 Merge pull request #2034 from Idclip/win_delay_load
Removed delay loading last modified time warning logic
2025-08-01 08:35:09 +12:00
Nick Avramoussis 188b8aeb1c Add back mLastWriteTime guarded with ABI <= 12 for ABI compatibility with mapped file stream data
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-07-31 21:15:08 +12:00
Nicholas Avramoussis 286a197a80 AX backend restructure for LLVM opaque ptr support (LLVM 16+)
Signed-off-by: Nicholas Avramoussis <navramoussis@wetafx.co.nz>
2025-07-28 18:54:11 +12:00
Jeff Lait 6d238d412e Remove tabs.
Set the camera parameter to any camera to support LOPs.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2025-07-11 16:32:50 -04:00
Jeff Lait 584b2b5a1b Synchronize with Houdini 21.
Non trivial changes:
- Env flag to disable stream writing (backported to 19.50)
- H21 style camera options
- OP_InputIdx and OP_OutputIdx support.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2025-07-11 16:07:46 -04:00
John Mertic 786a33c2c7 Point to correct Technical Charter
Signed-off-by: John Mertic <jmertic@linuxfoundation.org>
2025-07-09 11:37:16 -04:00
Nick Avramoussis 5e1658e69b Merge pull request #2026 from Idclip/leaf_val_iters
Improved performance of LeafNode ValueIters
2025-07-05 17:27:34 +12:00
Nick Avramoussis 7b8f054f5f Added an assert to the ValueIter constructor to check if the Node ptr is valid
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-07-04 20:34:56 +12:00
apradhana c2ac9bf519 Add TSC Metting Notes June 4th 2025.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2025-06-18 12:34:53 -07:00
jmlait 67964d1e15 Merge pull request #2042 from sideeffects/sendupstream_tscmeeting20250507
Meeting notes for May 7th 2025
2025-05-21 10:47:15 -04:00
Eric Powers 135616d177 Fix remove unnecessary null pointer checks, issue #257.
There only appeared to be one obvious case left.

Code search process:

    grep -C 3 delete .

... then look for if statements, in C-like code, conditioned on the same
variable, and no other obvious purpose that required the if statement.

Signed-off-by: Eric Powers <eric.powers@dreamworks.com>
2025-05-16 12:44:24 -07:00
Dan Bailey 7ac379d34b Merge pull request #2027 from danrbailey/tsc_260325
Meeting Notes 26th March 2025
2025-05-07 14:28:11 -07:00
Jeff Lait a58117a3df Meeting notes for May 7th 2025
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2025-05-07 17:26:42 -04:00
Nick Avramoussis 528c470d06 Removed delay loading last modified time warning logic
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-04-24 17:39:40 +12:00
Nick Avramoussis 4ab3f27e48 Merge pull request #2008 from jjtParadox/patch-1
Slowdown fix - Avoid unnecessary getLastWriteTime calls for memory mapped files on windows
2025-04-24 17:21:07 +12:00
Nick Avramoussis 4b7328db67 Merge pull request #2017 from sideeffects/sendupstream_nodiscard
Add [[nodiscard]] to confusing math functions.
2025-04-24 17:20:23 +12:00
Jonathan Swartz 6e7ab0d49b Merge pull request #2031 from matthewdcong/sync/aswf_master
Update NanoVDB with the latest changes
2025-04-24 06:10:45 +12:00
Nick Avramoussis cbc4a347ee Merge pull request #2029 from Idclip/bump_version
Bump version to 12.0.2
2025-04-24 06:10:20 +12:00
Matthew Cong 01b986c77d Move away from deprecated 20.04 runners (#2032)
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-24 06:09:45 +12:00
Matthew Cong 2ba65fe8b4 Move away from deprecated 20.04 runners
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:50:03 -07:00
Matthew Cong 16fb13286c Force set _WIN32 flag
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:50:02 -07:00
Matthew Cong 5a0c07d06e Fix Windows warnings
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:50:01 -07:00
Ken Museth 1f35dfe61e Improve points to grid
* minor cleanup

Signed-off-by: Ken <ken.museth@gmail.com>

* minor improvements to nanovdb::tools::cuda::PointsToGrid

Signed-off-by: Ken <ken.museth@gmail.com>

---------

Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:59 -07:00
Matthew Cong f60217a439 Add optimizations to MGPU PointsToGrid
* Add timer for MGPU PointsToGrid

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Avoid blocking kernel launches due to cudaFree

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Fix overlapping of copies

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Pipeline pointsPerVoxelPrefix sum

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Cleanup and optimization

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Further improve pipelining

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Remove unnecessary sync point

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Revert "Remove unnecessary sync point"

This reverts commit f01b36ad852f32ec65517b3baa08ea267d5edc2d.

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Switch to GPU sync

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Fix event destruction race condition and reduce host thread latency

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Revert timer add

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* More fine-grained pipelining

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Fix event wait/destruction race condition

Signed-off-by: Matthew Cong <mcong@nvidia.com>

---------

Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:56 -07:00
Ken Museth aba9a149eb Feature/fix get set methods
* minor cleanup

Signed-off-by: Ken <ken.museth@gmail.com>

* fixed issue in get/set random access methods

Signed-off-by: Ken <ken.museth@gmail.com>

* cleanup

Signed-off-by: Ken <ken.museth@gmail.com>

* deleted white space

Signed-off-by: Ken <ken.museth@gmail.com>

* cleanup

Signed-off-by: Ken <ken.museth@gmail.com>

* added unit tests

Signed-off-by: Ken <ken.museth@gmail.com>

* improved unit tests

Signed-off-by: Ken <ken.museth@gmail.com>

* improved unit tests

Signed-off-by: Ken <ken.museth@gmail.com>

---------

Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:52 -07:00
Matthew Cong ff943a30eb Fix race condition across different merge levels (and memory leak in corresponding tests)
* Fix memory leaks in PointsToGrid tests

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Fix leapfrogging across recursion levels

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Parallelize kernel dispatch for different levels

Signed-off-by: Matthew Cong <mcong@nvidia.com>

---------

Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:49 -07:00
Matthew Cong ef94a3b184 Generalize MGPU grid construction to any power-of-two number of GPUs
* Start support for more than two GPUs in key merge

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Flip flop storage

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Generalize concurrent leftIntervals/rightIntervals usage

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Fix median search

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Fix rebalancing

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Fix recursive MGPU merge

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Update TODO

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Add guards for zero-tile GPUs

Signed-off-by: Matthew Cong <mcong@nvidia.com>

---------

Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:45 -07:00
Matthew Cong 5f1033dfd7 Suppress stringop-overflow warning due to GCC 11 regression
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:42 -07:00
Jonathan Swartz e48a8f8d5c Adding /bigobj to TestNanoVDB.cu compilation options to fix Windows build failures
* Adding /bigobj to TestNanoVDB.cu compilation options to fix Windows build failure
---------

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:38 -07:00
Matthew CongandKen Museth b91cb6535a Silence CMake warning about FindBoost module deprecation
* Silence CMake warning about FindBoost module deprecation

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Fix typo

Signed-off-by: Matthew Cong <mcong@nvidia.com>

---------

Signed-off-by: Matthew Cong <mcong@nvidia.com>
Co-authored-by: Ken Museth <1495380+kmuseth@users.noreply.github.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:33 -07:00
Ken Museth 9b728cba18 minor cleanup
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:29 -07:00
Ken Museth 88eb8c998b revert deprecation warning
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:26 -07:00
Matthew Congand= 316e0b4d03 Add distributed implementation of PointsToGrid
* Add distributed implementation of PointsToGrid

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Fix race condition in merge and single GPU case

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Fix kernel/cudaFree race conditions

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Add DistributedPointsToGrid unittest

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Clean up example

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Use range-based for loops

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Use structured bindings inside for loop

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Fix Windows build and some warnings

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Update for refactored DeviceMesh

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Fix copyright/include

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Add parallelForEach helper

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Templatize kernels to align with CUB better

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Shorten TemporaryDevicePool to TempDevicePool

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Refactor to use TempDevicePool

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Switch to class

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Parallelize kernel dispatch in build

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Fix race condition wrt to root node processing

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Speed up synchronization

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Add comments and fix deprecated TransformInputIterator

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Address review comments

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Address more review comments

* Add more cudaCheck calls and restrict EqualityIndicator type

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Fix license identifiers and remove unused code

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Add missing include

Signed-off-by: Matthew Cong <mcong@nvidia.com>

---------

Signed-off-by: Matthew Cong <mcong@nvidia.com>
Co-authored-by: = <=>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:23 -07:00
Matthew Cong dd7f12eb23 Consolidate DeviceGuard into DeviceMesh header
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:20 -07:00
Ken Museth 72406ff08d fixed typos and improved documentation in NanoVDB
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:17 -07:00
Ken Museth 4f96110d5a introducing new magic numbers for grids and files
* introducing new magic numbers for grids and files

Signed-off-by: Ken <ken.museth@gmail.com>

* removed two redundant magic numbers

Signed-off-by: Ken <ken.museth@gmail.com>

---------

Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:14 -07:00
Ken Museth d0e37dff19 minor simplification in CreateNanoGrid
* minor simplification in CreateNanoGrid

Signed-off-by: Ken <ken.museth@gmail.com>

* fixed typo

Signed-off-by: Ken <ken.museth@gmail.com>

---------

Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:11 -07:00
Ken Museth 8598155fcb major improvements to GridBlindMetaData
* major improvements to GridBlindMetaData

Signed-off-by: Ken <ken.museth@gmail.com>

* minor changes to fix clang issue

Signed-off-by: Ken <ken.museth@gmail.com>

---------

Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:07 -07:00
Matthew CongandKen Museth 462aafda79 Fix class-memaccess warning due to non-trivial copy-assignment in GridBlindMetaData
Signed-off-by: Matthew Cong <mcong@nvidia.com>
Co-authored-by: Ken Museth <1495380+kmuseth@users.noreply.github.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:04 -07:00
Ken Museth c945c36a09 removed dead code and updated the minor version number
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:49:00 -07:00
Matthew CongandKen Museth 267da7d91d Add missing constructor for C++20 used in AddBlindData.cuh
Signed-off-by: Matthew Cong <mcong@nvidia.com>
Co-authored-by: Ken Museth <1495380+kmuseth@users.noreply.github.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:57 -07:00
Matthew Cong 74ae3a5989 Fix DeviceMesh.h header to be self-contained
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:54 -07:00
Ken Museth 1db28418eb Fixed issue in signedfloodfill
* Fixed issue in signedfloodfill

Signed-off-by: Ken <ken.museth@gmail.com>

* partially addressed review comments

Signed-off-by: Ken <ken.museth@gmail.com>

* added RootData::TileIterator

Signed-off-by: Ken <ken.museth@gmail.com>

* cleanup

Signed-off-by: Ken <ken.museth@gmail.com>

* fixed assert bug

Signed-off-by: Ken <ken.museth@gmail.com>

* snapshot

Signed-off-by: Ken <ken.museth@gmail.com>

* fixed bug and improved unit-test

Signed-off-by: Ken <ken.museth@gmail.com>

* improved unit test and documentation

Signed-off-by: Ken <ken.museth@gmail.com>

---------

Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:51 -07:00
Matthew Cong 690104f408 Fix TBB template deduction in C++20
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:48 -07:00
Matthew Cong 4adbccaee1 Fix out-of-bounds device id
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:46 -07:00
Matthew Cong 22e17e7956 Fix namespace for AbsDiff and RelDiff ostream overloads
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:43 -07:00
Matthew Cong d130267347 Fix missing relocatable device code flag
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:38 -07:00
Matthew Cong 1d4cf67d80 Change UnifiedBuffer prefetch and advise to be const
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:35 -07:00
Matthew Cong 4d500e10d0 Fix invalid free in UnifiedBuffer move constructor
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:32 -07:00
Matthew Cong 1d1899bb0e Add missing NCCL ifdef
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:28 -07:00
Matthew Cong 242b573c75 Add missing inline for DeviceMesh functions
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:24 -07:00
Matthew Cong d21bec89dc Add missing const variant of deviceData(device)
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:21 -07:00
Matthew CongandMark Harris d71b7417ad Switch to DeviceMesh for MGPU sparse convolution example
* Convert MGPU convolution example to use DeviceMesh

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Fix typos and clarify

Co-authored-by: Mark Harris <783069+harrism@users.noreply.github.com>

* Check for errors and switch to for_each

Signed-off-by: Matthew Cong <mcong@nvidia.com>

---------

Signed-off-by: Matthew Cong <mcong@nvidia.com>
Co-authored-by: Mark Harris <783069+harrism@users.noreply.github.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:18 -07:00
Matthew CongandMark Harris 9329349461 Add DeviceMesh and (optional) NCCL CMake Support
* Add device mesh

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Restore current device in constructor and destructor

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Enable range-based for loops

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Use structured bindings inside for loop

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Remove uneeded accessors and modularize functions

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Statically initialize entry point

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Encapsulate

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Switch to lightweight wrapper class for DeviceNodes vector

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Cleanup

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Minor changes needed for DistributedPointsToGrid

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Add RAII DeviceGuard

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* More cleanup

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Clean up NCCL dependency

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Remove parallel_for to modularize

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Implement and test move constructor/assignment

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Add docs

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Expand test and documentation

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Move non-reinit comment to function description

Co-authored-by: Mark Harris <783069+harrism@users.noreply.github.com>

* Switch to using aliases and modern type names

Co-authored-by: Mark Harris <783069+harrism@users.noreply.github.com>

* Use size_type instead of int for return

Co-authored-by: Mark Harris <783069+harrism@users.noreply.github.com>

* Separate out DeviceGuard and clean up API

Signed-off-by: Matthew Cong <mcong@nvidia.com>

---------

Signed-off-by: Matthew Cong <mcong@nvidia.com>
Co-authored-by: Mark Harris <783069+harrism@users.noreply.github.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:14 -07:00
Ken Museth 40853821a1 Minor fix to unit-test of NanoVDB
* Minor fix to unit-test of NanoVDB

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* minor change

Signed-off-by: Ken Museth <ken.museth@gmail.com>

---------

Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:11 -07:00
Matthew Cong f96095f6cf Fix ODR violation due to anonymous namespace in SignedFloodFill
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:08 -07:00
Matthew Cong 97b229964c Fix format strings and Windows conversion warning
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:05 -07:00
Ken Museth 5f54d98080 improved nanovdb_convert
* improved nanovdb_convert

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* fixed typo

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* added unit tests

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* review feedback

Signed-off-by: Ken Museth <ken.museth@gmail.com>

---------

Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:48:01 -07:00
Matthew Cong a96cb41408 Add missing iomanip include for latest GTest
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:47:57 -07:00
Matthew Cong a79ec33944 Separate PointsToGrid kernel lambdas into functors
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:47:56 -07:00
Ken Museth 0c94550eaa improved change notes and updated version number
* improved change notes and updated version number

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* improved documentation

Signed-off-by: Ken Museth <ken.museth@gmail.com>

---------

Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:47:53 -07:00
Matthew Cong 92d689c3bd Fix missing OpenVDB dependency for NanoVDB-only build
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-04-21 11:47:37 -07:00
ghurstunither 9437cd7867 Tube and Dilated Mesh Level Set Constructors (#1935)
Adds Various level set constructors:
* tools::createLevelSetCapsule creates a grid containing a narrow-band level set representation of a capsule (tube with constant radius and sphere caps).
* 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).
 * 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).
* tools::createLevelSetDilatedMesh creates a grid containing a narrow-band level set representation of a dilated surface mesh (dilated by a radius in all directions).

Base class that can be used to create other level sets:
* tools::ConvexVoxelizer, which can be inherited to implement a convex level set constructor.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2025-04-11 09:03:36 -04:00
ghurstunither 76d8a5e3a5 Merge pull request #2015 from ghurstunither/TSC_Jan22_2025
TSC notes Jan 22, 2025
2025-04-11 08:56:47 -04:00
Nick Avramoussis 71ac2add41 Bump version to 12.0.2
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-04-10 22:14:28 +12:00
Nick Avramoussis 6a0b12dadb Merge pull request #2023 from AcademySoftwareFoundation/v12.0.1_rc
V12.0.1
2025-04-09 17:50:19 +12:00
Dan Bailey a05dc7a903 Meeting Notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2025-04-08 22:16:10 -07:00
Nick Avramoussis 8b7c521f4d Added OPENVDB_ASSUME macros and applied them to Leaf ValueIters - fixes vectorization misses with clang
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-04-06 20:58:21 +12:00
Nick Avramoussis e2e0cb6d03 Improved performance of LeafNode ValueIters
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-04-06 19:09:10 +12:00
Nick Avramoussis c4ab206580 Merge branch 'master' into v12.0.1_rc 2025-04-03 18:45:16 +13:00
Nick Avramoussis f552aab859 Updated doc/changes.txt
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-04-03 18:22:14 +13:00
Ken Museth 28ccbc1d1f fixed offset bug in IndexToGrid - see PR2013 (#2021)
* fixed offset bug in IndexToGrid - see PR2013

Signed-off-by: Ken <ken.museth@gmail.com>

* added pendingchanges

Signed-off-by: Ken <ken.museth@gmail.com>

* improved documentation

Signed-off-by: Ken <ken.museth@gmail.com>

* minor update to documentation

Signed-off-by: Ken <ken.museth@gmail.com>

* addressed review comments

Signed-off-by: Ken <ken.museth@gmail.com>

---------

Signed-off-by: Ken <ken.museth@gmail.com>
2025-04-02 09:28:36 -07:00
Nick Avramoussis 1e8591fdc4 Updated release date
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-04-02 18:36:24 +13:00
Nick Avramoussis f87af0c0c4 Merge pull request #2020 from AcademySoftwareFoundation/master
master->v12.0.1
2025-03-28 20:27:10 +13:00
Nick Avramoussis 09f728eaca Merge pull request #2019 from Idclip/weekly_ci
Weekly CI fixes
2025-03-28 20:18:35 +13:00
Nick Avramoussis 113550d523 weekly CI fixes
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-03-28 08:36:26 +13:00
Nick Avramoussis 304ddf8060 Merge pull request #2018 from Idclip/relnotes
Updated release notes for 12.0.1
2025-03-27 19:37:54 +13:00
Nick Avramoussis 9ecd3d408f Updated release notes for 12.0.1
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-03-27 18:32:48 +13:00
Jeff Lait f8a1b1ef71 Add [[nodiscard]] to confusing math functions.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2025-03-26 14:50:05 -04:00
jmlait c97acb439d Merge pull request #2016 from sideeffects/sendupstream_nanovdbtranspose
Transpose on NanoToOpenVDB allowing round tripping
2025-03-26 14:19:24 -04:00
Jeff Lait 75133a8da7 Add changes note.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2025-03-26 11:51:57 -04:00
Jeff Lait 11334b5e44 The openvdb::Mat3::transpose() method returns a transpose of itself,
it doesn't do an in-place transpose.

Thus the line

    mat.transpose(); // the 3x3 in nanovdb is transposed relative to openvdb's 3x3

is a no-op, and not actually transposing the matrix.  Since we DO
transpose when we do an OpenToNano; it is important we transpose here
or we can't round-trip.

Unfortunately, it has been this way since the initial commit, so it is
quite likely tooling has already worked around this....

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2025-03-24 10:58:35 -04:00
ghurstunither 50a980f845 TSC notes
TSC notes

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2025-03-19 14:06:56 -04:00
Nick Avramoussis 4b38fba44f Specifically include glu.h on windows (#2010)
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2025-03-14 10:39:22 +13:00
Jonathan Swartz 8685b81ac2 Merge pull request #2012 from matthewdcong/bugfix/windows_nanovdb_ci
add CMAKE_CUDA_ARCHITECTURES to nanovdb weekly tests (#257)
2025-03-10 11:13:36 +13:00
Jonathan Swartz 79be73be68 add CMAKE_CUDA_ARCHITECTURES to nanovdb weekly tests (#257)
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2025-03-07 09:47:30 -08:00
jjtParadox 2d7ae513ef Avoid unnecessary and expensive getLastWriteTime calls for memory mapped files on windows
Signed-off-by: jjtParadox <jturner@4nsi.com>
2025-02-27 09:25:54 -06:00
jmlait 5ff0edc2cc Merge pull request #2004 from sideeffects/sendupsream_tscnotes20250205
Meeting notes for Feburary 5th, 2025.
2025-02-19 13:17:27 -05:00
apradhana 3c8f8ce6f0 Merge pull request #1998 from apradhana/TSC_Jan8_2025
Add Meeting notes from 2025-01-09.
2025-02-19 10:17:19 -08:00
Matthew Cong a2cb6c08b1 Update NanoVDB with latest changes (#2001)
* Merge changes from latest NanoVDB

Signed-off-by: Matthew Cong <mcong@nvidia.com>

* Fix comments and trailing include

Signed-off-by: Matthew Cong <mcong@nvidia.com>

---------

Signed-off-by: Matthew Cong <mcong@nvidia.com>
2025-02-11 13:55:30 -08:00
Jeff Lait a4bb1bcaf3 Meeting notes for Feburary 5th, 2025.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2025-02-07 13:04:55 -05:00
apradhana 2b14bdf795 Add Meeting notes from 2025-01-09.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2025-01-22 10:25:36 -08:00
Tim Straubinger 692d63e3b8 Remove whitespace
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 14:43:40 -08:00
Tim Straubinger 109c3f2591 Remove all mentions of CppUnit from build dependencies and instructions
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:57:33 -08:00
Tim Straubinger ac56c2496d Remove CppUnit from AX test CMake requirements
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:51:25 -08:00
Tim Straubinger 68d9753437 Remove cppunit utilities from main AX test runner
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:51:25 -08:00
Tim Straubinger dcd6744424 Convert all of AX integration test suite to use gtest
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:51:25 -08:00
Tim Straubinger 5df8871827 Convert all of AX frontend test suite to use gtest; remove temporary cppunit dual support from utils.h
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:51:24 -08:00
Tim Straubinger 748ace48cd Convert TestArrayPack.cc to use gtest; add temporary support for both gtest and cppunit to test/util.h
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:51:24 -08:00
Tim Straubinger 8a13cb2b02 Convert TestVolumeExecutable.cc from cppunit to gtest; add gtest friend declarations to VolumeExecutable
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:51:20 -08:00
Tim Straubinger ecb6e7b07c Convert TestPointExecutable.cc from cppunit to gtest; add gtest friend declarations to PointExecutable
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:46:21 -08:00
Tim Straubinger 5e6a0d260b Convert TestAXRun.cc from cppunit to gtest
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:33:23 -08:00
Tim Straubinger 18c2c3a992 Convert TestTypes.cc from cppunit to gtest
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:33:23 -08:00
Tim Straubinger 5beb2c5367 Convert TestSymbolTable.cc from cppunit to gtest
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:33:23 -08:00
Tim Straubinger b44248b200 Convert TestStringIR.cc from cppunit to gtest
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:33:23 -08:00
Tim Straubinger f25319edbb Convert TestLogger.cc from cppunit to gtest; add gtest friend declarations to Logger
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:33:23 -08:00
Tim Straubinger 26ada31fa1 Convert TestFunctionTypes.cc from cppunit to gtest
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:33:23 -08:00
Tim Straubinger 7aa4136886 Convert TestFunctionRegistry.cc from cppunit to gtest
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:33:23 -08:00
Tim Straubinger efa5176137 Convert TestFunctionGroup.cc from cppunit to gtest
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:33:23 -08:00
Tim Straubinger a065b5e3de Convert TestComputeGeneratorFailures.cc from cppunit to gtest
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:33:23 -08:00
Tim Straubinger 5c2f8e80f9 Convert TestCodecs.cc from cppunit to gtest
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:33:23 -08:00
Tim Straubinger 9bb34dff3f Convert TestAttributeBindings.cc from cppunit to gtest
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:33:23 -08:00
Tim Straubinger 40a3ef4c05 Convert TestScanners.cc from cppunit to gtest
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:33:23 -08:00
Tim Straubinger 29a17e36bc Revert deliberate test failure used for testing
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:33:23 -08:00
Tim Straubinger 3ed5f6e93d Add GoogleTest to AX test; run cppunit and gtest in tandem for gradual conversion; convert TestPrinters to gtest
Signed-off-by: Tim Straubinger <tstraubinger@ilm.com>
2025-01-07 13:33:23 -08:00
Jonathan Swartz 2148e41f6d Merge pull request #1990 from swahtz/apache2_typo
Fix typo in SPDX license identifier
2024-12-18 13:29:44 +13:00
Jonathan Swartz b78b48204e Fix typo in SPDX license identifier
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2024-12-18 13:08:04 +13:00
Jonathan Swartz 74c3e68907 Merge pull request #1986 from AcademySoftwareFoundation/fix_missing_spdx
Added SPDX license identifiers to files missing it
2024-12-18 08:57:43 +13:00
Jonathan Swartz ed6db4b3ab Merge pull request #1983 from swahtz/upload_v4
Changed GH action upload-artifact to v4; fixes #1982
2024-12-18 08:13:36 +13:00
Jonathan Swartz 16eb716fd5 Merge pull request #1980 from danrbailey/tsc_notes_031224
Meeting notes 3rd December
2024-12-18 08:02:25 +13:00
Jonathan Swartz caa3969681 Added spdx license identifiers to files missing them.
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2024-12-17 15:21:47 +13:00
Jonathan Swartz ca4aec122b Changed GH action upload-artifact to v4; fixes #1982
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2024-12-11 18:21:55 +13:00
Dan Bailey 840df4dc46 Meeting notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-12-06 11:10:51 -08:00
Dhruv Govil 930c3acb8e Fix Clang Template errors (#1977)
Upcoming versions of Clang/LLVM change some behaviour around templating that causes OpenVDB to fail to compile.

This commit addresses two issues and allows VDB to compile again.

1. There were three instances of an unnecessary template keyword in NodeManager.h that were not followed by a template call, and therefore are illegal to the compiler.

2. GridBuilder.h had a template call to a non-existent method. This was not previously validated, but is now validated. Switching the symbol from `isActive` to `isOn` per Ken's review.

See the [changelog](https://releases.llvm.org/19.1.0/tools/clang/docs/ReleaseNotes.html#improvements-to-clang-s-diagnostics:~:text=Clang%20now%20looks%20up%20members%20of%20the%20current%20instantiation%20in%20the%20template%20definition%20context%20if%20the%20current%20instantiation%20has%20no%20dependent%20base%20classes.) for Clang and the associated [PR for the second point above](https://github.com/llvm/llvm-project/pull/84050)

Signed-off-by: Dhruv Govil <dgovil2@apple.com>
2024-12-04 19:46:48 -08:00
Ken MusethandJonathan Swartz 7d44132801 added read/write support of OFF files to vdb_tool (#1971)
* added read/write support of OFF files to vdb_tool

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* added pendingchanges/vdb_tool.txt

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* added patch from Jonathan S

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* minor cleanup

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* addressed review comments

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* before major improvements to readPLY

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* cleanup

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* removed whitespace

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* added nanovdb::vdb_tool::swapBytes

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* added more documentation

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* patch by Jonathan S to fix CI

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* Fix gtest install for rpm. not deb

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* Building gtest from source; newer version required than available on distro

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* permissions fix

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* Attempting to fix doxygen node version issue
Missing iomanip include in TestNanoVDB

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* Bump container versions attempt to fix doxygen test

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* install_latex fix

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>

* added ascii option to Geometry::writePLY

Signed-off-by: Ken Museth <ken.museth@gmail.com>

* fixing issue introduced in the previous commit

Signed-off-by: Ken Museth <ken.museth@gmail.com>

---------

Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Co-authored-by: Jonathan Swartz <jonathan@jswartz.info>
2024-12-02 11:24:18 -08:00
ghurstunither 58724e5111 Merge pull request #1962 from AcademySoftwareFoundation/meeting_notes/2024-11-05
2024-11-05 Meeting Notes
2024-11-06 21:22:49 -05:00
ghurstunither 74ae698030 Update 2024-11-05.md
Some corrections suggested by Andre.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-11-06 12:38:48 -05:00
ghurstunither a692c44df7 Create 2024-11-05.md
Meeting notes from 2024-11-05.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-11-06 11:42:36 -05:00
Dan Bailey 79d056ce42 Bump to v12.0.1 (#1960)
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-11-01 16:35:52 -07:00
Dan Bailey 78135f5f82 Merge pull request #1958 from AcademySoftwareFoundation/v12.0.0_rc
VDB 12.0.0 Release
2024-10-31 22:39:28 -07:00
Dan Bailey 269300808a Add LLVM 13 back into AX matrix
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-31 15:59:05 -07:00
Dan Bailey c0197d2e39 A few small docs updates
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-31 13:16:52 -07:00
Dan Bailey 700390df40 A few minor docs updates
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-31 13:16:01 -07:00
Dan Bailey c6161d7c67 Add a note to the change log about the re-licensing
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-31 13:07:38 -07:00
Dan Bailey 94fcd865c4 More docs formatting fixes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-31 12:03:49 -07:00
Dan Bailey bd86b3781c Revert nanobind minimum version, more cleanup and refined future versions
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-31 12:01:51 -07:00
Dan Bailey 785bed5625 Fix some documentation formatting issues
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-31 11:41:42 -07:00
Dan Bailey 7afbe2a787 Fix ABI=13 error message
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-31 11:33:07 -07:00
Dan Bailey 47b2b52237 Add nanobind minimum version
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-31 11:32:02 -07:00
Dan Bailey 5768e86d61 Update change log
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-31 10:40:38 -07:00
Dan Bailey 667f4f477a Fix a memory leak in RootNode
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-31 10:40:38 -07:00
Dan Bailey b9f09a2580 Update docs GHA workflow
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-31 10:40:38 -07:00
Dan Bailey 880a3718ea Lots of CI updates
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-31 10:40:38 -07:00
Dan Bailey 6a8415f7d4 Bump version to 12.0.0
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-31 10:40:38 -07:00
Dan Bailey c884baa6c0 Remove some old GCC checks
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-31 10:40:38 -07:00
Dan Bailey 7d6410ba43 Bump CMake minimum 3.18 -> 3.20
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-31 10:40:38 -07:00
Dan Bailey d8c33bdf8c Update dependencies and enforce minimum versions
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-31 10:40:38 -07:00
Dan Bailey a4705352e0 Merge pull request #1957 from danrbailey/pdal
Fix Windows CI
2024-10-30 15:09:24 -07:00
Dan Bailey 3a023b4404 Remove pdal from vcpkg
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-30 13:58:36 -07:00
Dan Bailey c4849497e9 Merge pull request #1794 from ghurstunither/bugfix/NodeManager_overflow
Prevent integer overflow in NodeManager and LeafManager
2024-10-30 13:50:37 -07:00
ghurstunither 11686a8028 Update TestTree.cc
Remove migrated tests.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-30 15:00:53 -04:00
Dan Bailey 8a81dbb395 Merge pull request #1956 from danrbailey/root_delete_fix
Fix a memory-leak in RootNode::deleteChildOrTile()
2024-10-30 11:54:42 -07:00
ghurstunither 4853738770 Avoid ABI conditionals in Root/Internal/Leaf
Avoid ABI conditionals in Root/Internal/Leaf node files.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-30 13:41:52 -04:00
ghurstunither 52d61fd779 treeDepth stays Index
Keep Index return type for treeDepth.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-30 13:25:05 -04:00
ghurstunither aba7d2d435 define deprecated nodeCount for all versions.
define deprecated nodeCount for all versions.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-30 13:00:36 -04:00
ghurstunither 26f0ad1ea6 deprecation suppression
deprecation suppression in recursive nodeCount calls.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-30 11:52:51 -04:00
ghurstunither 607db982d3 Update TestPointExecutable.cc
AX test failures

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-30 11:41:23 -04:00
ghurstunither 97d6750ef1 Update TestVolumeExecutable.cc
trailing space

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-30 11:28:33 -04:00
ghurstunither a76faad8b6 Update TestVolumeExecutable.cc
AX tests for correct leafCount return type.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-30 11:27:18 -04:00
ghurstunither afbd819f02 Update TestNodeVisitor.cc
trailing space

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-30 10:53:11 -04:00
ghurstunither b1d114a2d2 Backward compatibility for unit tests.
Backward compatibility for unit tests.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-30 10:48:49 -04:00
ghurstunither 907afa0da6 Update Tree.h
Prevent nodeCount deprecation warnings.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-30 09:46:41 -04:00
jmlait 60d4c610b7 Merge pull request #1955 from sideeffects/sendupstream_tscmeeeting_20241029
TSC Meeting notes for Oct 29th 2024.
2024-10-30 09:00:34 -04:00
ghurstunither d1264364a2 compile for versions below 12
Restore 32 bit functionality for versions below 12.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-30 08:59:49 -04:00
ghurstunither 135f41d77e Merge remote-tracking branch 'upstream/master' into bugfix/NodeManager_overflow 2024-10-30 08:49:03 -04:00
Dan Bailey 58c8d3a4f4 Merge pull request #1941 from matthewdcong/pip_openvdb
Add support for pip install
2024-10-29 20:56:13 -07:00
Dan Bailey 2f84be5e20 Merge pull request #1951 from apradhana/levelset_filter_unittest
Add a unit-test for LevelSetFilter::fillet.
2024-10-29 20:54:48 -07:00
Dan Bailey ae6b1a1269 Merge pull request #1821 from tommatterson/vdb_tool_use_pdal
Added feature to read points into vdb_tool using PDAL
2024-10-29 20:53:50 -07:00
ghurstunither a478a0ed64 Merge remote-tracking branch 'upstream/master' into bugfix/NodeManager_overflow 2024-10-29 22:56:01 -04:00
ghurstunither 3813556aa7 More 64 bit return for TreeBase
* nonLeafCount and treeDepth return Index64 in TreeBase.
* All ABI breakages safeguarded for versions < 12.
* Deprecated implementations of nodeCount for vector<Index32> arguments.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-29 22:41:01 -04:00
Dan Bailey 986dfb959d Fix a memory-leak in RootNode::deleteChildOrTile() and add an iterator warning
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-29 16:59:08 -07:00
Jonathan Swartz ced3af8a45 Fix whitespace issue
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2024-10-30 12:35:13 +13:00
Jonathan Swartz 844c79b38a Added PDAL read test to vdb_tool unittests
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2024-10-30 12:29:42 +13:00
apradhana e8854bc324 Merge pull request #1953 from apradhana/TSC-Oct8-2024
Add meeting notes October 8th and 22nd, 2024.
2024-10-29 16:01:54 -07:00
Dan Bailey ff9463cf2d Merge pull request #1954 from AcademySoftwareFoundation/feature/ubsan_fix
Disable undefined behavior checks in transformValues()
2024-10-29 15:18:52 -07:00
Dan Bailey cc48dc07f5 Merge pull request #1938 from danrbailey/tree_api_unsafe
Adding unsafe methods to the RootNode, InternalNode and LeafNodes
2024-10-29 15:18:15 -07:00
apradhana da8b764aa9 Add a unit test for LevelSetFilter::fillet.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2024-10-29 14:53:09 -07:00
Matthew Cong 18ad210758 Consolidate SKBUILD logic
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2024-10-29 14:40:00 -07:00
Matthew Cong 40d1089000 Update classifier
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2024-10-29 14:06:28 -07:00
Matthew Cong 5e4bb9f3ea Add initial pip install implementation
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2024-10-29 14:06:28 -07:00
Dan Bailey 402eaf7877 Merge remote-tracking branch 'upstream/master' into tree_api_unsafe 2024-10-29 12:51:29 -07:00
Dan Bailey 8e395623d6 Merge branch 'feature/tree_api_tests' into tree_api_unsafe 2024-10-29 12:46:52 -07:00
Jeff Lait 7f6945bd00 Fix trailing spaces.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2024-10-29 15:44:09 -04:00
Jeff Lait 2e580072bb TSC Meeting notes for Oct 29th 2024.
Merge in pending changes.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2024-10-29 15:38:54 -04:00
Dan Bailey 49cc7de94a Switch to ubsan suppress macro
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-29 12:33:19 -07:00
Dan Bailey 57d4201cc7 Merge pull request #1936 from danrbailey/tree_api_probe
RootNode and InternalNode Probe Methods
2024-10-29 12:09:04 -07:00
Dan Bailey 251b127427 Merge pull request #1939 from danrbailey/root_node_emplace
Root Node Optimizations
2024-10-29 12:08:26 -07:00
Dan Bailey c33ecbef97 Merge pull request #1952 from danrbailey/python_ci
Python CI Fixes
2024-10-29 12:07:49 -07:00
Dan Bailey fe71e9da2a Disable undefined sanitization in transformValues()
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-29 10:57:39 -07:00
apradhana 8c57afe1d5 Add meeting notes October 8th and 22nd, 2024.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2024-10-29 10:30:45 -07:00
Dan Bailey 4296ab3508 Where Python_SITELIB is not defined, fall back to "site-packages"
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-29 09:29:20 -07:00
Dan Bailey 59f86855ff Use sudo to make install nanobind
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-29 09:29:09 -07:00
Dan Bailey d855b3f12d Eliminate Python version check now that the minimum version is Python3 and other clean up
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-29 09:29:06 -07:00
Dan Bailey 60a93146da Merge pull request #1931 from danrbailey/root_api_changes
RootNode API Changes
2024-10-28 10:23:10 -07:00
Dan Bailey 0c8caf63e1 Fix some asserts
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-26 17:35:47 -07:00
Dan Bailey 485ff9884f Address feedback
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-26 17:33:14 -07:00
Dan Bailey 18d4cc3c2c Address feedback
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-26 17:14:33 -07:00
Dan Bailey 682aaf1b93 Address feedback
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-26 16:57:14 -07:00
Dan Bailey 02abba7963 Add changes file
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-26 16:50:37 -07:00
Dan Bailey 0cda152ee6 Extend RootNode unit test to support map and delete test cases
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-26 16:50:37 -07:00
Dan Bailey a984443642 Add RootNode::deleteChildOrTile()
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-26 16:50:37 -07:00
Dan Bailey 937e5fa777 Fix a bug in the setOrigin() call
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-26 16:50:37 -07:00
Dan Bailey bee795bc93 Make hasKey() and coordToKey() public
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-26 16:50:37 -07:00
Dan Bailey eee04931e2 Make tileCount(), activeTileCount(), inactiveTileCount() public
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-26 16:50:37 -07:00
Dan Bailey 30e24e1329 Delete some unused private methods on RootNode
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-26 16:50:37 -07:00
ghurstunither fcff36445a Update TestNodeVisitor.cc
Correct type for nodeCount members.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-24 13:23:29 -04:00
ghurstunither f13a0a8524 Index64 leafCount in AX tests
Use Index64 for tree's leafCount.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-24 13:08:33 -04:00
ghurstunither 1f7798d6c6 Update CMakeLists.txt
Turns off OPENVDB_BUILD_UNITTESTS.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-24 12:21:16 -04:00
ghurstunither a24c8631bc Update Tree.h
Correct type for variable.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-24 12:20:12 -04:00
ghurstunither 187cb1a76e leafCount and friends work with Index64
leafCount, unallocatedLeafCount, nodeCount now work with Index64 to accommodate trees with more than 2^32-1 leaf nodes.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-10-24 12:12:37 -04:00
Jonathan Swartz da7c454b2a Fix pdal Windows package name. Fix linux build warnings causing errors.
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2024-10-24 10:18:44 +13:00
Jonathan Swartz c9c38d2163 Merge pull request #1 from swahtz/vdb_tool_use_pdal
Merge master, added libpdal to new install_windows ps script
2024-10-24 09:07:25 +13:00
Dan Bailey 7cb47d8626 Fix a compiler warning
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-23 10:27:57 -07:00
apradhana 5201109680 Merge pull request #1793 from ghurstunither/feature/fillet_filter
Fillet filter in LevelSetFilter.h
2024-10-23 09:41:25 -07:00
Jonathan Swartz 581b5d283f Whitespace fix
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2024-10-23 14:29:24 +13:00
Jonathan Swartz 946952bb9a Add libpdal back to vpckg's in isntall_windows.ps1
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2024-10-23 14:03:21 +13:00
Jonathan Swartz 1f7c4382ad Merge branch 'master' into vdb_tool_use_pdal
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2024-10-23 14:01:52 +13:00
Jonathan Swartz f012e748b3 Merge pull request #1926 from AcademySoftwareFoundation/feature/nanovdb_ci_update
Update NanoVDB to 2024 OS Image
2024-10-23 08:35:33 +13:00
ghurstunither 3900d483c5 Merge remote-tracking branch 'upstream/master' into feature/fillet_filter 2024-10-22 14:33:14 -04:00
ghurstunither d57fae34ca Merge remote-tracking branch 'upstream/master' into bugfix/NodeManager_overflow 2024-10-22 14:32:57 -04:00
Dan Bailey decf44d08f Merge pull request #1940 from danrbailey/weekly_ax
Remove AX from weekly extra builds due to LLVM 17
2024-10-22 11:26:21 -07:00
Dan Bailey 090b2d9ba9 Merge pull request #1916 from matthewdcong/openvdb_nanovdb_nanobind
Port OpenVDB Python bindings to nanobind and add NanoVDB Python bindings
2024-10-22 11:25:32 -07:00
Jonathan Swartz 164ef42418 Merge branch 'master' into feature/nanovdb_ci_update
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2024-10-23 07:08:45 +13:00
Matthew Cong 29cd46f613 Add NanoVDB Python bindings
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2024-10-22 08:14:41 -07:00
Matthew Cong 2a7fb5e223 Port OpenVDB Python bindings from pyind11 to nanobind
Signed-off-by: Matthew Cong <mcong@nvidia.com>
2024-10-22 08:14:41 -07:00
Jonathan Swartz 764638fa90 Added CMAKE_POSITION_INDEPENDENT_CODE flag to linux-nanovdb CI job to fix clang default behaviour change
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2024-10-22 19:48:03 +13:00
Dan Bailey 9b31b07ca4 Remove AX from weekly extra builds due to LLVM 17
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-21 16:00:50 -07:00
Dan Bailey e591925cac Fix a compiler warning
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-21 15:53:31 -07:00
Dan Bailey 37615a0818 Add changes file
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-21 15:53:24 -07:00
Dan Bailey f9a34cb566 Fix a const test
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-21 15:50:05 -07:00
Dan Bailey 0794215a67 Merge pull request #1928 from AcademySoftwareFoundation/feature/apache2
Update License to Apache 2.0
2024-10-21 15:44:21 -07:00
Dan Bailey cb6f134b9d Fix a compiler warning
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-21 13:31:50 -07:00
Dan Bailey f9431666b0 Update changes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-21 13:31:50 -07:00
Dan Bailey 27f67ff5a0 In-place create NodeStruct elements in std::map, avoid re-generating key
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-21 13:31:50 -07:00
Dan Bailey fb7384b193 Add changes file
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-21 13:27:54 -07:00
Dan Bailey 1cdeab7ba9 Merge branch 'feature/drop_abi_9' into feature/tree_api_tests 2024-10-21 13:24:33 -07:00
Dan Bailey e0f50ee14a Merge remote-tracking branch 'upstream/master' into feature/drop_abi_9 2024-10-21 13:23:04 -07:00
Dan Bailey 5c3e7e2c9b Merge pull request #1914 from ghurstunither/notes/meeting-notes-09-24-24
Create 2024-09-24.md
2024-10-21 12:55:18 -07:00
Dan Bailey 961f0f1672 Merge remote-tracking branch 'upstream/master' into feature/apache2 2024-10-21 12:54:16 -07:00
Dan Bailey 4ef947b3a8 Merge pull request #1933 from danrbailey/windows_powershell
Fix Windows CI
2024-10-20 20:21:45 -07:00
Jonathan Swartz 1a2e3377db Update CUDA paths
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2024-10-21 16:15:00 +13:00
Jonathan Swartz 302ed4de71 Merge branch 'master' into vdb_tool_use_pdal
Signed-off-by: Jonathan Swartz <2375296+swahtz@users.noreply.github.com>
2024-10-21 15:49:33 +13:00
Dan Bailey ab720f8626 Add unsafe methods and unit tests for RootNode, InternalNode and LeafNode(s)
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-18 17:17:20 -07:00
Dan Bailey 11148eb9d1 Add missing probeValue(Index, val) methods
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-18 17:16:57 -07:00
Dan Bailey bf8b540a25 Add missing isValueOn()/isValueOff() methods
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-18 17:16:49 -07:00
Dan Bailey 7a79af8344 Add new InternalNode probe methods
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-17 16:57:53 -07:00
Dan Bailey 419df1ab06 Add new RootNode probe methods
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-17 16:57:26 -07:00
Dan Bailey a824f1bfba Add RootNode and InternalNode unit tests
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-17 12:06:04 -07:00
Dan Bailey 8966156256 Port install_windows script from bash to powershell
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-10 22:00:03 -07:00
Dan Bailey 74d8adca6c Merge remote-tracking branch 'upstream/master' into feature/apache2 2024-10-10 12:14:39 -07:00
Dan Bailey 7a98d2ff7f Merge pull request #1925 from AcademySoftwareFoundation/feature/update_ci
Add 2024 CI Images and Drop 2021 CI Images
2024-10-10 11:44:14 -07:00
Dan Bailey 5421fb553f Address feedback
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-10 11:42:39 -07:00
Dhruv Govil 453fa6fe17 Change MPL-2.0 to Apache-2.0
Signed-off-by: Dhruv Govil <dgovil2@apple.com>
2024-10-09 15:27:51 -07:00
Dan Bailey ffea83c8ce Updated deprecation strategy to document new policy
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-09 15:23:29 -07:00
Dan Bailey c447849d62 Drop support for ABI=9
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-09 15:23:29 -07:00
Dan Bailey bdf1ac1e46 Update NanoVDB to 2024 OS Image
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-09 10:18:39 -07:00
Dan Bailey 934c3369c0 Revert NanoVDB change for now
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-08 18:57:29 -07:00
Dan Bailey cfd2ac4504 Drop AX from H20.5 2024 builds and fix whitespace
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-08 18:56:32 -07:00
Dan Bailey d4c861718d Install CppUnit from source for newer OS images
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-08 14:11:50 -07:00
Dan Bailey a82a02681c Merge remote-tracking branch 'upstream/master' into feature/update_ci 2024-10-08 12:32:10 -07:00
Dan Bailey b9439f6d79 Merge pull request #1924 from AcademySoftwareFoundation/feature/macos_weekly
Fix Weekly CI Latest Builds
2024-10-08 12:16:19 -07:00
Dan Bailey 7090dc8e69 Merge pull request #1922 from danrbailey/fix_windows_vcpkg
Fix a couple of small windows CI / vcpkg bugs
2024-10-08 12:15:11 -07:00
Dan Bailey 62cf2738de Merge pull request #1923 from AcademySoftwareFoundation/feature/h205
Add Houdini 20.5 to weekly CI
2024-10-08 12:14:23 -07:00
Dan Bailey 8bf1700ee9 Install glfw from source for 2023 image
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-04 16:24:11 -07:00
Dan Bailey c3c3c7ef5c Update CI - drop VFX 2021, add VFX 2024 + H20.5
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-04 16:20:20 -07:00
Dan Bailey a8a906ad36 Drop AX test from latest weekly
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-04 16:16:16 -07:00
Dan Bailey 5ddaa05159 ADD LLVM_DIR to latest Mac OS
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-04 16:16:05 -07:00
Dan Bailey 2232aef43a Add Houdini 20.5 to weekly CI
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-04 15:40:03 -07:00
Dan Bailey 9023a31284 Fix a couple of small windows CI / vcpkg bugs
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-10-04 11:18:06 -07:00
Dan Bailey 69e479ea5e Merge pull request #1913 from danrbailey/ubsan_unused
Fix ubsan weekly CI check
2024-10-03 13:51:38 -07:00
ghurstunither 4c51bb6ea0 Create 2024-09-24.md
09-24-24 meeting notes

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-09-25 10:35:27 -04:00
Dan Bailey 4778ac6540 No deprecated declarations
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-09-24 21:15:05 -07:00
Dan Bailey 221971480d Fix unused variable in AX
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-09-24 21:15:05 -07:00
Dan Bailey de7a496feb Merge pull request #1900 from danrbailey/tsc_notes_100924
Meeting notes 10th Sept
2024-09-18 10:00:26 -07:00
Dan Bailey 3b473dd5d5 Merge pull request #1775 from danrbailey/tree_adapter_improvements
Update TreeAdapter to work with const inputs
2024-09-18 09:03:04 -07:00
Dan Bailey 1f9a882ded Merge pull request #1789 from danrbailey/move_value_accessors_to_tree
Adjust existing grid API to move ValueAccessor methods to the tree
2024-09-18 09:02:21 -07:00
Dan Bailey 355120cb88 Merge pull request #1904 from AcademySoftwareFoundation/feature/boost_numeric
Make Boost Headers an Optional Dependency
2024-09-18 09:00:30 -07:00
Jonathan Swartz ba9d6c236b Merge pull request #1877 from swahtz/js/whitespace_ci_update
Updated spacesnottabs CI action to ignore other binary format files included in fVDB
2024-09-18 18:39:36 +12:00
Jonathan Swartz 0cbb234a75 Merge pull request #1905 from swahtz/fvdb_ci_ignores
fVDB CI paths-ignore
2024-09-18 18:39:13 +12:00
Jonathan Swartz af4304aa4b Ensure changes to fvdb sub-project don't trigger other project CI workflows
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2024-09-18 17:06:26 +12:00
Dan Bailey 0a3de16d13 Merge remote-tracking branch 'upstream/master' into tree_adapter_improvements 2024-09-17 21:50:08 -07:00
Dan Bailey 289c99a244 Merge remote-tracking branch 'upstream/master' into move_value_accessors_to_tree 2024-09-17 21:48:50 -07:00
Dan Bailey 659ef6dd5d Merge pull request #1723 from Idclip/remove_boost_promote
Replace boost conversion_traits with std::common_type
2024-09-17 21:44:50 -07:00
Jonathan Swartz 1b2491ccfa Merge branch 'master' into js/whitespace_ci_update
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2024-09-18 16:44:45 +12:00
Dan Bailey 82ec5a0e45 Merge branch 'feature/boost_numeric' into remove_boost_promote
Signed-off-by: Dan Bailey <5251654+danrbailey@users.noreply.github.com>
2024-09-17 21:43:33 -07:00
Dan Bailey 5331ae5de8 Merge pull request #1903 from danrbailey/windows_ci
Move all debug and static windows builds to the weekly CI
2024-09-17 14:51:38 -07:00
Dan Bailey c2b179f028 Merge pull request #1898 from danrbailey/fix_macos_houdini
Fix MacOS Houdini Build
2024-09-17 14:51:05 -07:00
Dan Bailey 7fad116fa6 Move all debug and static windows builds to the weekly CI
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-09-16 16:20:57 -07:00
Dan Bailey 1ac05f2d24 Merge remote-tracking branch 'upstream/master' into fix_macos_houdini 2024-09-16 13:05:21 -07:00
Dan Bailey ac497c2d12 Install tbb in CI only when not building for Houdini
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-09-16 13:04:29 -07:00
Dan Bailey 8340096819 Merge pull request #1899 from danrbailey/fix_nanovdb_header
Fix NanoVDB Build
2024-09-16 10:30:43 -07:00
Dan Bailey 8ea30d58b1 Merge pull request #1897 from danrbailey/windows_static
Fix Windows Static Build
2024-09-16 10:29:28 -07:00
Dan Bailey 915cfdf412 Update notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-09-13 20:18:36 -07:00
Dan Bailey 383aa1590f Merge pull request #1901 from AcademySoftwareFoundation/feature/houdini_arm64
Use Apple Silicon Houdini Downloads
2024-09-13 20:16:50 -07:00
Dan Bailey 33b30ec98d Meeting notes
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-09-13 15:53:05 -07:00
Dan Bailey 8e4365eb53 Fix missing nanovdb header
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-09-13 14:48:07 -07:00
Dan Bailey fcc8895c50 Use Apple Silicon Houdini Downloads
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-09-13 14:42:43 -07:00
Dan Bailey d90e61f5ee Use Apple Silicon Houdini Downloads and Houdini tbb instead of homebrew tbb
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-09-13 14:33:56 -07:00
Dan Bailey cd17db1aad Update llvm paths for Apple silicon homebrew paths
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-09-13 11:02:44 -07:00
Dan Bailey c04d4cf7d7 Use homebrew version of bash instead of mac version
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-09-13 10:35:19 -07:00
Dan Bailey f85ecbe95b Add missing backslash
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-09-13 10:35:08 -07:00
Dan Bailey 26c45ddc17 Remove Blosc prefix/suffix handling in FindBlosc.cmake
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-09-13 00:12:06 -07:00
apradhana a759e477aa Merge pull request #1870 from apradhana/more_ci_fixes
More CI Fixes
2024-09-10 13:37:11 -07:00
apradhana 60d2343491 Merge pull request #1894 from apradhana/fix_fix_vec3h_regression
Fixing build issue caused by adding cwiseAdd in `math/Vec3.h`
2024-09-10 13:36:17 -07:00
jmlait 81869dbb43 Merge pull request #1883 from sideeffects/sendupstream_maintainerchange
Rename Committer to Maintainer
2024-09-10 15:27:12 -04:00
Jeff Lait d6b688717c Properly spell Gregory.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2024-09-10 15:24:59 -04:00
jmlait e7f262e462 Merge pull request #1882 from sideeffects/sendupstream_tscnotes_20240827
Meeting notes of August 27, 2024.
2024-09-10 15:23:47 -04:00
apradhana 3ed0dc89d1 Template specialization of cwiseAdd for Vec3 half should be in Types.h and not in Vec3.h.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2024-09-10 12:17:13 -07:00
apradhana 5a547f1339 Merge pull request #1893 from apradhana/fix_vec3h_regression
Bug fix: the half type doesn't satisfy std::is_arithmetic so the operator doesn't get instantiated
2024-09-10 11:29:41 -07:00
apradhana 59c23b4d71 Add cwiseAdd to Vec3.h because half type doesn't satisfy std::is_arithmetic so the operator doesn't get instantiated.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2024-09-10 10:53:22 -07:00
Andre Pradhana 2e5f5d4af8 Add comments, add conditional based on matrix.config.image 2021 and 2022, remove sudo.
Signed-off-by: Andre Pradhana <andre.pradhana@gmail.com>
2024-09-07 16:26:07 -07:00
Jeff Lait 56d06d12b6 Rename Committer to Maintainer
Ensure all TSC are Maintainers
Add Jonathan Swartz as a Maintainer.
Adjust voting procedure for new TSC members to require TSC approval, not
maintainer approval.

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2024-08-27 15:56:14 -04:00
Jeff Lait 47333303b4 Meeting notes of August 27, 2024.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2024-08-27 15:40:55 -04:00
Jonathan Swartz bb35635fe8 Updated spacesnottabs CI action to ignore other binary format files included in fvdb
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
2024-08-21 15:47:38 +12:00
Ken Museth 6719224567 fixed precision issue in unit-test on OSX M3 (#1875)
Signed-off-by: kmuseth <ken.museth@gmail.com>
2024-08-16 19:00:39 -07:00
apradhana d74e2c4cd2 Merge pull request #1872 from kmuseth/update_CONTRIBUTING.md
updated CONTRIBUTING.md
2024-08-13 16:35:34 -07:00
kmuseth eac8ea3760 updated CONTRIBUTING.md
Signed-off-by: kmuseth <ken.museth@gmail.com>
2024-08-13 16:31:21 -07:00
apradhana f77872a80d Fix NanoVDB CI: nanovdb lite and on Windows: upgrade to CUDA 12.4 for Visual Studio 2022, allow use of unsecure node version, use node 16 in ax, build, docs, houdini, and weekly workflow.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2024-08-13 12:41:16 -07:00
apradhana 48dd8bfb26 Merge pull request #1791 from ghurstunither/Various_tsc_meeting_notes_2023_2024
Various TSC meeting notes
2024-08-13 10:32:55 -07:00
apradhana f199c395d6 Merge pull request #1805 from apradhana/TSC_April30_2024
Add TSC meeting notes from April 30, 2024.
2024-08-13 10:32:22 -07:00
apradhana 749333247a Merge pull request #1837 from Idclip/ci_fixes
Fixed Various CI
2024-08-13 10:29:50 -07:00
apradhana 3f63706cb9 Merge pull request #1859 from apradhana/TSC_July02-2024
Add meeting notes from July 2, 2024.
2024-08-13 10:28:34 -07:00
Dan Bailey 76416e8d3f Adding ILM to the re-license note (#1864)
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-07-25 08:40:10 -07:00
apradhana aea0f0e022 Merge pull request #1807 from kmuseth/feature/nanovdb_v32.7
NanoVDB v32.7.0
2024-07-16 10:12:08 -07:00
apradhana 569eda13ba Add updateFiles.py, bug fix in updateFiles.sh, add pending changes for
NanoVDB 32.7.

Signed-off-by: apradhana <andre.pradhana@gmail.com>
2024-07-15 20:48:26 -07:00
apradhana 02245e3687 Add meeting notes from June 25 and July 2, 2024.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2024-07-15 20:44:38 -07:00
Ken Museth a836f7e2c2 fixed typo
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2024-06-28 09:47:42 -07:00
Luc35b ffdc8810ca Update RE-LICENSE_NOTE.txt (#1853)
Signed-off-by: Luc35b <87685115+Luc35b@users.noreply.github.com>
2024-06-27 20:10:46 +00:00
kaarrot 72b45d2da6 Update RE-LICENSE_NOTE.txt (#1852)
Signed-off-by: kaarrot <8253037+kaarrot@users.noreply.github.com>
2024-06-27 20:10:07 +00:00
Tom Cnops 164c1f5cb5 Update RE-LICENSE_NOTE.txt (#1851)
Signed-off-by: Tom Cnops <60213975+tom-cnops@users.noreply.github.com>
2024-06-27 20:04:16 +00:00
David Aguilar e8b0bc9707 RE-LICENSE_NOTE: add Walt Disney Animation Studios approval to relicense (#1849)
Signed-off-by: Nick Cannon <nick.cannon@disneyanimation.com>
Signed-off-by: David Aguilar <david.aguilar@disneyanimation.com>
2024-06-27 20:03:01 +00:00
melsdnegandJohn Mertic c917f93c31 Update RE-LICENSE_NOTE.txt (#1845)
Signed-off-by: melsdneg <mels@DNEG.com>
Signed-off-by: John Mertic <jmertic@linuxfoundation.org>
Co-authored-by: John Mertic <jmertic@linuxfoundation.org>
2024-06-27 12:57:39 -07:00
Jérémie Dumas 705fa89d5f Add Adobe approval to the re-license file. (#1850)
Signed-off-by: Jérémie Dumas <jedumas@adobe.com>
2024-06-27 12:56:43 -07:00
Mike Dolan 222c9ec5ab Update RE-LICENSE_NOTE.txt (#1856)
Signed-off-by: Mike Dolan <mdolan@linuxfoundation.org>
2024-06-27 12:54:04 -07:00
Ken Museth 1aaa3d6397 Merge remote-tracking branch 'upstream/master' into feature/nanovdb_v32.7 2024-06-24 13:13:50 -07:00
Nick Avramoussis aed29bc0a3 Switch macos runners to intel variants for now
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2024-06-15 16:54:01 +12:00
Nick Avramoussis dd1dc87478 Fixed Various CI
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2024-06-15 16:54:01 +12:00
jmlait 80e063d142 Merge pull request #1839 from bpmckinnon/RelicenseUbisoft
Add Ubisoft approval to relicense
2024-06-11 14:13:54 -04:00
jmlait 45d683a99f Merge pull request #1838 from davvid/relicensing
RE-LICENSE_NOTE: add my relicensing note
2024-06-11 14:12:53 -04:00
jmlait e8c0f17531 Merge branch 'master' into relicensing
Signed-off-by: jmlait <jlait@andorra.sidefx.com>
2024-06-11 14:12:23 -04:00
jmlait 994ced175d Merge pull request #1842 from BrianSharpe/master
Adding "Brian Sharpe" to the RE-LICENCE node
2024-06-11 14:11:23 -04:00
jmlait 5cbca7cda1 Merge branch 'master' into master
Signed-off-by: jmlait <jlait@andorra.sidefx.com>
2024-06-11 14:11:02 -04:00
jmlait 8c37463d43 Merge pull request #1843 from KartikShrivastava/patch-1
Update RE-LICENSE_NOTE.txt
2024-06-11 14:10:19 -04:00
jmlait 829380a5e2 Merge branch 'master' into patch-1
Signed-off-by: jmlait <jlait@andorra.sidefx.com>
2024-06-11 14:09:46 -04:00
jmlait cd6f9d948e Merge pull request #1841 from 3Descape/patch-1
Update RE-LICENSE_NOTE.txt
2024-06-11 14:08:59 -04:00
jmlait acc60e2c7a Merge pull request #1848 from ghurstunither/master
Update RE-LICENSE_NOTE.txt
2024-06-11 14:05:46 -04:00
ghurstunither d84bb4a752 Update RE-LICENSE_NOTE.txt
Adds approval for Apache License switch on behalf of United Therapeutics Corporation.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-06-11 12:54:58 -04:00
Kartik bb7daa4d23 Update RE-LICENSE_NOTE.txt
Signed-off-by: Kartik <shrivastavakartik19@gmail.com>
2024-06-07 16:07:13 +05:30
Brian Sharpe 19507f8928 Adding "Brian Sharpe" to the RE-LICENCE node
Signed-off-by: Brian Sharpe <brisharpe@yahoo.com>
2024-06-07 10:42:51 +12:00
3Descape 3a3a2fc3d7 Update RE-LICENSE_NOTE.txt
Signed-off-by: 3Descape <mlackner@student.tugraz.at>
2024-06-06 18:31:45 +02:00
Brian McKinnon ff1c0c82d7 Add Ubisoft approval to relicense
Signed-off-by: Brian McKinnon <brian.mckinnon@ubisoft.com>
2024-06-05 16:49:50 -05:00
David Aguilar afdcc36534 RE-LICENSE_NOTE: add my relicensing note
Signed-off-by: David Aguilar <davvid@gmail.com>
2024-06-01 14:14:42 -07:00
Benedikt Mersch cbe3270cdb Update RE-LICENSE_NOTE.txt (#1836)
Signed-off-by: Benedikt Mersch <benedikt.mersch@gmail.com>
2024-05-29 13:59:55 -07:00
Dan Bailey c1aa9a7b44 Merge pull request #1827 from MehdiChinoune/patch-1
Update RE-LICENSE_NOTE.txt
2024-05-28 11:16:19 -07:00
jmlait e724f5bb70 Merge pull request #1828 from malaterre/patch-1
Update RE-LICENSE_NOTE.txt
2024-05-28 14:16:04 -04:00
jmlait 35db16bb01 Merge branch 'master' into patch-1
Signed-off-by: jmlait <jlait@andorra.sidefx.com>
2024-05-28 14:15:56 -04:00
Brecht SandersandKen Museth 967a936dfb Update RE-LICENSE_NOTE.txt (#1829)
Added my name as requested to agree to license change

Signed-off-by: Brecht Sanders <brecht@sanders.org>
Signed-off-by: Ken Museth <1495380+kmuseth@users.noreply.github.com>
Co-authored-by: Ken Museth <1495380+kmuseth@users.noreply.github.com>
2024-05-28 11:15:01 -07:00
jmlait 0a9cab3e63 Merge pull request #1830 from nachovizzo/patch-1
Update RE-LICENSE_NOTE.txt
2024-05-28 14:13:50 -04:00
jmlait fe9c13b754 Merge branch 'master' into patch-1
Signed-off-by: jmlait <jlait@andorra.sidefx.com>
2024-05-28 14:13:41 -04:00
jmlait d1e1353cf2 Merge pull request #1831 from BenFrantzDale/patch-1
Update RE-LICENSE_NOTE.txt
2024-05-28 14:12:25 -04:00
jmlait c247ea51aa Merge branch 'master' into patch-1
Signed-off-by: jmlait <jlait@andorra.sidefx.com>
2024-05-28 14:12:12 -04:00
jmlait 9b149047a7 Merge pull request #1833 from gaida-exe/license
Update RE-LICENSE_NOTE.txt
2024-05-28 14:11:10 -04:00
jmlait cdd121e4e6 Merge branch 'master' into license
Signed-off-by: jmlait <jlait@andorra.sidefx.com>
2024-05-28 14:10:42 -04:00
Alessio Quaglino 1d50a18f31 Update RE-LICENSE_NOTE.txt (#1835)
Signed-off-by: Alessio Quaglino <102665781+quagla@users.noreply.github.com>
2024-05-28 11:09:19 -07:00
Sebastian Gaida 331c7eda68 add name
Signed-off-by: Sebastian Gaida <sebastian-gaida@gmx.de>
2024-05-27 20:30:02 +02:00
Ben FrantzDale beb298fcac Update RE-LICENSE_NOTE.txt
Add myself

Signed-off-by: Ben FrantzDale <benfrantzdale@gmail.com>
2024-05-24 11:08:02 -04:00
Ignacio Vizzo b3fed52898 Update RE-LICENSE_NOTE.txt
Signed-off-by: Ignacio Vizzo <ignacio@dexory.com>
2024-05-24 12:31:16 +02:00
Mathieu Malaterre 7e8b5bc9d4 Update RE-LICENSE_NOTE.txt
As requested by Dhruv Govil by email.

Signed-off-by: Mathieu Malaterre <mathieu.malaterre@gmail.com>
2024-05-24 08:18:12 +02:00
Fredrik Salomonsson 5f33747371 Digital Domain 3.0, Inc. approved relicense from MPL-2.0 to Apache-2.0 (#1822)
Our approval is marked by the addition of our name to the
RE-LICENSE_NOTE.txt.

Signed-off-by: Fredrik Salomonsson <fredriks@d2.com>
2024-05-23 20:27:26 -07:00
مهدي شينون (Mehdi Chinoune) 5e189c674d Update RE-LICENSE_NOTE.txt
Signed-off-by: مهدي شينون (Mehdi Chinoune) <79349457+MehdiChinoune@users.noreply.github.com>
2024-05-23 23:16:24 +01:00
jmlait 11fedeaad0 Merge pull request #1823 from sideeffects/sendupstream_tscnotes20240520
TSC Meeting Notes.
2024-05-23 13:31:47 -04:00
Guy Martin 64a788cd22 Update RE-LICENSE_NOTE.txt (#1825)
Added NVIDIA's acceptance of relicense

Signed-off-by: Guy Martin <guy.w.martin@gmail.com>
2024-05-22 15:11:26 -07:00
jmlait 9169920786 Merge pull request #1816 from brechtvl/relicense
Add Blender Foundation to Apache relicense note
2024-05-22 16:55:28 -04:00
Jeff Lait 431995dd63 TSC Meeting Notes.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2024-05-22 16:48:21 -04:00
Ken Museth d813f6d97d addressed review comments
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2024-05-21 16:33:36 -07:00
Tom Matterson f04f2f6864 Added feature to read points into vdb_tool using Point Data Abstraction Library (PDAL)
* Uses any available pdal plugin to read input file
* Writes RGB into Cd channel of points (also extended to PTS implementation)
* Adds a requirement on PDAL, so hidden behind a feature VDB_TOOL_USE_PDAL - off by default

Signed-off-by: Tom Matterson <tommatterson@gmail.com>
2024-05-20 10:10:41 +12:00
Brecht Van Lommel dd0b4aa91e Add Blender Foundation to Apache relicense note
Signed-off-by: Brecht Van Lommel <brecht@blender.org>
2024-05-15 12:59:03 +02:00
Ken Museth d57ab80d00 improved documentation
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2024-05-14 15:06:58 -07:00
jmlait e1b176f437 Merge pull request #1813 from sideeffects/sendupstream_relicense
MPL to Apache relicense
2024-05-14 14:03:10 -04:00
Jeff Lait fcb33c9246 Side Effects Software Inc. have approved the request to relicense our
contributions to OpenVDB from MPL-2.0 to Apache-2.0.

Our approval is marked by the addition of our name to the
RE-LICENSE_NOTE.txt

Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2024-05-13 15:23:36 -04:00
matthewlow-dwa e1ff3e3db8 Add DWA to Apache 2.0 RE-LICENSE_NOTE.txt (#1810)
Signed-off-by: Matthew Low <Matthew.Low@dreamworks.com>
2024-05-10 08:12:10 -07:00
Ken Museth f591ab1218 fixed readGrids so it works with raw grid buffers
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2024-05-08 15:10:59 -07:00
Ken Museth 02ec97a7f7 fix to CMakeLists.txt
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2024-05-07 21:58:35 -07:00
Ken Museth 5bc540d5c9 initial commit of NanoVDB v32.7.0
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2024-05-07 21:47:13 -07:00
Ken Museth a7c6638c0c added RE-LICENSE_NOTE.txt (#1806)
Signed-off-by: Ken Museth <ken.museth@gmail.com>
2024-05-07 21:37:10 -07:00
apradhana 1c58340b32 Add TSC meeting notes from April 30, 2024.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2024-05-07 10:53:49 -07:00
jmlait 08409f0044 Merge pull request #1796 from BrianSharpe/master
guarding UINT64_C in nanovdb
2024-04-23 20:20:17 -04:00
Brian Sharpe 0f90fc572b guarding UINT64_C in nanovdb (for NVRTC users who have it defined already)
Signed-off-by: Brian Sharpe <brisharpe@yahoo.com>
2024-04-24 11:10:56 +12:00
ghurstunither aa208d1e29 Create 2024-04-23.md
Adds notes from April 23, 2024

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-04-23 14:50:53 -04:00
ghurstunither b5c16ef9cf Various TSC meeting notes
Various TSC meeting notes

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-04-23 14:50:37 -04:00
ghurstunither 4c3a5affa6 Prevents integer overflow
Prevent integer overflow on grids with many nodes or leafs.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-04-16 13:43:53 -04:00
ghurstunither abe5adf7ec Update LevelSetFilter.h
Adds fillet filter, which rounds off concave edges to create a smoother transition between surfaces.

Signed-off-by: ghurstunither <62885595+ghurstunither@users.noreply.github.com>
2024-04-16 11:46:14 -04:00
Dan Bailey df8f9c8b21 Adjust existing grid API to move ValueAccessor methods to the tree
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-04-12 13:21:52 -07:00
apradhana 45d2ce4bd6 Merge pull request #1781 from apradhana/TSC_March12_2024
TSC Meeting Notes March 12, 2024
2024-03-26 12:04:25 -07:00
jmlait 3331695e53 Merge pull request #1778 from sideeffects/sendupstream_tsc20240319
Meeting notes of March 19th.
2024-03-26 14:08:16 -04:00
apradhana 422545d017 Add Meeting Notes for March 12, 2024.
Signed-off-by: apradhana <andre.pradhana@gmail.com>
2024-03-26 10:49:42 -07:00
Jeff Lait 266a0c0cc3 Meeting notes of March 19th.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
2024-03-20 16:13:06 -04:00
Dan Bailey c4b5143480 Merge pull request #1776 from danrbailey/macos_brew_issue
Workaround for python3 brew mac CI issue on GitHub runners
2024-03-18 15:16:21 -07:00
Dan Bailey c910412ac2 Add workaround to install_macos script
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-03-13 15:57:56 -07:00
Dan Bailey b7e1c505b4 Remove python3 /usr/local/bin links on brew update
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-03-13 14:39:54 -07:00
Dan Bailey 6b9a6c23f5 Use non-const Grid in const version of type trait
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-03-12 19:14:01 -07:00
Dan Bailey 5862e8db76 Update TreeAdapter to work correctly with all const arguments and add extensive unit tests
Signed-off-by: Dan Bailey <danbailey@ilm.com>
2024-03-11 20:55:30 -07:00
Brian McKinnon 480d8642db Replace boost conversion_traits with std::common_type and removed the remaining mandatory boost dependency
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
2023-12-06 16:33:41 +13:00
1110 changed files with 164692 additions and 41670 deletions
+33 -26
View File
@@ -14,6 +14,7 @@ on:
- 'nanovdb/**'
- 'openvdb_maya/**'
- 'openvdb_houdini/**'
- 'fvdb/**'
- 'pendingchanges/**'
- '**.md'
pull_request:
@@ -26,11 +27,9 @@ on:
- 'nanovdb/**'
- 'openvdb_maya/**'
- 'openvdb_houdini/**'
- 'fvdb/**'
- 'pendingchanges/**'
- '**.md'
schedule:
# run this workflow every day 7am UTC
- cron: '0 7 * * *'
workflow_dispatch:
inputs:
type:
@@ -53,7 +52,7 @@ jobs:
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'linux'
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:
@@ -65,19 +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: '2022-clang11', cxx: 'clang++', build: 'Release', cmake: '' }
- { image: '2022-clang11', cxx: 'g++', build: 'Release', cmake: '' }
- { image: '2021-clang10', cxx: 'clang++', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' }
- { image: '2021-clang10', cxx: 'g++', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' }
- { 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: pybind11
#if: contains(matrix.config.image, '2023') == false
run: ./ci/install_pybind11.sh 2.10.0
- name: nanobind
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,24 +123,30 @@ jobs:
strategy:
matrix:
config:
#@note llvm10 never got its own brew formula...
- { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '11' }
- { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '12' }
- { runner: 'macos-latest', 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
- name: install_deps
run: ./ci/install_macos.sh ${{ matrix.config.llvm }}
run: |
./ci/install_macos.sh ${{ matrix.config.llvm }}
./ci/install_tbb_macos.sh
- name: build
run: >
./ci/build.sh -v
--build-type=${{ matrix.config.build }}
--components="core,python,bin,axcore,axbin,axtest"
--components="core,python,axcore,axbin,axtest"
--cargs=\"
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
-DUSE_EXPLICIT_INSTANTIATION=OFF
-DLLVM_DIR=/usr/local/opt/llvm@${{ matrix.config.llvm }}/lib/cmake/llvm
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
-DLLVM_DIR=/opt/homebrew/opt/llvm@${{ matrix.config.llvm }}/lib/cmake/llvm
\"
- name: test
run: cd build && ctest -V
@@ -150,15 +157,15 @@ jobs:
if: |
github.event_name == 'workflow_dispatch' &&
github.event.inputs.type == 'grammar'
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' }}
container:
image: aswf/ci-openvdb:2022-clang11
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
+61 -64
View File
@@ -15,9 +15,12 @@ on:
- 'openvdb_houdini/**'
- 'openvdb_ax/**'
- 'nanovdb/**'
- 'fvdb/**'
- 'pendingchanges/**'
- '**.md'
pull_request:
# Add 'ready_for_review' to run CI when a draft PR is marked ready.
types: [opened, synchronize, reopened, ready_for_review]
branches:
- '**'
paths-ignore:
@@ -28,14 +31,9 @@ on:
- 'openvdb_houdini/**'
- 'openvdb_ax/**'
- 'nanovdb/**'
- 'fvdb/**'
- 'pendingchanges/**'
- '**.md'
schedule:
# run this workflow every day at 7am UTC except Monday
- cron: '0 7 * * 0,2-6'
# run this workflow Monday 7am UTC
# warning: This pattern is checked in various places below
- cron: '0 7 * * 1'
workflow_dispatch:
inputs:
type:
@@ -57,15 +55,13 @@ jobs:
# VFX platform jobs. These are run on the appropriate CentOS images from
# the provided ASWF docker containers
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'linux'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
(github.event_name == 'push' ||
(github.event_name == 'pull_request' && github.event.pull_request.draft == false) ||
(github.event_name == 'workflow_dispatch' &&
(github.event.inputs.type == 'all' || github.event.inputs.type == 'linux')))
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:
@@ -74,22 +70,22 @@ jobs:
strategy:
matrix:
config:
# @note we specifically use clang15.0 (not clang15) here as the newest
# versions of the clang15.X containers have some issues with the GLFW
# installation
- { cxx: clang++, image: '2023-clang15.0', abi: '11', build: 'Release', cmake: '' }
- { cxx: g++, image: '2023-clang15.0', abi: '11', build: 'Release', cmake: '' }
- { cxx: clang++, image: '2022-clang11', abi: '11', build: 'Debug', cmake: '' }
- { cxx: clang++, image: '2022-clang11', abi: '10', build: 'Release', cmake: '' }
- { cxx: g++, image: '2022-clang11', abi: '10', build: 'Release', cmake: '' }
- { cxx: clang++, image: '2022-clang11', abi: '9', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' }
- { cxx: g++, image: '2022-clang11', abi: '9', 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: pybind11
#if: contains(matrix.config.image, '2023') == false
run: ./ci/install_pybind11.sh 2.10.0
- name: nanobind
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
@@ -113,9 +109,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
@@ -125,29 +120,17 @@ jobs:
run: ccache --evict-older-than 1d
windows:
# Windows CI. Tests static and dynamic builds with MT and MD respectively.
# Windows CI. Tests a dynamic build with MD.
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'win'
(github.event_name == 'push' ||
(github.event_name == 'pull_request' && github.event.pull_request.draft == false) ||
(github.event_name == 'workflow_dispatch' &&
(github.event.inputs.type == 'all' || github.event.inputs.type == 'win')))
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'windows-2022-8c-32g-300h') || 'windows-latest' }}
name: windows-vc:${{ matrix.config.vc }}-type:${{ matrix.config.build }}
name: windows
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.config.vc }}
VCPKG_DEFAULT_TRIPLET: x64-windows
strategy:
matrix:
config:
# static build of blosc from vcpkg does not build internal sources.
# USE_STATIC_DEPENDENCIES is required for IlmBase/OpenEXR defines and
# Boost as both shared and static libs are installed.
# USE_EXPLICIT_INSTANTIATION is disabled for debug static libraries
# due to disk space constraints
# @note Commented out the static debug build due to linker OOM LNK1102
- { vc: 'x64-windows-static', components: 'core,bin,view,render,test', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON' }
#- { vc: 'x64-windows-static', components: 'core,bin,view,render,test', build: 'Debug', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON -DUSE_EXPLICIT_INSTANTIATION=OFF' }
- { vc: 'x64-windows', components: 'core,bin,view,render,python,test', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' }
- { vc: 'x64-windows', components: 'core,bin,view,render,python,test', build: 'Debug', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' }
#- { vc: 'x64-windows', build: 'Release', cmake: '-G \"MinGW Makefiles\" -DOPENVDB_CORE_STATIC=OFF' }
fail-fast: false
steps:
- uses: actions/checkout@v3
@@ -155,17 +138,21 @@ jobs:
shell: pwsh
run: |
# note: system path must be modified in a previous step to it's use
echo "$Env:VCPKG_INSTALLATION_ROOT\installed\${{ matrix.config.vc }}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "${{github.workspace}}\build\openvdb\openvdb\${{ matrix.config.build }}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "$Env:VCPKG_INSTALLATION_ROOT\installed\x64-windows\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "${{github.workspace}}\build\openvdb\openvdb\Release" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: install
run: ./ci/install_windows.sh
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
--config=${{ matrix.config.build }}
--components=${{ matrix.config.components }}
--config='Release'
--components='core,bin,view,render,python,test'
--cargs=\'
${{ matrix.config.cmake }}
-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF
-DMSVC_COMPRESS_PDB=ON
-DUSE_EXR=ON
-DUSE_PNG=ON
@@ -176,27 +163,37 @@ jobs:
# Print the build directy size (monitor if we're hitting runner limits)
run: du -h build
- name: test
# Always run tests on weekly builds but skip Debug on commits as they take a while.
# https://github.community/t/distinct-job-for-each-schedule/17811/2
if: contains(github.event.schedule, '0 7 * * 1') || matrix.config.build == 'Release'
run: cd build && ctest -V -C ${{ matrix.config.build }}
run: cd build && ctest -V -C Release
macos:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'mac'
runs-on: macos-latest
(github.event_name == 'push' ||
(github.event_name == 'pull_request' && github.event.pull_request.draft == false) ||
(github.event_name == 'workflow_dispatch' &&
(github.event.inputs.type == 'all' || github.event.inputs.type == 'mac')))
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
run: ./ci/install_macos.sh
run: |
./ci/install_macos.sh
./ci/install_tbb_macos.sh
- name: build
run: >
./ci/build.sh -v
--build-type=Release
--components=\"core,python,bin,view,render,test\"
--cargs=\'
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
\'
- name: test
run: cd build && ctest -V
+41 -21
View File
@@ -11,7 +11,6 @@ on:
- 'CHANGES'
- 'openvdb_maya/**'
- 'pendingchanges/**'
- '**.md'
pull_request:
branches:
- '**'
@@ -19,7 +18,6 @@ on:
- 'CHANGES'
- 'openvdb_maya/**'
- 'pendingchanges/**'
- '**.md'
workflow_dispatch:
inputs:
deploy:
@@ -33,26 +31,41 @@ concurrency:
cancel-in-progress: true
jobs:
doxygen:
validate_docs:
# Cheap static checks that run before the heavier doxygen build:
# * every #include <...> referenced from a fenced code block in doc/ resolves
# * every github.com/.../blob/<branch>/<path> URL points to a file on disk
# Catches the class of docs-rot from issue #2161 (e.g. nanovdb::util ->
# nanovdb::tools rename) before the doxygen job runs.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set_up_python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: run_validator
run: python3 ci/validate_docs_references.py
doxygen:
needs: validate_docs
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:2022
image: aswf/ci-openvdb:2026
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: install_doxygen
run: ./ci/install_doxygen.sh 1_8_11
- name: pybind11
#if: contains(matrix.config.image, '2023') == false
run: ./ci/install_pybind11.sh 2.10.0
# - name: install_epydoc
# run: pip install epydoc
- name: install_latex
run: yum -y install texlive-latex-bin texlive-dvips texlive-collection-fontsrecommended texlive-collection-latexrecommended
run: ./ci/install_doxygen.sh 1_14_0
- name: nanobind
run: ./ci/install_nanobind.sh 2.5.0
- name: build
# Doxygen's native WARN_AS_ERROR=FAIL_ON_WARNINGS gates the docs build:
# any warning fails the job. FAIL_ON_WARNINGS still generates the docs and
# writes the full warning log first, so the artifact step below captures
# it for debugging. Enabled via OPENVDB_DOXYGEN_WARN_AS_ERROR (see
# doc/CMakeLists.txt).
run: >
./ci/build.sh -v
--build-type=Release
@@ -63,10 +76,18 @@ jobs:
-DOPENVDB_PYTHON_WRAP_ALL_GRID_TYPES=ON
-DUSE_EXPLICIT_INSTANTIATION=OFF
-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON
-DOPENVDB_DOXYGEN_WARN_AS_ERROR=ON
\"
# - name: epydoc
# run: |
# epydoc --html -o /usr/local/share/doc/OpenVDB/html/python pyopenvdb
- name: upload_doxygen_warning_log
# Always upload so contributors can debug failed PR builds without
# having to reproduce the doxygen environment locally.
if: always()
uses: actions/upload-artifact@v4
with:
name: doxygen-warnings
path: build/doc/doxygen.warnings.log
if-no-files-found: ignore
retention-days: 14
- name: pre_deploy
# Overwrite global SSH configuration
# https://github.com/peaceiris/actions-gh-pages/issues/719
@@ -84,7 +105,7 @@ jobs:
github.event.inputs.deploy == 'docs'
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
deploy_key: ${{ secrets.PRIVATE_KEY }}
publish_dir: /usr/local/share/doc/OpenVDB/html
destination_dir: documentation/doxygen
external_repository: AcademySoftwareFoundation/openvdb-website
@@ -105,7 +126,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:
@@ -155,4 +176,3 @@ jobs:
- Deployed from: AcademySoftwareFoundation/openvdb ${{ github.sha }}
Signed-off-by: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
+19 -25
View File
@@ -13,6 +13,7 @@ on:
- 'doc/**'
- 'nanovdb/**'
- 'openvdb_maya/**'
- 'fvdb/**'
- 'pendingchanges/**'
- '**.md'
pull_request:
@@ -24,11 +25,9 @@ on:
- 'doc/**'
- 'nanovdb/**'
- 'openvdb_maya/**'
- 'fvdb/**'
- 'pendingchanges/**'
- '**.md'
schedule:
# run this workflow every day 7am UTC
- cron: '0 7 * * *'
workflow_dispatch:
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
@@ -63,8 +62,8 @@ jobs:
if: >
${{ needs.checksecret.outputs.HOUDINI_SECRETS == 'true' ||
github.repository_owner == 'AcademySoftwareFoundation' }}
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.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:
@@ -73,22 +72,18 @@ jobs:
strategy:
matrix:
config:
- { cxx: clang++, image: '2023.0', hou_hash: '20_0-newabi', build: 'Release', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest' }
- { cxx: clang++, image: '2022', hou_hash: '20_0-oldabi', build: 'Release', components: 'core,hou' }
- { cxx: clang++, image: '2021', hou_hash: '19_5', build: 'Release', components: 'core,hou' }
- { cxx: clang++, image: '2023.0', hou_hash: '20_0-newabi', build: 'Debug', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest' }
- { cxx: g++, image: '2023.0', hou_hash: '20_0-newabi', build: 'Release', components: 'core,hou,bin,view,render,python,test,axcore,axbin,axtest' }
- { cxx: g++, image: '2022', hou_hash: '20_0-oldabi', build: 'Release', components: 'core,hou' }
- { 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:
# See note on this step in the Houdini weekly.yml job
# We can remove this when we no longer use < 2023 images
- name: remove zstd
run: yum -y remove zstd
- uses: actions/checkout@v3
- name: pybind11
#if: contains(matrix.config.image, '2023') == false
run: ./ci/install_pybind11.sh 2.10.0
- name: nanobind
run: ./ci/install_nanobind.sh 2.5.0
- name: install_gtest
run: ./ci/install_gtest.sh latest
- name: timestamp
id: timestamp
run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
@@ -119,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 \
@@ -129,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
@@ -159,15 +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: |
brew update
brew install bash gnu-getopt cmake boost glfw googletest openexr pybind11 llvm@15 cppunit
echo "/usr/local/opt/gnu-getopt/bin" >> $GITHUB_PATH
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,axtest" \
--components="core,hou,bin,view,render,test,axcore,axbin" \
--cargs=\" \
-DHOUDINI_ROOT=$HOME/houdini_install/hou \
-DOPENVDB_BUILD_HOUDINI_ABITESTS=OFF \
@@ -175,7 +168,8 @@ jobs:
-DDISABLE_CMAKE_SEARCH_PATHS=ON \
-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON \
-DUSE_EXPLICIT_INSTANTIATION=OFF \
-DLLVM_DIR=/usr/local/opt/llvm@15/lib/cmake/llvm \
-DLLVM_DIR=/opt/homebrew/opt/llvm@20/lib/cmake/llvm \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install \
\"
- name: test
run: cd build && ctest -V
+68 -63
View File
@@ -14,9 +14,12 @@ on:
- 'openvdb_ax/**'
- 'openvdb_maya/**'
- 'openvdb_houdini/**'
- 'fvdb/**'
- 'pendingchanges/**'
- '**.md'
pull_request:
# Add 'ready_for_review' to run CI when a draft PR is marked ready.
types: [opened, synchronize, reopened, ready_for_review]
branches:
- '**'
paths-ignore:
@@ -26,11 +29,9 @@ on:
- 'openvdb_ax/**'
- 'openvdb_maya/**'
- 'openvdb_houdini/**'
- 'fvdb/**'
- 'pendingchanges/**'
- '**.md'
schedule:
# run this workflow every day 7am UTC
- cron: '0 7 * * *'
workflow_dispatch:
inputs:
type:
@@ -45,11 +46,13 @@ concurrency:
jobs:
linux-nanovdb:
# push OR non-draft PR OR matching manual run
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'linux'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
(github.event_name == 'push' ||
(github.event_name == 'pull_request' && github.event.pull_request.draft == false) ||
(github.event_name == 'workflow_dispatch' &&
(github.event.inputs.type == 'all' || github.event.inputs.type == 'linux')))
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:
@@ -59,135 +62,137 @@ jobs:
strategy:
matrix:
config:
- { cxx: g++, image: '2022-clang11', build: 'Release' }
- { cxx: g++, image: '2022-clang11', build: 'Debug' }
- { cxx: clang++, image: '2022-clang11', build: 'Release' }
- { cxx: clang++, image: '2022-clang11', 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: install_cuda_11
- name: setup_cuda_12
run: |
yum -y install yum-utils
yum-config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo
echo "Installing cuda toolkit"
yum --enablerepo=epel -y install cuda-toolkit-11-6
echo "/usr/local/cuda-11.6/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=/usr/local/cuda-11.6/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
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: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'win'
(github.event_name == 'push' ||
(github.event_name == 'pull_request' && github.event.pull_request.draft == false) ||
(github.event_name == 'workflow_dispatch' &&
(github.event.inputs.type == 'all' || github.event.inputs.type == 'win')))
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'windows-2022-8c-32g-300h') || 'windows-latest' }}
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.config.vc }}
VCPKG_DEFAULT_TRIPLET: 'x64-windows'
visual_studio: "Visual Studio 17 2022"
cuda: "11.6.2"
cuda: "12.4.0"
strategy:
matrix:
config:
# static build of blosc from vcpkg does not build internal sources.
# USE_STATIC_DEPENDENCIES is required for IlmBase/OpenEXR defines and
# Boost as both shared and static libs are installed.
- { vc: 'x64-windows-static', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded' }
- { vc: 'x64-windows-static', build: 'Debug', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug' }
- { vc: 'x64-windows', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' }
- { vc: 'x64-windows', build: 'Debug', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' }
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: path
run: |
# note: system path must be modified in a previous step to it's use
echo "$Env:VCPKG_INSTALLATION_ROOT\installed\${{ matrix.config.vc }}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "${{github.workspace}}\build\openvdb\openvdb\${{ matrix.config.build }}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "$Env:VCPKG_INSTALLATION_ROOT\installed\x64-windows\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "${{github.workspace}}\build\openvdb\openvdb\Release" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: install_cuda
shell: powershell
run: .\ci\install_windows_cuda.ps1
- name: install_deps
shell: bash
run: |
vcpkg update
vcpkg install zlib tbb gtest blosc boost-iostreams boost-system boost-any boost-uuid boost-interprocess boost-algorithm
- name: install
shell: powershell
run: .\ci\install_windows.ps1
- name: install_numpy
shell: powershell
run: .\ci\install_windows_numpy.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=${{ matrix.config.build }}
--components=core,nano,nanotest,nanoexam,nanobench,nanotool
--config=Release
--components=core,nano,nanotest,nanoexam,nanobench,nanotool,nanopython,nanopytest
--cargs=\'
${{ matrix.config.cmake }}
-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: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'mac'
(github.event_name == 'push' ||
(github.event_name == 'pull_request' && github.event.pull_request.draft == false) ||
(github.event_name == 'workflow_dispatch' &&
(github.event.inputs.type == 'all' || github.event.inputs.type == 'mac')))
runs-on: ${{ matrix.config.runner }}
env:
CXX: ${{ matrix.config.cxx }}
strategy:
matrix:
config:
- { runner: 'macos-11', cxx: 'clang++', build: 'Release' }
- { runner: 'macos-11', 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
- name: install_deps
run: ./ci/install_macos.sh
run: |
./ci/install_macos.sh
./ci/install_tbb_macos.sh
- name: build
run: >
./ci/build.sh -v
--build-type=${{ matrix.config.build }}
--components=core,nano,nanotest,nanoexam,nanobench,nanotool
--cargs=\'-DUSE_EXPLICIT_INSTANTIATION=OFF -DNANOVDB_USE_CUDA=OFF -DNANOVDB_USE_OPENVDB=ON\'
--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 == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
(github.event_name == 'push' ||
(github.event_name == 'pull_request' && github.event.pull_request.draft == false) ||
(github.event_name == 'workflow_dispatch' &&
(github.event.inputs.type == 'all' || github.event.inputs.type == 'linux')))
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
container:
image: aswf/ci-openvdb:2024-clang17.2
steps:
- uses: actions/checkout@v3
- name: install_gtest
run: |
sudo apt-get update
sudo apt-get -q install -y libgtest-dev
run: ./ci/install_gtest.sh latest
- name: build_and_test
run: |
cd nanovdb/nanovdb
sudo mkdir .build
cd .build
sudo cmake -DUSE_EXPLICIT_INSTANTIATION=OFF -DNANOVDB_BUILD_UNITTESTS=ON ../
sudo cmake -DUSE_EXPLICIT_INSTANTIATION=OFF -DNANOVDB_BUILD_UNITTESTS=ON -DNANOVDB_USE_OPENVDB=OFF -DNANOVDB_USE_CUDA=OFF ../
sudo make -j8 install
sudo ctest -V
+55
View File
@@ -0,0 +1,55 @@
name: TEACHME
# Compile-checks the NanoVDB TEACHME tutorial against the real headers. Runs
# when EITHER the NanoVDB headers or the tutorial change, so an API change that
# breaks a lesson code block is caught here (the whole point of the harness).
# Compile-only: no GPU is required.
on:
push:
branches:
- 'master'
- 'feature/**'
- 'pr/**'
paths:
- 'nanovdb/nanovdb/**'
- 'doc/nanovdb/TEACHME/**'
- '.github/workflows/teachme.yml'
pull_request:
branches:
- '**'
paths:
- 'nanovdb/nanovdb/**'
- 'doc/nanovdb/TEACHME/**'
- '.github/workflows/teachme.yml'
workflow_dispatch:
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
teachme-docs-compile:
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
name: teachme-docs-compile
container:
image: aswf/ci-openvdb:2024-clang17.2
env:
# Compile-only target; matches the arch used by the other NanoVDB jobs.
CUDAARCHS: "80"
# Each TU compiles the kitchen-sink fixture (most of NanoVDB's heavy
# headers), so nvcc is memory-hungry. Cap parallel compiles to stay
# within the runner's RAM — unbounded -j OOMs the 8-core/32 GB runner.
TEACHME_JOBS: "4"
steps:
- uses: actions/checkout@v3
- name: setup_cuda_12
run: |
echo "/usr/local/cuda-12/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=/usr/local/cuda-12/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: run_harness
# Reference-checks every #include / prose header path, then compiles
# every tagged code block. The OpenVDB-dependent blocks are skipped
# (still reference-checked) when OpenVDB is not installed in the image.
run: bash doc/nanovdb/TEACHME/test/run.sh
+199 -72
View File
@@ -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,24 +70,13 @@ jobs:
strategy:
matrix:
config:
- { houdini_version: '19.5', platform: 'linux_x86_64_gcc9.3', hou_hash: '19_5' }
- { houdini_version: '20.0', platform: 'linux_x86_64_gcc9.3', hou_hash: '20_0-oldabi' }
- { 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:2023
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
@@ -111,8 +100,10 @@ jobs:
(github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'houdini')
# Note that macos-14 (current macos-latest) switches to M1. We could instead test
# the arm build here instead of the x86 one.
runs-on: macos-latest
name: macos-houdini-20
name: macos-houdini
env:
HOUDINI_CLIENT_ID: ${{ secrets.HOUDINI_CLIENT_ID }}
HOUDINI_SECRET_KEY: ${{ secrets.HOUDINI_SECRET_KEY }}
@@ -122,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_x86_64_clang12.0_11 --prod
run: ./ci/download_houdini.sh 21.0 macosx_arm64_clang15.0_14 --prod
- name: install_houdini
run: |
mkdir $HOME/houdini_install
@@ -145,34 +136,37 @@ 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:
# @note we specifically use clang15.0 (not clang15) here as the newest
# versions of the clang15.X containers have some issues with the GLFW
# installation
image: aswf/ci-openvdb:2023-clang15.0
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,axcore,axtest', 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,axcore,axtest', cmake: '' }
- { name: 'c++20', build: 'Release', components: 'core,test,axcore,axtest', cmake: '-DCMAKE_CXX_STANDARD=20' }
- { name: 'conf', build: 'Release', components: 'core,python,bin,view,render,test,axcore,axtest', 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: 'simd', image: '2026', build: 'Release', components: 'core,python,bin,view,render,test', cmake: '-DOPENVDB_X86_INSTRSET=7 -DUSE_VCL=ON' } # 7=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: pybind11
#if: contains(container.image, '2023') == false
run: ./ci/install_pybind11.sh 2.10.0
- name: nanobind
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
@@ -194,20 +188,23 @@ 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: '-D CMAKE_CXX_COMPILER=/usr/local/opt/llvm@15/bin/clang++' }
- { 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 pybind11-dev
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
fi
@@ -215,11 +212,75 @@ jobs:
run: >
./ci/build.sh -v
--build-type=Release
--components=\"core,axcore,python,bin,render,test,axtest,axbin\"
--cargs=\"-DCMAKE_CXX_STANDARD=20 -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install ${{ matrix.config.cmake }}\"
--components=\"core,axcore,python,bin,render,test,axbin\"
--cargs=\'
-DCMAKE_CXX_STANDARD=20
-DOPENVDB_USE_DELAYED_LOADING=OFF
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
${{ matrix.config.cmake }}
\'
- name: test
run: cd build && ctest -V
windows:
# Windows CI. Tests static and dynamic builds with MT and MD respectively.
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'win'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'windows-2022-8c-32g-300h') || 'windows-latest' }}
name: windows-vc:${{ matrix.config.vc }}-type:${{ matrix.config.build }}
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.config.vc }}
strategy:
matrix:
config:
# static build of blosc from vcpkg does not build internal sources.
# USE_STATIC_DEPENDENCIES is required for IlmBase/OpenEXR defines and
# Boost as both shared and static libs are installed.
# USE_EXPLICIT_INSTANTIATION is disabled for debug static libraries
# due to disk space constraints
- { vc: 'x64-windows-static', components: 'core,bin,view,render,test', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON' }
- { vc: 'x64-windows', components: 'core,bin,view,render,python,test', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' }
- { vc: 'x64-windows', components: 'core,bin,view,render,python,test', build: 'Debug', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' }
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: path
shell: pwsh
run: |
# note: system path must be modified in a previous step to it's use
echo "$Env:VCPKG_INSTALLATION_ROOT\installed\${{ matrix.config.vc }}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "${{github.workspace}}\build\openvdb\openvdb\${{ matrix.config.build }}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: install
shell: powershell
run: .\ci\install_windows.ps1
- name: install_numpy
if: matrix.config.vc == 'x64-windows'
shell: powershell
run: .\ci\install_windows_numpy.ps1
- name: build
run: >
./ci/build.sh -v
--config=${{ matrix.config.build }}
--components=${{ matrix.config.components }}
--cargs=\'
${{ matrix.config.cmake }}
-DMSVC_COMPRESS_PDB=ON
-DUSE_EXR=ON
-DUSE_PNG=ON
-DVCPKG_TARGET_TRIPLET=${VCPKG_DEFAULT_TRIPLET}
-DCMAKE_TOOLCHAIN_FILE=\"${VCPKG_INSTALLATION_ROOT}\\scripts\\buildsystems\\vcpkg.cmake\"
\'
- name: size
# Print the build directy size (monitor if we're hitting runner limits)
run: du -h build
- name: test
# Always run tests on weekly builds but skip Debug on commits as they take a while.
# https://github.community/t/distinct-job-for-each-schedule/17811/2
if: contains(github.event.schedule, '0 7 * * 1') || matrix.config.build == 'Release'
run: cd build && ctest -V -C ${{ matrix.config.build }}
#############################################################################
############################ AX Library Extras ##############################
#############################################################################
@@ -229,7 +290,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:
@@ -239,22 +300,14 @@ jobs:
strategy:
matrix:
config:
# Unified
- { image: '2022-clang14', cxx: 'clang++', build: 'Release', components: 'core,bin,axcore,axbin,axtest', cmake: '' }
- { image: '2022-clang14', cxx: 'g++', build: 'Release', components: 'core,bin,axcore,axbin,axtest', cmake: '' }
- { image: '2022-clang13', cxx: 'clang++', build: 'Release', components: 'core,bin,axcore,axbin,axtest', cmake: '' }
- { image: '2022-clang13', cxx: 'g++', build: 'Release', components: 'core,bin,axcore,axbin,axtest', cmake: '' }
# Standalone
- { image: '2021-clang10', cxx: 'clang++', build: 'Release', components: 'core', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' }
- { image: '2022-clang11', cxx: 'clang++', build: 'Debug', components: 'core', cmake: '' }
- { image: '2022-clang11', cxx: 'clang++', build: 'Release', components: 'core', cmake: '' }
- { image: '2022-clang11', cxx: 'g++', build: 'Release', components: 'core', 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: pybind11
#f: contains(matrix.config.image, '2023') == false
run: ./ci/install_pybind11.sh 2.10.0
- name: nanobind
run: ./ci/install_nanobind.sh 2.5.0
- name: build
run: >
./ci/build.sh -v
@@ -265,6 +318,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'
@@ -280,6 +334,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
@@ -291,21 +346,21 @@ jobs:
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'ax'
runs-on: macos-latest
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: '14' }
- { cxx: 'clang++', build: 'Release', llvm: '15' }
#- { cxx: 'clang++', build: 'Release', llvm: '16' } - not supported yet
- { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '20' }
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: install_deps
run: ./ci/install_macos.sh ${{ matrix.config.llvm }}
run: |
./ci/install_macos.sh ${{ matrix.config.llvm }}
./ci/install_tbb_macos.sh
- name: build
run: >
./ci/build.sh -v
@@ -314,7 +369,8 @@ jobs:
--cargs=\"
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
-DUSE_EXPLICIT_INSTANTIATION=OFF
-DLLVM_DIR=/usr/local/opt/llvm@${{ matrix.config.llvm }}/lib/cmake/llvm
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
-DLLVM_DIR=/opt/homebrew/opt/llvm@${{ matrix.config.llvm }}/lib/cmake/llvm
\"
- name: test
run: cd build && ctest -V
@@ -327,7 +383,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
@@ -341,16 +397,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
run: ./ci/install_windows.sh
shell: powershell
run: |
vcpkg update
vcpkg install tbb gtest
- name: build
run: >
./ci/build.sh -v
@@ -358,10 +420,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}\"
@@ -380,18 +445,77 @@ jobs:
################################## Blosc ####################################
#############################################################################
windows-nanovdb:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'win'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'windows-2022-8c-32g-300h') || 'windows-latest' }}
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.config.vc }}
visual_studio: "Visual Studio 17 2022"
cuda: "12.4.0"
strategy:
matrix:
config:
# static build of blosc from vcpkg does not build internal sources.
# USE_STATIC_DEPENDENCIES is required for IlmBase/OpenEXR defines and
# Boost as both shared and static libs are installed.
- { vc: 'x64-windows-static', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded' }
- { vc: 'x64-windows-static', build: 'Debug', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug' }
- { vc: 'x64-windows', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' }
- { vc: 'x64-windows', build: 'Debug', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' }
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: path
shell: powershell
run: |
# note: system path must be modified in a previous step to it's use
echo "$Env:VCPKG_INSTALLATION_ROOT\installed\${{ matrix.config.vc }}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "${{github.workspace}}\build\openvdb\openvdb\${{ matrix.config.build }}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: install_cuda
shell: powershell
run: .\ci\install_windows_cuda.ps1
- name: install
shell: powershell
run: .\ci\install_windows.ps1
- name: build
shell: bash
run: >
./ci/build.sh -v
--config=${{ matrix.config.build }}
--components=core,nano,nanotest,nanoexam,nanobench,nanotool
--cargs=\'
${{ matrix.config.cmake }}
-DMSVC_COMPRESS_PDB=ON
-DUSE_EXPLICIT_INSTANTIATION=OFF
-DNANOVDB_USE_CUDA=ON
-DCMAKE_CUDA_ARCHITECTURES="80"
-DNANOVDB_USE_OPENVDB=ON
-DVCPKG_TARGET_TRIPLET=${VCPKG_DEFAULT_TRIPLET}
-DCMAKE_TOOLCHAIN_FILE=\"${VCPKG_INSTALLATION_ROOT}\\scripts\\buildsystems\\vcpkg.cmake\"
\'
- name: test
shell: bash
run: cd build && ctest -V -E ".*cuda.*|.*mgpu.*"
#############################################################################
################################## Blosc ####################################
#############################################################################
linux-blosc:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'blosc'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
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
@@ -420,6 +544,9 @@ jobs:
# may not have this build type. See OpenVDBCXX.cmake
CXXFLAGS: "-gdwarf-4 -g3 -ggdb -Og"
steps:
- name: Enable Node 16
run: |
echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -478,7 +605,7 @@ jobs:
-strict
-extended
- name: upload_report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: abi_report
+4 -2
View File
@@ -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'
git grep -n " " -- ':!*/whitespace.yml' ':!tsc/meetings/*' ':!*.svg' ':!*.cmd' ':!*.png' ':!pendingchanges/*' ':!ext/*' ':!*.wlt' ':!*.jpg' ':!*.gif' ':!*.mp4' ':!*.pt' ':!*.pth' ':!*.nvdb' ':!*.npz'
test $? -eq 1
+522 -2
View File
@@ -1,7 +1,528 @@
OpenVDB Version History
=======================
Version 11.0.1 - 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
Build:
- Fixed a build issue with vdb_render on Windows with newer versions of
glew not including glu.h by default
- Fixed issues with newer versions of clang refusing to accept older
::template syntax
NanoVDB:
New features:
- Added support for multiple GPUs to DeviceBuffer
- Added a UnifiedBuffer class that wraps CUDA unified memory
- Added example for multiGPU sparse convolution
- Added CUDA utility functions for device queries
- Added functions to independently stop and compute the elapsed time for
timer classes
Improvements:
- Replaced CUB's CachingDeviceAllocator with the default asynchronous
stream ordered allocator in PointsToGrid for improved performance
Bug fix:
- Map is now properly transposed when converting NanoVDB to OpenVDB.
- Fixed ostream specializations being hidden within the nanovdb namespace
- Fixed a call to a non-existent method in GridBuild.h
Version 12.0.0 - October 31, 2024
OpenVDB is now licensed under the Apache 2.0 license, instead of the MPL 2.0 license.
This version introduces ABI changes relative to older major releases,
so to preserve ABI compatibility it might be necessary to define the
macro OPENVDB_ABI_VERSION_NUMBER=N, where, for example, N is 10 for
Houdini 20.0 and 11 for Houdini 20.5.
GCC 9 is no longer supported.
OpenVDB:
New features:
- Added fillet() method in tools::LevelSetFilter to round off concave edges
to create smoother transition between surfaces.
Improvements:
- Added openvdb::assertAbort to replace cassert and a
OPENVDB_ENABLE_ASSERTS cmake argument/compile define to toggle
assertions in OpenVDB code, independantly of NDEBUG. Asserts are
no longer enabled by default in when NDEBUG is absent (e.g.
Debug builds).
- Removed last traces of Boost when OPENVDB_USE_DELAYED_LOADING is OFF
[Reported by Brian McKinnon]
- RootNode code cleanup to eliminate redundant key conversion and
to create map values in-place.
- Add RootNode::deleteChildOrTile() to delete a child or tile of
the root node.
- ValueAccessors are now defined and created in the Tree class
instead of in the Grid class so that custom Tree implementations
may define and create their own ValueAccessors if desired.
- Added support for PDAL to vdb_tool [Contributed by Tom Matterson]
- LeafManager and NodeManager now use Index64 for leaf counts internally.
- Added RootNode::probeChild() const.
- Added RootNode::probeChild() and RootNode::probeConstChild().
- Added RootNode::probe() and RootNode::probeConst() to query key presence,
child node, value and active state.
- Added InternalNode::probeChild() const.
- Added InternalNode::probeChild() and probeChildConst() with coord access
and optionally value and active state.
- Added InternalNode::probeChild() and probeChildConst() with index access
and optionally value and active state.
- Added InternalNode::isValueOff(), LeafNode::isValueOff(),
LeafNodeBool::isValueOff(), LeafNodeMask::isValueOff().
- Added LeafNodeMask::probeValue(Index,val), LeafNodeBool::probeValue(Index,val).
- Added RootNode::getValueUnsafe(), RootNode::getChildUnsafe(),
RootNode::getConstChildUnsafe().
- Added InternalNode::getValueUnsafe(), InternalNode::getChildUnsafe(),
InternalNode::getConstChildUnsafe().
- Added InternalNode::setActiveStateUnsafe(), InternalNode::setValueOnlyUnsafe(),
InternalNode::setValueOnUnsafe(), InternalNode::setValueOffUnsafe().
- Added InternalNode::setChildUnsafe(), InternalNode::resetChildUnsafe(),
InternalNode::stealChildUnsafe(), InternalNode::deleteChildUnsafe().
- For LeafNode, LeafNodeBool and LeafNodeMask - added
LeafNode::getValueUnsafe(), LeafNode::setActiveStateunsafe(),
LeafNode::setValueOnlyUnsafe(), LeafNode::setValueOnUnsafe(),
LeafNode::setValueOffUnsafe().
ABI changes:
- Tree::leafCount(), Tree::unallocatedLeafCount(),
Tree::nonLeafCount() and Tree::nodeCount() now use Index64 in their
return types instead of Index32.
API Changes:
- RootNode::tileCount(), RootNode::activeTileCount() and
RootNode::inactiveTileCount() are now public.
- RootNode::hasKey() and RootNode::coordToKey() are now public.
- RootNode::leafCount(), RootNode::nonLeafCount() and RootNode::nodeCount()
now use Index64 instead of Index32. The Index32 variant is deprecated.
- InternalNode::leafCount(), InternalNode::nonLeafCount() and
InternalNode::nodeCount() now use Index64 instead of Index32. The Index32
variant is deprecated.
- LeafNode::leafCount() and LeafNode::nonLeafCount() now use Index64 instead
of Index32. The Index32 variant is deprecated.
Bug Fixes:
- Fix potential crash reading corrupt .vdb files with invalid
blosc or zip chunks.
[Fix thanks to Matthias Ueberheide]
- Fix a bug in RootNode::setOrigin() where the origin was updated
before the error was thrown potentially leaving the root in an
invalid state.
- Fixed a thread sanitizer issue which could cause undefined
behaviour in VolumeToSpheres::fillWithSpheres
[Reported by Jérémie Dumas]
- Fixed an occurance of undefined behaviour in tools::activate
(though this would typically not have manifested with any
unintended behaviour)
NanoVDB:
Bug fix:
- nanovdb::readGrids works with raw grid buffer.
Improvements:
- Restructure files location and namespace to be more align with
OpenVDB. The namespaces touched by the restructuring are: io,
cuda, util, tools, and math.
- Add two scripts updateFiles.sh and updateFiles.py to update the
files using NanoVDB. The script updateFiles.py works on both
Windows and Linux. For a more complete list of changes, see API
Changes (details).
- cuda::PointsToGrid supports target density.
- Add support for NanoVDB Grid of type UInt8.
- Add ability to use externally managed CUDA buffer.
- Add create methods for CudaDeviceBuffer and exceptions.
- Improve GridValidator logic, e.g. include check for grid count.
- Add operator > and >= for class Coord according to lexicographical order.
- Add toCodec to convert string to Codec enumeration type.
- Add nanovdb::strlen<GridType>().
- Add strncpy util.
- Add NANOVDB_DISABLE_SYNC_CUDA_MALLOC that maps cudaMallocAsync
and cudaFreeAsync to cudaMalloc and cudaFree respectively.
- Add guard to UINT64_C.
- Remove use of cudaMallocAsync in PointsToGrid.cuh.
- Align PNanoVDB blind metadata to NanoVDB.
API Changes:
- Change mapToGridType to toGridType.
- Change mapToMagic to toMagic.
- Change CpuTimer.h to Timer.h.
API Changes (details):
- These APIs are now under the math namespace: Ray, DDA, HDDA,
Vec3, Vec4, BBox, ZeroCrossing, TreeMarcher, PointTreeMarcher,
BoxStencil, CurvatureStencil, GradStencil, WenoStencil, AlignUp,
Min, Max, Abs, Clamp, Sqrt, Sign, Maximum, Delta, RoundDown, pi,
isApproxZero, Round, createSampler, SampleFromVoxels.
- These APIs are now under the tools namespace: createNanoGrid,
StatsMode, createLevelSetSphere, createFogVolumeSphere,
createFogVolumeSphere, createFogVolumeSphere,
createFogVolumeTorus, createLevelSetBox, CreateNanoGrid,
updateGridStats, evalChecksum, validateChecksum, checkGrid,
Extrema.
- These APIs are now under the util namespace: is_floating_point,
findLowestOn, findHighestOn, Range, streq, strcpy, strcat,
empty, Split, invoke, forEach, reduce, prefixSum, is_same,
is_specialization, PtrAdd, PtrDiff.
- Move nanovdb::build to nanovdb::tools::build.
- Rename nanovdb::BBoxR to nanovdb::Vec3dBBox.
- Rename nanovdb::BBox<nanovdb::Vec3d> to nanovdb::Vec3dBbox.
- Move nanovdb::cudaCreateNodeManager to nanovdb::cuda::createNodeManager.
- Move and rename nanovdb::cudaVoxelsToGrid to nanovdb::cuda::voxelsToGrid.
- Move and rename nanovdb::cudaPointsToGrid to nanovdb::cuda::pointsToGrid.
- Move nanovdb::DitherLUT to nanovdb::math::DitherLUT.
- Move and rename nanovdb::PackedRGBA8 to nanovdb::math::Rgba8.
- Move nanovdb::Rgba8 to nanovdb::math::Rgba8.
- Move and rename nanovdb::CpuTimer to nanovdb::util::Timer.
- Move nanovdb::GpuTimer to nanovdb::util::cuda::Timer.
- Move and rename nanovdb::CountOn to nanovdb::util::countOn.
- Move util/GridHandle.h to GridHandle.h.
- Move util/BuildGrid.h to tools/GridBuilder.h.
- Move util/GridBuilder.h to tools/GridBuilder.h.
- Move util/IO.h to io/IO.h.
- Move util/CSampleFromVoxels.h to math/CSampleFromVoxels.h.
- Move util/DitherLUT.h to math/DitherLUT.h.
- Move util/HDDA.h to math/HDDA.h.
- Move util/Ray.h to math/Ray.h.
- Move util/SampleFromVoxels.h to math/SampleFromVoxels.h.
- Move util/Stencils.h to nanovdb/math/Stencils.h.
- Move util/CreateNanoGrid.h to tools/CreateNanoGrid.h.
- Move and rename util/Primitives.h to tools/CreatePrimitives.h.
- Move util/GridChecksum.h to tools/GridChecksum.h.
- Move util/GridStats.h to tools/GridStats.h.
- Move util/GridChecksum.h to tools/GridChecksum.h.
- Move util/GridValidator.h to tools/GridValidator.h.
- Move util/NanoToOpenVDB.h to tools/NanoToOpenVDB.h.
- Move util/cuda/CudaGridChecksum.cuh to tools/cuda/CudaGridChecksum.cuh.
- Move util/cuda/CudaGridStats.cuh to tools/cuda/CudaGridStats.cuh.
- Move util/cuda/CudaGridValidator.cuh to tools/cuda/CudaGridValidator.cuh.
- Move util/cuda/CudaIndexToGrid.cuh to tools/cuda/CudaIndexToGrid.cuh.
- Move and rename util/cuda/CudaPointsToGrid.cuh to tools/cuda/PointsToGrid.cuh.
- Move util/cuda/CudaSignedFloodFill.cuh to tools/cuda/CudaSignedFloodFill.cuh.
- Move and rename util/cuda/CudaDeviceBuffer.h to cuda/DeviceBuffer.h.
- Move and rename util/cuda/CudaGridHandle.cuh to cuda/GridHandle.cuh.
- Move and rename util/cuda/CudaUtils.h to util/cuda/Util.h.
- Move and consolidate util/cuda/GpuTimer.h to util/cuda/Timer.h.
Houdini:
- When OPENVDB_ENABLE_RPATH is ON, the location of
libopenvdb_houdini is now added to the rpath of all Houdini
dsos.
Python:
- OpenVDB Python bindings are now implemented using nanobind
instead of pybind11
- The OpenVDB Python module has been changed from pyopenvdb to openvdb
- Added Python bindings for NanoVDB
Build:
- Fixed an issue with OpenVDB AX's CMake on Windows where the
static and shared library targets would have the same name
[Reported by Nicholas Yue]
- USE_EXPLICIT_INSTANTIATION is now disabled on Windows by default
due to OOM linker issues.
- Jemalloc is now the preferred allocator of choice on all
platforms when CONCURRENT_MALLOC is set to Auto.
- Fixed an issue with the Blosc CMake FindPackage for the OpenVDB
Windows static library.
Version 11.0.0 - November 1, 2023
@@ -399,7 +920,6 @@ Version 9.1.0 - June 9, 2022
Positional arguments as input files are deprecated.
- Added tools::minMax() which supports multithreaded evaluation of active
minimum and maximum values. Grid::evalMinMax() has been deprecated.
[Contributed by Greg Hurst]
- Significant performance improvements to AX point kernels, primarily due to
providing AX access to attribute buffers for superior code generation.
- vdb_print now prints both the in-core memory and total memory usage for
+123 -33
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: Apache-2.0
#
#[=======================================================================[
@@ -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.18)
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,7 +52,7 @@ endif()
###### Version
set(OpenVDB_MAJOR_VERSION 11)
set(OpenVDB_MAJOR_VERSION 13)
set(OpenVDB_MINOR_VERSION 0)
set(OpenVDB_PATCH_VERSION 1)
set(OpenVDB_VERSION "${OpenVDB_MAJOR_VERSION}.${OpenVDB_MINOR_VERSION}.${OpenVDB_PATCH_VERSION}")
@@ -80,6 +80,10 @@ option(OPENVDB_BUILD_NANOVDB "Build the NanoVDB library. Turns ON if USE_NANOVDB
# Global options
option(OPENVDB_ENABLE_RPATH "Build with RPATH information" ON)
option(OPENVDB_ENABLE_ASSERTS "Build with asserts in OpenVDB code enabled" OFF)
option(OPENVDB_ENABLE_VEC_RELATIONAL_OPERATIONS [=[
Enabled deprecated relational < and > operators on Vector types. This option
will be switched to OFF and the feature will be subsequently removed in future
releases.]=] ON)
option(OPENVDB_USE_DELAYED_LOADING "Build the core OpenVDB library with delayed-loading." ON)
option(OPENVDB_CXX_STRICT "Enable or disable pre-defined compiler warnings" OFF)
cmake_dependent_option(OPENVDB_INSTALL_CMAKE_MODULES
@@ -131,6 +135,30 @@ required.]=] ${USE_EXR})
option(USE_PNG "Use PNG while building openvdb components." OFF)
option(USE_AX "Use OpenVDB AX while building openvdb components." ${OPENVDB_BUILD_AX})
option(USE_NANOVDB "Use NanoVDB while building openvdb components." ${OPENVDB_BUILD_NANOVDB})
option(USE_VCL [=[
Use the internally supplied copy of Agner Fog's vectorclass (VCL) SIMD wrapper
library to instrument OpenVDB tools. This also requires VCL to be installed
along with OpenVDB headers. Only applicable which compiling for x86 targets.]=] OFF)
set(OPENVDB_X86_INSTRSET 0 CACHE STRING [=[
The x86 instruction set to use. When unset, if USE_VCL is ON, this is
automatically configured based on provided build flags. When unset and USE_VCL
is OFF, defaults to 0. It is expected for you to provide this flag. Available
values are:
0: Unknown or unspecified
1: SSE -msse
2: SSE2 -msse2 # Minimum on x86_64
3: SSE3 -msse3
4: SSSE3 -mssse3
5: SSE4.1 -msse4.1
6: SSE4.2 -msse4.2 # Minimum recommended where supported
7: AVX -mavx
8: AVX2 -mavx2
9: AVX512F -mavx512f
10: AVX512BW/DQ/VL -mavx512bw -mavx512dq -mavx512vl
Note that (while not strictly enforced by vendors) each option implies all
preceeding flags. If you need more granular control you can provide your
desired flags via CXX_FLAGS. Only applicable which compiling for x86 targets.
]=])
cmake_dependent_option(OPENVDB_DISABLE_BOOST_IMPLICIT_LINKING
"Disable the implicit linking of Boost libraries on Windows" ON "WIN32" OFF)
@@ -172,19 +200,6 @@ elseif(NOT ${CONCURRENT_MALLOC} IN_LIST _CONCURRENT_MALLOC_OPTIONS)
set(CONCURRENT_MALLOC Auto CACHE STRING FORCE)
endif()
set(_OPENVDB_SIMD_OPTIONS None SSE42 AVX)
if(NOT OPENVDB_SIMD)
set(OPENVDB_SIMD None CACHE STRING
"Choose whether to enable SIMD compiler flags or not, options are: None SSE42 AVX.
Although not required, it is strongly recommended to enable SIMD. AVX implies SSE42.
None is the default." FORCE
)
elseif(NOT ${OPENVDB_SIMD} IN_LIST _OPENVDB_SIMD_OPTIONS)
message(WARNING "Unrecognized or unsupported value for OPENVDB_SIMD, "
"using None instead.")
set(OPENVDB_SIMD None CACHE STRING FORCE)
endif()
if(USE_BLOSC AND NOT USE_ZLIB)
message(WARNING "ZLib can only be disabled if Blosc is also disabled. Enabling ZLib.")
endif()
@@ -268,6 +283,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})
@@ -285,6 +307,30 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
# Add cmake modules to installation command
if(SKBUILD)
set(OPENVDB_INSTALL_BINDIR openvdb/${CMAKE_INSTALL_BINDIR})
set(OPENVDB_INSTALL_LIBDIR openvdb/${CMAKE_INSTALL_LIBDIR})
set(OPENVDB_INSTALL_INCLUDEDIR openvdb/${CMAKE_INSTALL_INCLUDEDIR})
if(OPENVDB_BUILD_NANOVDB)
set(NANOVDB_INSTALL_BINDIR nanovdb/${CMAKE_INSTALL_BINDIR})
set(NANOVDB_INSTALL_LIBDIR nanovdb/${CMAKE_INSTALL_LIBDIR})
set(NANOVDB_INSTALL_INCLUDEDIR nanovdb/${CMAKE_INSTALL_INCLUDEDIR})
set(NANOVDB_INSTALL_DOCDIR nanovdb/${CMAKE_INSTALL_DOCDIR})
endif()
else()
set(OPENVDB_INSTALL_BINDIR ${CMAKE_INSTALL_BINDIR})
set(OPENVDB_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR})
set(OPENVDB_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR})
if(OPENVDB_BUILD_NANOVDB)
set(NANOVDB_INSTALL_BINDIR ${CMAKE_INSTALL_BINDIR})
set(NANOVDB_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR})
set(NANOVDB_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR})
set(NANOVDB_INSTALL_DOCDIR ${CMAKE_INSTALL_DOCDIR})
endif()
endif()
if(OPENVDB_INSTALL_CMAKE_MODULES)
set(OPENVDB_CMAKE_MODULES
cmake/FindBlosc.cmake
@@ -298,7 +344,7 @@ if(OPENVDB_INSTALL_CMAKE_MODULES)
cmake/OpenVDBMayaSetup.cmake
cmake/OpenVDBUtils.cmake
)
install(FILES ${OPENVDB_CMAKE_MODULES} DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/OpenVDB)
install(FILES ${OPENVDB_CMAKE_MODULES} DESTINATION ${OPENVDB_INSTALL_LIBDIR}/cmake/OpenVDB)
endif()
# Configure component dependencies by loading the Houdini/Maya setup
@@ -354,6 +400,28 @@ endif()
#########################################################################
# Still support -DOPENVDB_SIMD=SSE42 and -DOPENVDB_SIMD=AVX, these alias to
# their respective OPENVDB_X86_INSTRSET value but, as a build option, are
# deprecated. Not that the defines in version.h need to persist in case
# downstream software was using them before including VDB headers
set(_OPENVDB_SIMD_OPTIONS None SSE42 AVX)
if(NOT OPENVDB_SIMD)
set(OPENVDB_SIMD None CACHE STRING "Deprecated, see OPENVDB_X86_INSTRSET." FORCE)
else()
if(NOT ${OPENVDB_SIMD} IN_LIST _OPENVDB_SIMD_OPTIONS)
message(WARNING "Unrecognized or unsupported value for OPENVDB_SIMD, using None instead.")
set(OPENVDB_SIMD None CACHE STRING "Deprecated, see OPENVDB_X86_INSTRSET." FORCE)
endif()
message(DEPRECATION "The OPENVDB_SIMD option is deprecated and will be removed. Use OPENVDB_X86_INSTRSET.")
if(OPENVDB_SIMD STREQUAL "AVX")
set(OPENVDB_X86_INSTRSET 7)
elseif(OPENVDB_SIMD STREQUAL "SSE42")
set(OPENVDB_X86_INSTRSET 6)
endif()
endif()
#########################################################################
# Configure general CMake and CXX settings
include(cmake/config/OpenVDBCXX.cmake)
@@ -373,22 +441,6 @@ if(CONCURRENT_MALLOC STREQUAL "Auto")
endif()
endif()
# Configure SIMD. AVX implies SSE 4.2.
if(OPENVDB_SIMD STREQUAL "AVX")
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-mavx>")
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-msse4.2>")
endif()
add_compile_definitions("$<$<COMPILE_LANGUAGE:CXX>:OPENVDB_USE_AVX>")
add_compile_definitions("$<$<COMPILE_LANGUAGE:CXX>:OPENVDB_USE_SSE42>")
elseif(OPENVDB_SIMD STREQUAL "SSE42")
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-msse4.2>")
endif()
add_compile_definitions("$<$<COMPILE_LANGUAGE:CXX>:OPENVDB_USE_SSE42>")
endif()
#########################################################################
# Configure our cmake modules to only search for static libraries
@@ -451,6 +503,44 @@ if(NOT OPENVDB_BUILD_NANOVDB AND
find_package(OpenVDB REQUIRED COMPONENTS nanovdb)
endif()
# Locate Python and nanobind if necessary
if(OPENVDB_BUILD_PYTHON_MODULE OR (OPENVDB_BUILD_NANOVDB AND NANOVDB_BUILD_PYTHON_MODULE))
find_package(Python ${MINIMUM_PYTHON_VERSION} REQUIRED COMPONENTS Development Interpreter)
if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_PYTHON_VERSION)
if(Python_VERSION VERSION_LESS ${FUTURE_MINIMUM_PYTHON_VERSION})
message(DEPRECATION "Support for Python versions < ${FUTURE_MINIMUM_GLFW_VERSION} "
"is deprecated and will be removed.")
endif()
endif()
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)
else()
set(Python_PACKAGES_DIR "site-packages")
endif()
set(VDB_PYTHON_INSTALL_DIRECTORY
${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/${Python_PACKAGES_DIR}
CACHE STRING "The directory to install the openvdb and nanovdb Python modules."
)
endif()
endif()
# Validate the OpenVDB ABI Version. If OpenVDB_ABI is not set, we're either building
# the core library OR the ABI hasn't been deduced from a VDB installation. Use the
+1 -1
View File
@@ -6,10 +6,10 @@
# Admin/General
/.github/ @kmuseth @apradhana @jmlait @idclip @danrbailey @richhones
/.github/workflows/nanovdb.yml @kmuseth @apradhana
/ci/ @kmuseth @apradhana @jmlait @idclip @danrbailey @richhones
/cmake/ @kmuseth @apradhana @jmlait @idclip @danrbailey @richhones
/doc/ @kmuseth @apradhana @jmlait @idclip @danrbailey @richhones
/pendingchanges/ @kmuseth @apradhana @jmlait @idclip @danrbailey @richhones
/tsc/ @kmuseth @apradhana @jmlait @idclip @danrbailey @richhones
CODEOWNERS @kmuseth @apradhana @jmlait @idclip @danrbailey @richhones
LICENSE @kmuseth @apradhana @jmlait @idclip @danrbailey @richhones
+23 -16
View File
@@ -22,7 +22,7 @@ open source software best practice policies of the Linux Foundation.
#### License
OpenVDB is licensed under the [Mozilla Public License, version 2.0](LICENSE.md)
OpenVDB is licensed under the [Apache License, version 2.0](LICENSE.md)
license. Contributions to OpenVDB should abide by that standard
license.
@@ -54,21 +54,27 @@ Every commit must be signed off. That is, every commit log message
must include a “`Signed-off-by`” line (generated, for example, with
“`git commit --signoff`”), indicating that the committer wrote the
code and has the right to release it under the
[Mozilla Public License, version 2.0](LICENSE.md)
[Apache License, version 2.0](LICENSE.md)
license. See the [TAC documentation on contribution sign off](https://github.com/AcademySoftwareFoundation/tac/blob/master/process/contributing.md#contribution-sign-off) for more information on this requirement.
## Committer
#### Stale PRs
The committer role enables the participant to commit code directly to the repository, but also comes with the obligation to be a responsible leader in the community.
A PR that does not have a signed CLA or DCO sign-off will be given at least one week in which to resolve the issue and then will be closed. The TSC cannot review or merge PRs without these requirements having been met. Please re-open PRs that are now expected to pass once this criteria has been met.
### Process for becoming a committer
## Maintainer
The maintainer role is the equivalent of the "Committer" role in the charter.
This role enables the participant to commit code directly to the repository, but also comes with the obligation to be a responsible leader in the community.
### Process for becoming a maintainer
* Show your experience with the codebase through contributions and engagement on the community channels.
* Request to become a committer.
* Have the majority of committers approve you becoming a committer.
* Request to become a maintainer.
* Have the majority of maintainers approve you becoming a maintainer.
* Your name and email is added to the MAINTAINERS.md file for the project.
### Committer responsibilities
### Maintainer responsibilities
* Monitor email aliases.
* Monitor Slack (delayed response is perfectly acceptable).
@@ -76,28 +82,29 @@ The committer role enables the participant to commit code directly to the reposi
* Make sure that ongoing PRs are moving forward at the right pace or close them.
* Remain an active contributor to the project in general and the code base in particular.
### When does a committer lose committer status?
### When does a maintainer lose maintainer status?
If a committer is no longer interested or cannot perform the committer duties listed above, they
If a maintainer is no longer interested or cannot perform the maintainer duties listed above, they
should volunteer to be moved to emeritus status. In extreme cases this can also occur by a vote of
the committers per the voting process below.
the maintainers per the voting process below.
## Technical Steering Committee (TSC) member
The Technical Steering Committee (TSC) oversees the overall technical direction of OpenVDB, as defined in the [charter](charter.md).
TSC voting members consist of committers that have been nominated by the committers, with a supermajority of voting members required to have a committer elected to be a TSC voting member. TSC voting members term and succession is defined in the [charter](charter.md).
TSC voting members consist of maintainers that have been nominated by the TSC, with a supermajority of voting members required to have a maintainer elected to be a TSC voting member. TSC voting members term and succession is defined in the [charter](charter.md).
All meetings of the TSC are open to participation by any member of the OpenVDB community. Meeting times are listed in the [ASWF technical community calendar](https://lists.aswf.io/g/tac/calendar).
## Current TSC members
* Ken Museth, Chair / NVIDIA
* Andre Pradhana, DreamWorks
* Ken Museth (Chair), Nvidia
* Andre Pradhana, Nvidia
* Jeff Lait, SideFX
* Nick Avramoussis, WETA
* Nick Avramoussis, WETA FX
* Dan Bailey, ILM
* Richard Jones, DNEG
* Richard Jones, ILM
* Gregory Hurst, United Therapeutics
# Release Process
+176 -373
View File
@@ -1,373 +1,176 @@
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
+2
View File
@@ -14,3 +14,5 @@ The current OpenVDB maintainers are:
| Ken Museth | ken.museth@gmail.com
| Andre Pradhana | andre.pradhana@gmail.com
| Richard Jones | richardj@ilm.com
| Gregory Hurst | tbd
| Jonathan Swartz | tbd
+33
View File
@@ -0,0 +1,33 @@
The following copyright holders agree that all of their contributions
originally submitted to this project under the Mozilla Public License
Version 2.0, are hereby relicensed to the Apache License, Version 2.0,
and are submitted pursuant to the Developer Certificate of Origin, version 1.1:
Ken Museth
Mehdi Chinoune
DreamWorks Animation
Side Effects Software Inc.
Blender Foundation
NVIDIA Corporation
United Therapeutics Corporation
Digital Domain 3.0, Inc.
Double Negative
Ubisoft Entertainment SA
Adobe Inc.
Mathieu Malaterre
Brecht Sanders
Ignacio Vizzo
Ben FrantzDale
Sebastian Gaida
Alessio Quaglino
Benedikt Mersch
David Aguilar
Brian Sharpe
Kartik Shrivastava
Michael Lackner
Lucas Baraya
Kuba Roth
Tom Cnops
Walt Disney Pictures (Walt Disney Animation Studios)
The Linux Foundation
Industrial Light & Magic (ILM)
+5 -5
View File
@@ -10,7 +10,7 @@
[Discussion Forum](https://github.com/AcademySoftwareFoundation/openvdb/discussions) |
[Documentation](https://www.openvdb.org/documentation/doxygen) |
[Releases](https://github.com/AcademySoftwareFoundation/openvdb/releases) |
[License](https://www.mozilla.org/MPL/2.0) |
[License](https://www.apache.org/licenses/LICENSE-2.0) |
[Slack](https://slack.aswf.io/)
OpenVDB is an open source C++ library comprising a novel hierarchical data
@@ -28,13 +28,15 @@ generally less stable than the [production releases](https://github.com/AcademyS
### License
OpenVDB is released under the [Mozilla Public License Version 2.0](https://www.mozilla.org/MPL/2.0/),
OpenVDB is released under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0),
which is a free, open source software license developed and maintained by the
Mozilla Foundation.
Apache Software Foundation.
The trademarks of any contributor to this project may not be used in
association with the project without the contributor's express permission.
NOTE: OpenVDB has completed re-licensing from [Mozilla Public License Version 2.0](https://www.mozilla.org/MPL/2.0/) to [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0). Please see the file RE-LICENSE_NOTE.txt for more details.
### Contributing
OpenVDB welcomes contributions to the OpenVDB project. Please refer to the
@@ -93,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
```
+22 -10
View File
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: Apache-2.0
set -e
@@ -31,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
@@ -49,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'
@@ -65,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'
################################################
@@ -148,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
################################################
@@ -180,16 +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_9=ON \
-DOPENVDB_USE_DEPRECATED_ABI_10=ON \
-DOPENVDB_BUILD_VDB_PRINT=ON \
-DOPENVDB_BUILD_VDB_LOD=ON \
-DOPENVDB_BUILD_VDB_TOOL=ON \
-DOPENVDB_USE_DEPRECATED_ABI_11=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[@]}" \
+2
View File
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: Apache-2.0
set -ex
+1 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
#
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: Apache-2.0
#
# Python script to download the latest Houdini builds
# using the SideFX download API:
+24 -16
View File
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: Apache-2.0
set -ex
@@ -6,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
@@ -29,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
+2
View File
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: Apache-2.0
import os
import sys
+2
View File
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: Apache-2.0
#################################################################################
# This script extracts all code blocks from AX documentation which are NOT #
# marked as cpp/sh/unparsed and attempts to parse or compile them through the #
+2
View File
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: Apache-2.0
set -ex
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: Apache-2.0
set -ex
CURL_VERSION="$1"
wget -O cppunit.tar.gz https://dev-www.libreoffice.org/src/cppunit-${CURL_VERSION}.tar.gz
tar -xzf cppunit.tar.gz
cd cppunit-${CURL_VERSION}
./configure
make -j8
make install
+3 -1
View File
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: Apache-2.0
set -ex
@@ -13,6 +15,6 @@ fi
mkdir build
cd build
cmake ../.
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ../.
make -j8
make install
+21
View File
@@ -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
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: Apache-2.0
set -ex
GLFW_VERSION="$1"
git clone https://github.com/glfw/glfw.git
cd glfw
if [ "$GLFW_VERSION" != "latest" ]; then
git checkout tags/${GLFW_VERSION} -b ${GLFW_VERSION}
fi
mkdir build
cd build
cmake ..
make -j8
make install
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: Apache-2.0
set -ex
GTEST_VERSION="$1"
git clone https://github.com/google/googletest.git
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
+21
View File
@@ -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
+37 -6
View File
@@ -1,27 +1,58 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: Apache-2.0
set -ex
LLVM_CRT="$1"
LLVM_VER="$1"
LLVM_CRT="$2"
git clone -b llvmorg-12.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 ..
+19 -6
View File
@@ -1,7 +1,16 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: Apache-2.0
set -x
# Remove Python3 symlinks in /usr/local/bin as workaround to brew update issues
# https://github.com/actions/setup-python/issues/577
rm /usr/local/bin/2to3* || :
rm /usr/local/bin/idle3* || :
rm /usr/local/bin/pydoc* || :
rm /usr/local/bin/python3* || :
brew update
brew install bash gnu-getopt # for CI scripts
brew install boost
@@ -11,29 +20,33 @@ brew install glfw
brew install googletest
brew install jq # for trivial parsing of brew json
brew install openexr
brew install pybind11 # also installs the dependent python version
brew install tbb
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
# Alias python version installed by pybind11 to path
py_version=$(brew info pybind11 --json | \
# Alias python version installed by nanobind to path
py_version=$(brew info nanobind --json | \
jq -cr '.[].dependencies[] | select(. | startswith("python"))')
echo "Using python $py_version"
# export for subsequent action steps (note, not exported for this env)
echo "Python_ROOT_DIR=/usr/local/opt/$py_version" >> $GITHUB_ENV
echo "/usr/local/opt/$py_version/bin" >> $GITHUB_PATH
# use bash
echo "/usr/local/opt/bash/bin" >> $GITHUB_PATH
echo "/opt/homebrew/opt/bash/bin" >> $GITHUB_PATH
# use gnu-getopt
echo "/usr/local/opt/gnu-getopt/bin" >> $GITHUB_PATH
echo "/opt/homebrew/opt/gnu-getopt/bin" >> $GITHUB_PATH
LLVM_VERSION=$1
if [ ! -z "$LLVM_VERSION" ]; then
if [ "$LLVM_VERSION" == "latest" ]; then
brew install llvm
brew install cppunit
else
brew install llvm@$LLVM_VERSION
brew install cppunit
fi
fi
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: Apache-2.0
set -ex
@@ -9,8 +11,8 @@ if [ ! -z "${INSTALL_ROOT}" ]; then
CMAKE_EXTRA+=("-DCMAKE_INSTALL_PREFIX=${INSTALL_ROOT}")
fi
git clone https://github.com/pybind/pybind11.git
cd pybind11
git clone --recurse-submodules https://github.com/wjakob/nanobind.git
cd nanobind
if [ "$PYBIND11_VERSION" != "latest" ]; then
git checkout tags/v${PYBIND11_VERSION} -b v${PYBIND11_VERSION}
@@ -20,9 +22,9 @@ mkdir build
cd build
cmake \
-DPYBIND11_TEST=OFF \
-DNB_TEST=OFF \
"${CMAKE_EXTRA[@]}" \
..
make -j8
make install
sudo make install
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: Apache-2.0
set -x
brew update
brew install tbb
+28
View File
@@ -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://mirrors.mit.edu/CTAN/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 --repository https://mirrors.mit.edu/CTAN/systems/texlive/tlnet
# 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
+40
View File
@@ -0,0 +1,40 @@
# Enable verbose and stop on error
$ErrorActionPreference = "Stop"
$VerbosePreference = "Continue"
# Required dependencies
$vcpkgPackages = @(
"zlib",
"libpng",
"openexr",
"tbb",
"gtest",
"cppunit",
"blosc",
"glfw3",
"glew",
"python3",
"jemalloc",
"boost-iostreams",
"boost-interprocess",
"boost-algorithm",
"nanobind"
)
# Update vcpkg
vcpkg update
# Allow the vcpkg command to fail once so we can retry with the latest
try {
vcpkg install $vcpkgPackages
} catch {
Write-Host "vcpkg install failed, retrying with latest ports..."
# Retry the installation with updated ports
Push-Location $env:VCPKG_INSTALLATION_ROOT
git pull
Pop-Location
vcpkg update
vcpkg install $vcpkgPackages
}
Write-Host "vcpkg install completed successfully"
-8
View File
@@ -1,8 +0,0 @@
#!/usr/bin/env bash
set -ex
vcpkg update
vcpkg install zlib libpng openexr tbb gtest cppunit blosc glfw3 glew python3 jemalloc \
boost-iostreams boost-interprocess boost-algorithm pybind11 \
--clean-after-build
+3 -2
View File
@@ -26,12 +26,13 @@ $CUDA_KNOWN_URLS = @{
"11.2.1" = "https://developer.download.nvidia.com/compute/cuda/11.2.1/network_installers/cuda_11.2.1_win10_network.exe";
"11.2.2" = "https://developer.download.nvidia.com/compute/cuda/11.2.2/network_installers/cuda_11.2.2_win10_network.exe";
"11.3.0" = "https://developer.download.nvidia.com/compute/cuda/11.3.0/network_installers/cuda_11.3.0_win10_network.exe";
"11.6.2" = "https://developer.download.nvidia.com/compute/cuda/11.6.2/network_installers/cuda_11.6.2_windows_network.exe"
"11.6.2" = "https://developer.download.nvidia.com/compute/cuda/11.6.2/network_installers/cuda_11.6.2_windows_network.exe";
"12.4.0" = "https://developer.download.nvidia.com/compute/cuda/12.4.0/network_installers/cuda_12.4.0_windows_network.exe"
}
# @todo - change this to be based on _MSC_VER intead, or invert it to be CUDA keyed instead?
$VISUAL_STUDIO_MIN_CUDA = @{
"2022" = "11.6";
"2022" = "12.4";
"2019" = "10.1";
"2017" = "10.0"; # Depends on which version of 2017! 9.0 to 10.0 depending on version
"2015" = "8.0"; # might support older, unsure.
+9
View File
@@ -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"
+3 -1
View File
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: Apache-2.0
set -e
# Various tests to test the FindOpenVDB CMake modules and
@@ -8,7 +10,7 @@ set -e
# the expected VDB installation
cmakelists="
cmake_minimum_required(VERSION 3.18)
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\")
+2
View File
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: Apache-2.0
set -ex
+236
View File
@@ -0,0 +1,236 @@
#!/usr/bin/env python3
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: Apache-2.0
"""Validate cross-references inside the OpenVDB documentation tree.
Run from the repo root (no arguments) or pass paths to validate explicitly.
The script scans Markdown (`.md`) and Doxygen narrative (`.txt`) files under
``doc/`` and checks two classes of cross-reference for staleness:
1. ``#include <path/to/header.h>`` lines that appear inside Markdown
``cpp``/``cuda``/``c``/``c++`` fenced code blocks or inside Doxygen
``@code``/``\\code`` blocks. Each include is resolved to a real file in
``openvdb/``, ``openvdb_ax/``, ``openvdb_houdini/`` or ``nanovdb/``.
2. ``https://github.com/AcademySoftwareFoundation/openvdb/blob/<ref>/<path>``
URLs. The ``<path>`` portion is checked against the local checkout.
The script exits non-zero on any unresolved reference and prints a
``file:line`` style error so the failure is actionable in CI logs. It is
intentionally dependency-free so it can run in a minimal Python container.
This guards against the class of bug tracked in issue #2161, where renames
under ``nanovdb/util/ -> nanovdb/tools/`` and ``nanovdb/util/IO.h ->
nanovdb/io/IO.h`` silently left the docs referencing paths that no longer
exist.
"""
from __future__ import annotations
import re
import sys
from pathlib import Path
from typing import Iterable, List, Sequence, Tuple
REPO_ROOT = Path(__file__).resolve().parent.parent
# Map a top-level include namespace to one or more on-disk directories that it
# resolves against. ``#include <nanovdb/io/IO.h>`` resolves to
# ``nanovdb/nanovdb/io/IO.h`` because the repo uses a double-named layout;
# ``#include <houdini_utils/ParmFactory.h>`` resolves to
# ``openvdb_houdini/openvdb_houdini/ParmFactory.h`` because the Houdini plugin
# CMake configuration synthesises a ``houdini_utils/`` subtree at build time
# (see ``openvdb_houdini/openvdb_houdini/CMakeLists.txt``).
INCLUDE_NAMESPACE_ROOTS = {
"openvdb": ("openvdb/openvdb", "openvdb"),
"openvdb_ax": ("openvdb_ax/openvdb_ax", "openvdb_ax"),
"openvdb_houdini": ("openvdb_houdini/openvdb_houdini", "openvdb_houdini"),
"nanovdb": ("nanovdb/nanovdb", "nanovdb"),
"houdini_utils": ("openvdb_houdini/openvdb_houdini",),
}
# Top-level include path components that come from outside this repo. When a
# header's leading component matches one of these, we skip resolution entirely.
# Houdini SDK headers (``UT/``, ``GA/``, ``GEO_*``, etc.) live in the Houdini
# install, not in our checkout.
EXTERNAL_INCLUDE_PREFIXES = (
"boost/",
"tbb/",
"cuda", # cuda_runtime.h, cuda.h, ...
"thrust/",
"Eigen/",
"OpenEXR/",
"Imath/",
"openexr/",
"GL/",
# Houdini SDK prefixes
"UT/",
"GA/",
"GU/",
"GEO/",
"GT/",
"GR/",
"OP/",
"PRM/",
"SOP/",
"SYS/",
"CH/",
"DEP/",
"PI/",
"RE/",
# Standard library headers (no '/' is the usual signal, but list a few
# explicitly to be safe).
"stdio.h",
"iostream",
"vector",
"string",
"memory",
"cstdint",
)
# Match a Markdown fenced code block whose language is one of cpp/cuda/c/c++.
_MARKDOWN_FENCE_RE = re.compile(
r"^```(?:cpp|cuda|c\+\+|c)\s*$(?P<body>.*?)^```\s*$",
re.DOTALL | re.MULTILINE,
)
# Doxygen ``@code``/``\code`` ... ``@endcode``/``\endcode`` blocks. The
# language hint (``@code{.cpp}``) is optional.
_DOXY_CODE_RE = re.compile(
r"[@\\]code(?:\{[^}]*\})?\s*$(?P<body>.*?)^[@\\]endcode\s*$",
re.DOTALL | re.MULTILINE,
)
_INCLUDE_RE = re.compile(r"#\s*include\s*<([^>\n]+)>")
# Match URLs pointing into a blob in this repo. ``<ref>`` may be a branch
# name or a sha; ``<path>`` is the portion that must exist on disk today.
_GITHUB_BLOB_RE = re.compile(
r"https?://github\.com/AcademySoftwareFoundation/openvdb/blob/"
r"(?P<ref>[^/\s]+)/(?P<path>[^\s)\"'#?]+)"
)
def is_external_include(header: str) -> bool:
"""Return True for headers we cannot resolve from this repo."""
head, _, _ = header.partition("/")
if head in INCLUDE_NAMESPACE_ROOTS:
return False
return any(header.startswith(p) for p in EXTERNAL_INCLUDE_PREFIXES) or "/" not in header
def resolve_include(header: str) -> Path | None:
"""Resolve ``#include <header>`` to a path on disk, or None if not found."""
head, _, rest = header.partition("/")
roots = INCLUDE_NAMESPACE_ROOTS.get(head)
if roots is None or not rest:
return None
for root in roots:
candidate = REPO_ROOT / root / rest
if candidate.is_file():
return candidate
return None
def iter_code_block_lines(text: str) -> Iterable[Tuple[int, str]]:
"""Yield (line_number, line_text) for every line inside a code block.
Line numbers are 1-based and refer to the original ``text``. Handles both
Markdown fences (```cpp ...```) and Doxygen ``@code``/``\\code`` blocks.
"""
for match in _MARKDOWN_FENCE_RE.finditer(text):
body_start = match.start("body")
yield from _lines_with_offsets(text, match.group("body"), body_start)
for match in _DOXY_CODE_RE.finditer(text):
body_start = match.start("body")
yield from _lines_with_offsets(text, match.group("body"), body_start)
def _lines_with_offsets(full_text: str, body: str, body_offset: int) -> Iterable[Tuple[int, str]]:
base_line = full_text.count("\n", 0, body_offset) + 1
for i, line in enumerate(body.splitlines()):
yield base_line + i, line
def find_doc_files(extra_paths: Sequence[str]) -> List[Path]:
"""Return the list of doc files to scan.
Without arguments, scan ``doc/**/*.md`` and ``doc/**/*.txt``. With
arguments, scan only those files (resolved relative to the repo root).
"""
if extra_paths:
return [
(Path(p) if Path(p).is_absolute() else REPO_ROOT / p).resolve()
for p in extra_paths
]
doc_dir = REPO_ROOT / "doc"
return sorted(
list(doc_dir.rglob("*.md")) + list(doc_dir.rglob("*.txt"))
)
def check_file(path: Path) -> List[str]:
"""Return a list of human-readable error strings for the given doc file."""
errors: List[str] = []
try:
text = path.read_text(encoding="utf-8")
except (OSError, UnicodeDecodeError) as exc:
return [f"{path}: failed to read: {exc}"]
rel = path.relative_to(REPO_ROOT) if path.is_relative_to(REPO_ROOT) else path
for line_no, line in iter_code_block_lines(text):
for include_match in _INCLUDE_RE.finditer(line):
header = include_match.group(1).strip()
if is_external_include(header):
continue
if resolve_include(header) is None:
errors.append(
f"{rel}:{line_no}: include <{header}> does not resolve "
"to a file in this checkout"
)
for url_match in _GITHUB_BLOB_RE.finditer(text):
ref = url_match.group("ref")
url_path = url_match.group("path")
on_disk = REPO_ROOT / url_path
if not on_disk.exists():
# Compute the 1-based line number of the URL for the error report.
line_no = text.count("\n", 0, url_match.start()) + 1
errors.append(
f"{rel}:{line_no}: github URL "
f"AcademySoftwareFoundation/openvdb/blob/{ref}/{url_path} "
"does not exist in this checkout"
)
return errors
def main(argv: Sequence[str]) -> int:
files = find_doc_files(argv[1:])
total_errors: List[str] = []
for path in files:
if not path.exists():
total_errors.append(f"{path}: file does not exist")
continue
total_errors.extend(check_file(path))
if total_errors:
print("Documentation reference validation FAILED.", file=sys.stderr)
print("", file=sys.stderr)
for err in total_errors:
print(err, file=sys.stderr)
print("", file=sys.stderr)
print(
f"{len(total_errors)} broken reference(s) across "
f"{len(files)} file(s).",
file=sys.stderr,
)
return 1
print(f"OK: {len(files)} doc file(s) validated, no broken references.")
return 0
if __name__ == "__main__":
sys.exit(main(sys.argv))
+24
View File
@@ -0,0 +1,24 @@
# SPDX-License-Identifier: MIT
#
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors
set(CPM_DOWNLOAD_VERSION 0.40.2)
set(CPM_HASH_SUM "c8cdc32c03816538ce22781ed72964dc864b2a34a310d3b7104812a5ca2d835d")
if(CPM_SOURCE_CACHE)
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
elseif(DEFINED ENV{CPM_SOURCE_CACHE})
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
else()
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
endif()
# Expand relative path. This is important if the provided path contains a tilde (~)
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)
file(DOWNLOAD
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM}
)
include(${CPM_DOWNLOAD_LOCATION})
+7 -28
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: Apache-2.0
#
#[=======================================================================[.rst:
@@ -88,7 +88,7 @@ may be provided to tell this module where to look.
#]=======================================================================]
cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.24)
include(GNUInstallDirs)
mark_as_advanced(
@@ -188,22 +188,6 @@ list(APPEND _BLOSC_LIBRARYDIR_SEARCH_DIRS
${SYSTEM_LIBRARY_PATHS}
)
# Library suffix handling
set(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES})
if(MSVC)
if(BLOSC_USE_STATIC_LIBS)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
set(CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES};lib")
endif()
else()
if(BLOSC_USE_STATIC_LIBS)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
endif()
endif()
set(Blosc_LIB_COMPONENTS "")
# NOTE: Search for debug version first (see vcpkg hack)
list(APPEND BLOSC_BUILD_TYPES DEBUG RELEASE)
@@ -246,13 +230,6 @@ foreach(BUILD_TYPE ${BLOSC_BUILD_TYPES})
set(CMAKE_IGNORE_PATH ${_BLOSC_CMAKE_IGNORE_PATH})
endforeach()
# Reset library suffix
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_PREFIXES ${_BLOSC_ORIG_CMAKE_FIND_LIBRARY_PREFIXES})
unset(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
unset(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_PREFIXES)
if(Blosc_LIBRARY_DEBUG AND Blosc_LIBRARY_RELEASE)
# if the generator is multi-config or if CMAKE_BUILD_TYPE is set for
# single-config generators, set optimized and debug libraries
@@ -442,9 +419,11 @@ if(NOT TARGET Blosc::blosc)
set(${BLOSC_EXTERNAL_LIB}_LIBRARIES ${${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG})
endif()
target_link_libraries(Blosc::blosc INTERFACE
$<$<CONFIG:Release>:${${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE}>
$<$<CONFIG:Debug>:${${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG}>)
if(${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE OR ${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG)
target_link_libraries(Blosc::blosc INTERFACE
$<$<CONFIG:Release>:${${BLOSC_EXTERNAL_LIB}_LIBRARY_RELEASE}>
$<$<CONFIG:Debug>:${${BLOSC_EXTERNAL_LIB}_LIBRARY_DEBUG}>)
endif()
endforeach()
endif()
-320
View File
@@ -1,320 +0,0 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-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.18)
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()
+2 -2
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: Apache-2.0
#
#[=======================================================================[.rst:
@@ -64,7 +64,7 @@ may be provided to tell this module where to look.
#]=======================================================================]
cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.24)
include(GNUInstallDirs)
+2 -2
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: Apache-2.0
#
#[=======================================================================[.rst:
@@ -87,7 +87,7 @@ may be provided to tell this module where to look.
#]=======================================================================]
cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.24)
include(GNUInstallDirs)
+44
View File
@@ -0,0 +1,44 @@
include (FindPackageHandleStandardArgs)
if(NCCL_ROOT)
set(_NCCL_ROOT ${NCCL_ROOT})
elseif(DEFINED ENV{NCCL_ROOT})
set(_NCCL_ROOT $ENV{NCCL_ROOT})
endif()
set(_NCCL_INCLUDE_SEARCH_DIRS "")
list(APPEND _NCCL_INCLUDE_SEARCH_DIRS
${_NCCL_ROOT}/include
)
find_path(NCCL_INCLUDE_DIR
NAMES nccl.h
PATHS ${_NCCL_INCLUDE_SEARCH_DIRS}
)
set(_NCCL_LIBRARY_SEARCH_DIRS "")
list(APPEND _NCCL_LIBRARY_SEARCH_DIRS
${_NCCL_ROOT}/bin
)
find_library(NCCL_LIBRARY
NAMES nccl
PATHS ${_NCCL_LIBRARY_SEARCH_DIRS}
)
find_package_handle_standard_args(NCCL REQUIRED_VARS NCCL_INCLUDE_DIR NCCL_LIBRARY)
if (NCCL_FOUND)
mark_as_advanced(NCCL_INCLUDE_DIR)
mark_as_advanced(NCCL_LIBRARY)
endif()
if (NCCL_FOUND AND NOT TARGET NCCL::NCCL)
add_library(NCCL::NCCL SHARED IMPORTED)
if(MSVC)
string(REPLACE ".lib" ".dll" NCCL_DLL ${NCCL_LIBRARY})
set_property(TARGET NCCL::NCCL PROPERTY IMPORTED_LOCATION ${NCCL_DLL})
set_property(TARGET NCCL::NCCL PROPERTY IMPORTED_IMPLIB ${NCCL_LIBRARY})
else()
set_property(TARGET NCCL::NCCL PROPERTY IMPORTED_LOCATION ${NCCL_LIBRARY})
endif()
target_include_directories(NCCL::NCCL INTERFACE ${NCCL_INCLUDE_DIR})
endif()
+2 -2
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: Apache-2.0
#
#[=======================================================================[.rst:
@@ -93,7 +93,7 @@ may be provided to tell this module where to look.
#]=======================================================================]
cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.24)
include(GNUInstallDirs)
+7 -31
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: Apache-2.0
#
#[=======================================================================[.rst:
@@ -109,7 +109,7 @@ may be provided to tell this module where to look.
#]=======================================================================]
cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.24)
include(GNUInstallDirs)
@@ -334,10 +334,8 @@ set(_OPENVDB_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(OPENVDB_PYTHON_PATH_SUFFIXES
lib64/python
lib64/python2.7
lib64/python3
lib/python
lib/python2.7
lib/python3
)
@@ -491,37 +489,11 @@ endif()
# Add standard dependencies
find_package(TBB REQUIRED COMPONENTS tbb)
find_package(Boost REQUIRED COMPONENTS iostreams)
# Add deps for pyopenvdb
# @todo track for numpy
if(pyopenvdb IN_LIST OpenVDB_FIND_COMPONENTS)
find_package(Python REQUIRED)
# Boost python handling - try and find both python and pythonXx (version suffixed).
# Prioritize the version suffixed library, failing if neither exist.
find_package(Boost ${MINIMUM_BOOST_VERSION}
QUIET COMPONENTS python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}
)
if(TARGET Boost::python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
set(BOOST_PYTHON_LIB "python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
message(STATUS "Found boost_python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
else()
find_package(Boost ${MINIMUM_BOOST_VERSION} QUIET COMPONENTS python)
if(TARGET Boost::python)
set(BOOST_PYTHON_LIB "python")
message(STATUS "Found non-suffixed boost_python, assuming to be python version "
"\"${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}\" compatible"
)
else()
message(FATAL_ERROR "Unable to find boost_python or "
"boost_python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}."
)
endif()
endif()
endif()
# Add deps for openvdb_ax
@@ -656,6 +628,10 @@ if(OpenVDB_USES_IMATH_HALF)
find_package(Imath REQUIRED CONFIG)
endif()
if(OpenVDB_USES_DELAYED_LOADING)
find_package(Boost REQUIRED COMPONENTS iostreams)
endif()
if(UNIX)
find_package(Threads REQUIRED)
endif()
@@ -766,7 +742,7 @@ if(OpenVDB_pyopenvdb_LIBRARY)
set_target_properties(OpenVDB::pyopenvdb PROPERTIES
IMPORTED_LOCATION "${OpenVDB_pyopenvdb_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${OpenVDB_pyopenvdb_INCLUDE_DIR};${PYTHON_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "OpenVDB::openvdb;Boost::${BOOST_PYTHON_LIB};${PYTHON_LIBRARIES}"
INTERFACE_LINK_LIBRARIES "OpenVDB::openvdb;${PYTHON_LIBRARIES}"
INTERFACE_COMPILE_FEATURES cxx_std_17
)
endif()
+2 -2
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: Apache-2.0
#
#[=======================================================================[.rst:
@@ -93,7 +93,7 @@ may be provided to tell this module where to look.
#]=======================================================================]
cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.24)
include(GNUInstallDirs)
+2 -14
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: Apache-2.0
#
#[=======================================================================[.rst:
@@ -47,7 +47,7 @@ The following variables may be provided to tell this module where to look.
# Find the glfw3 installation and use glfw's CMake to initialize
# the glfw lib
cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.24)
set(_FIND_GLFW3_ADDITIONAL_OPTIONS "")
if(DISABLE_CMAKE_SEARCH_PATHS)
@@ -109,18 +109,6 @@ endif()
set(glfw3_FIND_VERSION ${MINIMUM_GLFW_VERSION})
find_package(glfw3 ${MINIMUM_GLFW_VERSION} REQUIRED)
# We only use find_package_handle_standard_args to verify and print
# appropriate messages. This now explicitly errors in 3.19...
# @todo Improve this entire GLFW3 search
# https://gitlab.kitware.com/cmake/cmake/-/issues/21505
if(${CMAKE_VERSION} VERSION_LESS 3.19)
find_package(PackageHandleStandardArgs)
find_package_handle_standard_args(glfw3
REQUIRED_VARS glfw3_DIR glfw3_FOUND
VERSION_VAR glfw3_VERSION
)
endif()
if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_GLFW_VERSION)
if(glfw3_VERSION VERSION_LESS ${FUTURE_MINIMUM_GLFW_VERSION})
message(DEPRECATION "Support for GLFW versions < ${FUTURE_MINIMUM_GLFW_VERSION} "
+2 -2
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: Apache-2.0
#
#[=======================================================================[.rst:
@@ -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.18)
cmake_minimum_required(VERSION 3.24)
# Include utility functions for version information
include(${CMAKE_CURRENT_LIST_DIR}/OpenVDBUtils.cmake)
+2 -2
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: Apache-2.0
#
#[=======================================================================[.rst:
@@ -51,7 +51,7 @@ variables may be provided to tell this module where to look.
# Find the Maya installation and use Maya's CMake to initialize
# the Maya lib
cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.24)
set(_FIND_MAYA_ADDITIONAL_OPTIONS "")
+118 -6
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: Apache-2.0
#
#[=======================================================================[.rst:
@@ -57,7 +57,7 @@ The following functions are provided:
#]=======================================================================]
cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.24)
function(OPENVDB_GET_VERSION_DEFINE HEADER KEY VALUE)
@@ -83,8 +83,8 @@ function(OPENVDB_GET_VERSION_DEFINE HEADER KEY VALUE)
endfunction()
########################################################################
########################################################################
###############################################################################
###############################################################################
function(OPENVDB_VERSION_FROM_HEADER OPENVDB_VERSION_FILE)
@@ -120,8 +120,8 @@ function(OPENVDB_VERSION_FROM_HEADER OPENVDB_VERSION_FILE)
endfunction()
########################################################################
########################################################################
###############################################################################
###############################################################################
function(OPENVDB_ABI_VERSION_FROM_PRINT OPENVDB_PRINT)
@@ -162,3 +162,115 @@ function(OPENVDB_ABI_VERSION_FROM_PRINT OPENVDB_PRINT)
set(${_VDB_ABI} ${_OpenVDB_ABI} PARENT_SCOPE)
endif()
endfunction()
###############################################################################
## @brief Compute the enumerated ISA value for x86/x86_64 architectures that
## VCL will use during compilation of OpenVDB. The value is stored in the
## VCL_INSTRSET variable. Possible values are:
## 0: Unknown or error
## 2: SSE2
## 3: SSE3
## 4: SSSE3
## 5: SSE4.1
## 6: SSE4.2
## 7: AVX
## 8: AVX2
## 9: AVX512F
## 10: AVX512BW/DQ/VL
function(OPENVDB_COMPUTE_X86_INSTRSET_FROM_VCL VCL_INSTRSET)
# Append project specific flags
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
if(OPENVDB_SIMD STREQUAL "AVX")
set(CMAKE_REQUIRED_FLAGS "-mavx;-msse4.2")
elseif(OPENVDB_SIMD STREQUAL "SSE42")
set(CMAKE_REQUIRED_FLAGS "-msse4.2")
endif()
# Figure out that the INSTRSET macro would expand to.
# @note would be much faster with try_run but this way doesn't involve
# invoking bad instruction sets on unsupported ISAs on the build machine.
include(CheckCXXSourceCompiles)
check_cxx_source_compiles([[
#include "${CMAKE_SOURCE_DIR}/ext/vcl/openvdb/ext/vcl/instrset.h"
int main() { static_assert(INSTRSET == 10); return 0; } ]] COMPUTE_VCL_INSTRSET__AVX512VL_DQ_BW__)
if(COMPUTE_VCL_INSTRSET__AVX512VL_DQ_BW__)
set(${VCL_INSTRSET} 10 PARENT_SCOPE)
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
return()
endif()
check_cxx_source_compiles([[
#include "${CMAKE_SOURCE_DIR}/ext/vcl/openvdb/ext/vcl/instrset.h"
int main() { static_assert(INSTRSET == 9); return 0; } ]] COMPUTE_VCL_INSTRSET__AVX512F__)
if(COMPUTE_VCL_INSTRSET__AVX512F__)
set(${VCL_INSTRSET} 9 PARENT_SCOPE)
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
return()
endif()
check_cxx_source_compiles([[
#include "${CMAKE_SOURCE_DIR}/ext/vcl/openvdb/ext/vcl/instrset.h"
int main() { static_assert(INSTRSET == 8); return 0; } ]] COMPUTE_VCL_INSTRSET__AVX2__)
if(COMPUTE_VCL_INSTRSET__AVX2__)
set(${VCL_INSTRSET} 8 PARENT_SCOPE)
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
return()
endif()
check_cxx_source_compiles([[
#include "${CMAKE_SOURCE_DIR}/ext/vcl/openvdb/ext/vcl/instrset.h"
int main() { static_assert(INSTRSET == 7); return 0; } ]] COMPUTE_VCL_INSTRSET__AVX__)
if(COMPUTE_VCL_INSTRSET__AVX__)
set(${VCL_INSTRSET} 7 PARENT_SCOPE)
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
return()
endif()
check_cxx_source_compiles([[
#include "${CMAKE_SOURCE_DIR}/ext/vcl/openvdb/ext/vcl/instrset.h"
int main() { static_assert(INSTRSET == 6); return 0; } ]] COMPUTE_VCL_INSTRSET__SSE4_2__)
if(COMPUTE_VCL_INSTRSET__SSE4_2__)
set(${VCL_INSTRSET} 6 PARENT_SCOPE)
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
return()
endif()
check_cxx_source_compiles([[
#include "${CMAKE_SOURCE_DIR}/ext/vcl/openvdb/ext/vcl/instrset.h"
int main() { static_assert(INSTRSET == 5); return 0; } ]] COMPUTE_VCL_INSTRSET__SSE4_1__)
if(COMPUTE_VCL_INSTRSET__SSE4_1__)
set(${VCL_INSTRSET} 5 PARENT_SCOPE)
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
return()
endif()
check_cxx_source_compiles([[
#include "${CMAKE_SOURCE_DIR}/ext/vcl/openvdb/ext/vcl/instrset.h"
int main() { static_assert(INSTRSET == 4); return 0; } ]] COMPUTE_VCL_INSTRSET__SSSE3__)
if(COMPUTE_VCL_INSTRSET__SSSE3__)
set(${VCL_INSTRSET} 4 PARENT_SCOPE)
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
return()
endif()
check_cxx_source_compiles([[
#include "${CMAKE_SOURCE_DIR}/ext/vcl/openvdb/ext/vcl/instrset.h"
int main() { static_assert(INSTRSET == 3); return 0; } ]] COMPUTE_VCL_INSTRSET__SSE3__)
if(COMPUTE_VCL_INSTRSET__SSE3__)
set(${VCL_INSTRSET} 3 PARENT_SCOPE)
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
return()
endif()
check_cxx_source_compiles([[
#include "${CMAKE_SOURCE_DIR}/ext/vcl/openvdb/ext/vcl/instrset.h"
int main() { static_assert(INSTRSET == 2); return 0; } ]] COMPUTE_VCL_INSTRSET__SSE2__)
if(COMPUTE_VCL_INSTRSET__SSE2__)
set(${VCL_INSTRSET} 2 PARENT_SCOPE)
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
return()
endif()
check_cxx_source_compiles([[
#include "${CMAKE_SOURCE_DIR}/ext/vcl/openvdb/ext/vcl/instrset.h"
int main() { static_assert(INSTRSET == 1); return 0; } ]] COMPUTE_VCL_INSTRSET__SSE__)
if(COMPUTE_VCL_INSTRSET__SSE__)
set(${VCL_INSTRSET} 1 PARENT_SCOPE)
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
return()
endif()
# Unknown or error
set(${VCL_INSTRSET} 0 PARENT_SCOPE)
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
endfunction()
+2 -2
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: Apache-2.0
#
#[=======================================================================[.rst:
@@ -16,7 +16,7 @@ existing from a previous run of cmake.
#]=======================================================================]
cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.24)
set(MANIFEST "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")
+51 -7
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: Apache-2.0
#
#[=======================================================================[
@@ -7,7 +7,7 @@
#]=======================================================================]
cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.24)
###############################################################################
@@ -127,6 +127,47 @@ endif()
###############################################################################
# x86 ISA selection
if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
if(OPENVDB_X86_INSTRSET GREATER_EQUAL 1)
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-msse>")
endif()
if(OPENVDB_X86_INSTRSET GREATER_EQUAL 2)
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-msse2>")
endif()
if(OPENVDB_X86_INSTRSET GREATER_EQUAL 3)
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-msse3>")
endif()
if(OPENVDB_X86_INSTRSET GREATER_EQUAL 4)
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-mssse3>")
endif()
if(OPENVDB_X86_INSTRSET GREATER_EQUAL 5)
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-msse4.1>")
endif()
if(OPENVDB_X86_INSTRSET GREATER_EQUAL 6)
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-msse4.2>")
endif()
if(OPENVDB_X86_INSTRSET GREATER_EQUAL 7)
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-mavx>")
endif()
if(OPENVDB_X86_INSTRSET GREATER_EQUAL 8)
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-mavx2>")
endif()
if(OPENVDB_X86_INSTRSET GREATER_EQUAL 9)
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-mavx512f>")
endif()
if(OPENVDB_X86_INSTRSET GREATER_EQUAL 10)
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-mavx512bw>")
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-mavx512dq>")
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-mavx512vl>")
endif()
elseif(OPENVDB_X86_INSTRSET GREATER 0)
message(WARNING "OPENVDB_X86_INSTRSET has been set but has no effect when building for ${CMAKE_SYSTEM_PROCESSOR}.")
endif()
###############################################################################
# Increase the number of sections that an object file can contain
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/bigobj>")
# Enable MSVC options that make it behave like other compilers
@@ -184,20 +225,23 @@ if(OPENVDB_CXX_STRICT)
add_compile_options("$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,9.3.0>>:-Wimplicit-fallthrough>")
# Only check global constructors for libraries (we should really check for
# executables too but gtest relies on these types of constructors for its
# framework).
add_compile_options("$<$<AND:$<NOT:$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>>,$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>>:-Wglobal-constructors>")
# framework). nanobind also incorporates these constructors so skip it as well.
add_compile_options("$<$<AND:$<NOT:$<OR:$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanobind-static>>>,$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>>:-Wglobal-constructors>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wno-sign-conversion>")
# GNU
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Werror>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wall>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wextra>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-pedantic>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wcast-align>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wcast-qual>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wconversion>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wdisabled-optimization>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Woverloaded-virtual>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wnon-virtual-dtor>")
# Disable select warnings for the nanobind static library
add_compile_options("$<$<AND:$<NOT:$<OR:$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanobind-static>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,openvdb_python>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanovdb_python>>>,$<COMPILE_LANG_AND_ID:CXX,GNU>>:-pedantic>")
add_compile_options("$<$<AND:$<NOT:$<OR:$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanobind-static>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,openvdb_python>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanovdb_python>>>,$<COMPILE_LANG_AND_ID:CXX,GNU>>:-Wcast-qual>")
add_compile_options("$<$<AND:$<NOT:$<OR:$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanobind-static>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,openvdb_python>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanovdb_python>>>,$<COMPILE_LANG_AND_ID:CXX,GNU>>:-Wconversion>")
add_compile_options("$<$<AND:$<OR:$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanobind-static>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,openvdb_python>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanovdb_python>>,$<COMPILE_LANG_AND_ID:CXX,GNU>>:-Wno-unused-variable>")
add_compile_options("$<$<AND:$<OR:$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanobind-static>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,openvdb_python>,$<STREQUAL:$<TARGET_PROPERTY:NAME>,nanovdb_python>>,$<COMPILE_LANG_AND_ID:CXX,GNU>>:-Wno-unused-but-set-parameter>")
else()
# NO OPENVDB_CXX_STRICT, suppress some warnings
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+28 -28
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: Apache-2.0
#
#[=======================================================================[
@@ -8,7 +8,7 @@
#]=======================================================================]
cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.24)
###############################################################################
@@ -27,59 +27,59 @@ 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).
# What's usually important is that the version of libstdc++ and glibc in use
# matches. Compilers other than GCC should provide options to ensure this
# targetting e.g. --gcc-toolchain and -fgnuc-version with Clang.
set(MINIMUM_GCC_VERSION 9.3.1)
set(MINIMUM_GCC_VERSION 11.2.1)
set(MINIMUM_CLANG_VERSION 5.0)
set(MINIMUM_ICC_VERSION 19)
set(MINIMUM_MSVC_VERSION 19.28) # 1928 (Visual Studio 2019 Version 16.8 + 16.9)
set(MINIMUM_MSVC_VERSION 19.30) # 1928 (Visual Studio 2019 Version 16.8 + 16.9)
# Should be 1.76 for VFX 22, but only version in apt is 1.73
set(MINIMUM_BOOST_VERSION 1.73)
set(MINIMUM_PYBIND_VERSION 2.9.1)
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 10.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.9.1)
set(MINIMUM_NUMPY_VERSION 1.20.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.
set(FUTURE_MINIMUM_GCC_VERSION 11.2.1)
set(FUTURE_MINIMUM_MSVC_VERSION 19.30) # 1930 (Visual Studio 2022)
# set(FUTURE_MINIMUM_GCC_VERSION 11.2.1)
# set(FUTURE_MINIMUM_MSVC_VERSION 19.30)
# set(FUTURE_MINIMUM_ICC_VERSION 19)
# set(FUTURE_MINIMUM_CXX_STANDARD 20)
set(FUTURE_MINIMUM_CMAKE_VERSION 3.20)
# set(FUTURE_MINIMUM_OPENEXR_VERSION 3.1)
set(FUTURE_MINIMUM_BOOST_VERSION 1.80)
set(FUTURE_MINIMUM_GLFW_VERSION 3.3)
set(FUTURE_MINIMUM_LOG4CPLUS_VERSION 2.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.10)
set(FUTURE_MINIMUM_NUMPY_VERSION 1.23.0)
# set(FUTURE_MINIMUM_PYTHON_VERSION 3.11)
# set(FUTURE_MINIMUM_HOUDINI_VERSION 20.0)
set(FUTURE_MINIMUM_LLVM_VERSION 13.0.0)
set(FUTURE_MINIMUM_LLVM_VERSION 18.0.0)
+101 -22
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenVDB Project
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: Apache-2.0
#
#[=======================================================================[
@@ -7,7 +7,7 @@
#]=======================================================================]
cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.24)
project(OpenVDBDocs LANGUAGES NONE)
include(GNUInstallDirs)
@@ -25,8 +25,16 @@ option(OPENVDB_DOXYGEN_NANOVDB "Build NanoVDB documentation" ON)
option(OPENVDB_DOXYGEN_INTERNAL [=[
Enable documentation of methods and classes which have been explicitly marked as internal
]=] OFF)
# When enabled, Doxygen's WARN_AS_ERROR=FAIL_ON_WARNINGS makes any warning fail
# the docs build (it still generates the docs and writes the full warning log
# first, then exits non-zero). CI turns this ON -- see .github/workflows/docs.yml
# -- so net-new doc warnings fail the PR that introduces them. Defaults OFF so a
# local doc build isn't blocked by a stray warning from a different Doxygen
# version; pass -DOPENVDB_DOXYGEN_WARN_AS_ERROR=ON to gate locally too.
option(OPENVDB_DOXYGEN_WARN_AS_ERROR
"Treat Doxygen warnings as errors" 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,11 +49,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/tree
openvdb/openvdb/util
ext/imath/openvdb/math
doc/build.txt
doc/changes.txt
doc/codingstyle.txt
@@ -57,28 +65,93 @@ 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)
# Hide implementation-detail symbols in the lowercase `internal` namespaces
# (the project convention for non-public helpers). Note: do NOT add a
# capital-I "*Internal*" glob here -- it also matches the public
# tree::InternalNode (and nanovdb::InternalNode) class, silently dropping it
# from the docs and breaking every \link to it (e.g. InternalNode::childCount
# in doc/changes.txt) while its RootNode/LeafNode siblings resolve fine.
set(DOXYGEN_EXCLUDE_SYMBOLS
"*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
# Enable \snippet resolution against the on-disk example sources. Paths in
# \snippet directives are resolved relative to EXAMPLE_PATH, so referring to
# `nanovdb/nanovdb/examples/ex_xxx/yyy.cc` from a doc page works as written.
set(DOXYGEN_EXAMPLE_PATH "${CMAKE_SOURCE_DIR}")
set(DOXYGEN_EXAMPLE_PATTERNS *.cc *.cpp *.cu *.cuh *.h *.txt)
set(DOXYGEN_EXAMPLE_RECURSIVE YES)
# Always capture Doxygen warnings to a logfile so CI can publish it as an
# artifact and contributors can see exactly what's broken.
set(DOXYGEN_WARN_LOGFILE "${CMAKE_CURRENT_BINARY_DIR}/doxygen.warnings.log")
if(OPENVDB_DOXYGEN_WARN_AS_ERROR)
# FAIL_ON_WARNINGS keeps generating docs but exits non-zero at the end if
# any warning was emitted. Requires Doxygen >= 1.9.x.
set(DOXYGEN_WARN_AS_ERROR FAIL_ON_WARNINGS)
# Don't suppress messages so contributors can see warnings during the build.
set(DOXYGEN_QUIET NO)
else()
set(DOXYGEN_QUIET YES)
endif()
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
# Render math formulas via MathJax instead of LaTeX -> PNG. This removes the
# entire `latex`/`dvips`/`gs` toolchain dependency from both local doc builds
# and CI (see .github/workflows/docs.yml), eliminates a class of cross-platform
# install pain, and produces crisper, selectable math in the rendered HTML.
set(DOXYGEN_USE_MATHJAX YES)
set(DOXYGEN_MATHJAX_VERSION MathJax_3) # default JS bundle loaded from a CDN
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
@@ -109,12 +182,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>,&nbsp;<i>j</i>,&nbsp;<i>k</i>)"]]
[[xyz="(<i>x</i>,&nbsp;<i>y</i>,&nbsp;<i>z</i>)"]]
[[ijk="(<i>i</i>,&nbsp\;<i>j</i>,&nbsp\;<i>k</i>)"]]
[[xyz="(<i>x</i>,&nbsp\;<i>y</i>,&nbsp\;<i>z</i>)"]]
[[const="<tt>const</tt>"]]
"\"vdbnamespace=openvdb::v${OpenVDB_MAJOR_VERSION}_${OpenVDB_MINOR_VERSION}\""
[["hunamespace=houdini_utils"]]
@@ -142,12 +216,18 @@ set(DOXYGEN_PREDEFINED
"OPENVDB_VERSION_NAME=v${OpenVDB_MAJOR_VERSION}_${OpenVDB_MINOR_VERSION}"
"OPENVDB_ABI_VERSION_NUMBER=${OpenVDB_MAJOR_VERSION}"
[[__declspec(x):= __attribute__(x):=]]
# Strip the symbol-visibility/export macro so Doxygen doesn't fold it into a
# declaration's name. Doxygen tolerates `class OPENVDB_API X` but mis-parses
# `enum OPENVDB_API X` (e.g. half::FromBitsTag in ext/imath/.../Half.h),
# reporting the enum as a documented-but-undeclared symbol.
"OPENVDB_API="
# Replace the deprecated macros with doxygen deprecated comments. This ensures
# that every bit of deprecated C++ is listed in the doxygen deprecated list,
# 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 "")
@@ -189,9 +269,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
@@ -204,7 +284,9 @@ if(OPENVDB_DOXYGEN_HOUDINI)
endif()
if(OPENVDB_DOXYGEN_AX)
set(DOXYGEN_EXTRA_PACKAGES amsmath) # for math formatting
# AX docs use @f$ inline and @f[ block math. Formula font size also applies
# under MathJax (set above). The amsmath package the AX docs assume is
# bundled by default in MathJax v3, so no extra extensions are required.
set(DOXYGEN_FORMULA_FONTSIZE 14)
list(APPEND DOXYGEN_ENABLED_SECTIONS "OPENVDB_AX")
@@ -220,8 +302,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)
@@ -235,7 +316,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
@@ -254,8 +334,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)
+225 -287
View File
@@ -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 "[]&nbsp;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>\"&nbsp;\"</b>.
by quotes&nbsp;`" "`.
@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 &amp;= b<br/>a |= b<br/>a ^= b<br/>a &lt;&lt;= b<br/>a &gt;&gt;= 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 &amp; b<br/>a | b<br/>
a ^ b<br/>a &lt;&lt; b<br/>a &gt;&gt; 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 &lt; b<br/>a &gt; b<br/>a &lt;= b<br/>a &gt;= 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&nbsp;&amp;&amp;&nbsp;b<br/>a&nbsp;||&nbsp;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/>{&nbsp;a,b&nbsp;...&nbsp;}
</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>`&amp;=`</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>`&lt;&lt;=`</b> @a `rhs` </td><td>Reference to @a `lhs`</td></tr>
<tr><td>Bitwise shift right assignment</td><td bgcolor="#ffc4c4"> @a `lhs` <b>`&gt;&gt;=`</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]&nbsp;=&nbsp;b;&nbsp;...&nbsp;a[n-1]&nbsp;=&nbsp;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]&nbsp;=&nbsp;b;&nbsp;...&nbsp;a[n-1]&nbsp;=&nbsp;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]&nbsp;=&nbsp;b[0];&nbsp;...&nbsp;a[n-1]&nbsp;=&nbsp;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>`&amp;=`</b></td>
<td bgcolor="#ffc4c4"> <b>`|=`</b></td>
<td bgcolor="#ffc4c4"> <b>`^=`</b></td>
<td bgcolor="#ffc4c4"> <b>`&lt;&lt;=`</b></td>
<td bgcolor="#ffc4c4"> <b>`&gt;&gt;= `</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&nbsp;Name</th><th>Operator&nbsp;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>`&amp;`</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>`&lt;&lt;`</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>`&gt;&gt;`</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&nbsp;Name</th><th>Operator&nbsp;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&nbsp;Name</th><th>Operator&nbsp;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&nbsp;Component&nbsp;Access</td>
<td bgcolor="#ffc4c4"> <em>`vector`</em>&nbsp;<b>.</b>&nbsp;@a `component` </td>
<td>Reference to component @a `component` of @a `vector`</td>
<td> <em>`vector`</em>&nbsp;<b>.</b>&nbsp;`component` </td>
<td>Reference to component `component` of `vector`</td>
</tr>
<tr style="text-align:left">
<td>Container&nbsp;Component&nbsp;Access</td>
<td bgcolor="#ffc4c4"> <em>`container`</em>&nbsp;<b>[</b>&nbsp;@a `exp` <b>]</b> </td>
<td>Reference to component at index @a `exp` of @a `container`</td>
<td> <em>`container`</em>&nbsp;<b>[</b>&nbsp;`exp` <b>]</b> </td>
<td>Reference to component at index `exp` of `container`</td>
</tr>
<tr style="text-align:left">
<td>Matrix&nbsp;Component&nbsp;Access</td>
<td bgcolor="#ffc4c4"> <em>`matrix`</em>&nbsp;<b>[</b>&nbsp;@a `exp1`,&nbsp;<em>`exp2`</em>&nbsp;<b>]</b> </td>
<td> <em>`matrix`</em>&nbsp;<b>[</b>&nbsp;`exp1`,&nbsp;<em>`exp2`</em>&nbsp;<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&nbsp;*&nbsp;dimension&nbsp;+&nbsp;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>&nbsp; <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>&nbsp;<b>`?`</b>&nbsp;<em>`b`</em>&nbsp;<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>&nbsp;<em> `a,&nbsp; `</em> `b&nbsp; `<b>`...&nbsp;}`</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>&nbsp;<b>`?`</b>&nbsp;<em>`b`</em>&nbsp;<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>&nbsp; <em>`a,&nbsp; b&nbsp; `</em><b>`...&nbsp;}`</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>
*/
+9 -12
View File
@@ -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>
*/
+14 -16
View File
@@ -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 -4
View File
@@ -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 -3
View File
@@ -1,5 +1,4 @@
/**
<div style="width:800px;text-align:justify;">
@page openvdbax OpenVDB AX
@@ -41,7 +40,6 @@ 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>
*/
+20 -32
View File
@@ -238,10 +238,8 @@ it's a good idea to read the above section on
DCC | Supported Version | OpenVDB ABI |
-------- | ----------------- | ----------- |
Houdini | 19.5 | 9 |
Houdini | 20.0 | 10 |
Maya | 2018 | Any |
Maya | 2019 | Any |
Houdini | 20.5 | 11 |
Houdini | 21.0 | 12 |
@subsection buildBuildHou Building Against Houdini
@@ -259,15 +257,13 @@ 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) |
PyBind11 | C++/python bindings | Optional (Python) |
NumPy | Scientific computing with Python | Optional (Python) |
nanobind | C++/python bindings | Optional (Python) |
LLVM | Target-independent code generation | OpenVDB AX |
At a minimum, boost, a matching C++17 compiler and CMake will be required. See
At a minimum a matching C++17 compiler and CMake will be required. See
the full [dependency list](@ref dependencies) for help with downloading and
installing the above software. Note that as Blosc and ZLib are provided as part
of the Houdini installation `USE_BLOSC` and `USE_ZLIB` should be left `ON`.
@@ -292,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
@@ -351,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) |
PyBind11 | C++/python bindings | Optional (Python) |
NumPy | Scientific computing with Python | Optional (Python) |
nanobind | C++/python bindings | Optional (Python) |
LLVM | Target-independent code generation | OpenVDB AX |
@@ -387,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
@@ -455,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
@@ -514,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.18)
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)
@@ -585,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
@@ -607,17 +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.73 requires CMake 3.17.2 or newer.
- Boost 1.74 requires CMake 3.19 or newer.
- Boost 1.75 requires CMake 3.19.5 or newer.
- Boost 1.76 requires CMake 3.20.3 or newer.
- Boost 1.77 requires CMake 3.21.3 or newer.
- Boost 1.78 requires CMake 3.22.2 or newer.
- Boost 1.79 requires CMake 3.23.2 or newer.
- 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.
@@ -643,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.
@@ -667,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'
+609 -41
View File
@@ -2,6 +2,576 @@
@page changes Release Notes
@htmlonly <a name="v13_0_1_changes"></a>@endhtmlonly
@par
<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&nbsp;20.5 and 12 for Houdini&nbsp;21.0.
</BLOCKQUOTE>
@par
<BLOCKQUOTE>
Support for reading <TT>.vdb</TT> files written prior to VDB&nbsp;1.0 has been
removed. To read older <TT>.vdb</TT> files, please use VDB&nbsp;12.x or older
and re-write them, so that they use the newer file format and can be read in
VDB&nbsp;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 @c openvdb::tree::LeafBuffer::storage()
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
@par
<B>Version 12.0.1</B> - <I>April 3, 2025</I>
@par
OpenVDB:
- New features:
- Added read and write support for OFF (Object File Format) files to vdb_tool
- Build:
- Fixed a build issue with vdb_render on Windows with newer versions of glew not including glu.h by default
- Fixed issues with newer versions of clang refusing to accept older ::template syntax
@par
NanoVDB:
- New features:
- Added support for multiple GPUs to DeviceBuffer
- Added a UnifiedBuffer class that wraps CUDA unified memory
- Added example for multiGPU sparse convolution
- Added CUDA utility functions for device queries
- Added functions to independently stop and compute the elapsed time for timer classes
- Improvements:
- Replaced CUB's CachingDeviceAllocator with the default asynchronous stream ordered allocator in PointsToGrid for improved performance
- Bug fix:
- Map is now properly transposed when converting NanoVDB to OpenVDB.
- Fixed ostream specializations being hidden within the nanovdb namespace
- Fixed a call to a non-existent method in GridBuild.h
@htmlonly <a name="v12_0_0_changes"></a>@endhtmlonly
@par
<B>Version 12.0.0</B> - <I>October 31, 2024</I>
@par
<BLOCKQUOTE>
OpenVDB is now licensed under the Apache&nbsp;2.0 license, instead of the MPL&nbsp;2.0 license.
</BLOCKQUOTE>
@par
<BLOCKQUOTE>
This version introduces ABI changes relative to older major releases, so to
preserve ABI compatibility it might be necessary to define the macro
<TT>OPENVDB_ABI_VERSION_NUMBER=</TT><I>N</I>, where, for example,
<I>N</I> is 10 for Houdini&nbsp;20.0 and 11 for Houdini&nbsp;20.5.
</BLOCKQUOTE>
@par
<BLOCKQUOTE>
GCC 9 is no longer supported.
</BLOCKQUOTE>
@par
OpenVDB:
- New features:
- Added tools::LevelSetFilter::fillet() method to round off concave edges
to create smoother transition between surfaces.
- Improvements:
- Added openvdb::assertAbort to replace cassert and a
@c OPENVDB_ENABLE_ASSERTS cmake argument/compile define to toggle
assertions in OpenVDB code, independantly of NDEBUG. Asserts are
no longer enabled by default in when NDEBUG is absent (e.g.
Debug builds).
- Removed last traces of Boost when @c OPENVDB_USE_DELAYED_LOADING is OFF
<I>[Reported&nbsp;by&nbsp;Brian&nbsp;McKinnon]</I>
- RootNode code cleanup to eliminate redundant key conversion and
to create map values in-place.
- Add RootNode::deleteChildOrTile() to delete a child or tile of
the root node.
- ValueAccessors are now defined and created in the Tree class
instead of in the Grid class so that custom Tree implementations
may define and create their own ValueAccessors if desired.
- Added support for PDAL to vdb_tool [Contributed by Tom Matterson]
- LeafManager and NodeManager now use Index64 for leaf counts internally.
- Added RootNode::probeChild() const.
- Added RootNode::probeChild() and RootNode::probeConstChild().
- Added RootNode::probe() and RootNode::probeConst() to query key presence,
child node, value and active state.
- Added InternalNode::probeChild() const.
- Added InternalNode::probeChild() and probeChildConst() with coord access
and optionally value and active state.
- Added InternalNode::probeChild() and probeChildConst() with index access
and optionally value and active state.
- Added InternalNode::isValueOff(), LeafNode::isValueOff(),
LeafNodeBool::isValueOff(), LeafNodeMask::isValueOff().
- Added LeafNodeMask::probeValue(Index,val), LeafNodeBool::probeValue(Index,val).
- Added RootNode::getValueUnsafe(), RootNode::getChildUnsafe(),
RootNode::getConstChildUnsafe().
- Added InternalNode::getValueUnsafe(), InternalNode::getChildUnsafe(),
InternalNode::getConstChildUnsafe().
- Added InternalNode::setActiveStateUnsafe(), InternalNode::setValueOnlyUnsafe(),
InternalNode::setValueOnUnsafe(), InternalNode::setValueOffUnsafe().
- Added InternalNode::setChildUnsafe(), InternalNode::resetChildUnsafe(),
InternalNode::stealChildUnsafe(), InternalNode::deleteChildUnsafe().
- For LeafNode, LeafNodeBool and LeafNodeMask - added
LeafNode::getValueUnsafe(), LeafNode::setActiveStateunsafe(),
LeafNode::setValueOnlyUnsafe(), LeafNode::setValueOnUnsafe(),
LeafNode::setValueOffUnsafe().
- ABI changes:
- Tree::leafCount(), Tree::unallocatedLeafCount(),
Tree::nonLeafCount() and Tree::nodeCount() now use Index64 in their
return types instead of Index32.
- API Changes:
- RootNode::tileCount(), RootNode::activeTileCount() and
RootNode::inactiveTileCount() are now public.
- RootNode::hasKey() and RootNode::coordToKey() are now public.
- RootNode::leafCount(), RootNode::nonLeafCount() and RootNode::nodeCount()
now use Index64 instead of Index32. The Index32 variant is deprecated.
- InternalNode::leafCount(), InternalNode::nonLeafCount() and
InternalNode::nodeCount() now use Index64 instead of Index32. The Index32
variant is deprecated.
- LeafNode::leafCount() and LeafNode::nonLeafCount() now use Index64 instead
of Index32. The Index32 variant is deprecated.
- Bug Fixes:
- Fix potential crash reading corrupt .vdb files with invalid
blosc or zip chunks.
<I>[Reported&nbsp;by&nbsp;Matthias&nbsp;Ueberheide]</I>
- Fix a bug in RootNode::setOrigin() where the origin was updated
before the error was thrown potentially leaving the root in an
invalid state.
- Fixed a thread sanitizer issue which could cause undefined
behaviour in VolumeToSpheres::fillWithSpheres
<I>[Reported&nbsp;by&nbsp;Jérémie&nbsp;Dumas]</I>
- Fixed an occurance of undefined behaviour in tools::activate
(though this would typically not have manifested with any
unintended behaviour)
@par
NanoVDB:
- Bug fix:
- nanovdb::readGrids works with raw grid buffer.
- Improvements:
- Restructure files location and namespace to be more align with
OpenVDB. The namespaces touched by the restructuring are: io,
cuda, util, tools, and math.
- Add two scripts updateFiles.sh and updateFiles.py to update the
files using NanoVDB. The script updateFiles.py works on both
Windows and Linux. For a more complete list of changes, see API
Changes (details).
- cuda::PointsToGrid supports target density.
- Add support for NanoVDB Grid of type UInt8.
- Add ability to use externally managed CUDA buffer.
- Add create methods for CudaDeviceBuffer and exceptions.
- Improve GridValidator logic, e.g. include check for grid count.
- Add operator > and >= for class Coord according to lexicographical order.
- Add toCodec to convert string to Codec enumeration type.
- Add nanovdb::strlen<GridType>().
- Add strncpy util.
- Add @c NANOVDB_DISABLE_SYNC_CUDA_MALLOC that maps cudaMallocAsync
and cudaFreeAsync to cudaMalloc and cudaFree respectively.
- Add guard to @c UINT64_C.
- Remove use of cudaMallocAsync in PointsToGrid.cuh.
- Align PNanoVDB blind metadata to NanoVDB.
- API Changes:
- Change mapToGridType to toGridType.
- Change mapToMagic to toMagic.
- Change <TT>CpuTimer.h</TT> to <TT>Timer.h</TT>.
- API Changes (details):
- These APIs are now under the math namespace: Ray, DDA, HDDA,
Vec3, Vec4, BBox, ZeroCrossing, TreeMarcher, PointTreeMarcher,
BoxStencil, CurvatureStencil, GradStencil, WenoStencil, AlignUp,
Min, Max, Abs, Clamp, Sqrt, Sign, Maximum, Delta, RoundDown, pi,
isApproxZero, Round, createSampler, SampleFromVoxels.
- These APIs are now under the tools namespace: createNanoGrid,
StatsMode, createLevelSetSphere, createFogVolumeSphere,
createFogVolumeSphere, createFogVolumeSphere,
createFogVolumeTorus, createLevelSetBox, CreateNanoGrid,
updateGridStats, evalChecksum, validateChecksum, checkGrid,
Extrema.
- These APIs are now under the util namespace: is_floating_point,
findLowestOn, findHighestOn, Range, streq, strcpy, strcat,
empty, Split, invoke, forEach, reduce, prefixSum, is_same,
is_specialization, PtrAdd, PtrDiff.
- Move nanovdb::build to nanovdb::tools::build.
- Rename nanovdb::BBoxR to nanovdb::Vec3dBBox.
- Rename nanovdb::BBox<nanovdb::Vec3d> to nanovdb::Vec3dBbox.
- Move nanovdb::cudaCreateNodeManager to nanovdb::cuda::createNodeManager.
- Move and rename nanovdb::cudaVoxelsToGrid to nanovdb::cuda::voxelsToGrid.
- Move and rename nanovdb::cudaPointsToGrid to nanovdb::cuda::pointsToGrid.
- Move nanovdb::DitherLUT to nanovdb::math::DitherLUT.
- Move and rename nanovdb::PackedRGBA8 to nanovdb::math::Rgba8.
- Move nanovdb::Rgba8 to nanovdb::math::Rgba8.
- Move and rename nanovdb::CpuTimer to nanovdb::util::Timer.
- Move nanovdb::GpuTimer to nanovdb::util::cuda::Timer.
- Move and rename nanovdb::CountOn to nanovdb::util::countOn.
- Move <TT>util/GridHandle.h</TT> to <TT>GridHandle.h</TT>.
- Move <TT>util/BuildGrid.h</TT> to <TT>tools/GridBuilder.h</TT>.
- Move <TT>util/GridBuilder.h</TT> to <TT>tools/GridBuilder.h</TT>.
- Move <TT>util/IO.h</TT> to <TT>io/IO.h</TT>.
- Move <TT>util/CSampleFromVoxels.h</TT> to <TT>math/CSampleFromVoxels.h</TT>.
- Move <TT>util/DitherLUT.h</TT> to <TT>math/DitherLUT.h</TT>.
- Move <TT>util/HDDA.h</TT> to <TT>math/HDDA.h</TT>.
- Move <TT>util/Ray.h</TT> to <TT>math/Ray.h</TT>.
- Move <TT>util/SampleFromVoxels.h</TT> to <TT>math/SampleFromVoxels.h</TT>.
- Move <TT>util/Stencils.h</TT> to <TT>nanovdb/math/Stencils.h</TT>.
- Move <TT>util/CreateNanoGrid.h</TT> to <TT>tools/CreateNanoGrid.h</TT>.
- Move and rename <TT>util/Primitives.h</TT> to <TT>tools/CreatePrimitives.h</TT>.
- Move <TT>util/GridChecksum.h</TT> to <TT>tools/GridChecksum.h</TT>.
- Move <TT>util/GridStats.h</TT> to <TT>tools/GridStats.h</TT>.
- Move <TT>util/GridChecksum.h</TT> to <TT>tools/GridChecksum.h</TT>.
- Move <TT>util/GridValidator.h</TT> to <TT>tools/GridValidator.h</TT>.
- Move <TT>util/NanoToOpenVDB.h</TT> to <TT>tools/NanoToOpenVDB.h</TT>.
- Move <TT>util/cuda/CudaGridChecksum.cuh</TT> to <TT>tools/cuda/CudaGridChecksum.cuh</TT>.
- Move <TT>util/cuda/CudaGridStats.cuh</TT> to <TT>tools/cuda/CudaGridStats.cuh</TT>.
- Move <TT>util/cuda/CudaGridValidator.cuh</TT> to <TT>tools/cuda/CudaGridValidator.cuh</TT>.
- Move <TT>util/cuda/CudaIndexToGrid.cuh</TT> to <TT>tools/cuda/CudaIndexToGrid.cuh</TT>.
- Move and rename <TT>util/cuda/CudaPointsToGrid.cuh</TT> to <TT>tools/cuda/PointsToGrid.cuh</TT>.
- Move <TT>util/cuda/CudaSignedFloodFill.cuh</TT> to <TT>tools/cuda/CudaSignedFloodFill.cuh</TT>.
- Move and rename <TT>util/cuda/CudaDeviceBuffer.h</TT> to <TT>cuda/DeviceBuffer.h</TT>.
- Move and rename <TT>util/cuda/CudaGridHandle.cuh</TT> to <TT>cuda/GridHandle.cuh</TT>.
- Move and rename <TT>util/cuda/CudaUtils.h</TT> to <TT>util/cuda/Util.h</TT>.
- Move and consolidate <TT>util/cuda/GpuTimer.h</TT> to <TT>util/cuda/Timer.h</TT>.
@par
Python:
- OpenVDB Python bindings are now implemented using nanobind
instead of pybind11
- The OpenVDB Python module has been changed from pyopenvdb to openvdb
- Added Python bindings for NanoVDB
@par
Houdini:
- When @c OPENVDB_ENABLE_RPATH is @c ON, the location of
libopenvdb_houdini is now added to the rpath of all Houdini
dsos.
@par
Build:
- Fixed an issue with OpenVDB AX's CMake on Windows where the
static and shared library targets would have the same name
<I>[Reported&nbsp;by&nbsp;Nicholas&nbsp;Yue]</I>
- @c USE_EXPLICIT_INSTANTIATION is now disabled on Windows by default
due to OOM linker issues.
- Jemalloc is now the preferred allocator of choice on all
platforms when @c CONCURRENT_MALLOC is set to Auto.
- Fixed an issue with the Blosc CMake FindPackage for the OpenVDB
Windows static library.
@htmlonly <a name="v11_0_0_changes"></a>@endhtmlonly
@par
<B>Version 11.0.0</B> - <I>November 1, 2023</I>
@@ -170,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:
@@ -2232,13 +2802,13 @@ Improvements:
util::PagedArray@endlink.
- Added an @c install_lib build target to the Makefile.
<I>[Contributed&nbsp;by&nbsp;Double&nbsp;Negative]</I>
- Added @subpage points "documentation" and Cookbook
- Added @ref points "documentation" and Cookbook
@ref openvdbPointsHelloWorld "examples" for OpenVDB&nbsp;Points.
<I>[Contributed&nbsp;by&nbsp;Double&nbsp;Negative]</I>
- Registration of OpenVDB&nbsp;Points grid and attribute types is now
handled in @vdblink::initialize() openvdb::initialize@endlink,
and @vdblink::points::initialize() points::initialize@endlink
and @vdblink::points::uninitialize() points::uninitialize@endlink
and @c openvdb::points::initialize()
and @c openvdb::points::uninitialize()
are therefore deprecated.
- Extended multi-pass I/O to handle a variable number of passes per leaf node.
<I>[Contributed&nbsp;by&nbsp;Double&nbsp;Negative]</I>
@@ -2956,11 +3526,10 @@ Houdini:
- @vdblink::tools::volumeToMesh() tools::volumeToMesh@endlink now compiles
for all grid types but throws an exception if the input grid does not
have a scalar value type.
- Added a
@vdblink::io::File::readGrid(const Name&, const BBoxd&) File::readGrid@endlink
overload and @vdblink::GridBase::readBuffers(std::istream&, const CoordBBox&)
readBuffers@endlink overloads to the grid, tree and node classes that allow
one to specify a bounding box against which to clip a grid while reading it.
- Added an <TT>openvdb::io::File::readGrid(const Name&, const BBoxd&)</TT>
overload and <TT>openvdb::GridBase::readBuffers(std::istream&, const CoordBBox&)</TT>
overloads to the grid, tree and node classes that allow one to specify a
bounding box against which to clip a grid while reading it.
For large grids, clipping while reading can result in significantly lower
memory usage than clipping after reading.
- Added @vdblink::GridBase::clipGrid() GridBase::clipGrid@endlink, which
@@ -3019,10 +3588,11 @@ Houdini:
- Added constructors and methods to both
@vdblink::math::RandInt RandInt@endlink and
@vdblink::math::Rand01 Rand01@endlink to set and reset the random seed value.
- Added convenience methods for
@vdblink::math::Transform::indexToWorld(const BBoxd&) const transforming@endlink
@vdblink::math::Transform::worldToIndex(const BBoxd&) const bounding@endlink
@vdblink::math::Transform::worldToIndexCellCentered(const BBoxd&) const boxes@endlink
- Added convenience methods
<TT>openvdb::math::Transform::indexToWorld(const BBoxd&)</TT>,
<TT>openvdb::math::Transform::worldToIndex(const BBoxd&)</TT> and
<TT>openvdb::math::Transform::worldToIndexCellCentered(const BBoxd&)</TT>
for transforming bounding boxes
to @vdblink::math::Transform math::Transform@endlink.
- @c vdb_view is now compatible with both GLFW&nbsp;2 and GLFW&nbsp;3.
- Made many small changes to address type conversion and other warnings
@@ -3042,9 +3612,9 @@ Houdini:
@par
API changes:
- The addition of a
@vdblink::GridBase::readBuffers(std::istream&, const CoordBBox&)
GridBase::readBuffers@endlink virtual function overload and the
- The addition of an
<TT>openvdb::GridBase::readBuffers(std::istream&, const CoordBBox&)</TT>
virtual function overload and the
@vdblink::GridBase::clip() GridBase::clip@endlink
@vdblink::GridBase::readNonresidentBuffers()
GridBase::readNonresidentBuffers@endlink and
@@ -3149,16 +3719,15 @@ Houdini:
extractSparseTreeWithMask@endlink, which copies data from the index-space
intersection of a sparse tree and a dense input grid.
- Added copy constructors to the
@vdblink::Grid::Grid(const Grid<OtherTreeType>&) Grid@endlink,
@vdblink::tree::Tree::Tree(const Tree<OtherRootType>&) Tree@endlink,
@vdblink::tree::RootNode::RootNode(const RootNode<OtherChildType>&)
RootNode@endlink,
@vdblink::tree::InternalNode::InternalNode(const InternalNode<OtherChildNodeType, Log2Dim>&)
InternalNode@endlink and
@vdblink::tree::LeafNode::LeafNode(const LeafNode<OtherValueType, Log2Dim>&) LeafNode@endlink
<TT>openvdb::Grid::Grid(const Grid&lt;OtherTreeType&gt;&)</TT>,
<TT>openvdb::tree::Tree::Tree(const Tree&lt;OtherRootType&gt;&)</TT>,
<TT>openvdb::tree::RootNode::RootNode(const RootNode&lt;OtherChildType&gt;&)</TT>,
<TT>openvdb::tree::InternalNode::InternalNode(const InternalNode&lt;OtherChildNodeType, Log2Dim&gt;&)</TT>
and
<TT>openvdb::tree::LeafNode::LeafNode(const LeafNode&lt;OtherValueType, Log2Dim&gt;&)</TT>
classes, and an assignment operator overload to
@vdblink::tree::RootNode::operator=(const RootNode<OtherChildType>&)
RootNode@endlink, that allow the source and destination to have different
<TT>openvdb::tree::RootNode::operator=(const RootNode&lt;OtherChildType&gt;&)</TT>,
that allow the source and destination to have different
value types.
- Modified @vdblink::tree::Tree::combine2() Tree::combine2@endlink to permit
combination of trees with different value types.
@@ -3210,7 +3779,7 @@ API changes:
LeafManager::LeafRange::Iterator@endlink,
@vdblink::util::BaseMaskIterator::operator=() BaseMaskIterator@endlink,
@vdblink::util::NodeMask::operator=() NodeMask@endlink and
@vdblink::util::RootNodeMask::operator=() RootNodeMask@endlink
@c openvdb::util::RootNodeMask::operator=()
now return references to the respective objects.
- Removed a number of methods that were deprecated in version&nbsp;2.0.0
or earlier.
@@ -3676,7 +4245,7 @@ API changes:
- @vdblink::tree::LeafManager tree::LeafManager@endlink can now be
instantiated with a @const tree, although buffer swapping with @const trees
is disabled.
- Added a @vdblink::Grid::signedFloodFill() Grid::signedFloodFill@endlink
- Added an @c openvdb::Grid::signedFloodFill()
overload that allows one to specify inside and outside values.
- Fixed a bug in Grid::setBackground() so that now only the values of
inactive voxels change.
@@ -3686,9 +4255,9 @@ API changes:
that relied on input and output grids having compatible tree topology.
- @vdblink::math::Transform math::Transform@endlink now includes an
@vdblink::math::Transform::isIdentity() isIdentity@endlink predicate
and methods to @vdblink::math::Transform::preMult(const Mat4d&) pre-@endlink
and @vdblink::math::Transform::postMult(const Mat4d&) postmultiply@endlink
by a matrix.
and methods <TT>openvdb::math::Transform::preMult(const Mat4d&)</TT> and
<TT>openvdb::math::Transform::postMult(const Mat4d&)</TT>
to pre- and postmultiply by a matrix.
- Modified the @link NodeMasks.h node mask@endlink classes to permit
octree-like tree configurations (i.e., with a branching factor of two)
and to use 64-bit operations instead of 32-bit operations.
@@ -3761,7 +4330,7 @@ API changes:
faster for high-resolution meshes where the polygon/voxel size ratio
is small.
- Added @vdblink::createLevelSet() createLevelSet@endlink and
@vdblink::createLevelSetSphere() createLevelSetSphere@endlink
@vdblink::tools::createLevelSetSphere() createLevelSetSphere@endlink
factory functions for level set grids.
- @vdblink::tree::ValueAccessor tree::ValueAccessor@endlink is now faster
for trees of height 2, 3 and 4 (the latter is the default), and it now
@@ -3874,7 +4443,7 @@ API changes:
- Added @vdblink::tools::compReplace() tools::compReplace@endlink,
which copies the active values of one grid into another, and added
a "Replace A With Active B" mode to the Combine SOP.
- @vdblink::Grid::signedFloodFill() Grid::signedFloodFill@endlink
- @c openvdb::Grid::signedFloodFill()
no longer enters an infinite loop when filling an empty grid.
- Fixed a bug in the particle to level set converter that sometimes
produced level sets with holes, and fixed a bug in the SOP that
@@ -4137,8 +4706,8 @@ API changes:
math library and a method to return the
@vdblink::math::Mat3::trace trace@endlink of a @c Mat3.
- Fixed a bug in the
@vdblink::tree::ValueAccessor::ValueAccessor(const ValueAccessor&)
ValueAccessor@endlink copy constructor that caused the copy to reference
<TT>openvdb::tree::ValueAccessor::ValueAccessor(const ValueAccessor&)</TT>
copy constructor that caused the copy to reference
the original.
- Fixed a bug in @vdblink::tree::RootNode::setActiveState()
RootNode::setActiveState@endlink that caused a crash
@@ -4146,7 +4715,7 @@ API changes:
- Added a @c Tree::pruneLevelSet method that is similar to but faster than
Tree::pruneInactive() for level set grids.
- Added fast leaf node voxel access
@vdblink::tree::LeafNode::getValue(Index) const methods@endlink
<TT>openvdb::tree::LeafNode::getValue(Index)</TT> methods
that index by linear offset (as returned by
@vdblink::tree::LeafNode::ValueOnIter::pos() ValueIter::pos@endlink)
instead of by @ijk coordinates.
@@ -4199,7 +4768,7 @@ API changes:
just the active states of voxels from one grid with those of
another grid of a possibly different type.
- Fixed an incorrect scale factor in the Laplacian diffusion
@vdblink::tools::Filter::laplacian() filter@endlink.
@c openvdb::tools::Filter::laplacian() filter.
- Fixed a bug in @vdblink::tree::Tree::merge() Tree::merge@endlink
that could leave a tree with invalid value accessors.
- Added @vdblink::tree::TreeValueIteratorBase::setActiveState()
@@ -4234,7 +4803,7 @@ API changes:
@par
<B>Version 0.92.0</B> - <I>August 23 2012</I>
- Added a Laplacian diffusion
@vdblink::tools::Filter::laplacian() filter@endlink.
@c openvdb::tools::Filter::laplacian() filter.
- Fixed a bug in the initialization of the sparse contour tracer
that caused mesh-to-volume conversion to fail in certain cases.
- Fixed a bug in the curvature stencil that caused mean curvature
@@ -4262,9 +4831,8 @@ API changes:
method that replaces a grid&rsquo;s tree with a new, empty tree of the
correct type.
- Fixed a crash in
@vdblink::tree::Tree::setValueOff(const Coord& xyz, const ValueType& value)
Tree::setValueOff@endlink when the new value was equal to the
background value.
<TT>openvdb::tree::Tree::setValueOff(const Coord& xyz, const ValueType& value)</TT>
when the new value was equal to the background value.
- Fixed bugs in Tree::prune() that could result in output tiles with
incorrect active states.
- Added @c librt to the link dependencies to address build failures
+1 -1
View File
@@ -7,7 +7,7 @@
This document details the coding practices that are used in the OpenVDB
codebase. Contributed code should conform to these guidelines to maintain
consistency and maintainability. If there is a rule that you would like
clarified, changed, or added, please send a note to openvdb@gmail.com.
clarified, changed, or added, please send a note to openvdb-dev@lists.aswf.io.
@section sStyleContents Contents
+59 -52
View File
@@ -36,61 +36,69 @@ Reference Platform, but for those that do, their specified versions are
Component | Requirements | Optional
----------------------- | ----------------------------------------------- | --------
OpenVDB Core Library | CMake, C++17 compiler, TBB::tbb, Boost::headers | Blosc, ZLib, Log4cplus, Imath::Imath, Boost::iostream
OpenVDB Core Library | CMake, C++17 compiler, TBB::tbb | Blosc, ZLib, Log4cplus, Imath::Imath (included), Boost::iostream, VCL (included)
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, PyBind11 | 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 Documentation | Doxygen | -
OpenVDB UnitTests | Core Library dependencies, GoogleTest, numpy* | -
OpenVDB Documentation | Doxygen, Doxygen Awesome (included) | -
- @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.
Note that OpenVDB comes bundled with the following dependencies. Please see
their respective license documentation in `ext/THIRD-PARTY.md` for license
information.
- Doxygen Awesome
- Imath::Imath
- VCL
@subsection depDependencyTable Dependency Table
Package | Minimum | Recommended | Description | apt-get | Homebrew | Source
-------------- | ------- | ----------- | ----------------------------------------------------------------- | ------- | -------- | ------
CMake | 3.18 | Latest | Cross-platform family of tools designed to help build software | Y | Y | https://cmake.org
GCC | 9.3.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.28 | 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.2 | 2020.3 | 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.73 | 1.80 | Components: headers, iostreams | Y | Y | https://www.boost.org
LLVM | 10.0.0 | 13.0.0* | Target-independent code generation | Y | Y | https://llvm.org/
Bison | 3.0.0 | 3.7.0 | General-purpose parser generator | Y | Y | https://www.gnu.org/software/gcc
Flex | 2.6.0 | 2.6.4 | Fast lexical analyzer generator | Y | Y | https://github.com/westes/flex
Python | 3.9.1 | 3.10 | The python interpreter and libraries | Y | Y | https://www.python.org
PyBind11 | 2.9.1 | Latest | C++/python bindings | Y | Y | https://pybind11.readthedocs.io
NumPy | 1.20.0 | 1.23.0 | Scientific computing with Python | Y | Y | http://www.numpy.org
GoogleTest | 1.10 | Latest | A unit testing framework module for C++ | Y | Y | https://github.com/google/googletest
CppUnit | 1.10 | Latest | A unit testing framework module for C++ | N | Y | https://freedesktop.org/wiki/Software/cppunit
Blosc | 1.17.0* | 1.17.0 | Recommended dependency for improved disk compression | Y | Y | https://github.com/Blosc/c-blosc/releases
Log4cplus | 1.1.2 | Latest | An optional dependency for improved OpenVDB Logging | Y | Y | https://github.com/log4cplus/log4cplus
libpng | - | Latest | Library for manipulating PNG images | Y | Y | http://www.libpng.org/pub/png/libpng.html
GLFW | 3.1 | > 3.3 | Simple API for OpenGL development | Y | Y | https://www.glfw.org
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
Package | Minimum | Recommended | Description | apt-get | Homebrew | Source
--------------- | ------- | ----------- | ----------------------------------------------------------------- | ------- | -------- | ------
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.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.82 | >= 1.85 | Components: iostreams | Y | Y | https://www.boost.org
VCL | 2.02.0 | >= 2.02.0 | x86 intrinsics and SIMD class wrappers and | Y | Y | https://github.com/vectorclass/version2
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.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
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.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.14.0 | Documentation generation from C++ | Y | Y | http://www.doxygen.nl
Doxygen Awesome | 2.0.0 | >= 2.0.0 | Documentation generation from C++ | Y | Y | https://github.com/jothepro/doxygen-awesome-css
- @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 +110,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
@@ -145,17 +156,15 @@ apt-get install zlibc # zlib
apt-get install libboost-iostreams-dev # Boost::iostream
apt-get install libblosc-dev # Blosc
# AX
apt-get install llvm-10-dev # LLVM
apt-get install llvm-15-dev # LLVM
# Python
apt-get install pybind11-dev # 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
@@ -180,12 +189,10 @@ brew install c-blosc # blosc
# AX
brew install llvm # LLVM
# Python
brew install pybind11 # PyBind11
brew install python # Python
brew install numpy # NumPy
brew install nanobind robin-map # nanobind
# Unit Tests
brew install gtest # GoogleTest
brew install cppunit # CppUnit
# vdb_view
brew install glfw # GLFW
# vdb_render
+18 -29
View File
@@ -22,44 +22,30 @@ primarily by
- Mihai Ald&eacute;n
- David Hill
See the @subpage changes "Release Notes" for what&rsquo;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
+5 -5
View File
@@ -40,10 +40,10 @@ details of VDB are described in the paper
<a href="http://www.museth.org/Ken/Publications.html" target="_blank">"VDB: High-Resolution Sparse Volumes with Dynamic Topology"</a>.
@section sWhatLicense What license is OpenVDB distributed under?
OpenVDB is released under the Mozilla Public License Version 2.0, which is a
free, open source software license developed and maintained by the Mozilla
Foundation. For more information about this license, see the
<a href="https://www.mozilla.org/en-US/MPL/" target="_blank">Mozilla FAQ</a>.
OpenVDB is released under the Apache License Version 2.0, which is a
free, open source software license developed and maintained by the Apache Software
Foundation. For more information about this license, see
<a href="https://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License, Version 2</a>.
@section sWhatCLA Is there a Contributor License Agreement for OpenVDB?
Yes, developers who wish to contribute code to be considered for inclusion
@@ -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&nbsp;B in the <i>Transactions on Graphics</i> paper.
@section sMaxRes Is OpenVDB unbounded?
+88
View File
@@ -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">&#160;$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 -->
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+1 -1
View File
@@ -26,7 +26,7 @@
* **Does NanoVDB depend on and require CUDA?**
No, NanoVDB is by design agnostic and works with most graphics APIs, e.g. OpenGL, OpenCL, OptiX, CUDA, HLSL, GLSL, DirectX, and even the CPU! The data structure itself (defined in [NanoVDB.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/NanoVDB.h) and [PNanoVDB.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/PNanoVDB.h)) only depends on C++11 or C99. However, some of the auxiliary math classes are optionally optimized with intrinsic CUDA calls (e.g. fma in Vec3) and some of the [Allocator](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/CudaDeviceBuffer.h) uses CUDA for explicit memory management. It should be straightforward to replace (or remove) these CUDA dependencies if you so desire.
No, NanoVDB is by design agnostic and works with most graphics APIs, e.g. OpenGL, OpenCL, OptiX, CUDA, HLSL, GLSL, DirectX, and even the CPU! The data structure itself (defined in [NanoVDB.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/NanoVDB.h) and [PNanoVDB.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/PNanoVDB.h)) only depends on C++11 or C99. However, some of the auxiliary math classes are optionally optimized with intrinsic CUDA calls (e.g. fma in Vec3) and the [DeviceBuffer](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/cuda/DeviceBuffer.h) allocator uses CUDA for explicit memory management. It should be straightforward to replace (or remove) these CUDA dependencies if you so desire.
* **How does the data structure of NanoVDB compare to that of OpenVDB?**
+25 -141
View File
@@ -1,154 +1,38 @@
# NanoVDB Hello World Examples {#NanoVDB_HelloWorld}
[The first example](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/examples/ex_openvdb_to_nanovdb_accessor/openvdb_to_nanovdb_accessor.cc) shows how to convert an OpenVDB level set sphere into a NanoVDB level set, use accessors to print out multiple values from both grids, and save the NanoVDB grid to file. Note that **this example depends on both OpenVDB and NanoVDB**.
The example snippets below are pulled directly from compiled example source
files via Doxygen's `\snippet` mechanism, so the code shown here is always
in sync with what is built and tested in CI. Enable
`-DNANOVDB_BUILD_EXAMPLES=ON` to build them locally.
```cpp
#include <openvdb/tools/LevelSetSphere.h> // replace with your own dependencies for generating the OpenVDB grid
#include <nanovdb/util/CreateNanoGrid.h> // converter from OpenVDB to NanoVDB (includes NanoVDB.h and GridManager.h)
#include <nanovdb/util/IO.h>
## Convert an OpenVDB grid to NanoVDB and use accessors
// Convert an openvdb level set sphere into a nanovdb, use accessors to print out multiple values from both
// grids and save the NanoVDB grid to file.
// Note, main depends on BOTH OpenVDB and NanoVDB.
int main()
{
try {
// Create an OpenVDB grid (here a level set surface but replace this with your own code)
auto srcGrid = openvdb::tools::createLevelSetSphere<openvdb::FloatGrid>(100.0f, openvdb::Vec3f(0.0f), 1.0f);
[The first example](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/examples/ex_openvdb_to_nanovdb_accessor/openvdb_to_nanovdb_accessor.cc)
shows how to convert an OpenVDB level set sphere into a NanoVDB level set, use
accessors to print out multiple values from both grids, and save the NanoVDB
grid to file. Note that **this example depends on both OpenVDB and NanoVDB**.
// Convert the OpenVDB grid, srcGrid, into a NanoVDB grid handle.
auto handle = nanovdb::createNanoGrid(*srcGrid);
\snippet nanovdb/nanovdb/examples/ex_openvdb_to_nanovdb_accessor/openvdb_to_nanovdb_accessor.cc openvdb_to_nanovdb_accessor
// Define a (raw) pointer to the NanoVDB grid on the host. Note we match the value type of the srcGrid!
auto* dstGrid = handle.grid<float>();
## Read a NanoVDB grid from a file (host only)
if (!dstGrid)
throw std::runtime_error("GridHandle does not contain a grid with value type float");
[The second example](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/examples/ex_read_nanovdb_sphere_accessor/read_nanovdb_sphere_accessor.cc)
reads a NanoVDB grid from a file (the one saved in the previous example) and
prints out multiple values. Note that **this example does not depend on
OpenVDB (nor CUDA), only NanoVDB**.
// Get accessors for the two grids. Note that accessors only accelerate repeated access!
auto dstAcc = dstGrid->getAccessor();
auto srcAcc = srcGrid->getAccessor();
\snippet nanovdb/nanovdb/examples/ex_read_nanovdb_sphere_accessor/read_nanovdb_sphere_accessor.cc read_nanovdb_sphere_accessor
// Access and print out a cross-section of the narrow-band level set from the two grids
for (int i = 97; i < 104; ++i) {
printf("(%3i,0,0) OpenVDB cpu: % -4.2f, NanoVDB cpu: % -4.2f\n", i, srcAcc.getValue(openvdb::Coord(i, 0, 0)), dstAcc.getValue(nanovdb::Coord(i, 0, 0)));
}
## Read a NanoVDB grid and access it on the CPU and GPU
nanovdb::io::writeGrid("data/sphere.nvdb", handle); // Write the NanoVDB grid to file and throw if writing fails
}
catch (const std::exception& e) {
std::cerr << "An exception occurred: \"" << e.what() << "\"" << std::endl;
}
return 0;
}
```
[The third example](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/examples/ex_read_nanovdb_sphere_accessor_cuda/read_nanovdb_sphere_accessor_cuda.cu)
reads a NanoVDB grid from a file (the one saved in the first example) and
prints out multiple values on both the CPU and GPU. Note that **this example
does NOT depend on OpenVDB, only NanoVDB and CUDA**.
[The second example](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/examples/ex_read_nanovdb_sphere_accessor/read_nanovdb_sphere_accessor.cc) reads a NanoVDB grid from a file (the one saved in the previous example) and prints out multiple values. Note that **this example does not depend on OpenVDB (nor CUDA), only NanoVDB**.
\snippet nanovdb/nanovdb/examples/ex_read_nanovdb_sphere_accessor_cuda/read_nanovdb_sphere_accessor_cuda.cu read_nanovdb_sphere_accessor_cuda
```cpp
#include <nanovdb/util/IO.h> // this is required to read (and write) NanoVDB files on the host
NVCC requires the CUDA kernel to be defined in
[a separate .cu file](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/examples/ex_read_nanovdb_sphere_accessor_cuda/read_nanovdb_sphere_accessor_cuda_kernel.cu):
/// @brief Read a NanoVDB grid from a file and print out multiple values.
///
/// @note Note This example does NOT depend on OpenVDB (nor CUDA), only NanoVDB.
int main()
{
try {
auto handle = nanovdb::io::readGrid("data/sphere.nvdb"); // reads first grid from file
auto* grid = handle.grid<float>(); // get a (raw) pointer to a NanoVDB grid of value type float
if (!grid)
throw std::runtime_error("File did not contain a grid with value type float");
auto acc = grid->getAccessor(); // create an accessor for fast access to multiple values
for (int i = 97; i < 104; ++i) {
printf("(%3i,0,0) NanoVDB cpu: % -4.2f\n", i, acc.getValue(nanovdb::Coord(i, 0, 0)));
}
}
catch (const std::exception& e) {
std::cerr << "An exception occurred: \"" << e.what() << "\"" << std::endl;
}
return 0;
}
```
[The third example](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/examples/ex_read_nanovdb_sphere_accessor_cuda/read_nanovdb_sphere_accessor_cuda.cc) reads a NanoVDB grid from a file (the one saved in the first example) and prints out multiple values on both the CPU and GPU. Note that **this example does NOT depend on OpenVDB, only NanoVDB and CUDA**.
```cpp
#include <nanovdb/util/IO.h> // this is required to read (and write) NanoVDB files on the host
#include <nanovdb/util/cuda/CudaDeviceBuffer.h> // required for CUDA memory management
extern "C" void launch_kernels(const nanovdb::NanoGrid<float>*,
const nanovdb::NanoGrid<float>*,
cudaStream_t stream);
/// @brief Read a NanoVDB grid from a file and print out multiple values on both the cpu and gpu.
///
/// @note Note This example does NOT depend on OpenVDB, only NanoVDB and CUDA.
int main()
{
try {
// returns a GridHandle using CUDA for memory management.
auto handle = nanovdb::io::readGrid<nanovdb::CudaDeviceBuffer>("data/sphere.nvdb");
cudaStream_t stream; // Create a CUDA stream to allow for asynchronous copy of pinned CUDA memory.
cudaStreamCreate(&stream);
handle.deviceUpload(stream, false); // Copy the NanoVDB grid to the GPU asynchronously
auto* cpuGrid = handle.grid<float>(); // get a (raw) pointer to a NanoVDB grid of value type float on the CPU
auto* deviceGrid = handle.deviceGrid<float>(); // get a (raw) pointer to a NanoVDB grid of value type float on the GPU
if (!deviceGrid || !cpuGrid)
throw std::runtime_error("GridHandle did not contain a grid with value type float");
launch_kernels(deviceGrid, cpuGrid, stream); // Call a host method to print a grid values on both the CPU and GPU
cudaStreamDestroy(stream); // Destroy the CUDA stream
}
catch (const std::exception& e) {
std::cerr << "An exception occurred: \"" << e.what() << "\"" << std::endl;
}
return 0;
}
```
NVCC requires the CUDA kernel to be defined in [a separate .cu file](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/examples/ex_read_nanovdb_sphere_accessor_cuda/read_nanovdb_sphere_accessor_cuda.cu):
```cpp
#include <nanovdb/NanoVDB.h> // this defined the core tree data structure of NanoVDB accessible on both the host and device
#include <stdio.h> // for printf
// This is called by the host only
void cpu_kernel(const nanovdb::NanoGrid<float>* cpuGrid)
{
auto cpuAcc = cpuGrid->getAccessor();
for (int i = 97; i < 104; ++i) {
printf("(%3i,0,0) NanoVDB cpu: % -4.2f\n", i, cpuAcc.getValue(nanovdb::Coord(i, 0, 0)));
}
}
// This is called by the device only
__global__ void gpu_kernel(const nanovdb::NanoGrid<float>* deviceGrid)
{
if (threadIdx.x > 6)
return;
int i = 97 + threadIdx.x;
auto gpuAcc = deviceGrid->getAccessor();
printf("(%3i,0,0) NanoVDB gpu: % -4.2f\n", i, gpuAcc.getValue(nanovdb::Coord(i, 0, 0)));
}
// This is called by the client code on the host
extern "C" void launch_kernels(const nanovdb::NanoGrid<float>* deviceGrid,
const nanovdb::NanoGrid<float>* cpuGrid,
cudaStream_t stream)
{
// Launch the device kernel asynchronously
gpu_kernel<<<1, 64, 0, stream>>>(deviceGrid);
// Launch the host "kernel" (synchronously)
cpu_kernel(cpuGrid);
}
```
\snippet nanovdb/nanovdb/examples/ex_read_nanovdb_sphere_accessor_cuda/read_nanovdb_sphere_accessor_cuda_kernel.cu read_nanovdb_sphere_accessor_cuda_kernel
+54 -24
View File
@@ -5,15 +5,15 @@
* [NanoVDB.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/NanoVDB.h) C++11 implementation of the core data structure and its access methods.
* [CNanoVDB.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/CNanoVDB.h) Incomplete but useable C99 implementation of the core data structure and its access methods. Designed in particular for use in OpenCL kernels. Note that this relies on zero-sized arrays for the _reserved padding, so will not work on all compilers (with MSVC being a particular example)
* [PNanoVDB.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/PNanoVDB.h) C99 implementation of the core data structure and its access methods. More complete coverage than CNanoVDB. This version is pointer-less and supports virtually all graphics APIs.
* [util/GridHandle.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/GridHandle.h) defines a handler for the memory allocated to a NanoVDB grid.
* [util/IO.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/IO.h) implements I/O support.
* [util/OpenToNanoVDB.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/OpenToNanoVDB.h) defines the converter from OpenVDB to NanoVDB and obviously depends on the OpenVDB library (as the only header file).
* [Ray.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/Ray.h) Ray class.
* [HDDA.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/HDDA.h) HDDA related.
* [SampleFromVoxels.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/SampleFromVoxels.h) interpolation.
* [GridHandle.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/GridHandle.h) defines a handler for the memory allocated to a NanoVDB grid.
* [io/IO.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/io/IO.h) implements I/O support.
* [tools/CreateNanoGrid.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/tools/CreateNanoGrid.h) defines the converter from OpenVDB to NanoVDB and obviously depends on the OpenVDB library (as the only header file).
* [math/Ray.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/math/Ray.h) Ray class.
* [math/HDDA.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/math/HDDA.h) HDDA related.
* [math/SampleFromVoxels.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/math/SampleFromVoxels.h) interpolation.
```bash
foo@bar:~$ tree
```
$ tree
.
├── CMakeLists.txt
├── cmd
@@ -22,25 +22,19 @@ foo@bar:~$ tree
│ │ └── nanovdb_convert.cc
│ ├── print
│ │ └── nanovdb_print.cc
│ ├── updateFiles.sh
│ └── validate
│ └── nanovdb_validate.cc
├── CNanoVDB.h
├── cuda
│ ├── DeviceBuffer.h
│ ├── GridHandle.cuh
│ └── NodeManager.cuh
├── docs
│ ├── CMakeLists.txt
│ ├── codingstyle.txt
│ └── doxygen-config
├── examples
│ ├── benchmark
│ │ ├── BenchKernels_dense.cu
│ │ ├── BenchKernels_nano.cu
│ │ ├── Benchmark_dense.cu
│ │ ├── Benchmark_nano.cu
│ │ ├── Camera.h
│ │ ├── CMakeLists.txt
│ │ ├── DenseGrid.h
│ │ ├── Image.h
│ │ ├── TestBenchmark.cc
│ │ └── TestBenchmark.cu
│ ├── CMakeLists.txt
│ ├── ex_bump_pool_buffer
│ │ └── bump_pool_buffer.cc
@@ -50,7 +44,7 @@ foo@bar:~$ tree
│ │ ├── nanovdb.cu
│ │ └── openvdb.cc
│ ├── ex_index_grid_cuda
│ │ ├── index_grid_cuda.cu
│ │ ├── index_grid_cuda.cc
│ │ └── index_grid_cuda_kernel.cu
│ ├── ex_make_custom_nanovdb
│ │ └── make_custom_nanovdb.cc
@@ -66,6 +60,7 @@ foo@bar:~$ tree
│ ├── ex_map_pool_buffer
│ │ └── map_pool_buffer.cc
│ ├── ex_modify_nanovdb_thrust
│ │ ├── modify_nanovdb_thrust.cc
│ │ └── modify_nanovdb_thrust.cu
│ ├── ex_nodemanager_cuda
│ │ ├── nodemanager_cuda.cc
@@ -103,9 +98,38 @@ foo@bar:~$ tree
│ │ └── VoxToNanoVDB.h
│ └── ex_write_nanovdb_grids
│ └── write_nanovdb_grids.cc
├── GridHandle.h
├── HostBuffer.h
├── io
│ └── IO.h
├── math
│ ├── CSampleFromVoxels.h
│ ├── DitherLUT.h
│ ├── HDDA.h
│ ├── Math.h
│ ├── Ray.h
│ ├── SampleFromVoxels.h
│ └── Stencils.h
├── NanoVDB.h
├── NodeManager.h
├── PNanoVDB.h
├── Readme.md
├── tools
│ ├── CreateNanoGrid.h
│ ├── CreatePrimitives.h
│ ├── cuda
│ │ ├── AddBlindData.cuh
│ │ ├── GridChecksum.cuh
│ │ ├── GridStats.cuh
│ │ ├── GridValidator.cuh
│ │ ├── IndexToGrid.cuh
│ │ ├── PointsToGrid.cuh
│ │ └── SignedFloodFill.cuh
│ ├── GridBuilder.h
│ ├── GridChecksum.h
│ ├── GridStats.h
│ ├── GridValidator.h
│ └── NanoToOpenVDB.h
├── unittest
│ ├── CMakeLists.txt
│ ├── pnanovdb_validate_strides.h
@@ -115,21 +139,25 @@ foo@bar:~$ tree
└── util
├── CpuTimer.h
├── CreateNanoGrid.h
├── CSampleFromVoxels.h
├── cuda
│ ├── CudaAddBlindData.cuh
│ ├── CudaDeviceBuffer.h
│ ├── CudaGridChecksum.cuh
│ ├── CudaGridHandle.cuh
│ ├── CudaGridStats.cuh
│ ├── CudaGridValidator.cuh
│ ├── CudaIndexToGrid.cuh
│ ├── CudaNodeManager.cuh
│ ├── CudaPointsToGrid.cuh
│ ├── CudaSignedFloodFill.cuh
│ ├── CudaUtils.h
│ └── GpuTimer.cuh
│ ├── GpuTimer.h
│ ├── Timer.h
│ └── Util.h
├── DitherLUT.h
├── ForEach.h
├── GridBuilder.h
├── GridChecksum.h
├── GridHandle.h
├── GridStats.h
├── GridValidator.h
├── HDDA.h
@@ -145,5 +173,7 @@ foo@bar:~$ tree
├── Ray.h
├── Reduce.h
├── SampleFromVoxels.h
└── Stencils.h
├── Stencils.h
├── Timer.h
└── Util.h
```
+67
View File
@@ -0,0 +1,67 @@
# TEACHME
This directory contains interactive lesson documents designed to be loaded by
an LLM coding agent (Claude Code, Cursor, or similar) to teach a user NanoVDB
interactively.
The lesson teaches how to *use* NanoVDB to read, build, transform, and render
sparse volumetric data on CPU and GPU. It is a single self-contained markdown
file the agent reads at the start of a session.
## Getting started
The easiest way to use this lesson is with [Claude Code](https://docs.anthropic.com/en/docs/claude-code)
(CLI or IDE extension) from the root of an OpenVDB checkout. The agent can
read the lesson files *and* the NanoVDB source code, so it can verify API
details and help you debug exercises in real time.
**Example prompts:**
To learn how to use NanoVDB:
```
Read doc/nanovdb/TEACHME/nanovdb_user_lesson.md and teach me how to use NanoVDB.
```
You can also give the agent context about your background so it can tailor
the lesson:
```
Read doc/nanovdb/TEACHME/nanovdb_user_lesson.md and teach me NanoVDB. I have
C++ and CUDA experience but I've never used OpenVDB or any sparse 3D data
structure before.
```
Keep the matching cheatsheet (`*_cheatsheet.md`) open in your editor while
working through exercises — it's a quick reference for the APIs and
invariants covered in the lesson.
## How it works
The lesson is a self-contained markdown file that serves as both a
curriculum and an instructor prompt. The LLM acts as an interactive
instructor: teaching concepts module by module, quizzing the student, and
adapting to their responses.
The lesson includes:
- Teacher instructions (persona, pacing, scope)
- Module-by-module curriculum with embedded concepts and code examples
- Quiz questions and an answer key
- Exercises with progressive difficulty
- A capstone project
- A reference table at the end
## Available lessons
| Lesson | Cheat sheet | Covers |
|---|---|---|
| [nanovdb_user_lesson.md](nanovdb_user_lesson.md) | [nanovdb_user_cheatsheet.md](nanovdb_user_cheatsheet.md) | Reading `.nvdb` files, `ReadAccessor`, `NodeManager`, math + sampling, HDDA ray-march, GPU kernels with `Grid`, GPU topology builders (`PointsToGrid`, `MeshToGrid`, `DilateGrid`, etc.), `IndexGrid` + `VoxelBlockManager`, OpenVDB ↔ NanoVDB conversion |
## Not covered
- The OpenVDB side (the dynamic, mutable tree used at film/sim time) — this
lesson treats OpenVDB only at the conversion boundary.
- Houdini / Maya integration — outside the scope.
- Gaussian splatting and fVDB-specific topics — see the fVDB repo's own
TEACHME at <https://github.com/openvdb/fvdb-core/tree/main/docs/TEACHME>.
+6
View File
@@ -0,0 +1,6 @@
# Build + editor + render artifacts (not source)
build/
compile_commands.json
.clangd
*.ppm
sphere.png
@@ -0,0 +1,27 @@
cmake_minimum_required(VERSION 3.20)
project(nanovdb_capstone LANGUAGES CXX CUDA)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CUDA_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # emit build/compile_commands.json
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES 89) # RTX 6000 Ada; override with -DCMAKE_CUDA_ARCHITECTURES=...
endif()
# NanoVDB headers pull in CUDA lambdas / relaxed-constexpr paths.
string(APPEND CMAKE_CUDA_FLAGS " --extended-lambda --expt-relaxed-constexpr")
# This file is at doc/nanovdb/TEACHME/capstone/CMakeLists.txt; the NanoVDB
# include root (the dir containing the nanovdb/ header subdir) is the repo's
# `nanovdb/` subdir — repo root is four dirs up.
get_filename_component(_teachme "${CMAKE_CURRENT_SOURCE_DIR}" DIRECTORY) # TEACHME
get_filename_component(_docnv "${_teachme}" DIRECTORY) # doc/nanovdb
get_filename_component(_doc "${_docnv}" DIRECTORY) # doc
get_filename_component(REPO_ROOT "${_doc}" DIRECTORY) # repo root
set(NANOVDB_INCLUDE_ROOT "${REPO_ROOT}/nanovdb")
message(STATUS "NanoVDB include root: ${NANOVDB_INCLUDE_ROOT}")
add_executable(raymarch raymarch.cu)
target_include_directories(raymarch PRIVATE "${NANOVDB_INCLUDE_ROOT}")
# Binary lands in the build dir (conventional). raymarch writes sphere.ppm to
# the current working directory, so run it from wherever you want the output.
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env python3
"""Convert a binary P6 PPM to PNG using only the Python standard library
(the container has no ImageMagick / PIL). Usage: python3 ppm2png.py in.ppm out.png"""
import sys, struct, zlib, binascii
def main(src, dst):
data = open(src, "rb").read()
i = 0
def tok(i):
n = len(data)
while i < n and data[i] in b" \t\n\r": i += 1
s = i
while i < n and data[i] not in b" \t\n\r": i += 1
if s == i: raise ValueError("truncated or non-binary PPM")
return data[s:i], i
magic, i = tok(i)
assert magic == b"P6", "not a binary PPM"
w, i = tok(i); h, i = tok(i); mx, i = tok(i)
i += 1 # single whitespace after maxval
W, H = int(w), int(h)
px = data[i:i + W * H * 3]
def chunk(typ, payload):
return (struct.pack(">I", len(payload)) + typ + payload +
struct.pack(">I", binascii.crc32(typ + payload) & 0xffffffff))
raw = bytearray()
for y in range(H):
raw.append(0) # filter: none
raw += px[y * W * 3:(y + 1) * W * 3]
png = (b"\x89PNG\r\n\x1a\n"
+ chunk(b"IHDR", struct.pack(">IIBBBBB", W, H, 8, 2, 0, 0, 0))
+ chunk(b"IDAT", zlib.compress(bytes(raw), 9))
+ chunk(b"IEND", b""))
open(dst, "wb").write(png)
print(f"wrote {dst} ({W}x{H})")
if __name__ == "__main__":
main(sys.argv[1], sys.argv[2])
+111
View File
@@ -0,0 +1,111 @@
// Capstone scaffold: GPU level-set ray-march renderer.
//
// The host plumbing is DONE (build SDF, upload to device, launch, read back,
// write PPM) and the light direction + ambient level are handed to the kernel
// as parameters. Your job is the kernel body — the per-pixel ray-march + shade.
// As shipped it compiles and runs but only writes a placeholder gradient.
//
// Build: cmake -S . -B build && cmake --build build
// Run: ./build/raymarch [ambient] [lx ly lz] (writes sphere.ppm)
// View: python3 ppm2png.py sphere.ppm sphere.png (then open sphere.png)
#include <nanovdb/NanoVDB.h>
#include <nanovdb/tools/CreatePrimitives.h>
#include <nanovdb/cuda/DeviceBuffer.h>
#include <nanovdb/cuda/GridHandle.cuh>
#include <nanovdb/math/Ray.h>
#include <nanovdb/math/HDDA.h> // nanovdb::math::ZeroCrossing
#include <nanovdb/math/Stencils.h> // nanovdb::math::GradStencil
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <vector>
using GridT = nanovdb::NanoGrid<float>;
__global__ void render(const GridT* grid, unsigned char* img, int W, int H,
nanovdb::Vec3f lightDir, float ambient)
{
const int x = blockIdx.x * blockDim.x + threadIdx.x;
const int y = blockIdx.y * blockDim.y + threadIdx.y;
if (x >= W || y >= H) return;
const int pid = (y * W + x) * 3;
// ===================== YOUR WORK STARTS HERE =====================
// Placeholder so it compiles & runs: a horizontal grey gradient.
unsigned char shade = (unsigned char)(255.f * x / W);
// The aesthetic inputs are given to you as parameters: `lightDir` and
// `ambient` (set in main, overridable on the command line). You write the
// ray-march and the shading math. Signatures are in the cheat sheet.
//
// 1. Camera ray (WORLD space). Pinhole: an eye point and, per pixel, a
// direction through the image plane. You decide the math — remember
// aspect ratio and that image y grows downward. Wrap it in a Ray.
//
// 2. The SDF lives in INDEX space, so convert your world ray to index
// space before you trace it. (Ray has a method for this.)
//
// 3. Find where the ray first crosses the surface (the SDF sign change).
// Module 5 gave you a helper in math/HDDA.h that drives an HDDA and
// reports the hit voxel, the value, and the ray parameter.
//
// 4. On a hit, the surface normal is the (normalized) SDF gradient at the
// hit voxel. Module 5's gradient stencil computes it. (Watch its
// template parameter.)
//
// 5. Shade: a Lambertian intensity from the normal and the provided
// `lightDir`, lifted off the floor by `ambient`; write it as greyscale.
// On a MISS, leave the background.
// ====================== YOUR WORK ENDS HERE ======================
img[pid] = shade; img[pid + 1] = shade; img[pid + 2] = shade;
}
int main(int argc, char** argv)
{
// Shading parameters passed into the kernel. Defaults, overridable on the
// command line: ./raymarch [ambient] [lx ly lz]
float ambient = 0.15f;
nanovdb::Vec3f lightDir(-0.577f, 0.577f, -0.577f); // (-1,1,-1) normalized
if (argc >= 2) ambient = (float)std::atof(argv[1]);
if (argc >= 5) lightDir = nanovdb::Vec3f((float)std::atof(argv[2]),
(float)std::atof(argv[3]),
(float)std::atof(argv[4]));
lightDir.normalize();
// Build a level-set sphere SDF on the host (radius 100, voxel size 1).
auto handle = nanovdb::tools::createLevelSetSphere<float>(
/*radius=*/100.0, /*center=*/nanovdb::Vec3d(0.0),
/*voxelSize=*/1.0, /*halfWidth=*/3.0);
// Move to the device. copy<DeviceBuffer>() fills the HOST side of the dual
// buffer; deviceUpload() pushes it to the GPU — skip it and deviceGrid()
// returns nullptr.
auto devHandle = handle.copy<nanovdb::cuda::DeviceBuffer>();
devHandle.deviceUpload();
const GridT* dGrid = devHandle.deviceGrid<float>();
if (!dGrid) { std::printf("no device grid\n"); return 1; }
const int W = 512, H = 512;
unsigned char* dImg = nullptr;
cudaMalloc(&dImg, size_t(W) * H * 3);
const dim3 block(16, 16), gridDim((W + 15) / 16, (H + 15) / 16);
render<<<gridDim, block>>>(dGrid, dImg, W, H, lightDir, ambient);
cudaDeviceSynchronize();
if (auto e = cudaGetLastError(); e != cudaSuccess) {
std::printf("CUDA error: %s\n", cudaGetErrorString(e));
return 1;
}
std::vector<unsigned char> img(size_t(W) * H * 3);
cudaMemcpy(img.data(), dImg, img.size(), cudaMemcpyDeviceToHost);
cudaFree(dImg);
FILE* f = std::fopen("sphere.ppm", "wb");
std::fprintf(f, "P6\n%d %d\n255\n", W, H);
std::fwrite(img.data(), 1, img.size(), f);
std::fclose(f);
std::printf("wrote sphere.ppm (%dx%d)\n", W, H);
return 0;
}
@@ -0,0 +1,105 @@
// Capstone: GPU level-set ray-march renderer.
// Build an SDF sphere -> move to device -> one thread per pixel ->
// ZeroCrossing to find the surface -> Lambertian shade via SDF gradient
// normal -> write PPM.
#include <nanovdb/NanoVDB.h>
#include <nanovdb/tools/CreatePrimitives.h>
#include <nanovdb/cuda/DeviceBuffer.h>
#include <nanovdb/cuda/GridHandle.cuh>
#include <nanovdb/math/Ray.h>
#include <nanovdb/math/HDDA.h> // ZeroCrossing lives here
#include <nanovdb/math/Stencils.h> // GradStencil
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <vector>
using GridT = nanovdb::NanoGrid<float>;
__global__ void render(const GridT* grid, unsigned char* img, int W, int H,
nanovdb::Vec3f lightDir, float ambient)
{
const int x = blockIdx.x * blockDim.x + threadIdx.x;
const int y = blockIdx.y * blockDim.y + threadIdx.y;
if (x >= W || y >= H) return;
const int pid = (y * W + x) * 3;
// --- pinhole camera in WORLD space ---
const nanovdb::Vec3f eye(0.f, 0.f, -300.f);
const float aspect = float(W) / float(H);
const float tanHalfFov = tanf(0.5f * 45.f * 3.14159265f / 180.f);
const float u = (2.f * ((x + 0.5f) / W) - 1.f) * tanHalfFov * aspect;
const float v = (1.f - 2.f * ((y + 0.5f) / H)) * tanHalfFov; // flip y
nanovdb::Vec3f dir(u, v, 1.f);
dir.normalize();
nanovdb::math::Ray<float> wRay(eye, dir);
auto iRay = wRay.worldToIndexF(*grid); // ray in index space
auto acc = grid->getAccessor();
nanovdb::Coord ijk;
float t = 0.f, val = 0.f;
unsigned char shade = 0; // background (black)
if (nanovdb::math::ZeroCrossing(iRay, acc, ijk, val, t)) {
nanovdb::math::GradStencil<GridT> stencil(*grid);
stencil.moveTo(ijk);
nanovdb::Vec3f n = stencil.gradient(); // SDF gradient = outward normal
n.normalize();
const float diff = fmaxf(0.f, n.dot(lightDir));
const float I = fminf(1.f, ambient + (1.f - ambient) * diff);
shade = (unsigned char)(255.f * I); // greyscale
}
img[pid] = shade; img[pid + 1] = shade; img[pid + 2] = shade;
}
int main(int argc, char** argv)
{
// Shading parameters (passed into the kernel). Defaults, overridable on the
// command line: ./raymarch [ambient] [lx ly lz]
float ambient = 0.15f;
nanovdb::Vec3f lightDir(-0.577f, 0.577f, -0.577f); // (-1,1,-1) normalized
if (argc >= 2) ambient = (float)std::atof(argv[1]);
if (argc >= 5) lightDir = nanovdb::Vec3f((float)std::atof(argv[2]),
(float)std::atof(argv[3]),
(float)std::atof(argv[4]));
lightDir.normalize();
// 1. Build a level-set sphere SDF on the host (radius 100, voxel size 1).
auto handle = nanovdb::tools::createLevelSetSphere<float>(
/*radius=*/100.0, /*center=*/nanovdb::Vec3d(0.0),
/*voxelSize=*/1.0, /*halfWidth=*/3.0);
// 2. Move it to the device. copy<DeviceBuffer>() fills the HOST side of the
// dual buffer; deviceUpload() pushes the bytes to the device. Only then
// is deviceGrid() non-null.
auto devHandle = handle.copy<nanovdb::cuda::DeviceBuffer>();
devHandle.deviceUpload();
const GridT* dGrid = devHandle.deviceGrid<float>();
if (!dGrid) { std::printf("no device grid\n"); return 1; }
// 3. Render.
const int W = 512, H = 512;
unsigned char* dImg = nullptr;
cudaMalloc(&dImg, size_t(W) * H * 3);
const dim3 block(16, 16), grid((W + 15) / 16, (H + 15) / 16);
render<<<grid, block>>>(dGrid, dImg, W, H, lightDir, ambient);
cudaDeviceSynchronize();
if (auto e = cudaGetLastError(); e != cudaSuccess) {
std::printf("CUDA error: %s\n", cudaGetErrorString(e));
return 1;
}
// 4. Copy back and write PPM.
std::vector<unsigned char> img(size_t(W) * H * 3);
cudaMemcpy(img.data(), dImg, img.size(), cudaMemcpyDeviceToHost);
cudaFree(dImg);
FILE* f = std::fopen("sphere.ppm", "wb");
std::fprintf(f, "P6\n%d %d\n255\n", W, H);
std::fwrite(img.data(), 1, img.size(), f);
std::fclose(f);
std::printf("wrote sphere.ppm (%dx%d)\n", W, H);
return 0;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

@@ -0,0 +1,592 @@
# NanoVDB User Cheat Sheet
A one-page reference for the APIs covered in `nanovdb_user_lesson.md`. Keep
this open while working through exercises.
---
## In one paragraph
NanoVDB is a single-header, read-only, GPU-friendly sparse 3D data
structure. The whole grid (one or more) lives in one contiguous,
32-byte-aligned byte buffer. `cudaMemcpy` it to the device and it works
as-is. Topology is *frozen* after construction; values can change, the set
of active voxels cannot. Every primitive is `__hostdev__` (callable from
both host and device with identical code).
---
## Includes & CMake
```cpp openvdb
#include <nanovdb/NanoVDB.h> // grid, accessor, math
#include <nanovdb/GridHandle.h> // owns the buffer
#include <nanovdb/HostBuffer.h> // CPU allocator
#include <nanovdb/NodeManager.h> // sequential iteration
#include <nanovdb/io/IO.h> // file IO
#include <nanovdb/math/HDDA.h> // ray-march
#include <nanovdb/math/SampleFromVoxels.h> // sampling
// GPU
#include <nanovdb/cuda/DeviceBuffer.h>
#include <nanovdb/cuda/GridHandle.cuh>
#include <nanovdb/cuda/NodeManager.cuh>
// Builders & operators (GPU)
#include <nanovdb/tools/cuda/PointsToGrid.cuh>
#include <nanovdb/tools/cuda/MeshToGrid.cuh>
#include <nanovdb/tools/cuda/DilateGrid.cuh>
#include <nanovdb/tools/cuda/CoarsenGrid.cuh>
#include <nanovdb/tools/cuda/RefineGrid.cuh>
#include <nanovdb/tools/cuda/PruneGrid.cuh>
#include <nanovdb/tools/cuda/MergeGrids.cuh>
#include <nanovdb/tools/cuda/SignedFloodFill.cuh>
// CPU builders & primitives
#include <nanovdb/tools/GridBuilder.h>
#include <nanovdb/tools/CreatePrimitives.h>
// IndexGrid / VBM
#include <nanovdb/tools/VoxelBlockManager.h>
#include <nanovdb/tools/cuda/VoxelBlockManager.cuh>
// Stats, validation, blind data
#include <nanovdb/tools/GridStats.h>
#include <nanovdb/tools/GridChecksum.h>
#include <nanovdb/tools/GridValidator.h>
#include <nanovdb/tools/cuda/AddBlindData.cuh>
// OpenVDB bridge (gated behind NANOVDB_USE_OPENVDB)
#include <nanovdb/tools/CreateNanoGrid.h>
#include <nanovdb/tools/NanoToOpenVDB.h>
```
```cmake
find_package(nanovdb CONFIG REQUIRED)
target_link_libraries(my_app PRIVATE nanovdb::nanovdb)
```
---
## Build types (`NanoGrid<T>`)
| `T` | Stored per voxel |
|-------------------|-------------------------------------------|
| `float`, `double` | Scalar (SDF, density) |
| `int32_t`, `int64_t` | Integer |
| `Vec3f`, `Vec3d` | 3-vector (velocity, color) |
| `bool` | Active state only |
| `ValueIndex` | Sequential index over all voxels |
| `ValueOnIndex` | Sequential index over **active** voxels |
| `ValueMask` | Topology only (no per-voxel values) |
| `Half` | 16-bit float |
| `Fp4`/`Fp8`/`Fp16`/`FpN` | Quantized float (4/8/16 bits) |
| `Point` | Point counts (for point grids) |
---
## File IO
```cpp
namespace io = nanovdb::io;
auto h = io::readGrid("file.nvdb"); // first grid
auto h2 = io::readGrid("file.nvdb", 2); // grid #2 (0-based)
auto hN = io::readGrid("file.nvdb", "density"); // by name
auto hAll = io::readGrid("file.nvdb", -1); // all → one handle
auto v = io::readGrids("file.nvdb"); // vector<handle>, one per segment
io::writeGrid("out.nvdb", h); // single
io::writeGrid("out.nvdb", h, io::Codec::BLOSC); // compressed
io::writeGrids("out.nvdb", handles); // many
```
---
## Inspecting a grid
```cpp
const auto* grid = handle.grid<float>(); // nullptr if T mismatch
if (!grid) throw std::runtime_error("type mismatch");
grid->gridName(); // const char*
grid->gridClass(); // GridClass enum (LevelSet, FogVolume, etc.)
grid->gridType(); // GridType enum (Float, Vec3f, OnIndex, ...)
grid->voxelSize(); // Vec3d
grid->activeVoxelCount(); // uint64_t
grid->indexBBox(); // CoordBBox
grid->worldBBox(); // BBox<Vec3d>
grid->tree().background(); // T
grid->worldToIndex(p); // Vec3<T>, p is world-space
grid->indexToWorld(p); // Vec3<T>, p is index-space (fractional)
```
---
## Random access (ReadAccessor)
```cpp
// One accessor per thread; not thread-safe; never copy between CPU & GPU
auto acc = grid->getAccessor();
float v = acc.getValue(nanovdb::Coord(1, 2, 3));
bool on = acc.isActive(nanovdb::Coord(1, 2, 3));
const auto* leaf = acc.getNode<nanovdb::NanoLeaf<float>>(); // cached leaf ptr, if needed
// probe* = value/state/leaf-existence in ONE descent (disambiguates the
// two "got background" cases: inactive-vs-no-node)
float pv;
bool active = acc.probeValue(nanovdb::Coord(1,2,3), pv); // pv set; ret = state
const nanovdb::NanoLeaf<float>* lf = acc.probeLeaf(nanovdb::Coord(1,2,3)); // nullptr if no leaf
```
---
## Sequential access (NodeManager)
```cpp
#include <nanovdb/NodeManager.h>
auto nmh = nanovdb::createNodeManager(*grid);
const auto* mgr = nmh.mgr<float>();
auto leafN = mgr->leafCount();
auto lowerN = mgr->lowerCount();
auto upperN = mgr->upperCount();
for (uint64_t i = 0; i < leafN; ++i) {
const auto& leaf = mgr->leaf(i);
for (auto it = leaf.beginValueOn(); it; ++it) {
float v = *it;
auto c = it.getCoord();
}
}
```
GPU. Pass the device-side `NodeManager*` to the kernel and index leaves by
block, voxels within a leaf by thread:
```cpp no-compile
#include <nanovdb/cuda/NodeManager.cuh>
auto dnmh = nanovdb::cuda::createNodeManager<float>(dGrid);
const auto* dmgr = dnmh.template deviceMgr<float>(); // device pointer
// One block per leaf; 64 threads cover the 512 voxels in each leaf.
perLeafKernel<<<dmgr->leafCount(), 64>>>(dmgr); // kernel defined just below
```
The kernel:
```cpp
__global__ void perLeafKernel(const nanovdb::NodeManager<float>* mgr)
{
using LeafT = nanovdb::NanoLeaf<float>;
const uint32_t leafIdx = blockIdx.x;
if (leafIdx >= mgr->leafCount()) return;
const LeafT& leaf = mgr->leaf(leafIdx);
// 512 voxels per leaf (LeafT::SIZE == 1<<3*LOG2DIM == 8^3).
for (uint32_t n = threadIdx.x; n < LeafT::SIZE; n += blockDim.x) {
if (!leaf.isActive(n)) continue;
float v = leaf.getValue(n);
nanovdb::Coord c = leaf.offsetToGlobalCoord(n);
// ... do something with (v, c)
}
}
```
Same methods exist on `lower(i)` and `upper(i)` (internal nodes) — you'll
mostly want `leaf(i)` since that's where actual voxel values live.
Indexed leaf-voxel API (callable from `__hostdev__` code):
| Call | Returns |
|-------------------------------|-------------------------------------------|
| `leaf.getValue(n)` | voxel value at offset `n` (0..511) |
| `leaf.isActive(n)` | active state at offset `n` |
| `leaf.offsetToGlobalCoord(n)` | the global `Coord` for offset `n` |
| `leaf.origin()` | the leaf's `(8,8,8)`-aligned origin Coord |
| `LeafT::SIZE` | `512`, voxels per leaf |
---
## Math primitives (all `__hostdev__`)
```cpp
nanovdb::Coord c(1, 2, 3);
auto c2 = nanovdb::Coord::Floor(nanovdb::Vec3f(1.7f, 2.1f, 3.9f)); // (1, 2, 3)
nanovdb::Vec3f v(1, 2, 3);
auto d = v.dot(v); // 14
auto n = v.length(); // sqrt(14)
auto u = v.normalize();
nanovdb::math::BBox<nanovdb::Vec3f> b(nanovdb::Vec3f(0,0,0),
nanovdb::Vec3f(10,10,10));
b.expand(nanovdb::Vec3f(5,5,5));
b.isInside(nanovdb::Vec3f(1,1,1));
```
---
## Sampling
```cpp
#include <nanovdb/math/SampleFromVoxels.h>
auto acc = grid->getAccessor();
auto sampler = nanovdb::math::createSampler<1>(acc); // 0=nearest, 1=trilinear, 2=triquadratic, 3=tricubic
auto idxPt = grid->worldToIndex(worldPt);
float v = sampler(idxPt);
```
---
## HDDA ray-march
```cpp
#include <nanovdb/math/Ray.h>
#include <nanovdb/math/HDDA.h>
auto acc = grid->getAccessor();
nanovdb::math::Ray<float> wRay({0,0,-5}, {0,0,1});
auto iRay = wRay.worldToIndexF(*grid);
// High-level: ZeroCrossing drives an HDDA and stops at the first sign change.
nanovdb::Coord ijk;
float v, t;
if (nanovdb::math::ZeroCrossing(iRay, acc, ijk, v, t)) { /* hit at ijk */ }
// Low-level: HDDA ctor takes the ray AND the start dimension from getDim.
nanovdb::Coord start(0, 0, 0);
nanovdb::math::HDDA<decltype(iRay), nanovdb::Coord> hdda(iRay, acc.getDim(start, iRay));
while (hdda.step()) {
if (acc.isActive(hdda.voxel())) break; // first active voxel
}
```
---
## GPU: transfer + kernel
```cpp
#include <nanovdb/cuda/DeviceBuffer.h>
#include <nanovdb/cuda/GridHandle.cuh>
auto devH = hostH.copy<nanovdb::cuda::DeviceBuffer>();
devH.deviceUpload(); // REQUIRED: push to device, else deviceGrid()==nullptr
const auto* dGrid = devH.deviceGrid<float>();
__global__ void k(const nanovdb::NanoGrid<float>* g,
const nanovdb::Coord* coords, float* out, int N) {
int tid = blockIdx.x * blockDim.x + threadIdx.x;
if (tid >= N) return;
auto acc = g->getAccessor();
out[tid] = acc.getValue(coords[tid]);
}
k<<<(N+127)/128, 128>>>(dGrid, dCoords, dOut, N);
```
---
## GPU builders
```cpp
// Points → grid (builder-pattern class, not a free function)
nanovdb::tools::cuda::PointsToGrid<nanovdb::Point> p2g(/*voxelSize=*/0.05);
auto ptsH = p2g.getHandle(dPoints, nPts);
const auto* ptsGrid = ptsH.deviceGrid<nanovdb::Point>();
// Mesh → OnIndexGrid (narrow-band). Verts are Vec3f, triangles Vec3i.
const nanovdb::Vec3f* dVerts; size_t vertN;
const nanovdb::Vec3i* dTris; size_t triN;
nanovdb::tools::cuda::MeshToGrid<nanovdb::ValueOnIndex> m2g(
dVerts, vertN, dTris, triN, nanovdb::Map(voxelSize));
m2g.setNarrowBandWidth(3.f);
auto meshH = m2g.getHandle();
const auto* meshGrid = meshH.deviceGrid<nanovdb::ValueOnIndex>();
// MeshToGrid + per-active-voxel UDF sidecar
auto [gridH, udfBuf] = m2g.getHandleAndUDF();
```
## CPU builder
```cpp
// Build a tree on the host, then bake into a packed NanoVDB grid.
nanovdb::tools::build::Grid<float> g(/*background=*/0.0f,
"my_grid", nanovdb::GridClass::FogVolume);
g.setTransform(/*scale=*/0.1); // voxel size
auto acc = g.getAccessor(); // not thread-safe
acc.setValue(nanovdb::Coord(0, 0, 0), 1.0f);
auto h = nanovdb::tools::createNanoGrid(g); // GridHandle<HostBuffer>
```
## Primitive helpers
```cpp
auto h = nanovdb::tools::createLevelSetSphere<float>(
/*radius=*/10.0, /*center=*/{0,0,0}, /*voxelSize=*/0.1);
// also: createLevelSetTorus, createLevelSetBox, createFogVolumeSphere, ...
```
---
## Topological operators (GPU)
```cpp
// Builder classes (NOT free functions); ValueOnIndex grids only. Construct
// from a device grid pointer, getHandle() returns a new GridHandle.
using OnIdx = nanovdb::ValueOnIndex;
auto* g = devH.deviceGrid<OnIdx>();
auto dilatedH = nanovdb::tools::cuda::DilateGrid<OnIdx>(g).getHandle();
auto coarseH = nanovdb::tools::cuda::CoarsenGrid<OnIdx>(g).getHandle();
auto fineH = nanovdb::tools::cuda::RefineGrid<OnIdx>(g).getHandle();
const nanovdb::Mask<3>* leafMask = nullptr; // PruneGrid needs a per-leaf mask
auto prunedH = nanovdb::tools::cuda::PruneGrid<OnIdx>(g, leafMask).getHandle();
auto mergedH = nanovdb::tools::cuda::MergeGrids<OnIdx>(g, g).getHandle();
// signedFloodFill is the exception: a free function, in place, on a scalar
// SDF grid (not OnIndex).
nanovdb::tools::cuda::signedFloodFill(devH.deviceGrid<float>());
```
CPU morphology equivalents live under `nanovdb/util/MorphologyHelpers.h`.
## Re-home sidecar data after a topology change (Injection.cuh)
A topology op renumbers the active-voxel indices, so the old sidecar no
longer matches. Move values across, and find the new voxels:
```cpp
#include <nanovdb/util/cuda/Injection.cuh>
#include <nanovdb/util/cuda/DeviceGridTraits.cuh>
#include <nanovdb/util/cuda/Util.h>
using OnIdx = nanovdb::ValueOnIndex;
const auto* srcGrid = devH.deviceGrid<OnIdx>(); // old grid
const auto* dstGrid = devHandle.deviceGrid<OnIdx>(); // new (e.g. dilated) grid
const float* oldSidecar = nullptr;
float* newSidecar = nullptr; // size = new activeVoxelCount(+1)
// Copy overlapping values (non-overlap dst voxels left untouched):
auto srcLeaves = nanovdb::util::cuda::DeviceGridTraits<OnIdx>::getTreeData(srcGrid).mNodeCount[0];
nanovdb::util::cuda::operatorKernel<
nanovdb::util::cuda::InjectGridDataFunctor<OnIdx, float>>
<<<srcLeaves, 256>>>(srcGrid, dstGrid, oldSidecar, newSidecar);
// Per-leaf overlap mask (new voxels = dstMask & ~overlap):
auto dstLeaves = nanovdb::util::cuda::DeviceGridTraits<OnIdx>::getTreeData(dstGrid).mNodeCount[0];
auto maskBuf = nanovdb::cuda::DeviceBuffer::create(dstLeaves*sizeof(nanovdb::Mask<3>), nullptr, false);
auto* overlap = static_cast<nanovdb::Mask<3>*>(maskBuf.deviceData());
unsigned nt = 128, nb = (dstLeaves + nt - 1) / nt;
nanovdb::util::cuda::lambdaKernel<<<nb, nt>>>(dstLeaves,
nanovdb::util::cuda::InjectGridMaskFunctor<OnIdx>(), srcGrid, dstGrid, overlap);
```
Simpler: pre-fill `newSidecar` with a sentinel; slots still holding it after
the data inject are the new voxels.
---
## Stats, validation & integrity
Nodes cache bbox/min/max/avg per node. Mutating values in place leaves them
**stale** — which silently breaks HDDA space-skipping and ray-tracing.
Recompute after any manual edit.
```cpp
#include <nanovdb/tools/GridStats.h> // CPU
// #include <nanovdb/tools/cuda/GridStats.cuh> // GPU (device grid + stream)
nanovdb::NanoGrid<float>* mutableGrid = nullptr; // non-const: it gets written
nanovdb::tools::updateGridStats(mutableGrid, nanovdb::tools::StatsMode::All);
// StatsMode: Disable | BBox | MinMax | All(=Default)
// Extrema over an index-space box, computed directly (no cache):
auto ex = nanovdb::tools::getExtrema(*grid, nanovdb::CoordBBox(nanovdb::Coord(-10), nanovdb::Coord(10)));
float lo = ex.min(), hi = ex.max();
```
Certify a grid after load / build / device transfer:
```cpp
#include <nanovdb/tools/GridChecksum.h>
#include <nanovdb/tools/GridValidator.h>
nanovdb::NanoGrid<float>* mutableGrid = nullptr; // non-const: edited grid
bool good = nanovdb::tools::validateChecksum(grid, nanovdb::CheckMode::Full);
nanovdb::tools::updateChecksum(mutableGrid, nanovdb::CheckMode::Full); // after a legit edit
bool valid = nanovdb::tools::isValid(grid, nanovdb::CheckMode::Full, /*verbose=*/false);
char err[(uint32_t)nanovdb::CheckMode::StrLen] = {}; // CheckMode is scoped → cast
nanovdb::tools::checkGrid(grid, err, nanovdb::CheckMode::Full); // err="" if valid
// CheckMode: Disable/Empty | Half/Partial/Default | Full
// GPU variants: tools/cuda/GridChecksum.cuh, tools/cuda/GridValidator.cuh
```
---
## IndexGrid & VBM
```cpp no-compile
// Build a ValueOnIndex grid from an OpenVDB grid
auto h = nanovdb::tools::createNanoGrid<openvdb::FloatGrid,
nanovdb::ValueOnIndex>(*ovGrid);
// Or from a mesh on the GPU (already returns OnIndexGrid)
nanovdb::tools::cuda::MeshToGrid<nanovdb::ValueOnIndex> mesher(dV, vN, dT, tN, nanovdb::Map(vs));
auto devH = mesher.getHandle();
const auto* g = devH.deviceGrid<nanovdb::ValueOnIndex>();
// External attribute array — same length as active voxel count
size_t N = g->activeVoxelCount();
thrust::device_vector<float> attr(N);
// Read attribute at a coordinate
auto acc = g->getAccessor();
uint64_t idx = acc.getValue(c); // index into attr
float a = attr[idx];
// VBM: SIMT-friendly block iteration (Log2BlockWidth >= 6, i.e. >=64/block)
auto vbmH = nanovdb::tools::buildVoxelBlockManager<6>(g);
// see tools/cuda/VoxelBlockManager.cuh for the GPU decode pattern
```
ChannelAccessor — read the sidecar by attribute, not by index (one typed
call instead of getValue(ijk) → array[idx]). Note: IndexT defaults to
`ValueIndex`, so spell out `ValueOnIndex`:
```cpp
__global__ void readChan(const nanovdb::NanoGrid<nanovdb::ValueOnIndex>* g,
float* dValues, nanovdb::Coord c, float* out) {
nanovdb::ChannelAccessor<float, nanovdb::ValueOnIndex> ca(*g, dValues);
*out = ca.getValue(c); // attribute value (not the index)
// ca(c) same; ca.getIndex(c) for the raw index; ca.probeValue(c, v) for state+value
// ctor (*g, channelID) instead reads an internal blind-data channel
}
```
Bake a sidecar back into a value grid (round-trip partner of the split;
needed by value-typed tools like `signedFloodFill`):
```cpp
#include <nanovdb/tools/cuda/IndexToGrid.cuh>
const auto* idxGrid = devH.deviceGrid<nanovdb::ValueOnIndex>();
const float* dValues = nullptr; // per-active-voxel sidecar
auto floatH = nanovdb::tools::cuda::indexToGrid<float>(idxGrid, dValues);
const auto* floatGrid = floatH.deviceGrid<float>(); // values now in-grid
```
---
## OpenVDB ↔ NanoVDB
```cpp openvdb
#include <nanovdb/tools/CreateNanoGrid.h>
#include <nanovdb/tools/NanoToOpenVDB.h>
// OpenVDB → NanoVDB (optionally with type change)
auto h = nanovdb::tools::createNanoGrid<openvdb::FloatGrid, float>(*ovGrid);
auto h_half = nanovdb::tools::createNanoGrid<openvdb::FloatGrid,
nanovdb::Half>(*ovGrid);
// NanoVDB → OpenVDB
auto ovGrid = nanovdb::tools::nanoToOpenVDB<float>(handle);
```
---
## Blind data (attached arrays)
Read (host or device — `__hostdev__`):
```cpp
uint32_t n = grid->blindDataCount();
const nanovdb::GridBlindMetaData& meta = grid->blindMetaData(0);
// meta.mValueCount, mValueSize, mDataType, mSemantic, mDataClass, mName
int id = grid->findBlindDataForSemantic(nanovdb::GridBlindDataSemantic::PointPosition);
// or: int id = grid->findBlindData("name");
const nanovdb::Vec3f* pos = grid->getBlindData<nanovdb::Vec3f>(id); // nullptr if T mismatch
```
Attach on the GPU (returns a NEW handle with the array appended; fixes the
checksum):
```cpp
#include <nanovdb/tools/cuda/AddBlindData.cuh>
const float* dChannel = nullptr; uint64_t valueCount = 0;
auto h = nanovdb::tools::cuda::addBlindData(
dGrid, dChannel, valueCount,
nanovdb::GridBlindDataClass::ChannelArray,
nanovdb::GridBlindDataSemantic::Unknown, "my_channel");
const auto* g = h.deviceGrid<float>();
```
---
## Common idioms
```cpp
// Iterate active voxels in a grid (CPU, leaf-by-leaf)
auto nmh = nanovdb::createNodeManager(*grid);
auto* mgr = nmh.mgr<float>();
for (uint64_t L = 0; L < mgr->leafCount(); ++L) {
const auto& leaf = mgr->leaf(L);
for (auto it = leaf.beginValueOn(); it; ++it) {
// *it is the value, it.getCoord() is the ijk
}
}
// Sample a grid at a list of world-space points (pts is a std::vector<Vec3f>)
auto sampler = nanovdb::math::createSampler<1>(acc);
std::vector<float> sampled;
for (const auto& w : pts)
sampled.push_back(sampler(grid->worldToIndex(w)));
// Save a level-set sphere to disk
auto h = nanovdb::tools::createLevelSetSphere<float>(10.0, {0,0,0}, 0.1);
nanovdb::io::writeGrid("sphere.nvdb", h);
```
---
## Pitfalls
- **Type mismatch returns nullptr.** Always check `handle.grid<T>()`.
- **Accessors are not thread-safe.** One per thread/warp.
- **Accessors don't cross CPU/GPU.** Build inside the kernel.
- **Topology is frozen.** To "add a voxel" you must rebuild the grid.
- **32-byte alignment.** Don't allocate the buffer yourself with
`new char[N]` — use `HostBuffer` or `DeviceBuffer`, which guarantee
alignment.
- **No runtime `std::` in `__hostdev__` code.** Containers, iostreams,
allocators, `std::sort` etc. won't work on device. For type traits and
compile-time helpers, NanoVDB uses its own `nanovdb::util::is_same` /
`util::enable_if` / `util::conditional` / `util::remove_const` (in
`util/Util.h`) — these compile under C++11 across compilers and don't
need `--expt-relaxed-constexpr`. Where NanoVDB needs more, it pulls from
CCCL's `cuda::std::` (e.g. `cuda::std::numeric_limits` in `math/Math.h`).
Plain `std::` compile-time facilities work with relaxed constexpr but
NanoVDB's own headers avoid them for portability.
- **HDDA is essential for sparse ray-march.** Without it, you're stepping
one voxel at a time through empty space.
---
## Tools / binaries
| Tool | Purpose |
|---------------------|-------------------------------------------|
| `nanovdb_print` | Print metadata for grids in a `.nvdb` |
| `nanovdb_convert` | OpenVDB ↔ NanoVDB on the CLI |
| `nanovdb_validate` | ABI / format validation |
Run with `--help` for options.
File diff suppressed because it is too large Load Diff
+3
View File
@@ -0,0 +1,3 @@
# Transient harness outputs
gen/
build/
+87
View File
@@ -0,0 +1,87 @@
cmake_minimum_required(VERSION 3.20)
project(teachme_tests LANGUAGES CXX CUDA)
# Compile-only gate: object libraries compile each generated translation unit
# to an object file without linking. That is exactly what we want — catch API
# errors at compile time; the fixture's extern stand-ins never need to resolve.
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CUDA_STANDARD 17)
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES 89) # RTX 6000 Ada; any arch suffices to compile
endif()
# NanoVDB headers pull in CUDA lambdas / relaxed-constexpr code paths.
# diag 177 = "function declared but never referenced": every wrapped block
# becomes an unreferenced static function on purpose, so silence it.
string(APPEND CMAKE_CUDA_FLAGS
" --extended-lambda --expt-relaxed-constexpr --diag-suppress 177")
# NanoVDB include root: this file is doc/nanovdb/TEACHME/test/CMakeLists.txt, so
# the repo root is four dirs up. Headers are at nanovdb/nanovdb/NanoVDB.h, so the
# include root is the repo's `nanovdb/` subdir (a sibling of `doc/`).
get_filename_component(_teachme_dir "${CMAKE_CURRENT_SOURCE_DIR}" DIRECTORY) # TEACHME
get_filename_component(_docnv_dir "${_teachme_dir}" DIRECTORY) # doc/nanovdb
get_filename_component(_doc_dir "${_docnv_dir}" DIRECTORY) # doc
get_filename_component(REPO_ROOT "${_doc_dir}" DIRECTORY) # repo root
set(NANOVDB_INCLUDE_ROOT "${REPO_ROOT}/nanovdb")
set(OPENVDB_INCLUDE_ROOT "${REPO_ROOT}/openvdb")
message(STATUS "NanoVDB include root: ${NANOVDB_INCLUDE_ROOT}")
# Generated TUs + manifest live in ${GEN_DIR} (passed in, defaults to ./gen).
if(NOT DEFINED GEN_DIR)
set(GEN_DIR "${CMAKE_CURRENT_SOURCE_DIR}/gen")
endif()
set(_manifest "${GEN_DIR}/manifest.txt")
if(NOT EXISTS "${_manifest}")
message(FATAL_ERROR "No manifest at ${_manifest}. Run the extractor first "
"(see run.sh).")
endif()
file(STRINGS "${_manifest}" _lines)
set(_core_srcs "")
set(_ovdb_srcs "")
foreach(_line IN LISTS _lines)
if(_line STREQUAL "")
continue()
endif()
separate_arguments(_parts UNIX_COMMAND "${_line}")
list(GET _parts 0 _stem)
list(GET _parts 1 _needs_ovdb)
set(_src "${GEN_DIR}/${_stem}.cu")
if(_needs_ovdb STREQUAL "1")
list(APPEND _ovdb_srcs "${_src}")
else()
list(APPEND _core_srcs "${_src}")
endif()
endforeach()
# Core (NanoVDB-only) translation units.
if(_core_srcs)
add_library(teachme_blocks OBJECT ${_core_srcs})
target_include_directories(teachme_blocks PRIVATE
"${NANOVDB_INCLUDE_ROOT}" "${GEN_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
list(LENGTH _core_srcs _n_core)
message(STATUS "teachme_blocks: ${_n_core} core TU(s)")
endif()
# OpenVDB-dependent translation units — only if OpenVDB is available.
if(_ovdb_srcs)
find_package(OpenVDB QUIET)
if(OpenVDB_FOUND)
add_library(teachme_blocks_openvdb OBJECT ${_ovdb_srcs})
target_compile_definitions(teachme_blocks_openvdb PRIVATE NANOVDB_USE_OPENVDB)
target_include_directories(teachme_blocks_openvdb PRIVATE
"${NANOVDB_INCLUDE_ROOT}" "${OPENVDB_INCLUDE_ROOT}"
"${GEN_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
target_link_libraries(teachme_blocks_openvdb PRIVATE OpenVDB::openvdb)
list(LENGTH _ovdb_srcs _n_ovdb)
message(STATUS "teachme_blocks_openvdb: ${_n_ovdb} OpenVDB TU(s)")
else()
list(LENGTH _ovdb_srcs _n_ovdb)
message(WARNING "OpenVDB not found — skipping ${_n_ovdb} OpenVDB TU(s). "
"These blocks are reference-checked but not compiled.")
endif()
endif()
+89
View File
@@ -0,0 +1,89 @@
# TEACHME test harness
Keeps the code in the lesson honest. Two gates:
1. **Reference validation** (`teachme_tests.py check-refs`) — every
`#include <...>` in a code block must resolve to a real header in the
NanoVDB tree (or be explicitly exempt). Catches stale-path rot — e.g. a
header that was renamed out from under the docs.
2. **Compilation** (`teachme_tests.py extract` + CMake) — code blocks tagged
as compilable are extracted into `.cu` translation units and compiled
(compile-only, `-c`) against the real NanoVDB headers. Catches API-shape
drift — wrong namespace, a free function that's actually a class, a
renamed method, a changed signature.
Run both with `./run.sh` from this directory.
## Why compile-only
The harness compiles (`nvcc -c`) but does not link or run. NanoVDB is
header-only and the goal is to catch *API* errors (does this call name a
real symbol with a compatible signature?), which all surface at compile
time. Skipping the link step means a fixture header can declare the
"given" symbols a fragment assumes (`grid`, `acc`, device pointers) as
`extern` globals — unresolved at link, but fully type-checked at compile.
Everything compiles as CUDA (`.cu`) because even host-only examples pull
in CUDA code paths (under `__CUDACC__`) when they include headers like
`NodeManager.h` or `io/IO.h`.
## Block tagging
Code blocks are fenced with an info string: a language followed by
whitespace-separated tags, e.g.
```cpp compile
```cpp compile-global continuation
```cpp skip-refs
**Opt-out model:** every `cpp` / `cu` block is compiled by default. A block
is wrapped in a function body unless it opens a top-level definition
(`__global__`, `template`, `struct`, `class`, `namespace`, `enum`, `using`,
`typedef`), in which case it is auto-emitted at file scope. Tags only adjust
the defaults:
| Tag | Meaning |
|----------------|------------------------------------------------------------------------------------------|
| *(none)* | Compiled. Auto: file scope if it opens a top-level definition, else function-wrapped. |
| `no-compile` | Reference-check includes only; do **not** compile. For illustrative/partial fragments. |
| `global` | Force file-scope emission (override the auto-detection). |
| `main` | Block is already a complete program (its own `main`); compile verbatim. |
| `continuation` | Append this block to the previous block's translation unit (shares its symbols). |
| `openvdb` | Block needs OpenVDB; compiled only when OpenVDB is found. |
| `skip-refs` | Do **not** validate includes in this block — for intentionally-stale counter-examples. |
A translation unit is a sequence of segments. A non-`continuation` block
starts a new TU; each following `continuation` block adds a segment. At emit
time, file-scope segments go to file scope (in order) and function segments
each get their own wrapper function — so a kernel definition followed by a
`continuation` launch line compose into one valid TU.
Every TU includes `fixture.cuh`, which pulls in the common NanoVDB headers
(a deliberately broad "kitchen-sink" set, so terse fragments compile without
restating includes) and declares the stand-in "given" symbols (`grid`,
`acc`, device pointers, etc.) as `extern`. Including the heavy `tools/cuda/*`
headers in every TU makes per-TU compilation slower; that's an accepted
trade for letting fragments stay terse. If the suite grows large, switch to
per-TU includes driven by each block's own `#include` lines.
## Coverage
`check-refs` reports how many code blocks are compile-tagged vs
reference-only, so the fraction of the lesson that is actually
compile-gated is visible (and ideally climbing).
## Exemptions
Includes that are intentionally not real are skipped by the validator:
- ellipsis placeholders such as `#include <openvdb/...>`
- any include inside a `skip-refs` block (e.g. the deprecated
`nanovdb/util/cuda/CudaDeviceBuffer.h` shown as a "this path is stale"
counter-example)
## Files
- `teachme_tests.py` — the extractor + reference validator
- `fixture.cuh` — common headers + `extern` stand-in symbols
- `CMakeLists.txt` — compiles the generated TUs
- `run.sh` — driver: check-refs → extract → cmake configure+build → report
+92
View File
@@ -0,0 +1,92 @@
// fixture.cuh — common headers + stand-in "given" symbols for TEACHME
// code-block compilation.
//
// Lesson fragments assume context: "you have a grid", "you have device
// points", etc. The harness compiles each block (compile-only, never linked)
// with this header in scope, so those assumed symbols need declarations with
// the right *types* — enough for the compiler to type-check member calls and
// catch API drift. They are declared `extern` (no definitions): a block that
// declares its own local `grid`/`acc`/etc. simply shadows the extern, and
// since we never link, the unresolved externs cost nothing.
//
// Grow this file as the tagging pass surfaces more assumed names. Keep the
// types matching how the lesson uses each symbol.
#pragma once
// ---- common headers (header guards make re-includes in blocks harmless) ----
// Core read path + IO + math + CUDA.
#include <nanovdb/NanoVDB.h>
#include <nanovdb/GridHandle.h>
#include <nanovdb/HostBuffer.h>
#include <nanovdb/NodeManager.h>
#include <nanovdb/io/IO.h>
#include <nanovdb/math/Ray.h>
#include <nanovdb/math/HDDA.h>
#include <nanovdb/math/SampleFromVoxels.h>
#include <nanovdb/math/Stencils.h>
#include <nanovdb/cuda/DeviceBuffer.h>
#include <nanovdb/cuda/GridHandle.cuh>
#include <nanovdb/cuda/NodeManager.cuh>
// Commonly-assumed "tools" headers — ambient so terse fragments compile
// without restating the include. (OpenVDB-conversion headers are NOT here;
// blocks that need them are tagged `openvdb` and include them explicitly.)
#include <nanovdb/tools/CreatePrimitives.h>
#include <nanovdb/tools/CreateNanoGrid.h>
#include <nanovdb/tools/GridBuilder.h>
#include <nanovdb/tools/VoxelBlockManager.h>
#include <nanovdb/tools/cuda/PointsToGrid.cuh>
#include <nanovdb/tools/cuda/MeshToGrid.cuh>
#include <nanovdb/tools/cuda/DilateGrid.cuh>
#include <nanovdb/tools/cuda/CoarsenGrid.cuh>
#include <nanovdb/tools/cuda/RefineGrid.cuh>
#include <nanovdb/tools/cuda/PruneGrid.cuh>
#include <nanovdb/tools/cuda/MergeGrids.cuh>
#include <nanovdb/tools/cuda/SignedFloodFill.cuh>
#include <cstdint>
#include <cstddef>
#include <cmath>
#include <string>
#include <vector>
#include <iostream>
#include <stdexcept>
// ---- stand-in "given" symbols (extern: declared, never defined) ----
// Handles
extern nanovdb::GridHandle<nanovdb::HostBuffer> handle;
extern nanovdb::GridHandle<nanovdb::HostBuffer> hostH;
extern nanovdb::GridHandle<nanovdb::cuda::DeviceBuffer> devH;
extern nanovdb::GridHandle<nanovdb::cuda::DeviceBuffer> devHandle;
extern std::vector<nanovdb::GridHandle<nanovdb::HostBuffer>> handles;
// Grids (host + device pointers into a float grid)
extern const nanovdb::NanoGrid<float>* grid;
extern const nanovdb::NanoGrid<float>* dGrid;
// A read accessor + sampler over the float grid (fragments often assume these
// already exist from a prior step).
extern nanovdb::DefaultReadAccessor<float> acc;
// Device point / coord / output buffers used by kernel launches.
// dPoints is non-const: PointsToGrid<Point> writes input points into the
// grid's blind data via getPoint<element_type>(...) = ..., which requires a
// non-const element type.
extern nanovdb::Vec3f* dPoints;
extern std::size_t nPts;
extern const nanovdb::Vec3f* dPts;
extern const nanovdb::Vec3f* worldPts;
extern const nanovdb::Coord* dCoords;
extern const nanovdb::Coord* coords;
extern float* dOut;
extern float* out;
extern int N;
// Host-side query containers + single query points
extern std::vector<nanovdb::Vec3f> pts;
extern std::vector<nanovdb::Coord> queries;
extern nanovdb::Vec3f worldPt; // a single world-space query point
extern nanovdb::Vec3f p; // generic world-space point
// Misc scalars
extern double voxelSize;
+59
View File
@@ -0,0 +1,59 @@
#!/usr/bin/env bash
# Drive the TEACHME test harness: reference-check -> extract -> compile.
#
# Usage: ./run.sh
# Exits nonzero if any reference is dangling or any compile-tagged block
# fails to compile.
set -euo pipefail
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TEACHME="$(dirname "$HERE")"
GEN="$HERE/gen"
BUILD="$HERE/build"
MD=(
"$TEACHME/nanovdb_user_lesson.md"
"$TEACHME/nanovdb_user_cheatsheet.md"
"$TEACHME/README.md"
)
echo "==> [1/3] reference check"
python3 "$HERE/teachme_tests.py" check-refs "${MD[@]}"
echo "==> [2/3] extract compile-tagged blocks"
rm -rf "$GEN"
mkdir -p "$GEN"
python3 "$HERE/teachme_tests.py" extract "${MD[@]}" --out "$GEN"
n_tu=$(find "$GEN" -name '*.cu' | wc -l | tr -d ' ')
if [ "$n_tu" -eq 0 ]; then
echo "==> [3/3] compile: no compile-tagged blocks yet — nothing to build"
echo "PASS (reference check only)"
exit 0
fi
echo "==> [3/3] compile $n_tu translation unit(s)"
mkdir -p "$BUILD"
cmake -S "$HERE" -B "$BUILD" -DGEN_DIR="$GEN" -DCMAKE_BUILD_TYPE=Release \
> "$BUILD/configure.log" 2>&1 || { cat "$BUILD/configure.log"; exit 1; }
# Cap parallelism: each TU pulls in the kitchen-sink fixture (most of NanoVDB's
# heavy headers), so nvcc is memory-hungry. Default to all cores locally; CI
# sets TEACHME_JOBS lower so the parallel nvcc processes stay within the
# runner's RAM (8 unbounded jobs OOM a 32 GB runner).
jobs="${TEACHME_JOBS:-$(nproc)}"
# Keep going (--keep-going / -k) so every failing TU is reported, not just the
# first. Capture cmake's status directly (don't pipe through tee, which would
# mask it).
set +e
cmake --build "$BUILD" --parallel "$jobs" -- -k > "$BUILD/build.log" 2>&1
status=$?
set -e
cat "$BUILD/build.log"
if [ "$status" -eq 0 ]; then
echo "PASS: all $n_tu translation unit(s) compiled"
else
echo "FAIL: one or more translation units did not compile (see above)"
exit 1
fi
+319
View File
@@ -0,0 +1,319 @@
#!/usr/bin/env python3
"""TEACHME lesson test harness: reference validation + block extraction.
Two subcommands:
check-refs <md...> Validate every #include in code blocks resolves
against the NanoVDB include root. Reports
compile-coverage. Exits nonzero on dangling refs.
extract <md...> --out <dir> Extract compile-tagged code blocks into .cu
translation units under <dir>, ready for CMake.
See README.md for the block tagging convention.
"""
import argparse
import os
import re
import sys
# Repo layout: this file is at doc/nanovdb/TEACHME/test/teachme_tests.py, so the
# repo root is four levels up. The NanoVDB include root (the dir that contains
# the `nanovdb/` header subdir) is the repo's `nanovdb/`; OpenVDB's is `openvdb/`.
HERE = os.path.dirname(os.path.abspath(__file__))
REPO_ROOT = os.path.abspath(os.path.join(HERE, "..", "..", "..", ".."))
NANOVDB_INCLUDE_ROOT = os.path.join(REPO_ROOT, "nanovdb")
OPENVDB_INCLUDE_ROOT = os.path.join(REPO_ROOT, "openvdb")
INCLUDE_ROOTS = [NANOVDB_INCLUDE_ROOT, OPENVDB_INCLUDE_ROOT]
FENCE_RE = re.compile(r"^```(\w+)?(.*)$")
INCLUDE_RE = re.compile(r'^\s*#\s*include\s*<([^>]+)>')
# Inline-code spans in prose that look like header paths, e.g.
# `nanovdb/tools/GridBuilder.h`. Used to catch stale "Read: ..." references.
PROSE_PATH_RE = re.compile(r'`((?:nanovdb|openvdb)/[\w./]+\.(?:h|cuh|cc|cpp))`')
# A line carrying this marker is exempt from prose-path checking (for
# intentionally-stale counter-examples).
STALE_OK = "teachme:stale-ok"
def resolves(inc):
"""True if an include path exists under any include root."""
return any(os.path.isfile(os.path.join(r, inc)) for r in INCLUDE_ROOTS)
# Languages whose blocks we care about.
CODE_LANGS = {"cpp", "cu", "c++"}
# Opt-OUT model: every cpp/cu block is compiled unless tagged `no-compile`.
# A line that begins a file-scope definition forces file-scope emission even
# without an explicit `global` tag.
FILE_SCOPE_RE = re.compile(r'^\s*(template\b|struct\b|class\b|namespace\b|'
r'__global__\b|enum\b|using\b|typedef\b)')
class Block:
__slots__ = ("path", "start_line", "lang", "tags", "lines")
def __init__(self, path, start_line, lang, tags):
self.path = path
self.start_line = start_line
self.lang = lang
self.tags = tags
self.lines = []
@property
def text(self):
return "".join(self.lines)
def parse_blocks(path):
"""Yield Block objects for every fenced code block in a markdown file."""
blocks = []
with open(path, encoding="utf-8") as f:
lines = f.readlines()
i = 0
in_block = None
for lineno, line in enumerate(lines, 1):
m = FENCE_RE.match(line)
if m:
if in_block is None:
lang = (m.group(1) or "").lower()
tags = set(m.group(2).split())
in_block = Block(path, lineno, lang, tags)
else:
blocks.append(in_block)
in_block = None
continue
if in_block is not None:
in_block.lines.append(line)
if in_block is not None:
sys.stderr.write(f"{path}: unterminated code fence opened at "
f"line {in_block.start_line}\n")
return blocks
def is_exempt_include(inc):
"""Includes that are intentionally not real headers."""
if "..." in inc: # ellipsis placeholder, e.g. openvdb/...
return True
return False
def scan_prose_paths(path):
"""Yield (lineno, token) for header-path references in prose inline code,
skipping lines inside fenced code blocks and lines marked stale-ok."""
with open(path, encoding="utf-8") as f:
lines = f.readlines()
in_fence = False
for lineno, line in enumerate(lines, 1):
if FENCE_RE.match(line) and line.lstrip().startswith("```"):
in_fence = not in_fence
continue
if in_fence or STALE_OK in line:
continue
for tok in PROSE_PATH_RE.findall(line):
yield lineno, tok
def cmd_check_refs(args):
code_blocks = 0
compiled_blocks = 0
dangling = [] # (path, lineno, inc, kind)
for path in args.md:
# 1) #include lines inside code blocks
for b in parse_blocks(path):
if b.lang not in CODE_LANGS:
continue
code_blocks += 1
if "no-compile" not in b.tags:
compiled_blocks += 1
if "skip-refs" in b.tags:
continue
for off, line in enumerate(b.lines):
im = INCLUDE_RE.match(line)
if not im:
continue
inc = im.group(1).strip()
if is_exempt_include(inc):
continue
if not resolves(inc):
dangling.append((path, b.start_line + 1 + off, inc, "include"))
# 2) header-path references in prose ("Read: `nanovdb/.../X.h`")
for lineno, tok in scan_prose_paths(path):
if not resolves(tok):
dangling.append((path, lineno, tok, "prose"))
if dangling:
sys.stderr.write("DANGLING REFERENCES:\n")
for path, lineno, ref, kind in dangling:
rel = os.path.relpath(path)
sys.stderr.write(f" {rel}:{lineno}: [{kind}] {ref!r} does not "
f"resolve under any include root\n")
pct = (100.0 * compiled_blocks / code_blocks) if code_blocks else 0.0
print(f"code blocks: {code_blocks} compiled: {compiled_blocks} "
f"({pct:.0f}%) no-compile: {code_blocks - compiled_blocks}")
if dangling:
print(f"FAIL: {len(dangling)} dangling reference(s)")
return 1
print("OK: all references resolve")
return 0
def split_block(block):
"""Split one block's lines into ordered (kind, lines) sub-segments.
`kind` is 'global' (file scope) or 'fn' (function body). Explicit `global`
/ `main` tags force the whole block. Otherwise we brace-walk: a top-level
definition (matched by FILE_SCOPE_RE at brace depth 0, e.g. a __global__
kernel) becomes a file-scope chunk spanning until its braces balance;
everything else at depth 0 (launches, statements) becomes a function chunk.
This lets a single block mix a kernel definition and its launch.
"""
if "global" in block.tags:
return [("global", block.lines)]
if "main" in block.tags:
return [("main", block.lines)]
segs = []
fn_buf = []
lines = block.lines
i, n = 0, len(lines)
def flush_fn():
if fn_buf:
segs.append(("fn", fn_buf[:]))
fn_buf.clear()
while i < n:
line = lines[i]
stripped = line.lstrip()
if stripped.startswith("#"): # preprocessor: neutral (hoisted later)
fn_buf.append(line)
i += 1
continue
if FILE_SCOPE_RE.match(line): # start of a top-level definition
flush_fn()
chunk = []
depth = 0
saw_brace = False
while i < n:
l = lines[i]
chunk.append(l)
i += 1
depth += l.count("{") - l.count("}")
if "{" in l:
saw_brace = True
if saw_brace and depth <= 0:
break
if not saw_brace and l.rstrip().endswith(";"):
break # brace-less decl, e.g. `using X = ...;`
segs.append(("global", chunk))
continue
fn_buf.append(line) # ordinary statement → function body
i += 1
flush_fn()
return segs if segs else [("fn", lines)]
def cmd_extract(args):
os.makedirs(args.out, exist_ok=True)
# A TU has a list of (kind, lines, line_no) sub-segments + an openvdb flag.
tus = []
current = None
for path in args.md:
for b in parse_blocks(path):
if b.lang not in CODE_LANGS:
continue
# Opt-out: compile everything except blocks tagged no-compile.
if "no-compile" in b.tags:
continue
subsegs = [(k, lines, b.start_line) for (k, lines) in split_block(b)]
cont = "continuation" in b.tags
if cont and current is not None:
current["segs"].extend(subsegs)
if "openvdb" in b.tags:
current["openvdb"] = True
else:
current = {
"segs": list(subsegs),
"openvdb": "openvdb" in b.tags,
"src": os.path.basename(path),
"line": b.start_line,
}
tus.append(current)
manifest = []
for n, tu in enumerate(tus):
stem = f"tu_{n:03d}_{os.path.splitext(tu['src'])[0]}_{tu['line']}"
fname = os.path.join(args.out, stem + ".cu")
# Hoist all preprocessor directives (#include/#define/#pragma) to file
# scope, deduped in first-seen order, so function-wrapped segments
# never carry an #include into block scope (illegal for headers that
# define static __device__ functions).
hoisted = []
seen_hoist = set()
seg_render = [] # (kind, body_lines, line)
for kind, lines, line in tu["segs"]:
body = []
for ln in lines:
if ln.lstrip().startswith("#"):
if ln not in seen_hoist:
seen_hoist.add(ln)
hoisted.append(ln)
else:
body.append(ln)
if body:
seg_render.append((kind, body, line))
out = ['#include "fixture.cuh"\n']
out += hoisted
out.append("\n")
fn_count = 0
for kind, body, line in seg_render:
out.append(f"// --- from {tu['src']}:{line} ---\n")
if kind in ("global", "main"):
out += body
else: # fn
out.append(f"static void _seg_{fn_count}() {{\n")
out += body
out.append("\n}\n")
fn_count += 1
out.append("\n")
with open(fname, "w", encoding="utf-8") as f:
f.writelines(out)
manifest.append((stem, tu["openvdb"]))
# Emit a manifest CMake can read: <stem> <needs_openvdb 0|1>
with open(os.path.join(args.out, "manifest.txt"), "w") as f:
for stem, ovdb in manifest:
f.write(f"{stem} {1 if ovdb else 0}\n")
n_ovdb = sum(1 for _, o in manifest if o)
print(f"extracted {len(manifest)} translation unit(s) "
f"({n_ovdb} need OpenVDB) into {args.out}")
return 0
def main():
ap = argparse.ArgumentParser(description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter)
sub = ap.add_subparsers(dest="cmd", required=True)
p1 = sub.add_parser("check-refs", help="validate #include references")
p1.add_argument("md", nargs="+", help="markdown files")
p1.set_defaults(func=cmd_check_refs)
p2 = sub.add_parser("extract", help="extract compile-tagged blocks to .cu")
p2.add_argument("md", nargs="+", help="markdown files")
p2.add_argument("--out", required=True, help="output directory")
p2.set_defaults(func=cmd_extract)
args = ap.parse_args()
sys.exit(args.func(args))
if __name__ == "__main__":
main()
+4
View File
@@ -6,3 +6,7 @@ Welcome to the NanoVDB documentation page.
* @subpage NanoVDB_FAQ
* @subpage NanoVDB_SourceTree
* @subpage NanoVDB_HelloWorld
For a hands-on introduction, point an LLM coding agent (Claude Code, Cursor, or
similar) at the [TEACHME lessons](https://github.com/AcademySoftwareFoundation/openvdb/tree/master/doc/nanovdb/TEACHME)
and ask it to teach you the NanoVDB API interactively.
+26
View File
@@ -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();
}
-1
View File
@@ -21,7 +21,6 @@
- @ref secPtIndexFilters
- @ref secPtSpaceAndTrans
@section secPtOverview Introduction
@anchor openvdbPointsOverview
+4 -6
View File
@@ -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
+126
View File
@@ -0,0 +1,126 @@
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.
-------------------------------------------------------------------------
Apache 2.0
* VCL (c) Copyright 2012-2022 Agner Fog.
https://github.com/vectorclass/version2
OpenVDB includes a copy of vectorclass for x86 SIMD intrinsic usage. Usage
of VCL is disabled by default and requires the VCL headers to be shipped with
OpenVDB installations. This behaviour and usage of VCL can be controlled
during OpenVDB configuration. See the full LICENSE terms in:
vcl/openvdb/ext/vcl/LICENSE
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-------------------------------------------------------------------------
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
}
}
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More