20#ifndef OpenMPvtkSMPThreadLocalBackend_h
21#define OpenMPvtkSMPThreadLocalBackend_h
23#include "vtkCommonCoreModule.h"
37VTK_ABI_NAMESPACE_BEGIN
55 void operator=(
const Slot&);
84 std::atomic<HashTableArray*> Root;
85 std::atomic<size_t> Count;
99 : ThreadSpecificStorage(nullptr)
100 , CurrentArray(nullptr)
107 this->ThreadSpecificStorage = &threadSpecifc;
112 this->CurrentArray = this->ThreadSpecificStorage->Root;
113 this->CurrentSlot = 0;
122 this->CurrentArray =
nullptr;
123 this->CurrentSlot = 0;
128 bool GetAtEnd()
const {
return this->CurrentArray ==
nullptr; }
134 if (++this->CurrentSlot >= this->CurrentArray->
Size)
136 this->CurrentArray = this->CurrentArray->
Prev;
137 this->CurrentSlot = 0;
138 if (!this->CurrentArray)
143 Slot* slot = this->CurrentArray->
Slots + this->CurrentSlot;
153 Slot* slot = this->CurrentArray->
Slots + this->CurrentSlot;
159 return (this->ThreadSpecificStorage == it.ThreadSpecificStorage) &&
160 (this->CurrentArray == it.CurrentArray) && (this->CurrentSlot == it.CurrentSlot);
bool operator==(const ThreadSpecificStorageIterator &it) const
ThreadSpecificStorageIterator()
void SetThreadSpecificStorage(ThreadSpecific &threadSpecifc)
bool GetInitialized() const
StoragePointerType & GetStorage() const
ThreadSpecific(unsigned numThreads)
StoragePointerType & GetStorage()
void * StoragePointerType
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
HashTableArray(size_t sizeLg)
std::atomic< size_t > NumberOfEntries
std::atomic< ThreadIdType > ThreadId
StoragePointerType Storage