18#ifndef OpenMPvtkSMPThreadLocalImpl_h
19#define OpenMPvtkSMPThreadLocalImpl_h
23#include "SMP/OpenMP/vtkSMPToolsImpl.txx"
42 : Backend(GetNumberOfThreadsOpenMP())
47 : Backend(GetNumberOfThreadsOpenMP())
65 T* local =
reinterpret_cast<T*
>(ptr);
68 ptr = local =
new T(this->Exemplar);
73 size_t size()
const override {
return this->Backend.Size(); }
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 & GetContent() override
virtual ItImpl * CloneImpl() const override
bool Compare(ItImplAbstract *other) 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.