mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Common: Set a min size on threadpool work chunks.
This should avoid slicing loops, etc. into too many chunks. Generalize the memcpy a bit.
This commit is contained in:
1 parent
639dd67130
commit
b2f3f06768
5 files changed
+48
-45
No files matched your search
+2
-6
@@ -324,14 +324,10 @@ static void DoMemoryVoid(PointerWrap &p, uint32_t start, uint32_t size) {
|
||||
|
||||
switch (p.mode) {
|
||||
case PointerWrap::MODE_READ:
|
||||
GlobalThreadPool::Loop([&](int l, int h) {
|
||||
memmove(d + l, storage + l, h - l);
|
||||
}, 0, size);
|
||||
GlobalThreadPool::Memcpy(d, storage, size);
|
||||
break;
|
||||
case PointerWrap::MODE_WRITE:
|
||||
GlobalThreadPool::Loop([&](int l, int h) {
|
||||
memmove(storage + l, d + l, h - l);
|
||||
}, 0, size);
|
||||
GlobalThreadPool::Memcpy(storage, d, size);
|
||||
break;
|
||||
case PointerWrap::MODE_MEASURE:
|
||||
// Nothing to do here.
|
||||
|
||||
Reference in new issue
Block a user