32 #ifndef OpenMPvtkSMPThreadLocalBackend_h
33 #define OpenMPvtkSMPThreadLocalBackend_h
35 #include "vtkCommonCoreModule.h"
66 void operator=(
const Slot&);
91 StoragePointerType& GetStorage();
95 std::atomic<HashTableArray*> Root;
96 std::atomic<size_t> Count;
110 : ThreadSpecificStorage(nullptr)
111 , CurrentArray(nullptr)
118 this->ThreadSpecificStorage = &threadSpecifc;
123 this->CurrentArray = this->ThreadSpecificStorage->Root;
124 this->CurrentSlot = 0;
133 this->CurrentArray =
nullptr;
134 this->CurrentSlot = 0;
139 bool GetAtEnd()
const {
return this->CurrentArray ==
nullptr; }
145 if (++this->CurrentSlot >= this->CurrentArray->
Size)
147 this->CurrentArray = this->CurrentArray->
Prev;
148 this->CurrentSlot = 0;
149 if (!this->CurrentArray)
154 Slot* slot = this->CurrentArray->
Slots + this->CurrentSlot;
164 Slot* slot = this->CurrentArray->
Slots + this->CurrentSlot;
170 return (this->ThreadSpecificStorage == it.ThreadSpecificStorage) &&
171 (this->CurrentArray == it.CurrentArray) && (this->CurrentSlot == it.CurrentSlot);
void SetThreadSpecificStorage(ThreadSpecific &threadSpecifc)
StoragePointerType Storage
std::atomic< ThreadIdType > ThreadId
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
bool GetInitialized() const
std::atomic< size_t > NumberOfEntries
bool operator==(const ThreadSpecificStorageIterator &it) const
ThreadSpecificStorageIterator()
void * StoragePointerType
HashTableArray(size_t sizeLg)
StoragePointerType & GetStorage() const