Template Class SpinLock

Class Documentation

template<MemoryScope scope = MemoryScope::SYSTEM, typename Integer = uint64_t, typename enable = std::enable_if_t<std::is_integral<Integer>::value>>
class SpinLock

basic spinlock which uses atomic_add

Public Functions

SpinLock()
~SpinLock() = default
SpinLock(const SpinLock&) = delete
SpinLock &operator=(const SpinLock&) = delete
SpinLock(SpinLock&&) = delete
__host__ __device__ void Acquire()

Blocking method to acquire the lock.

__host__ __device__ void Release()

Blocking method to release the lock.

__host__ __device__ bool TryAcquire()