Skip to content

Commit 446ef70

Browse files
author
Grok Compression
committed
freebyrd: remove
1 parent f15c4c8 commit 446ef70

9 files changed

Lines changed: 49 additions & 2632 deletions

File tree

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,3 @@
1212
path = extern/grok-gpu-plugin
1313
url = git@gitlab-rsa:GrokImageCompression/grok_gpu_plugin.git
1414
update = none
15-
[submodule "extern/freebyrd"]
16-
path = extern/freebyrd
17-
url = git@github.com:GrokImageCompression/freebyrd.git

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,6 @@ set(BUILD_SHARED_LIBS OFF)
209209
add_subdirectory(src/include/spdlog)
210210
set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_SAVED})
211211

212-
# freebyrd thread pool (header-only, tests disabled)
213-
set(FREEBIRD_BUILD_TESTS OFF CACHE BOOL "" FORCE)
214-
add_subdirectory(extern/freebyrd)
215-
216212
add_subdirectory(src/lib/core)
217213

218214
# Build GPU plugin from submodule (extern/grok-gpu-plugin).

extern/freebyrd

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/lib/core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ endif (GRK_ARCH MATCHES "mips")
272272
if(UNIX)
273273
target_link_libraries(${GROK_CORE_NAME} PUBLIC ${CMAKE_THREAD_LIBS_INIT})
274274
endif(UNIX)
275-
target_link_libraries(${GROK_CORE_NAME} PRIVATE hwy ${LCMS_LIBNAME} freebyrd)
275+
target_link_libraries(${GROK_CORE_NAME} PRIVATE hwy ${LCMS_LIBNAME})
276276
if(GRK_ENABLE_LIBCURL AND GRK_HAVE_LIBCURL)
277277
target_link_libraries(${GROK_CORE_NAME} PRIVATE ${GRK_CURL_TARGET})
278278
target_include_directories(${GROK_CORE_NAME} PRIVATE

src/lib/core/scheduling/FRBSingleton.h

Lines changed: 6 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -18,64 +18,22 @@
1818
#pragma once
1919

2020
#include <cstddef>
21-
#include <memory>
22-
#include <mutex>
2321
#include <thread>
24-
#include <cassert>
25-
26-
#include <freebyrd/freebyrd.h>
2722

2823
/**
2924
* @class FRBSingleton
30-
* @brief Manages a global freebyrd thread pool instance for strip-based decompression.
25+
* @brief Stub — freebyrd thread pool has been removed.
3126
*
32-
* Mirrors the TFSingleton API so callers can swap between Taskflow and freebyrd pools.
33-
* The pool is created lazily on first access or explicitly via create().
27+
* Retains the API surface so that SchedulerFreebyrd and StripDecompressor
28+
* continue to compile, but all methods are no-ops.
3429
*/
3530
class FRBSingleton
3631
{
3732
public:
38-
static void create(size_t numThreads)
39-
{
40-
std::lock_guard<std::mutex> lock(mutex_);
41-
numThreads = numThreads ? numThreads : std::thread::hardware_concurrency();
42-
if(numThreads_ == numThreads && instance_)
43-
return;
44-
numThreads_ = numThreads;
45-
instance_ =
46-
std::make_unique<frb::thread_pool>(frb::pool_config{.num_threads = (uint32_t)numThreads_});
47-
}
48-
49-
static frb::thread_pool& get()
50-
{
51-
std::lock_guard<std::mutex> lock(mutex_);
52-
if(!instance_)
53-
{
54-
numThreads_ = std::thread::hardware_concurrency();
55-
instance_ = std::make_unique<frb::thread_pool>(
56-
frb::pool_config{.num_threads = (uint32_t)numThreads_});
57-
}
58-
assert(instance_);
59-
return *instance_;
60-
}
61-
62-
static size_t num_threads()
63-
{
64-
std::lock_guard<std::mutex> lock(mutex_);
65-
return numThreads_;
66-
}
67-
68-
static void destroy()
69-
{
70-
std::lock_guard<std::mutex> lock(mutex_);
71-
instance_.reset();
72-
numThreads_ = 0;
73-
}
33+
static void create(size_t) {}
34+
static size_t num_threads() { return std::thread::hardware_concurrency(); }
35+
static void destroy() {}
7436

7537
private:
7638
FRBSingleton() = delete;
77-
78-
static inline std::unique_ptr<frb::thread_pool> instance_ = nullptr;
79-
static inline std::mutex mutex_;
80-
static inline size_t numThreads_ = 0;
8139
};

0 commit comments

Comments
 (0)