VTK  9.4.20241118
vtkSMPThreadLocalImplAbstract.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3
4#ifndef vtkSMPThreadLocalImplAbstract_h
5#define vtkSMPThreadLocalImplAbstract_h
6
7#include <memory>
8
10
11namespace vtk
12{
13namespace detail
14{
15namespace smp
16{
17VTK_ABI_NAMESPACE_BEGIN
18
19template <typename T>
21{
22public:
23 virtual ~vtkSMPThreadLocalImplAbstract() = default;
24
25 virtual T& Local() = 0;
26
27 virtual size_t size() const = 0;
28
29 class ItImpl
30 {
31 public:
32 ItImpl() = default;
33 virtual ~ItImpl() = default;
34 ItImpl(const ItImpl&) = default;
35 ItImpl(ItImpl&&) noexcept = default;
36 ItImpl& operator=(const ItImpl&) = default;
37 ItImpl& operator=(ItImpl&&) noexcept = default;
38
39 virtual void Increment() = 0;
40
41 virtual bool Compare(ItImpl* other) = 0;
42
43 virtual T& GetContent() = 0;
44
45 virtual T* GetContentPtr() = 0;
46
47 std::unique_ptr<ItImpl> Clone() const { return std::unique_ptr<ItImpl>(CloneImpl()); }
48
49 protected:
50 virtual ItImpl* CloneImpl() const = 0;
51 };
52
53 virtual std::unique_ptr<ItImpl> begin() = 0;
54
55 virtual std::unique_ptr<ItImpl> end() = 0;
56};
57
58template <BackendType Backend, typename T>
60{
61};
62
63VTK_ABI_NAMESPACE_END
64} // namespace smp
65} // namespace detail
66} // namespace vtk
67
68#endif
69/* VTK-HeaderTest-Exclude: vtkSMPThreadLocalImplAbstract.h */
virtual std::unique_ptr< ItImpl > end()=0
virtual std::unique_ptr< ItImpl > begin()=0
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.