diff --git a/vtkm/cont/Field.h b/vtkm/cont/Field.h index 0947943ef..c1ac23e1e 100644 --- a/vtkm/cont/Field.h +++ b/vtkm/cont/Field.h @@ -20,7 +20,13 @@ #ifndef vtk_m_cont_Field_h #define vtk_m_cont_Field_h +#include +#include +#include + #include +#include +#include #include #include @@ -28,6 +34,165 @@ namespace vtkm { namespace cont { +namespace internal { + +template +class InputToOutputTypeTransform +{ +public: + typedef vtkm::Vec ResultType; + typedef vtkm::Pair MinMaxPairType; + + template + VTKM_EXEC_EXPORT + MinMaxPairType operator()(const ValueType &value) const + { + ResultType input; + for (vtkm::Id i = 0; i < NumberOfComponents; ++i) + { + input[i] = static_cast( + vtkm::VecTraits::GetComponent(value, i)); + } + return make_Pair(input, input); + } +}; + +template +class MinMax +{ +public: + typedef vtkm::Vec ResultType; + typedef vtkm::Pair MinMaxPairType; + + VTKM_EXEC_EXPORT + MinMaxPairType operator()(const MinMaxPairType &v1, const MinMaxPairType &v2) const + { + MinMaxPairType result; + for (vtkm::Id i = 0; i < NumberOfComponents; ++i) + { + result.first[i] = vtkm::Min(v1.first[i], v2.first[i]); + result.second[i] = vtkm::Max(v1.second[i], v2.second[i]); + } + return result; + } +}; + +enum +{ + MAX_NUMBER_OF_COMPONENTS = 10 +}; + +template +class SelectNumberOfComponents +{ +public: + static void Execute(vtkm::Id components, const vtkm::cont::DynamicArrayHandle &data, + ArrayHandle &bounds) + { + if (components == NumberOfComponents) + { + ComputeBoundsClass::template CallBody(data, bounds); + } + else + { + SelectNumberOfComponents::Execute( + components, data, bounds); + } + } +}; + +template +class SelectNumberOfComponents +{ +public: + static void Execute(vtkm::Id, const vtkm::cont::DynamicArrayHandle&, + ArrayHandle&) + { + throw vtkm::cont::ErrorControlInternal( + "Number of components in array greater than expected maximum."); + } +}; + + +template +class ComputeBounds +{ +private: + template + class Body + { + public: + Body(ArrayHandle *bounds) : Bounds(bounds) {} + + template + void operator()(const ArrayHandleType &data) const + { + typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; + typedef vtkm::Vec ResultType; + typedef vtkm::Pair MinMaxPairType; + + MinMaxPairType initialValue = make_Pair(ResultType(vtkm::Infinity64()), + ResultType(vtkm::NegativeInfinity64())); + + vtkm::cont::ArrayHandleTransform > input(data); + + MinMaxPairType result = Algorithm::Reduce(input, initialValue, + MinMax()); + + this->Bounds->Allocate(NumberOfComponents * 2); + for (vtkm::Id i = 0; i < NumberOfComponents; ++i) + { + this->Bounds->GetPortalControl().Set(i * 2, result.first[i]); + this->Bounds->GetPortalControl().Set(i * 2 + 1, result.second[i]); + } + } + + private: + ArrayHandle *Bounds; + }; + +public: + template + static void CallBody(const vtkm::cont::DynamicArrayHandle &data, + ArrayHandle &bounds) + { + Body cb(&bounds); + data.CastAndCall(cb, TypeList(), StorageList()); + } + + static void DoCompute(const DynamicArrayHandle &data, + ArrayHandle &bounds) + { + typedef ComputeBounds SelfType; + VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapterTag); + + vtkm::Id numberOfComponents = data.GetNumberOfComponents(); + switch(numberOfComponents) + { + case 1: + CallBody<1>(data, bounds); + break; + case 2: + CallBody<2>(data, bounds); + break; + case 3: + CallBody<3>(data, bounds); + break; + case 4: + CallBody<4>(data, bounds); + break; + default: + SelectNumberOfComponents<5, SelfType>::Execute(numberOfComponents, data, + bounds); + break; + } + } +}; + +} // namespace internal + + /// A \c Field encapsulates an array on some piece of the mesh, such as /// the points, a cell set, a node logical dimension, or the whole mesh. /// @@ -48,7 +213,7 @@ public: Field(std::string name, int order, Association association, vtkm::cont::DynamicArrayHandle &data) : Name(name), Order(order), AssocTag(association), AssocCellsetName(), - AssocLogicalDim(-1), Data(data) + AssocLogicalDim(-1), Data(data), Bounds(), ModifiedFlag(true) { VTKM_ASSERT_CONT(this->AssocTag == ASSOC_WHOLE_MESH || this->AssocTag == ASSOC_POINTS); @@ -58,7 +223,7 @@ public: VTKM_CONT_EXPORT Field(std::string name, int order, Association association, ArrayHandle &data) : Name(name), Order(order), AssocTag(association), AssocCellsetName(), - AssocLogicalDim(-1) + AssocLogicalDim(-1), Bounds(), ModifiedFlag(true) { VTKM_ASSERT_CONT(this->AssocTag == ASSOC_WHOLE_MESH || this->AssocTag == ASSOC_POINTS); @@ -70,7 +235,7 @@ public: Field(std::string name, int order, Association association, const std::vector &data) : Name(name), Order(order), AssocTag(association), AssocCellsetName(), - AssocLogicalDim(-1) + AssocLogicalDim(-1), Bounds(), ModifiedFlag(true) { VTKM_ASSERT_CONT(this->AssocTag == ASSOC_WHOLE_MESH || this->AssocTag == ASSOC_POINTS); @@ -82,7 +247,7 @@ public: Field(std::string name, int order, Association association, const T *data, vtkm::Id nvals) : Name(name), Order(order), AssocTag(association), AssocCellsetName(), - AssocLogicalDim(-1) + AssocLogicalDim(-1), Bounds(), ModifiedFlag(true) { VTKM_ASSERT_CONT(this->AssocTag == ASSOC_WHOLE_MESH || this->AssocTag == ASSOC_POINTS); @@ -93,7 +258,8 @@ public: VTKM_CONT_EXPORT Field(std::string name, int order, Association association, T) : Name(name), Order(order), AssocTag(association), AssocCellsetName(), - AssocLogicalDim(-1), Data(vtkm::cont::ArrayHandle()) + AssocLogicalDim(-1), Data(vtkm::cont::ArrayHandle()), Bounds(), + ModifiedFlag(true) { VTKM_ASSERT_CONT(this->AssocTag == ASSOC_WHOLE_MESH || this->AssocTag == ASSOC_POINTS); @@ -104,7 +270,7 @@ public: Field(std::string name, int order, Association association, const std::string& cellSetName, vtkm::cont::DynamicArrayHandle &data) : Name(name), Order(order), AssocTag(association), AssocCellsetName(cellSetName), - AssocLogicalDim(-1), Data(data) + AssocLogicalDim(-1), Data(data), Bounds(), ModifiedFlag(true) { VTKM_ASSERT_CONT(this->AssocTag == ASSOC_CELL_SET); } @@ -114,7 +280,7 @@ public: Field(std::string name, int order, Association association, const std::string& cellSetName, ArrayHandle &data) : Name(name), Order(order), AssocTag(association), AssocCellsetName(cellSetName), - AssocLogicalDim(-1) + AssocLogicalDim(-1), Bounds(), ModifiedFlag(true) { VTKM_ASSERT_CONT(this->AssocTag == ASSOC_CELL_SET); this->SetData(data); @@ -125,7 +291,7 @@ public: Field(std::string name, int order, Association association, const std::string& cellSetName, const std::vector &data) : Name(name), Order(order), AssocTag(association), AssocCellsetName(cellSetName), - AssocLogicalDim(-1) + AssocLogicalDim(-1), Bounds(), ModifiedFlag(true) { VTKM_ASSERT_CONT(this->AssocTag == ASSOC_CELL_SET); this->CopyData(&data[0], data.size()); @@ -136,7 +302,7 @@ public: Field(std::string name, int order, Association association, const std::string& cellSetName, const T *data, vtkm::Id nvals) : Name(name), Order(order), AssocTag(association), AssocCellsetName(cellSetName), - AssocLogicalDim(-1) + AssocLogicalDim(-1), Bounds(), ModifiedFlag(true) { VTKM_ASSERT_CONT(this->AssocTag == ASSOC_CELL_SET); this->CopyData(data, nvals); @@ -147,7 +313,8 @@ public: Field(std::string name, int order, Association association, const std::string& cellSetName, T) : Name(name), Order(order), AssocTag(association), AssocCellsetName(cellSetName), - AssocLogicalDim(-1), Data(vtkm::cont::ArrayHandle()) + AssocLogicalDim(-1), Data(vtkm::cont::ArrayHandle()), Bounds(), + ModifiedFlag(true) { VTKM_ASSERT_CONT(this->AssocTag == ASSOC_CELL_SET); } @@ -157,7 +324,7 @@ public: Field(std::string name, int order, Association association, int logicalDim, vtkm::cont::DynamicArrayHandle &data) : Name(name), Order(order), AssocTag(association), AssocCellsetName(), - AssocLogicalDim(logicalDim), Data(data) + AssocLogicalDim(logicalDim), Data(data), Bounds(), ModifiedFlag(true) { VTKM_ASSERT_CONT(this->AssocTag == ASSOC_LOGICAL_DIM); } @@ -167,7 +334,7 @@ public: Field(std::string name, int order, Association association, int logicalDim, ArrayHandle &data) : Name(name), Order(order), AssocTag(association), AssocCellsetName(), - AssocLogicalDim(logicalDim) + AssocLogicalDim(logicalDim), Bounds(), ModifiedFlag(true) { VTKM_ASSERT_CONT(this->AssocTag == ASSOC_LOGICAL_DIM); this->SetData(data); @@ -178,7 +345,7 @@ public: Field(std::string name, int order, Association association, int logicalDim, const std::vector &data) : Name(name), Order(order), AssocTag(association), AssocCellsetName(), - AssocLogicalDim(logicalDim) + AssocLogicalDim(logicalDim), Bounds(), ModifiedFlag(true) { VTKM_ASSERT_CONT(this->AssocTag == ASSOC_LOGICAL_DIM); this->CopyData(&data[0], data.size()); @@ -189,7 +356,7 @@ public: Field(std::string name, int order, Association association, int logicalDim, const T *data, vtkm::Id nvals) : Name(name), Order(order), AssocTag(association), AssocCellsetName(), - AssocLogicalDim(logicalDim) + AssocLogicalDim(logicalDim), Bounds(), ModifiedFlag(true) { VTKM_ASSERT_CONT(this->AssocTag == ASSOC_LOGICAL_DIM); this->CopyData(data, nvals); @@ -199,7 +366,8 @@ public: VTKM_CONT_EXPORT Field(std::string name, int order, Association association, int logicalDim, T) : Name(name), Order(order), AssocTag(association), AssocCellsetName(), - AssocLogicalDim(logicalDim), Data(vtkm::cont::ArrayHandle()) + AssocLogicalDim(logicalDim), Data(vtkm::cont::ArrayHandle()), Bounds(), + ModifiedFlag(true) { VTKM_ASSERT_CONT(this->AssocTag == ASSOC_LOGICAL_DIM); } @@ -240,9 +408,72 @@ public: return this->Data; } + template + VTKM_CONT_EXPORT + const vtkm::cont::ArrayHandle& GetBounds(DeviceAdapterTag, + TypeList, + StorageList) const + { + if (this->ModifiedFlag) + { + internal::ComputeBounds::DoCompute( + this->Data, this->Bounds); + this->ModifiedFlag = false; + } + + return this->Bounds; + } + + template + VTKM_CONT_EXPORT + void GetBounds(vtkm::Float64 *bounds, DeviceAdapterTag, TypeList, StorageList) const + { + this->GetBounds(DeviceAdapterTag(), TypeList(), StorageList()); + + vtkm::Id length = this->Bounds.GetNumberOfValues(); + for (vtkm::Id i = 0; i < length; ++i) + { + bounds[i] = this->Bounds.GetPortalConstControl().Get(i); + } + } + + template + VTKM_CONT_EXPORT + const vtkm::cont::ArrayHandle& GetBounds(DeviceAdapterTag, + TypeList) const + { + return this->GetBounds(DeviceAdapterTag(), TypeList(), + VTKM_DEFAULT_STORAGE_LIST_TAG()); + } + + template + VTKM_CONT_EXPORT + void GetBounds(vtkm::Float64 *bounds, DeviceAdapterTag, TypeList) const + { + this->GetBounds(bounds, DeviceAdapterTag(), TypeList(), + VTKM_DEFAULT_STORAGE_LIST_TAG()); + } + + template + VTKM_CONT_EXPORT + const vtkm::cont::ArrayHandle& GetBounds(DeviceAdapterTag) const + { + return this->GetBounds(DeviceAdapterTag(), VTKM_DEFAULT_TYPE_LIST_TAG(), + VTKM_DEFAULT_STORAGE_LIST_TAG()); + } + + template + VTKM_CONT_EXPORT + void GetBounds(vtkm::Float64 *bounds, DeviceAdapterTag) const + { + this->GetBounds(bounds, DeviceAdapterTag(), VTKM_DEFAULT_TYPE_LIST_TAG(), + VTKM_DEFAULT_STORAGE_LIST_TAG()); + } + VTKM_CONT_EXPORT vtkm::cont::DynamicArrayHandle &GetData() { + this->ModifiedFlag = true; return this->Data; } @@ -251,6 +482,7 @@ public: void SetData(vtkm::cont::ArrayHandle &newdata) { this->Data = newdata; + this->ModifiedFlag = true; } template @@ -268,6 +500,7 @@ public: //assign to the dynamic array handle this->Data = tmp; + this->ModifiedFlag = true; } VTKM_CONT_EXPORT @@ -298,6 +531,8 @@ private: int AssocLogicalDim; ///< only populate if assoc is logical dim vtkm::cont::DynamicArrayHandle Data; + mutable vtkm::cont::ArrayHandle Bounds; + mutable bool ModifiedFlag; }; diff --git a/vtkm/cont/cuda/testing/CMakeLists.txt b/vtkm/cont/cuda/testing/CMakeLists.txt index af93feee4..f2c16c107 100644 --- a/vtkm/cont/cuda/testing/CMakeLists.txt +++ b/vtkm/cont/cuda/testing/CMakeLists.txt @@ -19,6 +19,7 @@ ##============================================================================ set(unit_tests + UnitTestComputeBoundsCuda.cu UnitTestCudaArrayHandle.cu UnitTestCudaArrayHandleFancy.cu UnitTestCudaMath.cu diff --git a/vtkm/cont/cuda/testing/UnitTestComputeBoundsCuda.cu b/vtkm/cont/cuda/testing/UnitTestComputeBoundsCuda.cu new file mode 100644 index 000000000..187aa9f8c --- /dev/null +++ b/vtkm/cont/cuda/testing/UnitTestComputeBoundsCuda.cu @@ -0,0 +1,32 @@ +//============================================================================ +// 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 Sandia Corporation. +// Copyright 2014 UT-Battelle, LLC. +// Copyright 2014 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. +//============================================================================ +#define BOOST_SP_DISABLE_THREADS + +#include + +#include +#include + +int UnitTestComputeBoundsCuda(int, char *[]) +{ + int result = vtkm::cont::testing::TestingComputeBounds + ::Run(); + return vtkm::cont::cuda::internal::Testing::CheckCudaBeforeExit(result); +} diff --git a/vtkm/cont/tbb/testing/CMakeLists.txt b/vtkm/cont/tbb/testing/CMakeLists.txt index cd4e478ce..1fd8e4df5 100644 --- a/vtkm/cont/tbb/testing/CMakeLists.txt +++ b/vtkm/cont/tbb/testing/CMakeLists.txt @@ -19,6 +19,7 @@ ##============================================================================ set(unit_tests + UnitTestComputeBoundsTBB.cxx UnitTestDeviceAdapterTBB.cxx UnitTestTBBArrayHandle.cxx UnitTestTBBArrayHandleFancy.cxx diff --git a/vtkm/cont/tbb/testing/UnitTestComputeBoundsTBB.cxx b/vtkm/cont/tbb/testing/UnitTestComputeBoundsTBB.cxx new file mode 100644 index 000000000..44b10ea5b --- /dev/null +++ b/vtkm/cont/tbb/testing/UnitTestComputeBoundsTBB.cxx @@ -0,0 +1,29 @@ +//============================================================================ +// 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 Sandia Corporation. +// Copyright 2014 UT-Battelle, LLC. +// Copyright 2014 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. +//============================================================================ + +#include + +#include + +int UnitTestComputeBoundsTBB(int, char *[]) +{ + return vtkm::cont::testing::TestingComputeBounds + ::Run(); +} diff --git a/vtkm/cont/testing/CMakeLists.txt b/vtkm/cont/testing/CMakeLists.txt index 80d0e9ba0..91c59721a 100644 --- a/vtkm/cont/testing/CMakeLists.txt +++ b/vtkm/cont/testing/CMakeLists.txt @@ -22,6 +22,7 @@ set(headers MakeTestDataSet.h Testing.h TestingArrayHandles.h + TestingComputeBounds.h TestingDeviceAdapter.h TestingFancyArrayHandles.h ) @@ -39,6 +40,7 @@ set(unit_tests UnitTestArrayHandleUniformPointCoordinates.cxx UnitTestArrayPortalToIterators.cxx UnitTestContTesting.cxx + UnitTestComputeBoundsSerial.cxx UnitTestDataSetRegular.cxx UnitTestDataSetExplicit.cxx UnitTestDeviceAdapterAlgorithmDependency.cxx @@ -54,4 +56,3 @@ set(unit_tests ) vtkm_unit_tests(SOURCES ${unit_tests}) - diff --git a/vtkm/cont/testing/TestingComputeBounds.h b/vtkm/cont/testing/TestingComputeBounds.h new file mode 100644 index 000000000..fdba39480 --- /dev/null +++ b/vtkm/cont/testing/TestingComputeBounds.h @@ -0,0 +1,170 @@ +//============================================================================ +// 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 Sandia Corporation. +// Copyright 2014 UT-Battelle, LLC. +// Copyright 2014 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. +//============================================================================ +#ifndef vtk_m_cont_testing_TestingComputeBounds_h +#define vtk_m_cont_testing_TestingComputeBounds_h + +#include +#include +#include + +#include + +#include +#include + +namespace vtkm { +namespace cont { +namespace testing { + +struct CustomTypeList : vtkm::ListTagBase, + vtkm::Vec, + vtkm::Vec, + vtkm::Vec, + vtkm::Vec, + vtkm::Vec, + vtkm::Vec, + vtkm::Vec > +{}; + +template +class TestingComputeBounds +{ +private: + template + static void TestScalarField() + { + const vtkm::Id nvals = 11; + T data[nvals] = { 1, 2, 3, 4, 5, -5, -4, -3, -2, -1, 0 }; + std::random_shuffle(data, data + nvals); + vtkm::cont::Field field("TestField", 1, vtkm::cont::Field::ASSOC_POINTS, data, + nvals); + + vtkm::Float64 result[2]; + field.GetBounds(result, DeviceAdapterTag()); + + if (result[0] == -5.0 && result[1] == 5.0) + { + std::cout << "Success" << std::endl; + } + else + { + std::cout << "Expected: -5.0, 5.0; Got: " << result[0] << ", " << result[1] + << std::endl; + VTKM_TEST_FAIL("Failed"); + } + } + + template + static void TestVecField() + { + const vtkm::Id nvals = 11; + T data[nvals] = { 1, 2, 3, 4, 5, -5, -4, -3, -2, -1, 0 }; + vtkm::Vec fieldData[nvals]; + for (vtkm::Id i = 0; i < NumberOfComponents; ++i) + { + std::random_shuffle(data, data + nvals); + for (vtkm::Id j = 0; j < nvals; ++j) + { + fieldData[j][i] = data[j]; + } + } + vtkm::cont::Field field("TestField", 1, vtkm::cont::Field::ASSOC_POINTS, fieldData, + nvals); + + vtkm::Float64 result[NumberOfComponents * 2]; + field.GetBounds(result, DeviceAdapterTag(), CustomTypeList(), + VTKM_DEFAULT_STORAGE_LIST_TAG()); + + bool success = true; + for (vtkm::Id i = 0; i < NumberOfComponents; ++i) + { + if (result[i * 2] != -5.0 || result[i * 2 + 1] != 5.0) + { + success = false; + break; + } + } + + if (success) + { + std::cout << "Success" << std::endl; + } + else + { + std::cout << "Expected: -5.0s and 5.0s; Got: "; + for (vtkm::Id i = 0; i < NumberOfComponents; ++i) + { + std::cout << result[i * 2] << ","; + } + std::cout << " and "; + for (vtkm::Id i = 0; i < NumberOfComponents; ++i) + { + std::cout << result[i * 2 + 1] << ","; + } + std::cout << std::endl; + VTKM_TEST_FAIL("Failed"); + } + } + + struct TestAll + { + VTKM_CONT_EXPORT void operator()() const + { + std::cout << "Testing (Int32, 1)..." << std::endl; + TestingComputeBounds::TestScalarField(); + std::cout << "Testing (Int64, 1)..." << std::endl; + TestingComputeBounds::TestScalarField(); + std::cout << "Testing (Float32, 1)..." << std::endl; + TestingComputeBounds::TestScalarField(); + std::cout << "Testing (Float64, 1)..." << std::endl; + TestingComputeBounds::TestScalarField(); + + std::cout << "Testing (Int32, 3)..." << std::endl; + TestingComputeBounds::TestVecField(); + std::cout << "Testing (Int64, 3)..." << std::endl; + TestingComputeBounds::TestVecField(); + std::cout << "Testing (Float32, 3)..." << std::endl; + TestingComputeBounds::TestVecField(); + std::cout << "Testing (Float64, 3)..." << std::endl; + TestingComputeBounds::TestVecField(); + + std::cout << "Testing (Int32, 9)..." << std::endl; + TestingComputeBounds::TestVecField(); + std::cout << "Testing (Int64, 9)..." << std::endl; + TestingComputeBounds::TestVecField(); + std::cout << "Testing (Float32, 9)..." << std::endl; + TestingComputeBounds::TestVecField(); + std::cout << "Testing (Float64, 9)..." << std::endl; + TestingComputeBounds::TestVecField(); + } + }; + +public: + static VTKM_CONT_EXPORT int Run() + { + return vtkm::cont::testing::Testing::Run(TestAll()); + } +}; + +} +} +} // namespace vtkm::cont::testing + +#endif //vtk_m_cont_testing_TestingComputeBounds_h diff --git a/vtkm/cont/testing/UnitTestComputeBoundsSerial.cxx b/vtkm/cont/testing/UnitTestComputeBoundsSerial.cxx new file mode 100644 index 000000000..d4eb8e973 --- /dev/null +++ b/vtkm/cont/testing/UnitTestComputeBoundsSerial.cxx @@ -0,0 +1,29 @@ +//============================================================================ +// 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 Sandia Corporation. +// Copyright 2014 UT-Battelle, LLC. +// Copyright 2014 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. +//============================================================================ + +#include + +#include + +int UnitTestComputeBoundsSerial(int, char *[]) +{ + return vtkm::cont::testing::TestingComputeBounds + ::Run(); +}