Skip to content

Commit c04347c

Browse files
committed
COMP: Honor SIMPLNX_TEST_ALGORITHM_PATH=Both in in-core builds
The in-core build previously forced SIMPLNX_TEST_ALGORITHM_PATH to InCoreOnly whenever SIMPLNX_USE_OOC was OFF, on the assumption that no out-of-core paths exist to test. That is no longer true: the Direct/Scanline dispatch classes are always compiled into the plugins, and forcing the Scanline (OOC) path runs it against in-core data via copyIntoBuffer (a plain std::copy here), staying fast while verifying the OOC algorithm matches the in-core result. * Only coerce the nonsensical OocOnly (1) to InCoreOnly (2) when OOC is off * Allow Both (0) so a single in-core build can validate both algorithm paths Signed-off-by: Joey Kleingers <joey.kleingers@bluequartz.net>
1 parent ddc1d5b commit c04347c

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

CMakeLists.txt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,16 @@ if(SIMPLNX_USE_OOC)
7474
"Set -DSIMPLNX_OOC_SOURCE_DIR=/path/to/SimplnxOoc/SimplnxOoc")
7575
endif()
7676
else()
77-
# With OOC compiled out there are no out-of-core algorithm paths to exercise,
78-
# so pin the test path to InCoreOnly. Forcing it avoids a stale cached 0/1
79-
# (Both/OocOnly) producing tests that can never run.
80-
if(NOT SIMPLNX_TEST_ALGORITHM_PATH STREQUAL "2")
81-
message(STATUS "SIMPLNX_USE_OOC=OFF: forcing SIMPLNX_TEST_ALGORITHM_PATH=2 (InCoreOnly).")
77+
# With OOC compiled out there are no out-of-core data stores, so a pure OocOnly (1)
78+
# run would execute tests against data that is never actually out-of-core. Coerce
79+
# that to InCoreOnly. Both (0) remains meaningful: the Direct/Scanline dispatch
80+
# classes are always compiled into the plugins, and forcing the Scanline (OOC) path
81+
# exercises it against in-core data via copyIntoBuffer (a plain std::copy here), which
82+
# stays fast while verifying the OOC algorithm produces identical results to the
83+
# in-core algorithm. This is the only configuration where Both runs quickly, since a
84+
# real OOC build would run the unoptimized Direct path against disk-backed chunks.
85+
if(SIMPLNX_TEST_ALGORITHM_PATH STREQUAL "1")
86+
message(STATUS "SIMPLNX_USE_OOC=OFF: coercing SIMPLNX_TEST_ALGORITHM_PATH=1 (OocOnly) to 2 (InCoreOnly).")
8287
set(SIMPLNX_TEST_ALGORITHM_PATH "2" CACHE STRING "Algorithm paths to test: 0=Both, 1=OocOnly, 2=InCoreOnly" FORCE)
8388
endif()
8489
endif()

0 commit comments

Comments
 (0)