mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-26 00:34:45 +02:00
Core: Init memory on multiple threads.
Also init volatile at the same time for consistency.
This commit is contained in:
@@ -133,3 +133,10 @@ void ThreadPool::ParallelMemcpy(void *dest, const void *src, int size) {
|
||||
memmove((uint8_t *)dest + l, (const uint8_t *)src + l, h - l);
|
||||
}, 0, size, MIN_SIZE);
|
||||
}
|
||||
|
||||
void ThreadPool::ParallelMemset(void *dest, uint8_t val, int size) {
|
||||
static const int MIN_SIZE = 128 * 1024;
|
||||
ParallelLoop([&](int l, int h) {
|
||||
memset((uint8_t *)dest + l, val, h - l);
|
||||
}, 0, size, MIN_SIZE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user