Salome HOME
merge from master
[tools/sat_salome.git] / products / patches / paraview.0019-spns-26344-VTK-OpenMP.patch
1 diff -Naur ParaView-5.9.0_ref/VTK/Filters/Geometry/vtkGeometryFilter.cxx ParaView-5.9.0/VTK/Filters/Geometry/vtkGeometryFilter.cxx
2 --- ParaView-5.9.0_ref/VTK/Filters/Geometry/vtkGeometryFilter.cxx       2021-09-16 13:17:47.022010882 +0200
3 +++ ParaView-5.9.0/VTK/Filters/Geometry/vtkGeometryFilter.cxx   2021-09-16 13:21:51.054384099 +0200
4 @@ -448,6 +448,71 @@
5      this->ICellIds.TakeReference(vtkIdList::New());
6      this->Coords.TakeReference(vtkPoints::New());
7    }
8 +  
9 +  LocalDataType(const LocalDataType& other)
10 +  {
11 +    this->ThreadId = other.ThreadId;
12 +
13 +    this->Verts = other.Verts;
14 +    this->Lines = other.Lines;
15 +    this->Polys = other.Polys;
16 +    this->Strips = other.Strips;
17 +
18 +    this->VertsConnOffset = other.VertsConnOffset;
19 +    this->VertsOffset = other.VertsOffset;
20 +    this->LinesConnOffset = other.LinesConnOffset;
21 +    this->LinesOffset = other.LinesOffset;
22 +    this->PolysConnOffset = other.PolysConnOffset;
23 +    this->PolysOffset = other.PolysOffset;
24 +    this->StripsConnOffset = other.StripsConnOffset;
25 +    this->StripsOffset = other.StripsOffset;
26 +
27 +    this->PointMap = other.PointMap;
28 +    // These are here to have a different allocation for each threads
29 +    this->Cell.TakeReference(vtkGenericCell::New());
30 +    this->CellIds.TakeReference(vtkIdList::New());
31 +    this->IPts.TakeReference(vtkIdList::New());
32 +    this->ICellIds.TakeReference(vtkIdList::New());
33 +    this->Coords.TakeReference(vtkPoints::New());
34 +  }
35 +
36 +  LocalDataType& operator=(const LocalDataType& other)
37 +  {
38 +    if (this != &other)
39 +    {
40 +      LocalDataType tmp = LocalDataType(other);
41 +      this->Swap(tmp);
42 +    }
43 +    return *this;
44 +  }
45 +
46 +  void Swap(LocalDataType& other)
47 +  {
48 +    using std::swap; // the compiler will use custom swap for members if it exists
49 +
50 +    swap(this->Verts, other.Verts);
51 +    swap(this->Lines, other.Lines);
52 +    swap(this->Polys, other.Polys);
53 +    swap(this->Strips, other.Strips);
54 +
55 +    swap(this->VertsConnOffset, other.VertsConnOffset);
56 +    swap(this->VertsOffset, other.VertsOffset);
57 +    swap(this->LinesConnOffset, other.LinesConnOffset);
58 +    swap(this->LinesOffset, other.LinesOffset);
59 +    swap(this->PolysConnOffset, other.PolysConnOffset);
60 +    swap(this->PolysOffset, other.PolysOffset);
61 +    swap(this->StripsConnOffset, other.StripsConnOffset);
62 +    swap(this->StripsOffset, other.StripsOffset);
63 +
64 +    swap(this->PointMap, other.PointMap);
65 +    swap(this->Cell, other.Cell);
66 +    swap(this->CellIds, other.CellIds);
67 +    swap(this->IPts, other.IPts);
68 +    swap(this->ICellIds, other.ICellIds);
69 +    swap(this->Coords, other.Coords);
70 +  }
71 +
72 +
73  
74    void SetPointMap(vtkIdType* ptMap)
75    {