Commit b5f2e706 authored by Abhishek Yenpure's avatar Abhishek Yenpure
Browse files

Moving changes of .cxx to .hxx

-For the BoundingIntervalHierarchy CUDA had failures with using
 .cxx file to implement the virtual methods
-Moving the contents to the .hxx file after discussing with Rob
 over email
-Need to still work on the .cxx implementation after merge
parent e0296a24
//============================================================================
// 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 2014 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
// Copyright 2014 UT-Battelle, LLC.
// Copyright 2014 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.
//============================================================================
#include <vtkm/cont/BoundingIntervalHierarchy.h>
#include <vtkm/cont/BoundingIntervalHierarchy.hxx>
namespace vtkm
{
namespace cont
{
using HandleType = vtkm::cont::VirtualObjectHandle<vtkm::exec::CellLocator>;
VTKM_CONT
void BoundingIntervalHierarchy::Build()
{
BuildFunctor functor(this);
vtkm::cont::TryExecute(functor);
}
VTKM_CONT
const HandleType BoundingIntervalHierarchy::PrepareForExecutionImpl(const vtkm::Int8 deviceId) const
{
/*using DeviceList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG;
const vtkm::exec::CellLocator* toReturn;
vtkm::cont::internal::FindDeviceAdapterTagAndCall(
device, DeviceList(), PrepareForExecutionFunctor(), *this, &toReturn);
return toReturn;*/
using DeviceList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG;
//HandleType ExecHandle; // = new HandleType(locator, false);
vtkm::cont::internal::FindDeviceAdapterTagAndCall(
deviceId, DeviceList(), PrepareForExecutionFunctor(), *this, this->ExecHandle);
return this->ExecHandle;
}
}
}
...@@ -511,5 +511,28 @@ public: ...@@ -511,5 +511,28 @@ public:
} }
}; };
VTKM_CONT
void BoundingIntervalHierarchy::Build()
{
BuildFunctor functor(this);
vtkm::cont::TryExecute(functor);
}
VTKM_CONT
const HandleType BoundingIntervalHierarchy::PrepareForExecutionImpl(const vtkm::Int8 deviceId) const
{
/*using DeviceList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG;
const vtkm::exec::CellLocator* toReturn;
vtkm::cont::internal::FindDeviceAdapterTagAndCall(
device, DeviceList(), PrepareForExecutionFunctor(), *this, &toReturn);
return toReturn;*/
using DeviceList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG;
//HandleType ExecHandle; // = new HandleType(locator, false);
vtkm::cont::internal::FindDeviceAdapterTagAndCall(
deviceId, DeviceList(), PrepareForExecutionFunctor(), *this, this->ExecHandle);
return this->ExecHandle;
}
} //namespace cont } //namespace cont
} //namespace vtkm } //namespace vtkm
...@@ -135,7 +135,6 @@ set(sources ...@@ -135,7 +135,6 @@ set(sources
# compiled with a device-specific compiler (like CUDA). # compiled with a device-specific compiler (like CUDA).
set(device_sources set(device_sources
ArrayRangeCompute.cxx ArrayRangeCompute.cxx
BoundingIntervalHierarchy.cxx
CellSetExplicit.cxx CellSetExplicit.cxx
ColorTable.cxx ColorTable.cxx
CoordinateSystem.cxx CoordinateSystem.cxx
......
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