diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index 1af619b59..d50554a38 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -28,6 +28,9 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION # disable doxygen warning about not generating graph ".*warning: Included by graph for" + # Doxygen warns when creating output directory: + "Notice: Output directory.*does not exist. I have created it for you." + # disable doxygen warnings from CONTRIBUTING.md, CodingConventions.md. # these files are really intended for Gitlab, hence we don't want to use # doxygen tags in them. diff --git a/vtkm/cont/cuda/internal/DeviceAdapterAtomicArrayImplementationCuda.h b/vtkm/cont/cuda/internal/DeviceAdapterAtomicArrayImplementationCuda.h index 289f21b10..db176d4d0 100644 --- a/vtkm/cont/cuda/internal/DeviceAdapterAtomicArrayImplementationCuda.h +++ b/vtkm/cont/cuda/internal/DeviceAdapterAtomicArrayImplementationCuda.h @@ -72,16 +72,19 @@ private: vtkm::cont::DeviceAdapterTagCuda>::Portal; PortalType Portal; + VTKM_SUPPRESS_EXEC_WARNINGS __device__ vtkm::Int64 vtkmAtomicAdd(vtkm::Int64* address, const vtkm::Int64& value) const { return atomicAdd((unsigned long long*)address, (unsigned long long)value); } + VTKM_SUPPRESS_EXEC_WARNINGS __device__ vtkm::Int32 vtkmAtomicAdd(vtkm::Int32* address, const vtkm::Int32& value) const { return atomicAdd(address, value); } + VTKM_SUPPRESS_EXEC_WARNINGS __device__ vtkm::Int32 vtkmCompareAndSwap(vtkm::Int32* address, const vtkm::Int32& newValue, const vtkm::Int32& oldValue) const @@ -89,6 +92,7 @@ private: return atomicCAS(address, oldValue, newValue); } + VTKM_SUPPRESS_EXEC_WARNINGS __device__ vtkm::Int64 vtkmCompareAndSwap(vtkm::Int64* address, const vtkm::Int64& newValue, const vtkm::Int64& oldValue) const diff --git a/vtkm/exec/CellMeasure.h b/vtkm/exec/CellMeasure.h index 357a279f2..1b4f1ac71 100644 --- a/vtkm/exec/CellMeasure.h +++ b/vtkm/exec/CellMeasure.h @@ -19,7 +19,9 @@ //============================================================================ #ifndef vtk_m_exec_CellMeasure_h #define vtk_m_exec_CellMeasure_h -/*!\file Functions that provide integral measures over cells. */ +/*!\file + * Functions that provide integral measures over cells. +*/ #include "vtkm/CellShape.h" #include "vtkm/CellTraits.h" diff --git a/vtkm/filter/CMakeLists.txt b/vtkm/filter/CMakeLists.txt index 273206ffa..69c5e38c8 100644 --- a/vtkm/filter/CMakeLists.txt +++ b/vtkm/filter/CMakeLists.txt @@ -25,6 +25,7 @@ set(headers ClipWithField.h ClipWithImplicitFunction.h ContourTreeUniform.h + CoordinateSystemTransform.h CrossProduct.h DotProduct.h Entropy.h @@ -71,6 +72,7 @@ set(header_template_sources ClipWithField.hxx ClipWithImplicitFunction.hxx ContourTreeUniform.hxx + CoordinateSystemTransform.hxx CrossProduct.hxx DotProduct.hxx Entropy.hxx diff --git a/vtkm/filter/CoordinateSystemTransform.h b/vtkm/filter/CoordinateSystemTransform.h new file mode 100644 index 000000000..845407b10 --- /dev/null +++ b/vtkm/filter/CoordinateSystemTransform.h @@ -0,0 +1,95 @@ +//============================================================================ +// 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. +//============================================================================ + +#ifndef vtk_m_filter_CoordianteSystemTransform_h +#define vtk_m_filter_CoordianteSystemTransform_h + +#include +#include + +namespace vtkm +{ +namespace filter +{ +/// \brief +/// +/// Generate a coordinate transformation on coordiantes from a dataset. +class CylindricalCoordinateTransform + : public vtkm::filter::FilterField +{ +public: + VTKM_CONT + CylindricalCoordinateTransform(); + + VTKM_CONT void SetCartesianToCylindrical() { Worklet.SetCartesianToCylindrical(); } + VTKM_CONT void SetCylindricalToCartesian() { Worklet.SetCylindricalToCartesian(); } + + template + VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input, + const vtkm::cont::ArrayHandle& field, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag); + +private: + vtkm::worklet::CylindricalCoordinateTransform Worklet; +}; + +template <> +class FilterTraits +{ +public: + //Point Elevation can only convert Float and Double Vec3 arrays + using InputFieldTypeList = vtkm::TypeListTagFieldVec3; +}; + +class SphericalCoordinateTransform : public vtkm::filter::FilterField +{ +public: + VTKM_CONT + SphericalCoordinateTransform(); + + VTKM_CONT void SetCartesianToSpherical() { Worklet.SetCartesianToSpherical(); } + VTKM_CONT void SetSphericalToCartesian() { Worklet.SetSphericalToCartesian(); } + + template + VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input, + const vtkm::cont::ArrayHandle& field, + const vtkm::filter::FieldMetadata& fieldMeta, + const vtkm::filter::PolicyBase& policy, + const DeviceAdapter& tag) const; + +private: + vtkm::worklet::SphericalCoordinateTransform Worklet; +}; + +template <> +class FilterTraits +{ +public: + //Point Elevation can only convert Float and Double Vec3 arrays + using InputFieldTypeList = vtkm::TypeListTagFieldVec3; +}; +} +} // namespace vtkm::filter + +#include + +#endif // vtk_m_filter_CoordianteSystemTransform_h diff --git a/vtkm/filter/CoordinateSystemTransform.hxx b/vtkm/filter/CoordinateSystemTransform.hxx new file mode 100644 index 000000000..75d1733e9 --- /dev/null +++ b/vtkm/filter/CoordinateSystemTransform.hxx @@ -0,0 +1,79 @@ +//============================================================================ +// 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 +#include + +namespace vtkm +{ +namespace filter +{ + +//----------------------------------------------------------------------------- +inline VTKM_CONT CylindricalCoordinateTransform::CylindricalCoordinateTransform() + : Worklet() +{ + this->SetOutputFieldName("cylindricalCoordinateSystemTransform"); +} + +//----------------------------------------------------------------------------- +template +inline VTKM_CONT vtkm::cont::DataSet CylindricalCoordinateTransform::DoExecute( + const vtkm::cont::DataSet& inDataSet, + const vtkm::cont::ArrayHandle& field, + const vtkm::filter::FieldMetadata& fieldMetadata, + const vtkm::filter::PolicyBase&, + const DeviceAdapter& device) +{ + vtkm::cont::ArrayHandle outArray; + Worklet.Run(field, outArray, device); + return internal::CreateResult(inDataSet, + outArray, + this->GetOutputFieldName(), + fieldMetadata.GetAssociation(), + fieldMetadata.GetCellSetName()); +} + +//----------------------------------------------------------------------------- +inline VTKM_CONT SphericalCoordinateTransform::SphericalCoordinateTransform() + : Worklet() +{ + this->SetOutputFieldName("sphericalCoordinateSystemTransform"); +} + +//----------------------------------------------------------------------------- +template +inline VTKM_CONT vtkm::cont::DataSet SphericalCoordinateTransform::DoExecute( + const vtkm::cont::DataSet& inDataSet, + const vtkm::cont::ArrayHandle& field, + const vtkm::filter::FieldMetadata& fieldMetadata, + const vtkm::filter::PolicyBase&, + const DeviceAdapter& device) const +{ + vtkm::cont::ArrayHandle outArray; + Worklet.Run(field, outArray, device); + return internal::CreateResult(inDataSet, + outArray, + this->GetOutputFieldName(), + fieldMetadata.GetAssociation(), + fieldMetadata.GetCellSetName()); +} +} +} // namespace vtkm::filter diff --git a/vtkm/filter/NDEntropy.h b/vtkm/filter/NDEntropy.h index 2af7b4c9a..d7a8f5b31 100644 --- a/vtkm/filter/NDEntropy.h +++ b/vtkm/filter/NDEntropy.h @@ -26,19 +26,9 @@ namespace vtkm { namespace filter { -/// \brief Clean a mesh to an unstructured grid +/// \brief Calculate the entropy of input N-Dims fields /// -/// This filter takes a data set and essentially copies it into a new data set. -/// The newly constructed data set will have the same cells as the input and -/// the topology will be stored in a \c CellSetExplicit<>. The filter will also -/// optionally remove all unused points. -/// -/// Note that the result of \c CleanGrid is not necessarily smaller than the -/// input. For example, "cleaning" a data set with a \c CellSetStructured -/// topology will actually result in a much larger data set. -/// -/// \todo Add a feature to merge points that are coincident or within a -/// tolerance. +/// This filter calculate the entropy of input N-Dims fields. /// class NDEntropy : public vtkm::filter::FilterDataSet { diff --git a/vtkm/filter/NDHistogram.h b/vtkm/filter/NDHistogram.h index 6e5b43dac..3a328a0bd 100644 --- a/vtkm/filter/NDHistogram.h +++ b/vtkm/filter/NDHistogram.h @@ -26,19 +26,17 @@ namespace vtkm { namespace filter { -/// \brief Clean a mesh to an unstructured grid +/// \brief Generate a N-Dims histogram from input fields /// -/// This filter takes a data set and essentially copies it into a new data set. -/// The newly constructed data set will have the same cells as the input and -/// the topology will be stored in a \c CellSetExplicit<>. The filter will also -/// optionally remove all unused points. -/// -/// Note that the result of \c CleanGrid is not necessarily smaller than the -/// input. For example, "cleaning" a data set with a \c CellSetStructured -/// topology will actually result in a much larger data set. -/// -/// \todo Add a feature to merge points that are coincident or within a -/// tolerance. +/// This filter takes a data set and with target fields and bins defined, +/// it would generate a N-Dims histogram from input fields. The result is stored +/// in a field named as "Frequency". This filed contains all the frequencies of +/// the N-Dims histogram in sparse representation. That being said, the result +/// field does not store 0 frequency bins. Meanwhile all input fileds now +/// would have the same length and store bin ids instead. +/// E.g. (FieldA[i], FieldB[i], FieldC[i], Frequency[i]) is a bin in the histogram. +/// The first three numbers are binIDs for FieldA, FieldB and FieldC. Frequency[i] stores +/// the frequency for this bin (FieldA[i], FieldB[i], FieldC[i]). /// class NDHistogram : public vtkm::filter::FilterDataSet { diff --git a/vtkm/filter/testing/CMakeLists.txt b/vtkm/filter/testing/CMakeLists.txt index 4f51edd01..6b448b9c9 100644 --- a/vtkm/filter/testing/CMakeLists.txt +++ b/vtkm/filter/testing/CMakeLists.txt @@ -25,6 +25,7 @@ set(unit_tests UnitTestClipWithFieldFilter.cxx UnitTestClipWithImplicitFunctionFilter.cxx UnitTestContourTreeUniformFilter.cxx + UnitTestCoordinateSystemTransform.cxx UnitTestCrossProductFilter.cxx UnitTestDotProductFilter.cxx UnitTestEntropyFilter.cxx diff --git a/vtkm/filter/testing/UnitTestCoordinateSystemTransform.cxx b/vtkm/filter/testing/UnitTestCoordinateSystemTransform.cxx new file mode 100644 index 000000000..dae8b385a --- /dev/null +++ b/vtkm/filter/testing/UnitTestCoordinateSystemTransform.cxx @@ -0,0 +1,204 @@ +//============================================================================ +// 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 +#include + +#include +#include + +namespace +{ + +enum CoordinateType +{ + CART = 0, + CYL, + SPH +}; + +vtkm::cont::DataSet MakeTestDataSet(const CoordinateType& cType) +{ + vtkm::cont::DataSet dataSet; + + std::vector> coordinates; + const vtkm::Id dim = 5; + if (cType == CART) + { + for (vtkm::Id j = 0; j < dim; ++j) + { + vtkm::FloatDefault z = + static_cast(j) / static_cast(dim - 1); + for (vtkm::Id i = 0; i < dim; ++i) + { + vtkm::FloatDefault x = + static_cast(i) / static_cast(dim - 1); + vtkm::FloatDefault y = (x * x + z * z) / 2.0f; + coordinates.push_back(vtkm::make_Vec(x + 0, y + 0, z + 0)); + } + } + } + else if (cType == CYL) + { + vtkm::FloatDefault R = 1.0f; + for (vtkm::Id j = 0; j < dim; j++) + { + vtkm::FloatDefault Z = + static_cast(j) / static_cast(dim - 1); + for (vtkm::Id i = 0; i < dim; i++) + { + vtkm::FloatDefault Theta = vtkm::TwoPif() * + (static_cast(i) / static_cast(dim - 1)); + coordinates.push_back(vtkm::make_Vec(R, Theta, Z)); + } + } + } + else if (cType == SPH) + { + //Spherical coordinates have some degenerate cases, so provide some good cases. + vtkm::FloatDefault R = 1.0f; + vtkm::FloatDefault eps = vtkm::Epsilon(); + std::vector Thetas = { + eps, vtkm::Pif() / 4, vtkm::Pif() / 3, vtkm::Pif() / 2, vtkm::Pif() - eps + }; + std::vector Phis = { + eps, vtkm::TwoPif() / 4, vtkm::TwoPif() / 3, vtkm::TwoPif() / 2, vtkm::TwoPif() - eps + }; + for (std::size_t i = 0; i < Thetas.size(); i++) + for (std::size_t j = 0; j < Phis.size(); j++) + coordinates.push_back(vtkm::make_Vec(R, Thetas[i], Phis[j])); + } + + vtkm::Id numCells = (dim - 1) * (dim - 1); + dataSet.AddCoordinateSystem( + vtkm::cont::make_CoordinateSystem("coordinates", coordinates, vtkm::CopyFlag::On)); + + vtkm::cont::CellSetExplicit<> cellSet("cells"); + cellSet.PrepareToAddCells(numCells, numCells * 4); + for (vtkm::Id j = 0; j < dim - 1; ++j) + { + for (vtkm::Id i = 0; i < dim - 1; ++i) + { + cellSet.AddCell(vtkm::CELL_SHAPE_QUAD, + 4, + vtkm::make_Vec( + j * dim + i, j * dim + i + 1, (j + 1) * dim + i + 1, (j + 1) * dim + i)); + } + } + cellSet.CompleteAddingCells(vtkm::Id(coordinates.size())); + + dataSet.AddCellSet(cellSet); + return dataSet; +} + +void ValidateCoordTransform(const vtkm::cont::DataSet& ds, + const vtkm::cont::DataSet& dsTrn, + const std::vector& isAngle) +{ + auto points = ds.GetCoordinateSystem().GetData(); + auto pointsTrn = dsTrn.GetCoordinateSystem().GetData(); + VTKM_TEST_ASSERT(points.GetNumberOfValues() == pointsTrn.GetNumberOfValues(), + "Incorrect number of points in point transform"); + + auto pointsPortal = points.GetPortalConstControl(); + auto pointsTrnPortal = pointsTrn.GetPortalConstControl(); + + for (vtkm::Id i = 0; i < points.GetNumberOfValues(); i++) + { + vtkm::Vec p = pointsPortal.Get(i); + vtkm::Vec r = pointsTrnPortal.Get(i); + bool isEqual = true; + for (vtkm::IdComponent j = 0; j < 3; j++) + { + if (isAngle[static_cast(j)]) + isEqual &= (test_equal(p[j], r[j]) || test_equal(p[j] + vtkm::TwoPif(), r[j]) || + test_equal(p[j], r[j] + vtkm::TwoPif())); + else + isEqual &= test_equal(p[j], r[j]); + } + VTKM_TEST_ASSERT(isEqual, "Wrong result for PointTransform worklet"); + } +} +} + +void TestCoordinateSystemTransform() +{ + std::cout << "Testing CylindricalCoordinateTransform Filter" << std::endl; + + //Test cartesian to cyl + vtkm::cont::DataSet dsCart = MakeTestDataSet(CART); + vtkm::filter::CylindricalCoordinateTransform cylTrn; + + cylTrn.SetOutputFieldName("cylindricalCoords"); + cylTrn.SetUseCoordinateSystemAsField(true); + cylTrn.SetCartesianToCylindrical(); + vtkm::cont::DataSet carToCylDataSet = cylTrn.Execute(dsCart); + + cylTrn.SetCylindricalToCartesian(); + cylTrn.SetUseCoordinateSystemAsField(true); + cylTrn.SetOutputFieldName("cartesianCoords"); + vtkm::cont::DataSet cylToCarDataSet = cylTrn.Execute(carToCylDataSet); + ValidateCoordTransform(dsCart, cylToCarDataSet, { false, false, false }); + + //Test cyl to cart. + vtkm::cont::DataSet dsCyl = MakeTestDataSet(CYL); + cylTrn.SetCylindricalToCartesian(); + cylTrn.SetUseCoordinateSystemAsField(true); + cylTrn.SetOutputFieldName("cartesianCoords"); + cylToCarDataSet = cylTrn.Execute(dsCyl); + + cylTrn.SetCartesianToCylindrical(); + cylTrn.SetUseCoordinateSystemAsField(true); + cylTrn.SetOutputFieldName("cylindricalCoords"); + carToCylDataSet = cylTrn.Execute(cylToCarDataSet); + ValidateCoordTransform(dsCyl, carToCylDataSet, { false, true, false }); + + std::cout << "Testing SphericalCoordinateTransform Filter" << std::endl; + + vtkm::filter::SphericalCoordinateTransform sphTrn; + sphTrn.SetOutputFieldName("sphericalCoords"); + sphTrn.SetUseCoordinateSystemAsField(true); + sphTrn.SetCartesianToSpherical(); + vtkm::cont::DataSet carToSphDataSet = sphTrn.Execute(dsCart); + + sphTrn.SetOutputFieldName("cartesianCoords"); + sphTrn.SetUseCoordinateSystemAsField(true); + sphTrn.SetSphericalToCartesian(); + vtkm::cont::DataSet sphToCarDataSet = sphTrn.Execute(carToSphDataSet); + ValidateCoordTransform(dsCart, sphToCarDataSet, { false, true, true }); + + vtkm::cont::DataSet dsSph = MakeTestDataSet(SPH); + sphTrn.SetSphericalToCartesian(); + sphTrn.SetUseCoordinateSystemAsField(true); + sphTrn.SetOutputFieldName("sphericalCoords"); + sphToCarDataSet = sphTrn.Execute(dsSph); + + sphTrn.SetCartesianToSpherical(); + sphTrn.SetUseCoordinateSystemAsField(true); + sphTrn.SetOutputFieldName("sphericalCoords"); + carToSphDataSet = cylTrn.Execute(sphToCarDataSet); + ValidateCoordTransform(dsSph, carToSphDataSet, { false, true, true }); +} + + +int UnitTestCoordinateSystemTransform(int, char* []) +{ + return vtkm::cont::testing::Testing::Run(TestCoordinateSystemTransform); +} diff --git a/vtkm/filter/testing/UnitTestNDHistogramFilter.cxx b/vtkm/filter/testing/UnitTestNDHistogramFilter.cxx index 8f7836fa5..dd98dba1c 100644 --- a/vtkm/filter/testing/UnitTestNDHistogramFilter.cxx +++ b/vtkm/filter/testing/UnitTestNDHistogramFilter.cxx @@ -80,7 +80,7 @@ void RunTest() //The first "fieldNames.size()"" fields are the binId arrays for inputs field //And their order and field names are the same as the order and name in fieldNames //The name of last fields in the dataset is "Frequency" - //This field contains the all freqncys of the N-Dims histogram + //This field contains all the frequencies of the N-Dims histogram //The result histogram is stored in sparse representation //(Do not store and return zero frequency bins) //All fields in return dataset must have the same length diff --git a/vtkm/internal/ExportMacros.h b/vtkm/internal/ExportMacros.h index 45244a440..1827c6139 100644 --- a/vtkm/internal/ExportMacros.h +++ b/vtkm/internal/ExportMacros.h @@ -61,7 +61,9 @@ // by the visibility of both T and S. // // Solution: -// The solution is fairly simple, but annoying. You need to mark +// The solution is fairly simple, but annoying. You need to mark every single +// header only class that is tempgit lated on non value types to be marked as +// always exported ( or never pass fvisibility=hidden ). // // TL;DR: // This markup is used when we want to make sure: diff --git a/vtkm/worklet/CoordinateSystemTransform.h b/vtkm/worklet/CoordinateSystemTransform.h index b6d0714ff..8cc8ff488 100644 --- a/vtkm/worklet/CoordinateSystemTransform.h +++ b/vtkm/worklet/CoordinateSystemTransform.h @@ -123,7 +123,6 @@ struct CarToSphere : public vtkm::worklet::WorkletMapField }; }; -template class CylindricalCoordinateTransform { public: @@ -136,9 +135,9 @@ public: VTKM_CONT void SetCartesianToCylindrical() { cartesianToCylindrical = true; } VTKM_CONT void SetCylindricalToCartesian() { cartesianToCylindrical = false; } - template - void Run(const vtkm::cont::ArrayHandle, CoordsStorageType>& inPoints, - vtkm::cont::ArrayHandle, CoordsStorageType>& outPoints, + template + void Run(const vtkm::cont::ArrayHandle, InStorageType>& inPoints, + vtkm::cont::ArrayHandle, OutStorageType>& outPoints, DeviceAdapterTag) const { if (cartesianToCylindrical) @@ -153,7 +152,7 @@ public: } } - template + template void Run(const vtkm::cont::CoordinateSystem& inPoints, vtkm::cont::ArrayHandle, CoordsStorageType>& outPoints, DeviceAdapterTag) const @@ -174,7 +173,6 @@ private: bool cartesianToCylindrical; }; -template class SphericalCoordinateTransform { public: @@ -187,9 +185,9 @@ public: VTKM_CONT void SetCartesianToSpherical() { CartesianToSpherical = true; } VTKM_CONT void SetSphericalToCartesian() { CartesianToSpherical = false; } - template - void Run(const vtkm::cont::ArrayHandle, CoordsStorageType>& inPoints, - vtkm::cont::ArrayHandle, CoordsStorageType>& outPoints, + template + void Run(const vtkm::cont::ArrayHandle, InStorageType>& inPoints, + vtkm::cont::ArrayHandle, OutStorageType>& outPoints, DeviceAdapterTag) const { if (CartesianToSpherical) @@ -204,7 +202,7 @@ public: } } - template + template void Run(const vtkm::cont::CoordinateSystem& inPoints, vtkm::cont::ArrayHandle, CoordsStorageType>& outPoints, DeviceAdapterTag) const diff --git a/vtkm/worklet/testing/UnitTestCoordinateSystemTransform.cxx b/vtkm/worklet/testing/UnitTestCoordinateSystemTransform.cxx index 0c5b18c63..134895434 100644 --- a/vtkm/worklet/testing/UnitTestCoordinateSystemTransform.cxx +++ b/vtkm/worklet/testing/UnitTestCoordinateSystemTransform.cxx @@ -153,7 +153,7 @@ void TestCoordinateSystemTransform() //Test cartesian to cyl vtkm::cont::DataSet dsCart = MakeTestDataSet(CART); - vtkm::worklet::CylindricalCoordinateTransform cylTrn; + vtkm::worklet::CylindricalCoordinateTransform cylTrn; vtkm::cont::ArrayHandle> carToCylPts; vtkm::cont::ArrayHandle> revResult; @@ -179,7 +179,7 @@ void TestCoordinateSystemTransform() //Spherical transform //Test cartesian to sph - vtkm::worklet::SphericalCoordinateTransform sphTrn; + vtkm::worklet::SphericalCoordinateTransform sphTrn; vtkm::cont::ArrayHandle> carToSphPts; sphTrn.SetCartesianToSpherical(); diff --git a/vtkm/worklet/testing/UnitTestNDimsHistogram.cxx b/vtkm/worklet/testing/UnitTestNDimsHistogram.cxx index e3c0dcf3b..ca4128195 100644 --- a/vtkm/worklet/testing/UnitTestNDimsHistogram.cxx +++ b/vtkm/worklet/testing/UnitTestNDimsHistogram.cxx @@ -106,7 +106,7 @@ void TestNDimsHistogram() // (we do not keep the 0 frequency entities) // e.g. we have three variable(data arrays) in this example // binIds[0, 1, 2][j] is a combination of bin ID of three variable, - // freqs[j] is the freqncy of this bin IDs combination + // freqs[j] is the frequency of this bin IDs combination std::vector> binIds; vtkm::cont::ArrayHandle freqs; ndHistogram.Run(binIds, freqs, VTKM_DEFAULT_DEVICE_ADAPTER_TAG());