6#ifndef STDThreadvtkSMPThreadLocalImpl_h
7#define STDThreadvtkSMPThreadLocalImpl_h
11#include "SMP/STDThread/vtkSMPToolsImpl.txx"
22VTK_ABI_NAMESPACE_BEGIN
31 : Backend(GetNumberOfThreadsSTDThread())
36 : Backend(GetNumberOfThreadsSTDThread())
54 T* local =
reinterpret_cast<T*
>(ptr);
57 ptr = local =
new T(this->Exemplar);
62 size_t size()
const override {
return this->Backend.GetSize(); }
71 return this->Impl ==
static_cast<ItImpl*
>(other)->Impl;
74 T&
GetContent()
override {
return *
reinterpret_cast<T*
>(this->Impl.GetStorage()); }
76 T*
GetContentPtr()
override {
return reinterpret_cast<T*
>(this->Impl.GetStorage()); }
87 std::unique_ptr<ItImplAbstract>
begin() override
90 auto it = std::unique_ptr<ItImpl>(
new ItImpl());
91 it->Impl.SetThreadSpecificStorage(this->Backend);
92 it->Impl.SetToBegin();
94 std::unique_ptr<ItImplAbstract> abstractIt(std::move(it));
98 std::unique_ptr<ItImplAbstract>
end()
override
101 auto it = std::unique_ptr<ItImpl>(
new ItImpl());
102 it->Impl.SetThreadSpecificStorage(this->Backend);
105 std::unique_ptr<ItImplAbstract> abstractIt(std::move(it));
void SetThreadSpecificStorage(ThreadSpecific &threadSpecifc)
StoragePointerType & GetStorage() const
ItImpl & operator=(const ItImpl &)=default
virtual std::unique_ptr< ItImpl > begin()=0
T * GetContentPtr() override
void Increment() override
ItImpl * CloneImpl() const override
bool Compare(ItImplAbstract *other) override
T & GetContent() override
size_t size() const override
std::unique_ptr< ItImplAbstract > end() override
vtkSMPThreadLocalImpl(const T &exemplar)
~vtkSMPThreadLocalImpl() override
void * StoragePointerType
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.