18#ifndef STDThreadvtkSMPThreadLocalImpl_h
19#define STDThreadvtkSMPThreadLocalImpl_h
23#include "SMP/STDThread/vtkSMPToolsImpl.txx"
42 : Backend(GetNumberOfThreadsSTDThread())
47 : Backend(GetNumberOfThreadsSTDThread())
65 T* local =
reinterpret_cast<T*
>(ptr);
68 ptr = local =
new T(this->Exemplar);
73 size_t size()
const override {
return this->Backend.GetSize(); }
82 return this->Impl ==
static_cast<ItImpl*
>(other)->Impl;
85 T&
GetContent()
override {
return *
reinterpret_cast<T*
>(this->Impl.GetStorage()); }
87 T*
GetContentPtr()
override {
return reinterpret_cast<T*
>(this->Impl.GetStorage()); }
98 std::unique_ptr<ItImplAbstract>
begin() override
101 auto it = std::unique_ptr<ItImpl>(
new ItImpl());
102 it->Impl.SetThreadSpecificStorage(this->Backend);
103 it->Impl.SetToBegin();
105 std::unique_ptr<ItImplAbstract> abstractIt(std::move(it));
109 std::unique_ptr<ItImplAbstract>
end()
override
112 auto it = std::unique_ptr<ItImpl>(
new ItImpl());
113 it->Impl.SetThreadSpecificStorage(this->Backend);
116 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
bool Compare(ItImplAbstract *other) override
T & GetContent() override
virtual ItImpl * CloneImpl() const 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.