6#ifndef OpenMPvtkSMPThreadLocalImpl_h
7#define OpenMPvtkSMPThreadLocalImpl_h
11#include "SMP/OpenMP/vtkSMPToolsImpl.txx"
22VTK_ABI_NAMESPACE_BEGIN
31 : Backend(GetNumberOfThreadsOpenMP())
36 : Backend(GetNumberOfThreadsOpenMP())
54 T* local =
reinterpret_cast<T*
>(ptr);
57 ptr = local =
new T(this->Exemplar);
62 size_t size()
const override {
return this->Backend.Size(); }
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 & GetContent() override
bool Compare(ItImplAbstract *other) override
ItImpl * CloneImpl() const override
T * GetContentPtr() override
void Increment() 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.