|
1 | 1 | --- a/Common/Core/vtkAOSDataArrayTemplate.h
|
2 | 2 | +++ b/Common/Core/vtkAOSDataArrayTemplate.h
|
3 |
| -@@ -63,7 +63,7 @@ |
| 3 | +@@ -75,7 +75,7 @@ |
4 | 4 | /**
|
5 | 5 | * Get the value at @a valueIdx. @a valueIdx assumes AOS ordering.
|
6 | 6 | */
|
|
9 | 9 | VTK_EXPECTS(0 <= valueIdx && valueIdx < GetNumberOfValues())
|
10 | 10 | {
|
11 | 11 | return this->Buffer->GetBuffer()[valueIdx];
|
12 |
| -@@ -72,7 +72,7 @@ |
| 12 | +@@ -84,7 +84,7 @@ |
13 | 13 | /**
|
14 | 14 | * Set the value at @a valueIdx to @a value. @a valueIdx assumes AOS ordering.
|
15 | 15 | */
|
|
18 | 18 | VTK_EXPECTS(0 <= valueIdx && valueIdx < GetNumberOfValues())
|
19 | 19 | {
|
20 | 20 | this->Buffer->GetBuffer()[valueIdx] = value;
|
21 |
| -@@ -82,7 +82,7 @@ |
| 21 | +@@ -94,7 +94,7 @@ |
22 | 22 | /**
|
23 | 23 | * Copy the tuple at @a tupleIdx into @a tuple.
|
24 | 24 | */
|
|
27 | 27 | VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
|
28 | 28 | {
|
29 | 29 | const vtkIdType valueIdx = tupleIdx * this->NumberOfComponents;
|
30 |
| -@@ -95,7 +95,7 @@ |
| 30 | +@@ -107,7 +107,7 @@ |
31 | 31 | /**
|
32 | 32 | * Set this array's tuple at @a tupleIdx to the values in @a tuple.
|
33 | 33 | */
|
|
36 | 36 | VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
|
37 | 37 | {
|
38 | 38 | const vtkIdType valueIdx = tupleIdx * this->NumberOfComponents;
|
39 |
| -@@ -106,7 +106,7 @@ |
| 39 | +@@ -158,7 +158,7 @@ |
40 | 40 | /**
|
41 | 41 | * Get component @a comp of the tuple at @a tupleIdx.
|
42 | 42 | */
|
43 |
| -- ValueType GetTypedComponent(vtkIdType tupleIdx, int comp) const VTK_EXPECTS(0 <= tupleIdx && |
44 |
| -+ VTKCOMMONCORE_EXPORT ValueType GetTypedComponent(vtkIdType tupleIdx, int comp) const VTK_EXPECTS(0 <= tupleIdx && |
45 |
| - tupleIdx < GetNumberOfTuples()) VTK_EXPECTS(0 <= comp && comp < GetNumberOfComponents()) |
| 43 | +- ValueType GetTypedComponent(vtkIdType tupleIdx, int comp) const |
| 44 | ++ VTKCOMMONCORE_EXPORT ValueType GetTypedComponent(vtkIdType tupleIdx, int comp) const |
| 45 | + VTK_EXPECTS(0 <= tupleIdx && GetNumberOfComponents() * tupleIdx + comp < GetNumberOfValues()) |
| 46 | + VTK_EXPECTS(0 <= comp && comp < GetNumberOfComponents()) |
46 | 47 | {
|
47 |
| - return this->Buffer->GetBuffer()[this->NumberOfComponents * tupleIdx + comp]; |
48 |
| -@@ -116,7 +116,7 @@ |
| 48 | +@@ -169,7 +169,7 @@ |
49 | 49 | /**
|
50 | 50 | * Set component @a comp of the tuple at @a tupleIdx to @a value.
|
51 | 51 | */
|
52 |
| -- void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType value) VTK_EXPECTS(0 <= tupleIdx && |
53 |
| -+ VTKCOMMONCORE_EXPORT void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType value) VTK_EXPECTS(0 <= tupleIdx && |
54 |
| - tupleIdx < GetNumberOfTuples()) VTK_EXPECTS(0 <= comp && comp < GetNumberOfComponents()) |
| 52 | +- void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType value) |
| 53 | ++ VTKCOMMONCORE_EXPORT void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType value) |
| 54 | + VTK_EXPECTS(0 <= tupleIdx && GetNumberOfComponents() * tupleIdx + comp < GetNumberOfValues()) |
| 55 | + VTK_EXPECTS(0 <= comp && comp < GetNumberOfComponents()) |
55 | 56 | {
|
56 |
| - const vtkIdType valueIdx = tupleIdx * this->NumberOfComponents + comp; |
57 |
| -@@ -260,11 +260,11 @@ |
| 57 | +@@ -314,11 +314,11 @@ |
58 | 58 | vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray* source) override;
|
59 | 59 | // MSVC doesn't like 'using' here (error C2487). Just forward instead:
|
60 | 60 | // using Superclass::InsertTuples;
|
|
70 | 70 | this->Superclass::InsertTuplesStartingAt(dstStart, srcIds, source);
|
71 | 71 | --- a/Common/Core/vtkSetGet.h
|
72 | 72 | +++ b/Common/Core/vtkSetGet.h
|
73 |
| -@@ -827,7 +827,7 @@ |
| 73 | +@@ -1076,7 +1076,7 @@ |
74 | 74 | \
|
75 | 75 | public: \
|
76 | 76 | typedef superclass Superclass; \
|
|
79 | 79 | { \
|
80 | 80 | if (!strcmp(thisClassName, type)) \
|
81 | 81 | { \
|
82 |
| -@@ -836,7 +836,7 @@ |
83 |
| - return superclass::IsTypeOf(type); \ |
| 82 | +@@ -1088,7 +1088,7 @@ |
| 83 | + { \ |
| 84 | + return this->thisClass::IsTypeOf(type); \ |
84 | 85 | } \
|
85 |
| - vtkTypeBool IsA(const char* type) override { return this->thisClass::IsTypeOf(type); } \ |
86 | 86 | - static thisClass* SafeDownCast(vtkObjectBase* o) \
|
87 | 87 | + static VTKCOMMONCORE_EXPORT thisClass* SafeDownCast(vtkObjectBase* o) \
|
88 | 88 | { \
|
89 | 89 | if (o && o->IsA(thisClassName)) \
|
90 | 90 | { \
|
91 |
| -@@ -848,7 +848,7 @@ |
| 91 | +@@ -1100,7 +1100,7 @@ |
92 | 92 | { \
|
93 | 93 | return instanceType::SafeDownCast(this->NewInstanceInternal()); \
|
94 | 94 | } \
|
|
99 | 99 | { \
|
100 | 100 | --- a/Common/Core/vtkSOADataArrayTemplate.h
|
101 | 101 | +++ b/Common/Core/vtkSOADataArrayTemplate.h
|
102 |
| -@@ -60,7 +60,7 @@ |
| 102 | +@@ -52,7 +52,7 @@ |
103 | 103 | /**
|
104 | 104 | * Get the value at @a valueIdx. @a valueIdx assumes AOS ordering.
|
105 | 105 | */
|
|
108 | 108 | {
|
109 | 109 | vtkIdType tupleIdx;
|
110 | 110 | int comp;
|
111 |
| -@@ -73,7 +73,7 @@ |
| 111 | +@@ -65,7 +65,7 @@ |
112 | 112 | /**
|
113 | 113 | * Set the value at @a valueIdx to @a value. @a valueIdx assumes AOS ordering.
|
114 | 114 | */
|
|
117 | 117 | {
|
118 | 118 | vtkIdType tupleIdx;
|
119 | 119 | int comp;
|
120 |
| -@@ -85,7 +85,7 @@ |
| 120 | +@@ -77,7 +77,7 @@ |
121 | 121 | /**
|
122 | 122 | * Copy the tuple at @a tupleIdx into @a tuple.
|
123 | 123 | */
|
124 | 124 | - inline void GetTypedTuple(vtkIdType tupleIdx, ValueType* tuple) const
|
125 | 125 | + inline VTKCOMMONCORE_EXPORT void GetTypedTuple(vtkIdType tupleIdx, ValueType* tuple) const
|
126 | 126 | {
|
127 |
| - for (size_t cc = 0; cc < this->Data.size(); cc++) |
| 127 | + if (this->StorageType == StorageTypeEnum::SOA) |
128 | 128 | {
|
129 |
| -@@ -96,7 +96,7 @@ |
| 129 | +@@ -97,7 +97,7 @@ |
130 | 130 | /**
|
131 | 131 | * Set this array's tuple at @a tupleIdx to the values in @a tuple.
|
132 | 132 | */
|
133 | 133 | - inline void SetTypedTuple(vtkIdType tupleIdx, const ValueType* tuple)
|
134 | 134 | + inline VTKCOMMONCORE_EXPORT void SetTypedTuple(vtkIdType tupleIdx, const ValueType* tuple)
|
135 | 135 | {
|
136 |
| - for (size_t cc = 0; cc < this->Data.size(); ++cc) |
| 136 | + if (this->StorageType == StorageTypeEnum::SOA) |
137 | 137 | {
|
138 |
| -@@ -107,7 +107,7 @@ |
| 138 | +@@ -117,7 +117,7 @@ |
139 | 139 | /**
|
140 | 140 | * Get component @a comp of the tuple at @a tupleIdx.
|
141 | 141 | */
|
142 | 142 | - inline ValueType GetTypedComponent(vtkIdType tupleIdx, int comp) const
|
143 | 143 | + inline VTKCOMMONCORE_EXPORT ValueType GetTypedComponent(vtkIdType tupleIdx, int comp) const
|
144 | 144 | {
|
145 |
| - return this->Data[comp]->GetBuffer()[tupleIdx]; |
146 |
| - } |
147 |
| -@@ -115,7 +115,7 @@ |
| 145 | + if (this->StorageType == StorageTypeEnum::SOA) |
| 146 | + { |
| 147 | +@@ -129,7 +129,7 @@ |
148 | 148 | /**
|
149 | 149 | * Set component @a comp of the tuple at @a tupleIdx to @a value.
|
150 | 150 | */
|
151 | 151 | - inline void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType value)
|
152 | 152 | + inline VTKCOMMONCORE_EXPORT void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType value)
|
153 | 153 | {
|
154 |
| - this->Data[comp]->GetBuffer()[tupleIdx] = value; |
155 |
| - } |
156 |
| -@@ -198,11 +198,11 @@ |
| 154 | + if (this->StorageType == StorageTypeEnum::SOA) |
| 155 | + { |
| 156 | +@@ -219,11 +219,11 @@ |
157 | 157 | vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray* source) override;
|
158 | 158 | // MSVC doesn't like 'using' here (error C2487). Just forward instead:
|
159 | 159 | // using Superclass::InsertTuples;
|
|
167 | 167 | vtkIdType dstStart, vtkIdList* srcIds, vtkAbstractArray* source) override
|
168 | 168 | {
|
169 | 169 | this->Superclass::InsertTuplesStartingAt(dstStart, srcIds, source);
|
170 |
| - |
0 commit comments