mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
17 lines
521 B
C++
17 lines
521 B
C++
#pragma once
|
|
|
|
#include "Common/Thread/ThreadPool.h"
|
|
|
|
class GlobalThreadPool {
|
|
public:
|
|
// will execute slices of "loop" from "lower" to "upper"
|
|
// in parallel on the global thread pool
|
|
static void Loop(const std::function<void(int,int)>& loop, int lower, int upper, int minSize = -1);
|
|
static void Memcpy(void *dest, const void *src, int size);
|
|
static void Memset(void *dest, uint8_t val, int size);
|
|
|
|
private:
|
|
static std::unique_ptr<ThreadPool> pool;
|
|
static std::once_flag init_flag;
|
|
static void Inititialize();
|
|
};
|