This file is indexed.

/usr/include/vtk-6.2/vtkSMPMergePoints.h is in libvtk6-dev 6.2.0+dfsg1-10build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkSMPMergePoints.h

  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
// .NAME vtkSMPMergePoints - Class designed to help with merging of points in parallel
// .SECTION Description
// vtkSMPMergePoints is a subclass of vtkMergePoints designed to help
// with merging of points generated by using multiple locators in parallel.
// Its main functionality is provided by the Merge function. It also
// has a few additional convenience functions.
// Merge is thread safe as long as no two threads are merging the same
// bin. The common way of using vtkSMPMergePoints is:
//  - Initialize with outLocator->InitializeMerge()
//  - Allocate points with outLocator->GetPoints()->Resize(numPts) (numPts should be >= total number of points)
//  - Do bunch of merging with outLocator->Merge(inLocator[i], ...) (this can be done in parallel as long as no two bins are done at the same time)
//  - Fix the size of points with outLocator->FixSizeOfPointArray()

#ifndef vtkSMPMergePoints_h__
#define vtkSMPMergePoints_h__

#include "vtkFiltersSMPModule.h" // For export macro
#include "vtkMergePoints.h"
#include "vtkIdList.h" // For inline functions
#include "vtkAtomicInt.h" // For the atomic integer used in Merge()

class vtkPointData;

class VTKFILTERSSMP_EXPORT vtkSMPMergePoints : public vtkMergePoints
{
public:
  vtkTypeMacro(vtkSMPMergePoints, vtkMergePoints);
  static vtkSMPMergePoints* New();
  void PrintSelf(ostream &os, vtkIndent indent);

  // Description:
  // This should be called from 1 thread before any call to Merge.
  void InitializeMerge();

  // Description:
  // Merge the points of one of the bins from the given locator to
  // the same bin of the current locator. Note that this requires that
  // the two locators have identical binning structures. This also
  // merges point data given in the inPD argument to the outPd.
  // Furthermore, it generates a map of the old ids of the input locator
  // to the new ids. This is stored in the idList argument. The map
  // is idList[oldId] = newId.
  void Merge(vtkSMPMergePoints* locator,
             vtkIdType idx,
             vtkPointData *outPd,
             vtkPointData *inPd,
             vtkIdList* idList);

  // Description:
  // At the of the merge, this can be called to set the MaxId of the
  // points array to the maximum id in the locator. The current design
  // usage is as follows:
  //  - Allocate points with points->Resize(numPts). NumPts should be >= total number of points
  //  - Do bunch of merging with outLocator->Merge(inLocator[i], ...)
  //  - Fix the size of points with outLocator->FixSizeOfPointArray()
  void FixSizeOfPointArray();

  // Description:
  // Returns the biggest id in the locator.
  vtkIdType GetMaxId()
  {
    return this->AtomicInsertionId - 1;
  }

  // Description:
  // Retuns the number of points in a bin.
  vtkIdType GetNumberOfIdsInBucket(vtkIdType idx)
  {
    if ( !this->HashTable )
      {
      return 0;
      }
    vtkIdList* bucket = this->HashTable[idx];
    return bucket ? bucket->GetNumberOfIds() : 0;
  }

  // Description:
  // Retuns the number of bins.
  vtkIdType GetNumberOfBuckets()
  {
    return this->NumberOfBuckets;
  }

protected:
  vtkSMPMergePoints();
  ~vtkSMPMergePoints();

  vtkAtomicInt<vtkIdType> AtomicInsertionId;

private:
  vtkSMPMergePoints(const vtkSMPMergePoints&); // Not implemented
  void operator=(const vtkSMPMergePoints&); // Not implemented
};

#endif // vtkSMPMergePoints_h__