public void CreateAtomicValContext() { _atomicVal = new OptimisticallyLockedValue <Vector2>(new Vector2(-1f, -1f)); _atomicValBarrier = new ManualResetEvent(false); _atomicValThreads = new List <Thread>(); BenchmarkUtils.PrepareThreads(NumThreads, _atomicValBarrier, WithAtomicVal_Entry, _atomicValThreads); }
public void CreateAtomicLongContext() { _atomicLong = new AtomicLong(0L); _atomicLongBarrier = new ManualResetEvent(false); _atomicLongThreads = new List <Thread>(); BenchmarkUtils.PrepareThreads(NumThreads, _atomicLongBarrier, WithAtomicLong_Entry, _atomicLongThreads); }
public void CreateContextualFuncsContext() { _contextualFuncsBarrier = new ManualResetEvent(false); _contextualFuncsThreads = new List <Thread>(); _contextualFuncsUser = new LockFreeReference <User>(new User(0, "")); _contextualFuncsInt64 = new LockFreeInt64(0L); BenchmarkUtils.PrepareThreads(NumThreads, _contextualFuncsBarrier, WithContextualFuncs_Entry, _contextualFuncsThreads); }
public void CreateLockedLongLessGranularContext() { _lockedLessGranularLongLock = new object(); _lockedLessGranularLong = new AtomicLong(0L); _lockedLessGranularLongBarrier = new ManualResetEvent(false); _lockedLessGranularLongThreads = new List <Thread>(); BenchmarkUtils.PrepareThreads(NumThreads, _lockedLessGranularLongBarrier, WithLockedLongLessGranular_Entry, _lockedLessGranularLongThreads); }
public void CreateLockedLongContext() { _lockedLongLock = new object(); _lockedLong = new LockFreeInt64(0L); _lockedLongBarrier = new ManualResetEvent(false); _lockedLongThreads = new List <Thread>(); BenchmarkUtils.PrepareThreads(NumThreads, _lockedLongBarrier, WithLockedLong_Entry, _lockedLongThreads); }
public void CreateAtomicValContext() { _atomicVal = new LockFreeValue <Vector2>(new Vector2(5f, 10f)); _atomicValBarrier = new ManualResetEvent(false); _atomicValThreads = new List <Thread>(); _atomicValRemainingThreadCount = new LockFreeInt32(NumThreads); BenchmarkUtils.PrepareThreads(NumThreads, _atomicValBarrier, WithAtomicVal_EntryA, _atomicValThreads); BenchmarkUtils.PrepareThreads(NumThreads, _atomicValBarrier, WithAtomicVal_EntryB, _atomicValThreads); }
public void CreateManualLoopContext() { _manualLoopVector2 = new Vector2(5f, 10f); _manualLoopBarrier = new ManualResetEvent(false); _manualLoopThreads = new List <Thread>(); _manualLoopRemainingThreadCount = new LockFreeInt32(NumThreads); BenchmarkUtils.PrepareThreads(NumThreads, _manualLoopBarrier, WithManualLoop_EntryA, _manualLoopThreads); BenchmarkUtils.PrepareThreads(NumThreads, _manualLoopBarrier, WithManualLoop_EntryB, _manualLoopThreads); }