23 #ifndef STDThreadvtkSMPThreadLocalBackend_h
24 #define STDThreadvtkSMPThreadLocalBackend_h
26 #include "vtkCommonCoreModule.h"
42 VTK_ABI_NAMESPACE_BEGIN
60 void operator=(
const Slot&);
85 StoragePointerType& GetStorage();
86 size_t GetSize()
const;
89 std::atomic<HashTableArray*> Root;
90 std::atomic<size_t> Size;
100 : ThreadSpecificStorage(nullptr)
101 , CurrentArray(nullptr)
108 this->ThreadSpecificStorage = &threadSpecifc;
113 this->CurrentArray = this->ThreadSpecificStorage->Root;
114 this->CurrentSlot = 0;
123 this->CurrentArray =
nullptr;
124 this->CurrentSlot = 0;
129 bool GetAtEnd()
const {
return this->CurrentArray ==
nullptr; }
135 if (++this->CurrentSlot >= this->CurrentArray->
Size)
137 this->CurrentArray = this->CurrentArray->
Prev;
138 this->CurrentSlot = 0;
139 if (!this->CurrentArray)
144 Slot* slot = this->CurrentArray->
Slots + this->CurrentSlot;
154 Slot* slot = this->CurrentArray->
Slots + this->CurrentSlot;
160 return (this->ThreadSpecificStorage == it.ThreadSpecificStorage) &&
161 (this->CurrentArray == it.CurrentArray) && (this->CurrentSlot == it.CurrentSlot);
170 VTK_ABI_NAMESPACE_END
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