mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Removed all modifications in the internal device adapter algorithm header files.
This commit is contained in:
parent
06ac9f7219
commit
4d61066e9c
@ -13,30 +13,30 @@
|
||||
|
||||
if(VTKm_ENABLE_EXAMPLES)
|
||||
set(CMAKE_PREFIX_PATH ${VTKm_BINARY_DIR}/${VTKm_INSTALL_CONFIG_DIR})
|
||||
#add_subdirectory(clipping)
|
||||
#add_subdirectory(contour_tree)
|
||||
#add_subdirectory(contour_tree_augmented)
|
||||
#add_subdirectory(cosmotools)
|
||||
#add_subdirectory(demo)
|
||||
#add_subdirectory(game_of_life)
|
||||
#add_subdirectory(hello_world)
|
||||
#add_subdirectory(histogram)
|
||||
#add_subdirectory(isosurface)
|
||||
#add_subdirectory(lagrangian)
|
||||
add_subdirectory(clipping)
|
||||
add_subdirectory(contour_tree)
|
||||
add_subdirectory(contour_tree_augmented)
|
||||
add_subdirectory(cosmotools)
|
||||
add_subdirectory(demo)
|
||||
add_subdirectory(game_of_life)
|
||||
add_subdirectory(hello_world)
|
||||
add_subdirectory(histogram)
|
||||
add_subdirectory(isosurface)
|
||||
add_subdirectory(lagrangian)
|
||||
add_subdirectory(mesh_quality)
|
||||
#add_subdirectory(multi_backend)
|
||||
#add_subdirectory(oscillator)
|
||||
#add_subdirectory(particle_advection)
|
||||
#add_subdirectory(redistribute_points)
|
||||
#add_subdirectory(rendering)
|
||||
#add_subdirectory(streamline)
|
||||
#add_subdirectory(temporal_advection)
|
||||
#add_subdirectory(tetrahedra)
|
||||
add_subdirectory(multi_backend)
|
||||
add_subdirectory(oscillator)
|
||||
add_subdirectory(particle_advection)
|
||||
add_subdirectory(redistribute_points)
|
||||
add_subdirectory(rendering)
|
||||
add_subdirectory(streamline)
|
||||
add_subdirectory(temporal_advection)
|
||||
add_subdirectory(tetrahedra)
|
||||
endif()
|
||||
|
||||
if (VTKm_ENABLE_TESTING)
|
||||
# These need to be fast to build as they will
|
||||
# be built each time we run the test
|
||||
#vtkm_test_against_install(rendering)
|
||||
#vtkm_test_against_install(histogram)
|
||||
vtkm_test_against_install(rendering)
|
||||
vtkm_test_against_install(histogram)
|
||||
endif()
|
||||
|
@ -94,13 +94,6 @@ struct DeviceAdapterAlgorithm
|
||||
vtkm::cont::ArrayHandle<T, COut>& output,
|
||||
UnaryPredicate unary_predicate);
|
||||
|
||||
template <typename T, typename U, class CIn, class CStencil, class COut>
|
||||
VTKM_CONT static void CopyIf(const vtkm::cont::ArrayHandle<T, CIn>& input,
|
||||
const vtkm::cont::ArrayHandle<U, CStencil>& stencil,
|
||||
vtkm::cont::ArrayHandle<T, COut>& output,
|
||||
const vtkm::Id& output_size);
|
||||
|
||||
|
||||
/// \brief Copy the contents of a section of one ArrayHandle to another
|
||||
///
|
||||
/// Copies the a range of elements of \c input to \c output. The number of
|
||||
|
@ -1142,21 +1142,6 @@ public:
|
||||
output.Shrink(newSize);
|
||||
}
|
||||
|
||||
template <typename T, typename U, class SIn, class SStencil, class SOut>
|
||||
VTKM_CONT static void CopyIf(const vtkm::cont::ArrayHandle<U, SIn>& input,
|
||||
const vtkm::cont::ArrayHandle<T, SStencil>& stencil,
|
||||
vtkm::cont::ArrayHandle<U, SOut>& output,
|
||||
const vtkm::Id& output_size)
|
||||
{
|
||||
VTKM_LOG_SCOPE_FUNCTION(vtkm::cont::LogLevel::Perf);
|
||||
vtkm::Id size = stencil.GetNumberOfValues();
|
||||
CopyIfPortal(input.PrepareForInput(DeviceAdapterTagCuda()),
|
||||
stencil.PrepareForInput(DeviceAdapterTagCuda()),
|
||||
output.PrepareForOutput(output_size, DeviceAdapterTagCuda()),
|
||||
::vtkm::NotZeroInitialized()); //yes on the stencil
|
||||
}
|
||||
|
||||
|
||||
template <typename T, typename U, class SIn, class SOut>
|
||||
VTKM_CONT static bool CopySubRange(const vtkm::cont::ArrayHandle<T, SIn>& input,
|
||||
vtkm::Id inputStartIndex,
|
||||
@ -1784,6 +1769,17 @@ public:
|
||||
using Task = vtkm::exec::cuda::internal::TaskStrided1D<WorkletType, InvocationType>;
|
||||
return Task(worklet, invocation, globalIndexOffset);
|
||||
}
|
||||
|
||||
template <typename WorkletType, typename InvocationType>
|
||||
static vtkm::exec::cuda::internal::TaskStrided3D<WorkletType, InvocationType> MakeTask(
|
||||
WorkletType& worklet,
|
||||
InvocationType& invocation,
|
||||
vtkm::Id3,
|
||||
vtkm::Id globalIndexOffset = 0)
|
||||
{
|
||||
using Task = vtkm::exec::cuda::internal::TaskStrided3D<WorkletType, InvocationType>;
|
||||
return Task(worklet, invocation, globalIndexOffset);
|
||||
}
|
||||
};
|
||||
}
|
||||
} // namespace vtkm::cont
|
||||
|
@ -124,44 +124,6 @@ public:
|
||||
output.Shrink(writePos);
|
||||
}
|
||||
|
||||
template <typename T, typename U, class CIn, class CStencil, class COut>
|
||||
VTKM_CONT static void CopyIf(const vtkm::cont::ArrayHandle<T, CIn>& input,
|
||||
const vtkm::cont::ArrayHandle<U, CStencil>& stencil,
|
||||
vtkm::cont::ArrayHandle<T, COut>& output,
|
||||
const vtkm::Id& output_size)
|
||||
{
|
||||
::vtkm::NotZeroInitialized unary_predicate;
|
||||
CopyIf(input, stencil, output, output_size, unary_predicate);
|
||||
}
|
||||
|
||||
|
||||
template <typename T, typename U, class CIn, class CStencil, class COut, class UnaryPredicate>
|
||||
VTKM_CONT static void CopyIf(const vtkm::cont::ArrayHandle<T, CIn>& input,
|
||||
const vtkm::cont::ArrayHandle<U, CStencil>& stencil,
|
||||
vtkm::cont::ArrayHandle<T, COut>& output,
|
||||
const vtkm::Id& output_size,
|
||||
UnaryPredicate predicate)
|
||||
{
|
||||
vtkm::Id inputSize = input.GetNumberOfValues();
|
||||
VTKM_ASSERT(inputSize == stencil.GetNumberOfValues());
|
||||
|
||||
auto inputPortal = input.PrepareForInput(DeviceAdapterTagSerial());
|
||||
auto stencilPortal = stencil.PrepareForInput(DeviceAdapterTagSerial());
|
||||
auto outputPortal = output.PrepareForOutput(output_size, DeviceAdapterTagSerial());
|
||||
|
||||
vtkm::Id readPos = 0;
|
||||
vtkm::Id writePos = 0;
|
||||
|
||||
for (; readPos < inputSize; ++readPos)
|
||||
{
|
||||
if (predicate(stencilPortal.Get(readPos)))
|
||||
{
|
||||
outputPortal.Set(writePos, inputPortal.Get(readPos));
|
||||
++writePos;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T, typename U, class CIn, class COut>
|
||||
VTKM_CONT static bool CopySubRange(const vtkm::cont::ArrayHandle<T, CIn>& input,
|
||||
vtkm::Id inputStartIndex,
|
||||
|
@ -79,35 +79,6 @@ public:
|
||||
output.Shrink(outputSize);
|
||||
}
|
||||
|
||||
template <typename T, typename U, class CIn, class CStencil, class COut>
|
||||
VTKM_CONT static void CopyIf(const vtkm::cont::ArrayHandle<T, CIn>& input,
|
||||
const vtkm::cont::ArrayHandle<U, CStencil>& stencil,
|
||||
vtkm::cont::ArrayHandle<T, COut>& output,
|
||||
const vtkm::Id& output_size)
|
||||
{
|
||||
|
||||
VTKM_LOG_SCOPE_FUNCTION(vtkm::cont::LogLevel::Perf);
|
||||
::vtkm::NotZeroInitialized unary_predicate;
|
||||
CopyIf(input, stencil, output, output_size, unary_predicate);
|
||||
}
|
||||
|
||||
template <typename T, typename U, class CIn, class CStencil, class COut, class UnaryPredicate>
|
||||
VTKM_CONT static void CopyIf(const vtkm::cont::ArrayHandle<T, CIn>& input,
|
||||
const vtkm::cont::ArrayHandle<U, CStencil>& stencil,
|
||||
vtkm::cont::ArrayHandle<T, COut>& output,
|
||||
const vtkm::Id& output_size,
|
||||
UnaryPredicate unary_predicate)
|
||||
{
|
||||
|
||||
VTKM_LOG_SCOPE_FUNCTION(vtkm::cont::LogLevel::Perf);
|
||||
vtkm::Id inputSize = input.GetNumberOfValues();
|
||||
tbb::CopyIfPortals(input.PrepareForInput(DeviceAdapterTagTBB()),
|
||||
stencil.PrepareForInput(DeviceAdapterTagTBB()),
|
||||
output.PrepareForOutput(output_size, DeviceAdapterTagTBB()),
|
||||
unary_predicate);
|
||||
}
|
||||
|
||||
|
||||
template <typename T, typename U, class CIn, class COut>
|
||||
VTKM_CONT static bool CopySubRange(const vtkm::cont::ArrayHandle<T, CIn>& input,
|
||||
vtkm::Id inputStartIndex,
|
||||
|
@ -134,7 +134,6 @@ VTKM_EXEC OutType CellEdgeRatioMetric(const vtkm::IdComponent& numPts,
|
||||
{
|
||||
if (numPts != 3)
|
||||
{
|
||||
std::cout << "numPts triangle: " << numPts << "\n";
|
||||
worklet.RaiseError("Edge ratio metric(triangle) requires 3 points.");
|
||||
return OutType(0.0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user