ppsspp/Core/ThreadPools.h
Unknown W. Brackets 4f96169357 Core: Init memory on multiple threads.
Also init volatile at the same time for consistency.
2021-04-16 00:53:50 -07:00

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();
};