MCPcopy Create free account
hub / github.com/ml-explore/mlx-data / limit

Method limit

mlx/data/core/ThreadController.cpp:107–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107ThreadControllerState ThreadController::limit() {
108 ThreadControllerState state(symbols_.size());
109 for (auto i = 0; i < symbols_.size(); i++) {
110 auto symbol = symbols_[i];
111 state[i] = reinterpret_cast<int (*)(void)>(symbol->get_sym)();
112 reinterpret_cast<void (*)(int)>(symbol->set_sym)(1);
113 }
114 return state;
115}
116
117void ThreadController::restore(const ThreadControllerState& state) {
118 for (auto i = 0; i < symbols_.size(); i++) {

Callers 1

ThreadPoolMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected