23#ifndef STDThreadvtkSMPThreadLocalBackend_h
24#define STDThreadvtkSMPThreadLocalBackend_h
26#include "vtkCommonCoreModule.h"
42VTK_ABI_NAMESPACE_BEGIN
60 void operator=(
const Slot&);
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);
ThreadSpecificStorageIterator()
void SetThreadSpecificStorage(ThreadSpecific &threadSpecifc)
bool GetInitialized() const
bool operator==(const ThreadSpecificStorageIterator &it) const
StoragePointerType & GetStorage() const
StoragePointerType & GetStorage()
ThreadSpecific(unsigned numThreads)
void * StoragePointerType
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
std::atomic< size_t > NumberOfEntries
HashTableArray(size_t sizeLg)
StoragePointerType Storage
std::atomic< ThreadIdType > ThreadId