mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-21 05:12:22 -08:00
tweak thread broadcasting and balance symbol inputs
This commit is contained in:
1 parent
77ece3193e
commit
f69532e11d
3 files changed
+98
-74
No files matched your search
@@ -246,18 +246,19 @@ tp_divide_work(Arena *arena, U64 item_count, U32 worker_count)
|
||||
return range_arr;
|
||||
}
|
||||
|
||||
internal void *
|
||||
tp_broadcast_(TP_Context *tp, U64 task_id, void *ptr)
|
||||
internal void
|
||||
tp_broadcast_(TP_Context *tp, U64 task_id, void *ptr, U64 ptr_size)
|
||||
{
|
||||
if (task_id == 0) {
|
||||
tp->broadcast = ptr;
|
||||
tp->broadcast = ptr;
|
||||
tp->broadcast_size = ptr_size;
|
||||
}
|
||||
barrier_wait(tp->barrier);
|
||||
|
||||
void *result = tp->broadcast;
|
||||
if (task_id != 0) {
|
||||
MemoryCopy(ptr, tp->broadcast, tp->broadcast_size);
|
||||
}
|
||||
barrier_wait(tp->barrier);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
internal U64
|
||||
|
||||
Reference in new issue
Block a user