35#ifndef STDThreadvtkSMPThreadLocalBackend_h
36#define STDThreadvtkSMPThreadLocalBackend_h
38#include "vtkCommonCoreModule.h"
71 void operator=(
const Slot&);
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);
ThreadSpecificStorageIterator()
void SetThreadSpecificStorage(ThreadSpecific &threadSpecifc)
bool GetInitialized() const
bool operator==(const ThreadSpecificStorageIterator &it) const
StoragePointerType & GetStorage() const
StoragePointerType & GetStorage()
ThreadSpecific(unsigned numThreads)
virtual ~ThreadSpecific()
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