You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a CUDA-style workgroup barrier on the @Gpu path so cooperative kernels can
synchronize within a local workgroup (same scope as CUDA __syncthreads).
Expose two call forms from cthreads.sync that lower to the same GLSL
barrier (no host locks / no GLSL spinlocks):
__sync_threads(): CUDA-familiar
Barrier.arrive_and_wait(): beginner-friendly; notBarrier(...) construction
Motivation
Enable shared-memory tiles / reductions later (__sync_threads is the first step)
Keep one import surface: from cthreads.sync import Barrier, __sync_threads
Reuse the existing GPU CallPlugin pattern (AST name / Attribute match)
Scope (explicit)
Workgroup / block local only (GLSL barrier() + memoryBarrierShared())
Not grid-wide sync (that stays multi-dispatch / host join)
Not Python mid-run observe
CPU Barrier(parties).arrive_and_wait() unchanged (host mutex/CV barrier)
@Gpu rejects Barrier(n) / Barrier() construction with a clear error
Activity