35 #ifndef STDThreadvtkSMPThreadLocalBackend_h
36 #define STDThreadvtkSMPThreadLocalBackend_h
38 #include "vtkCommonCoreModule.h"
71 void operator=(
const Slot&);
96 StoragePointerType& GetStorage();
97 size_t GetSize()
const;
100 std::atomic<HashTableArray*> Root;
101 std::atomic<size_t> Size;
111 : ThreadSpecificStorage(nullptr)
112 , CurrentArray(nullptr)
119 this->ThreadSpecificStorage = &threadSpecifc;
124 this->CurrentArray = this->ThreadSpecificStorage->Root;
125 this->CurrentSlot = 0;
134 this->CurrentArray =
nullptr;
135 this->CurrentSlot = 0;
140 bool GetAtEnd()
const {
return this->CurrentArray ==
nullptr; }
146 if (++this->CurrentSlot >= this->CurrentArray->
Size)
148 this->CurrentArray = this->CurrentArray->
Prev;
149 this->CurrentSlot = 0;
150 if (!this->CurrentArray)
155 Slot* slot = this->CurrentArray->
Slots + this->CurrentSlot;
165 Slot* slot = this->CurrentArray->
Slots + this->CurrentSlot;
171 return (this->ThreadSpecificStorage == it.ThreadSpecificStorage) &&
172 (this->CurrentArray == it.CurrentArray) && (this->CurrentSlot == it.CurrentSlot);
void * StoragePointerType
std::atomic< ThreadIdType > ThreadId
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
bool operator==(const ThreadSpecificStorageIterator &it) const
bool GetInitialized() const
HashTableArray(size_t sizeLg)
ThreadSpecificStorageIterator()
StoragePointerType & GetStorage() const
StoragePointerType Storage
void SetThreadSpecificStorage(ThreadSpecific &threadSpecifc)
std::atomic< size_t > NumberOfEntries