Commit 7a122f23 authored by Abhishek Yenpure's avatar Abhishek Yenpure

Fixing Problems with Locators

-Fix missing copyright statements
-Updating the PointLocator interface
-Updating the Cell Locator unit test to use less memory and finish early
parent f018a8a7
//============================================================================
//// Copyright (c) Kitware, Inc.
//// All rights reserved.
//// See LICENSE.txt 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.
////
//// Copyright 2015 Sandia Corporation.
//// Copyright 2015 UT-Battelle, LLC.
//// Copyright 2015 Los Alamos National Security.
////
//// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
//// the U.S. Government retains certain rights in this software.
////
//// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
//// Laboratory (LANL), the U.S. Government retains certain rights in
//// this software.
////============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt 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.
//
// Copyright 2017 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
// Copyright 2017 UT-Battelle, LLC.
// Copyright 2017 Los Alamos National Security.
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. Government retains certain rights in this software.
//
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
// Laboratory (LANL), the U.S. Government retains certain rights in
// this software.
//============================================================================
#ifndef vtk_m_cont_BoundingIntervalHierarchyExec_h
#define vtk_m_cont_BoundingIntervalHierarchyExec_h
......
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt 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.
//
// Copyright 2017 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
// Copyright 2017 UT-Battelle, LLC.
// Copyright 2017 Los Alamos National Security.
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. Government retains certain rights in this software.
//
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
// Laboratory (LANL), the U.S. Government retains certain rights in
// this software.
//============================================================================
#ifndef vtk_m_cont_CellLocator_h
#define vtk_m_cont_CellLocator_h
......
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt 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.
//
// Copyright 2017 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
// Copyright 2017 UT-Battelle, LLC.
// Copyright 2017 Los Alamos National Security.
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. Government retains certain rights in this software.
//
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
// Laboratory (LANL), the U.S. Government retains certain rights in
// this software.
//============================================================================
#ifndef vtk_m_cont_PointLocator_h
#define vtk_m_cont_PointLocator_h
#include <vtkm/Types.h>
#include <vtkm/cont/CoordinateSystem.h>
#include <vtkm/cont/DeviceAdapter.h>
......@@ -22,7 +44,7 @@ public:
namespace cont
{
class PointLocator : public ExecutionObjectBase
class PointLocator : public vtkm::cont::ExecutionObjectBase
{
public:
......@@ -49,14 +71,14 @@ public:
}
template <typename DeviceAdapter>
VTKM_CONT std::unique_ptr<vtkm::exec::PointLocator> PrepareForExecution(DeviceAdapter device)
VTKM_CONT const vtkm::exec::PointLocator* PrepareForExecution(DeviceAdapter)
{
vtkm::cont::DeviceAdapterId deviceId = vtkm::cont::DeviceAdapterTraits<DeviceAdapter>::GetId();
return PrepareForExecution(deviceId);
}
VTKM_CONT virtual std::unique_ptr<vtkm::exec::PointLocator> PrepareForExecution(
vtkm::cont::DeviceAdapterId device) = 0;
VTKM_CONT virtual const vtkm::exec::PointLocator* PrepareForExecutionImpl(
const vtkm::Int8 device) = 0;
private:
vtkm::cont::CoordinateSystem Coords;
......@@ -65,3 +87,5 @@ private:
} // namespace cont
} // namespace vtkm
#endif // vtk_m_cont_PointLocator_h
......@@ -117,10 +117,10 @@ void TestBoundingIntervalHierarchy(vtkm::cont::DataSet dataSet, vtkm::IdComponen
void RunTest()
{
TestBoundingIntervalHierarchy(ConstructDataSet(145), 3);
TestBoundingIntervalHierarchy(ConstructDataSet(145), 4);
TestBoundingIntervalHierarchy(ConstructDataSet(145), 6);
TestBoundingIntervalHierarchy(ConstructDataSet(145), 9);
TestBoundingIntervalHierarchy(ConstructDataSet(10), 3);
TestBoundingIntervalHierarchy(ConstructDataSet(10), 4);
TestBoundingIntervalHierarchy(ConstructDataSet(10), 6);
TestBoundingIntervalHierarchy(ConstructDataSet(10), 9);
}
} // anonymous namespace
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment