2015-07-16 19:10:01 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
//
|
2015-07-16 19:10:01 +00:00
|
|
|
// 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.
|
|
|
|
//============================================================================
|
2018-05-11 21:11:45 +00:00
|
|
|
|
2015-07-16 19:10:01 +00:00
|
|
|
#include <vtkm/cont/cuda/DeviceAdapterCuda.h>
|
|
|
|
|
|
|
|
#include <vtkm/cont/cuda/internal/testing/Testing.h>
|
2016-05-26 22:02:30 +00:00
|
|
|
#include <vtkm/cont/testing/TestingComputeRange.h>
|
2015-07-16 19:10:01 +00:00
|
|
|
|
2019-01-01 22:19:02 +00:00
|
|
|
int UnitTestCudaComputeRange(int argc, char* argv[])
|
2015-07-16 19:10:01 +00:00
|
|
|
{
|
2019-05-15 21:26:34 +00:00
|
|
|
auto& tracker = vtkm::cont::GetRuntimeDeviceTracker();
|
2018-05-11 21:11:45 +00:00
|
|
|
tracker.ForceDevice(vtkm::cont::DeviceAdapterTagCuda{});
|
2019-01-01 22:19:02 +00:00
|
|
|
int result =
|
|
|
|
vtkm::cont::testing::TestingComputeRange<vtkm::cont::DeviceAdapterTagCuda>::Run(argc, argv);
|
2015-07-16 19:10:01 +00:00
|
|
|
return vtkm::cont::cuda::internal::Testing::CheckCudaBeforeExit(result);
|
|
|
|
}
|