From d93262eb8d99731be3348bd61521eca403c770ea Mon Sep 17 00:00:00 2001 From: LTLA Date: Fri, 30 Aug 2024 09:52:15 -0700 Subject: [PATCH] Switch to the new SUBPAR_USES_OPENMP_RANGE macro in subpar v0.3.1. --- CMakeLists.txt | 2 +- cmake/Config.cmake.in | 2 +- extern/CMakeLists.txt | 4 ++-- include/tatami_hdf5/serialize.hpp | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c99c66a..4a4e482 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ if(TATAMI_HDF5_FETCH_EXTERN) add_subdirectory(extern) else() find_package(tatami_tatami_chunked 2.0.0 CONFIG REQUIRED) - find_package(ltla_subpar 0.2.1 CONFIG REQUIRED) + find_package(ltla_subpar 0.3.1 CONFIG REQUIRED) endif() target_link_libraries(tatami_hdf5 INTERFACE tatami::tatami_chunked ltla::subpar) diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in index b3db963..6b3ad0d 100644 --- a/cmake/Config.cmake.in +++ b/cmake/Config.cmake.in @@ -2,7 +2,7 @@ include(CMakeFindDependencyMacro) find_dependency(tatami_tatami_chunked 2.0.0 CONFIG REQUIRED) -find_dependency(ltla_subpar 0.2.1 CONFIG REQUIRED) +find_dependency(ltla_subpar 0.3.1 CONFIG REQUIRED) if(@TATAMI_HDF5_FIND_HDF5@) # Not REQUIRED, so don't use find_dependency according to diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index bd28cbd..29c3e76 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -3,13 +3,13 @@ include(FetchContent) FetchContent_Declare( tatami_chunked GIT_REPOSITORY https://github.com/tatami-inc/tatami_chunked - GIT_TAG master # ^v2.0.0 + GIT_TAG master # ^2.0.0 ) FetchContent_Declare( subpar GIT_REPOSITORY https://github.com/LTLA/subpar - GIT_TAG master # ^v0.2.1 + GIT_TAG master # ^0.3.1 ) FetchContent_MakeAvailable(tatami_chunked) diff --git a/include/tatami_hdf5/serialize.hpp b/include/tatami_hdf5/serialize.hpp index 2dfc019..2707e4c 100644 --- a/include/tatami_hdf5/serialize.hpp +++ b/include/tatami_hdf5/serialize.hpp @@ -8,7 +8,7 @@ #ifndef TATAMI_HDF5_PARALLEL_LOCK #include "subpar/subpar.hpp" -#ifndef SUBPAR_USES_OPENMP +#ifndef SUBPAR_USES_OPENMP_RANGE #include #include namespace tatami_hdf5 { @@ -30,11 +30,11 @@ namespace tatami_hdf5 { * This is primarily intended for use inside `tatami::parallelize()` but can also be called anywhere that uses the same parallelization scheme. * Also check out the [**subpar**](https://ltla.github.io/subpar) library, which implements the default parallelization scheme for `tatami::parallelize()`. * - * The default serialization mechanism is automatically determined from the definition of the `SUBPAR_USES_OPENMP` macro. + * The default serialization mechanism is automatically determined from the definition of the `SUBPAR_USES_OPENMP_RANGE` macro. * If defined (i.e., OpenMP is used), `f` is executed in OpenMP critical regions named `"hdf5"`. * Otherwise, a global mutex from `` is used to guard the execution of `f`. * - * If a custom parallelization scheme is defined via `TATAMI_CUSTOM_PARALLEL` or `SUBPAR_CUSTOM_PARALLEL`, the default serialization mechanism may not be appropriate. + * If a custom parallelization scheme is defined via `TATAMI_CUSTOM_PARALLEL` or `SUBPAR_CUSTOM_PARALLELIZE_RANGE`, the default serialization mechanism may not be appropriate. * Users should instead define a `TATAMI_HDF5_PARALLEL_LOCK` function-like macro that accepts `f` and executes it in a serial section appropriate to the custom scheme. * Once defined, this user-defined lock will be used in all calls to `serialize()`. * @@ -46,7 +46,7 @@ void serialize(Function_ f) { #ifdef TATAMI_HDF5_PARALLEL_LOCK TATAMI_HDF5_PARALLEL_LOCK(f); #else -#ifdef SUBPAR_USES_OPENMP +#ifdef SUBPAR_USES_OPENMP_RANGE #pragma omp critical(hdf5) { f();